Search Linux Wireless

[PATCH] wl12xx: don't join upon disassociation

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

 



wl12xx "rejoins" upon every BSS_CHANGED_BSSID notification.
However, there is no need to rejoin after disassociation, so just
filter out the case when the new bssid is 00:00:00:00:00:00.

Signed-off-by: Eliad Peller <eliad@xxxxxxxxxx>
---
 drivers/net/wireless/wl12xx/main.c |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 062247e..7aa783c 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1944,19 +1944,23 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
 	    memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) {
 			memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN);
 
-			ret = wl1271_cmd_build_null_data(wl);
-			if (ret < 0)
-				goto out_sleep;
+			if (!is_zero_ether_addr(wl->bssid)) {
+				ret = wl1271_cmd_build_null_data(wl);
+				if (ret < 0)
+					goto out_sleep;
 
-			ret = wl1271_build_qos_null_data(wl);
-			if (ret < 0)
-				goto out_sleep;
+				ret = wl1271_build_qos_null_data(wl);
+				if (ret < 0)
+					goto out_sleep;
 
-			/* filter out all packets not from this BSSID */
-			wl1271_configure_filters(wl, 0);
+				/* filter out all packets not from this BSSID */
+				wl1271_configure_filters(wl, 0);
 
-			/* Need to update the BSSID (for filtering etc) */
-			do_join = true;
+				/*
+				 * Need to update the BSSID (for filtering etc)
+				 */
+				do_join = true;
+			}
 	}
 
 	if (changed & BSS_CHANGED_ASSOC) {
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux