Search Linux Wireless

[PATCH 14/31] wifi: mwifiex: iterate over privs in mwifiex_process_assoc_resp()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mwifiex_process_assoc_resp() only checks the first bss in station
mode for having an assoc response. This breaks when there are multiple
bss in station mode, in that case we have to check all of them for
having an assoc response. Do this by iterating over the available
bss.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/net/wireless/marvell/mwifiex/cmdevt.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
index d91351384c6bb..c515887cc0623 100644
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
@@ -921,10 +921,15 @@ void mwifiex_process_assoc_resp(struct mwifiex_adapter *adapter)
 	struct cfg80211_rx_assoc_resp_data assoc_resp = {
 		.uapsd_queues = -1,
 	};
-	struct mwifiex_private *priv =
-		mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA);
+	struct mwifiex_private *priv;
+	int i;
+
+	for (i = 0; i < adapter->priv_num; i++) {
+		priv = adapter->priv[i];
+
+		if (!priv->assoc_rsp_size)
+			continue;
 
-	if (priv->assoc_rsp_size) {
 		assoc_resp.links[0].bss = priv->req_bss;
 		assoc_resp.buf = priv->assoc_rsp_buf;
 		assoc_resp.len = priv->assoc_rsp_size;

-- 
2.39.2





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux