nl80211: Use LEAVE_IBSS with driver-based-SME
NL80211_CMD_LEAVE_IBSS was used only with wpa_supplicant-based SME. Extend this to drivers that implement SME internally. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
38ce8e2709
commit
9392c9be7a
1 changed files with 5 additions and 2 deletions
|
@ -5876,13 +5876,16 @@ static int wpa_driver_nl80211_deauthenticate(struct i802_bss *bss,
|
|||
const u8 *addr, int reason_code)
|
||||
{
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
|
||||
if (drv->nlmode == NL80211_IFTYPE_ADHOC) {
|
||||
nl80211_mark_disconnected(drv);
|
||||
return nl80211_leave_ibss(drv);
|
||||
}
|
||||
if (!(drv->capa.flags & WPA_DRIVER_FLAGS_SME))
|
||||
return wpa_driver_nl80211_disconnect(drv, reason_code);
|
||||
wpa_printf(MSG_DEBUG, "%s(addr=" MACSTR " reason_code=%d)",
|
||||
__func__, MAC2STR(addr), reason_code);
|
||||
nl80211_mark_disconnected(drv);
|
||||
if (drv->nlmode == NL80211_IFTYPE_ADHOC)
|
||||
return nl80211_leave_ibss(drv);
|
||||
return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DEAUTHENTICATE,
|
||||
reason_code, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue