nl80211: Clear bss->freq when stopping AP mode
The current operating frequency information was already cleared when stopping other modes, but the cases for stopping AP mode were not covered. Clear bss->freq in wpa_driver_nl80211_del_beacon() to cover these cases. In addition, move clearing of bss->beacon_set there to avoid having to clear that in all callers separately. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
fa34e3255e
commit
6c850a1c06
1 changed files with 2 additions and 2 deletions
|
@ -2936,6 +2936,8 @@ static int wpa_driver_nl80211_del_beacon(struct i802_bss *bss)
|
|||
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
|
||||
drv->ifindex);
|
||||
bss->beacon_set = 0;
|
||||
bss->freq = 0;
|
||||
nl80211_put_wiphy_data_ap(bss);
|
||||
msg = nl80211_drv_msg(drv, 0, NL80211_CMD_DEL_BEACON);
|
||||
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
|
||||
|
@ -8492,7 +8494,6 @@ static int wpa_driver_nl80211_deinit_ap(void *priv)
|
|||
if (!is_ap_interface(drv->nlmode))
|
||||
return -1;
|
||||
wpa_driver_nl80211_del_beacon(bss);
|
||||
bss->beacon_set = 0;
|
||||
|
||||
/*
|
||||
* If the P2P GO interface was dynamically added, then it is
|
||||
|
@ -8512,7 +8513,6 @@ static int wpa_driver_nl80211_stop_ap(void *priv)
|
|||
if (!is_ap_interface(drv->nlmode))
|
||||
return -1;
|
||||
wpa_driver_nl80211_del_beacon(bss);
|
||||
bss->beacon_set = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue