]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
mac80211: tell driver about IBSS merge
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 29 Apr 2010 19:34:01 +0000 (21:34 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 30 Apr 2010 18:59:15 +0000 (14:59 -0400)
My previous patch "mac80211: notify driver about
IBSS status" left a problem -- when we merge with
a new BSSID, we never tell the driver that we left
the old one. Fix that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ibss.c

index a87e309e3b9906ee6554111819020fadf2c891d7..c585fced8584eecf83b78c766760b9298005ba40 100644 (file)
@@ -91,6 +91,12 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
        if (memcmp(ifibss->bssid, bssid, ETH_ALEN))
                sta_info_flush(sdata->local, sdata);
 
+       /* if merging, indicate to driver that we leave the old IBSS */
+       if (sdata->vif.bss_conf.ibss_joined) {
+               sdata->vif.bss_conf.ibss_joined = false;
+               ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IBSS);
+       }
+
        memcpy(ifibss->bssid, bssid, ETH_ALEN);
 
        sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0;