aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2009-03-12 09:04:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-27 20:12:45 -0400
commit11432379fd2a3854a3408424d8dcd99afd811573 (patch)
treec9184c78051ef76d9e9e148d2bc6777a10f02ca7
parent51b381479ff5bc9b8c49ce15fd8bc35c6b695ca4 (diff)
mac80211: start pending scan after probe/auth/assoc timed out
If a scan is queued in STA mode while the interface is in state direct probe, authenticate or associate the scan is delayed until the interface enters disabled or associated state. But in case of direct probe-, authentication- or association- timeout sta_work will not be scheduled anymore (without external trigger) and thus the pending scan is not executed and prevents a new scan from being triggered (-EBUSY). Fix this by queueing the sta work again after direct probe-, authentication- and association- timeout. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/mlme.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index aaf7793583a..a55879663b3 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -682,6 +682,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
682static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata) 682static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata)
683{ 683{
684 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 684 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
685 struct ieee80211_local *local = sdata->local;
685 686
686 ifmgd->direct_probe_tries++; 687 ifmgd->direct_probe_tries++;
687 if (ifmgd->direct_probe_tries > IEEE80211_AUTH_MAX_TRIES) { 688 if (ifmgd->direct_probe_tries > IEEE80211_AUTH_MAX_TRIES) {
@@ -697,6 +698,13 @@ static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata)
697 ieee80211_rx_bss_remove(sdata, ifmgd->bssid, 698 ieee80211_rx_bss_remove(sdata, ifmgd->bssid,
698 sdata->local->hw.conf.channel->center_freq, 699 sdata->local->hw.conf.channel->center_freq,
699 ifmgd->ssid, ifmgd->ssid_len); 700 ifmgd->ssid, ifmgd->ssid_len);
701
702 /*
703 * We might have a pending scan which had no chance to run yet
704 * due to state == IEEE80211_STA_MLME_DIRECT_PROBE.
705 * Hence, queue the STAs work again
706 */
707 queue_work(local->hw.workqueue, &ifmgd->work);
700 return; 708 return;
701 } 709 }
702 710
@@ -721,6 +729,7 @@ static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata)
721static void ieee80211_authenticate(struct ieee80211_sub_if_data *sdata) 729static void ieee80211_authenticate(struct ieee80211_sub_if_data *sdata)
722{ 730{
723 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 731 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
732 struct ieee80211_local *local = sdata->local;
724 733
725 ifmgd->auth_tries++; 734 ifmgd->auth_tries++;
726 if (ifmgd->auth_tries > IEEE80211_AUTH_MAX_TRIES) { 735 if (ifmgd->auth_tries > IEEE80211_AUTH_MAX_TRIES) {
@@ -732,6 +741,13 @@ static void ieee80211_authenticate(struct ieee80211_sub_if_data *sdata)
732 ieee80211_rx_bss_remove(sdata, ifmgd->bssid, 741 ieee80211_rx_bss_remove(sdata, ifmgd->bssid,
733 sdata->local->hw.conf.channel->center_freq, 742 sdata->local->hw.conf.channel->center_freq,
734 ifmgd->ssid, ifmgd->ssid_len); 743 ifmgd->ssid, ifmgd->ssid_len);
744
745 /*
746 * We might have a pending scan which had no chance to run yet
747 * due to state == IEEE80211_STA_MLME_AUTHENTICATE.
748 * Hence, queue the STAs work again
749 */
750 queue_work(local->hw.workqueue, &ifmgd->work);
735 return; 751 return;
736 } 752 }
737 753
@@ -878,6 +894,7 @@ static int ieee80211_privacy_mismatch(struct ieee80211_sub_if_data *sdata)
878static void ieee80211_associate(struct ieee80211_sub_if_data *sdata) 894static void ieee80211_associate(struct ieee80211_sub_if_data *sdata)
879{ 895{
880 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 896 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
897 struct ieee80211_local *local = sdata->local;
881 898
882 ifmgd->assoc_tries++; 899 ifmgd->assoc_tries++;
883 if (ifmgd->assoc_tries > IEEE80211_ASSOC_MAX_TRIES) { 900 if (ifmgd->assoc_tries > IEEE80211_ASSOC_MAX_TRIES) {
@@ -889,6 +906,12 @@ static void ieee80211_associate(struct ieee80211_sub_if_data *sdata)
889 ieee80211_rx_bss_remove(sdata, ifmgd->bssid, 906 ieee80211_rx_bss_remove(sdata, ifmgd->bssid,
890 sdata->local->hw.conf.channel->center_freq, 907 sdata->local->hw.conf.channel->center_freq,
891 ifmgd->ssid, ifmgd->ssid_len); 908 ifmgd->ssid, ifmgd->ssid_len);
909 /*
910 * We might have a pending scan which had no chance to run yet
911 * due to state == IEEE80211_STA_MLME_ASSOCIATE.
912 * Hence, queue the STAs work again
913 */
914 queue_work(local->hw.workqueue, &ifmgd->work);
892 return; 915 return;
893 } 916 }
894 917