mwl8k: don't overwrite mwl8k_vif::bssid until after disassociation
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 30 Nov 2009 17:13:56 +0000 (18:13 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Dec 2009 21:51:22 +0000 (16:51 -0500)
When disassociating, mac80211 zeroes vif->bss_info.bssid before
calling our ->bss_info_changed(), but we need the BSSID to remove the
hardware station database entry for our AP, so we can't clear our
local copy of the BSSID until after we've done that.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c

index 2e9da9aa38e7e7d6a969e7246c028235ee7b9ea9..ea1173fd598cf54864d6f2f9e91edcbd9caa0b32 100644 (file)
@@ -3025,9 +3025,6 @@ static void mwl8k_bss_info_changed(struct ieee80211_hw *hw,
        struct mwl8k_vif *mwl8k_vif = MWL8K_VIF(vif);
        int rc;
 
-       if (changed & BSS_CHANGED_BSSID)
-               memcpy(mwl8k_vif->bssid, info->bssid, ETH_ALEN);
-
        if ((changed & BSS_CHANGED_ASSOC) == 0)
                return;
 
@@ -3041,6 +3038,8 @@ static void mwl8k_bss_info_changed(struct ieee80211_hw *hw,
                memcpy(&mwl8k_vif->bss_info, info,
                        sizeof(struct ieee80211_bss_conf));
 
+               memcpy(mwl8k_vif->bssid, info->bssid, ETH_ALEN);
+
                /* Install rates */
                rc = mwl8k_update_rateset(hw, vif);
                if (rc)