]> Pileus Git - ~andy/linux/blobdiff - net/mac80211/mlme.c
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
[~andy/linux] / net / mac80211 / mlme.c
index 91d84cc77bbf7f9a3bda9b7ca1d04677b0672e7f..66e4fcdd1c6b4a6a07a7d26f3a66bc7e43183807 100644 (file)
@@ -1352,6 +1352,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
        if (WARN_ON(!ifmgd->associated))
                return;
 
+       ieee80211_stop_poll(sdata);
+
        memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN);
 
        ifmgd->associated = NULL;
@@ -2612,8 +2614,6 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
        struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
        u8 frame_buf[DEAUTH_DISASSOC_LEN];
 
-       ieee80211_stop_poll(sdata);
-
        ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason,
                               false, frame_buf);
        mutex_unlock(&ifmgd->mtx);