mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
cfg80211: allow aborting in-progress connection atttempts
On a disconnect request from userspace, cfg80211 currently calls called rdev_disconnect() only in case that 'current_bss' was set, i.e. connection had been established. Change this to allow the userspace call to succeed and call the driver's disconnect() method also while the connection attempt is in progress, to be able to abort attempts. Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Luca Coelho <[email protected]> [change commit subject/message] Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
parent
f438ceb81d
commit
0711d63878
2 changed files with 5 additions and 4 deletions
|
|
@ -1088,7 +1088,7 @@ int cfg80211_disconnect(struct cfg80211_registered_device *rdev,
|
|||
err = cfg80211_sme_disconnect(wdev, reason);
|
||||
else if (!rdev->ops->disconnect)
|
||||
cfg80211_mlme_down(rdev, dev);
|
||||
else if (wdev->current_bss)
|
||||
else if (wdev->ssid_len)
|
||||
err = rdev_disconnect(rdev, dev, reason);
|
||||
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue