]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Skip set_mode event subscription during deinit
authorJouni Malinen <j@w1.fi>
Fri, 6 Apr 2012 15:58:44 +0000 (18:58 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 6 Apr 2012 15:58:44 +0000 (18:58 +0300)
There is no need to subscribe to event messages during deinit process,
so skip this to avoid unnecessary operations and to keep the debug logs
a bit cleaner.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/drivers/driver_nl80211.c

index f369c956b5d6507d21478f17dbebb04a3297c8a0..1ceca542b0152cea1552fdd4f428c21bb024ad97 100644 (file)
@@ -189,6 +189,7 @@ struct i802_bss {
        unsigned int beacon_set:1;
        unsigned int added_if_into_bridge:1;
        unsigned int added_bridge:1;
+       unsigned int in_deinit:1;
 
        u8 addr[ETH_ALEN];
 
@@ -3331,6 +3332,7 @@ static void wpa_driver_nl80211_deinit(void *priv)
        struct i802_bss *bss = priv;
        struct wpa_driver_nl80211_data *drv = bss->drv;
 
+       bss->in_deinit = 1;
        if (drv->data_tx_status)
                eloop_unregister_read_sock(drv->eapol_tx_sock);
        if (drv->eapol_tx_sock >= 0)
@@ -7008,7 +7010,7 @@ done:
                nl80211_mgmt_unsubscribe(bss, "mode change");
        }
 
-       if (!is_ap_interface(nlmode) &&
+       if (!bss->in_deinit && !is_ap_interface(nlmode) &&
            nl80211_mgmt_subscribe_non_ap(bss) < 0)
                wpa_printf(MSG_DEBUG, "nl80211: Failed to register Action "
                           "frame processing - ignore for now");