aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mlme.c')
-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