]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
brcmsmac: react on changing SSID
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 24 Mar 2013 00:45:59 +0000 (01:45 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 27 Mar 2013 17:37:36 +0000 (13:37 -0400)
To send the correct probe response the hardware needs to know the SSID
when it changed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
drivers/net/wireless/brcm80211/brcmsmac/main.c
drivers/net/wireless/brcm80211/brcmsmac/pub.h

index e113fb6f3241170b4c49cebd949f451efb53a325..5688df5907b8834e0ed4efa6a4b25bfefb98d57b 100644 (file)
@@ -521,6 +521,12 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
                brcms_c_set_addrmatch(wl->wlc, RCM_BSSID_OFFSET, info->bssid);
                spin_unlock_bh(&wl->lock);
        }
+       if (changed & BSS_CHANGED_SSID) {
+               /* BSSID changed, for whatever reason (IBSS and managed mode) */
+               spin_lock_bh(&wl->lock);
+               brcms_c_set_ssid(wl->wlc, info->ssid, info->ssid_len);
+               spin_unlock_bh(&wl->lock);
+       }
        if (changed & BSS_CHANGED_BEACON) {
                /* Beacon data changed, retrieve new beacon (beaconing modes) */
                struct sk_buff *beacon;
index 60dc2c4bb2f469f53a56d850dae844f44576c84e..cf11d89494997c2e241a14ac2fec75047d6a0577 100644 (file)
@@ -3783,6 +3783,15 @@ static void brcms_c_set_bssid(struct brcms_bss_cfg *bsscfg)
        brcms_c_set_addrmatch(bsscfg->wlc, RCM_BSSID_OFFSET, bsscfg->BSSID);
 }
 
+void brcms_c_set_ssid(struct brcms_c_info *wlc, u8 *ssid, size_t ssid_len)
+{
+       u8 len = min_t(u8, sizeof(wlc->bsscfg->SSID), ssid_len);
+       memset(wlc->bsscfg->SSID, 0, sizeof(wlc->bsscfg->SSID));
+
+       memcpy(wlc->bsscfg->SSID, ssid, len);
+       wlc->bsscfg->SSID_len = len;
+}
+
 static void brcms_b_set_shortslot(struct brcms_hardware *wlc_hw, bool shortslot)
 {
        wlc_hw->shortslot = shortslot;
index 8a3071f8f511be18f88040d77c2858b573f0110d..6ed0a20be013a5c2005f84fad73a08577bacb7bc 100644 (file)
@@ -336,5 +336,7 @@ extern void brcms_c_update_beacon(struct brcms_c_info *wlc);
 extern void brcms_c_set_new_beacon(struct brcms_c_info *wlc,
                                   struct sk_buff *beacon, u16 tim_offset,
                                   u16 dtim_period);
+extern void brcms_c_set_ssid(struct brcms_c_info *wlc, u8 *ssid,
+                            size_t ssid_len);
 
 #endif                         /* _BRCM_PUB_H_ */