aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r--net/wireless/mlme.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 5b9b22120824..30058a80d7af 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -545,6 +545,12 @@ static int __cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev,
545 545
546 ASSERT_WDEV_LOCK(wdev); 546 ASSERT_WDEV_LOCK(wdev);
547 547
548 if (wdev->sme_state != CFG80211_SME_CONNECTED)
549 return -ENOTCONN;
550
551 if (WARN_ON(!wdev->current_bss))
552 return -ENOTCONN;
553
548 memset(&req, 0, sizeof(req)); 554 memset(&req, 0, sizeof(req));
549 req.reason_code = reason; 555 req.reason_code = reason;
550 req.ie = ie; 556 req.ie = ie;