Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98cf9959 authored by Rafael Beims's avatar Rafael Beims Committed by Greg Kroah-Hartman
Browse files

wifi: mwifiex: Fix interface type change



commit a17b9f590f6ec2b9f1b12b1db3bf1d181de6b272 upstream.

When changing the interface type we also need to update the bss_num, the
driver private data is searched based on a unique (bss_type, bss_num)
tuple, therefore every time bss_type changes, bss_num must also change.

This fixes for example an issue in which, after the mode changed, a
wireless scan on the changed interface would not finish, leading to
repeated -EBUSY messages to userspace when other scan requests were
sent.

Fixes: c606008b7062 ("mwifiex: Properly initialize private structure on interface type changes")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarRafael Beims <rafael.beims@toradex.com>
Signed-off-by: default avatarFrancesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240510110458.15475-1-francesco@dolcini.it


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d81d7e34
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -934,6 +934,8 @@ mwifiex_init_new_priv_params(struct mwifiex_private *priv,
		return -EOPNOTSUPP;
	}

	priv->bss_num = mwifiex_get_unused_bss_num(adapter, priv->bss_type);

	spin_lock_irqsave(&adapter->main_proc_lock, flags);
	adapter->main_locked = false;
	spin_unlock_irqrestore(&adapter->main_proc_lock, flags);