nl80211: Skip set_mode event subscription during deinit

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>
This commit is contained in:
Jouni Malinen 2012-04-06 18:58:44 +03:00
parent 103b8f4dea
commit 873d0fcfd3

View 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");