diff options
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r-- | net/wireless/sme.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 4a8289f9b4f0..68307883ec87 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -351,7 +351,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | |||
351 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION)) | 351 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION)) |
352 | return; | 352 | return; |
353 | 353 | ||
354 | if (WARN_ON(wdev->sme_state != CFG80211_SME_CONNECTING)) | 354 | if (wdev->sme_state != CFG80211_SME_CONNECTING) |
355 | return; | 355 | return; |
356 | 356 | ||
357 | nl80211_send_connect_result(wiphy_to_dev(wdev->wiphy), dev, | 357 | nl80211_send_connect_result(wiphy_to_dev(wdev->wiphy), dev, |
@@ -445,6 +445,8 @@ void cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | |||
445 | struct cfg80211_event *ev; | 445 | struct cfg80211_event *ev; |
446 | unsigned long flags; | 446 | unsigned long flags; |
447 | 447 | ||
448 | CFG80211_DEV_WARN_ON(wdev->sme_state != CFG80211_SME_CONNECTING); | ||
449 | |||
448 | ev = kzalloc(sizeof(*ev) + req_ie_len + resp_ie_len, gfp); | 450 | ev = kzalloc(sizeof(*ev) + req_ie_len + resp_ie_len, gfp); |
449 | if (!ev) | 451 | if (!ev) |
450 | return; | 452 | return; |
@@ -481,7 +483,7 @@ void __cfg80211_roamed(struct wireless_dev *wdev, const u8 *bssid, | |||
481 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION)) | 483 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION)) |
482 | return; | 484 | return; |
483 | 485 | ||
484 | if (WARN_ON(wdev->sme_state != CFG80211_SME_CONNECTED)) | 486 | if (wdev->sme_state != CFG80211_SME_CONNECTED) |
485 | return; | 487 | return; |
486 | 488 | ||
487 | /* internal error -- how did we get to CONNECTED w/o BSS? */ | 489 | /* internal error -- how did we get to CONNECTED w/o BSS? */ |
@@ -540,6 +542,8 @@ void cfg80211_roamed(struct net_device *dev, const u8 *bssid, | |||
540 | struct cfg80211_event *ev; | 542 | struct cfg80211_event *ev; |
541 | unsigned long flags; | 543 | unsigned long flags; |
542 | 544 | ||
545 | CFG80211_DEV_WARN_ON(wdev->sme_state != CFG80211_SME_CONNECTED); | ||
546 | |||
543 | ev = kzalloc(sizeof(*ev) + req_ie_len + resp_ie_len, gfp); | 547 | ev = kzalloc(sizeof(*ev) + req_ie_len + resp_ie_len, gfp); |
544 | if (!ev) | 548 | if (!ev) |
545 | return; | 549 | return; |
@@ -575,7 +579,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie, | |||
575 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION)) | 579 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION)) |
576 | return; | 580 | return; |
577 | 581 | ||
578 | if (WARN_ON(wdev->sme_state != CFG80211_SME_CONNECTED)) | 582 | if (wdev->sme_state != CFG80211_SME_CONNECTED) |
579 | return; | 583 | return; |
580 | 584 | ||
581 | if (wdev->current_bss) { | 585 | if (wdev->current_bss) { |
@@ -639,6 +643,8 @@ void cfg80211_disconnected(struct net_device *dev, u16 reason, | |||
639 | struct cfg80211_event *ev; | 643 | struct cfg80211_event *ev; |
640 | unsigned long flags; | 644 | unsigned long flags; |
641 | 645 | ||
646 | CFG80211_DEV_WARN_ON(wdev->sme_state != CFG80211_SME_CONNECTED); | ||
647 | |||
642 | ev = kzalloc(sizeof(*ev) + ie_len, gfp); | 648 | ev = kzalloc(sizeof(*ev) + ie_len, gfp); |
643 | if (!ev) | 649 | if (!ev) |
644 | return; | 650 | return; |