diff options
author | Zhu Yi <yi.zhu@intel.com> | 2009-07-19 23:47:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:28 -0400 |
commit | 9c7c0cdd24e64f9aed39453a1bffc3b3fd16ef99 (patch) | |
tree | d0f23e678a027ecb51e27d9483d6ec288420fd24 /drivers/net/wireless/iwmc3200wifi | |
parent | b68518fcbc6e0fe8c06a218cd2b92f62f3730cf9 (diff) |
iwmc3200wifi: fix cfg80211_connect_result is called in IBSS
Avoid calling cfg80211_connect_result() in IBSS mode.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/rx.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c index 6743391a45be..86079a187eef 100644 --- a/drivers/net/wireless/iwmc3200wifi/rx.c +++ b/drivers/net/wireless/iwmc3200wifi/rx.c | |||
@@ -517,6 +517,9 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf, | |||
517 | 517 | ||
518 | iwm_link_on(iwm); | 518 | iwm_link_on(iwm); |
519 | 519 | ||
520 | if (iwm->conf.mode == UMAC_MODE_IBSS) | ||
521 | goto ibss; | ||
522 | |||
520 | cfg80211_connect_result(iwm_to_ndev(iwm), | 523 | cfg80211_connect_result(iwm_to_ndev(iwm), |
521 | complete->bssid, | 524 | complete->bssid, |
522 | iwm->req_ie, iwm->req_ie_len, | 525 | iwm->req_ie, iwm->req_ie_len, |
@@ -530,6 +533,9 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf, | |||
530 | 533 | ||
531 | iwm_link_off(iwm); | 534 | iwm_link_off(iwm); |
532 | 535 | ||
536 | if (iwm->conf.mode == UMAC_MODE_IBSS) | ||
537 | goto ibss; | ||
538 | |||
533 | cfg80211_connect_result(iwm_to_ndev(iwm), complete->bssid, | 539 | cfg80211_connect_result(iwm_to_ndev(iwm), complete->bssid, |
534 | NULL, 0, NULL, 0, | 540 | NULL, 0, NULL, 0, |
535 | WLAN_STATUS_UNSPECIFIED_FAILURE, | 541 | WLAN_STATUS_UNSPECIFIED_FAILURE, |
@@ -538,11 +544,10 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf, | |||
538 | break; | 544 | break; |
539 | } | 545 | } |
540 | 546 | ||
541 | if (iwm->conf.mode == UMAC_MODE_IBSS) { | 547 | return 0; |
542 | cfg80211_ibss_joined(iwm_to_ndev(iwm), iwm->bssid, GFP_KERNEL); | ||
543 | return 0; | ||
544 | } | ||
545 | 548 | ||
549 | ibss: | ||
550 | cfg80211_ibss_joined(iwm_to_ndev(iwm), iwm->bssid, GFP_KERNEL); | ||
546 | return 0; | 551 | return 0; |
547 | } | 552 | } |
548 | 553 | ||