aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/work.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/work.c')
-rw-r--r--net/mac80211/work.c37
1 files changed, 31 insertions, 6 deletions
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index d2e7f0e8667..7737f204d3f 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -25,6 +25,7 @@
25 25
26#include "ieee80211_i.h" 26#include "ieee80211_i.h"
27#include "rate.h" 27#include "rate.h"
28#include "driver-ops.h"
28 29
29#define IEEE80211_AUTH_TIMEOUT (HZ / 5) 30#define IEEE80211_AUTH_TIMEOUT (HZ / 5)
30#define IEEE80211_AUTH_MAX_TRIES 3 31#define IEEE80211_AUTH_MAX_TRIES 3
@@ -427,6 +428,14 @@ ieee80211_direct_probe(struct ieee80211_work *wk)
427 struct ieee80211_sub_if_data *sdata = wk->sdata; 428 struct ieee80211_sub_if_data *sdata = wk->sdata;
428 struct ieee80211_local *local = sdata->local; 429 struct ieee80211_local *local = sdata->local;
429 430
431 if (!wk->probe_auth.synced) {
432 int ret = drv_tx_sync(local, sdata, wk->filter_ta,
433 IEEE80211_TX_SYNC_AUTH);
434 if (ret)
435 return WORK_ACT_TIMEOUT;
436 }
437 wk->probe_auth.synced = true;
438
430 wk->probe_auth.tries++; 439 wk->probe_auth.tries++;
431 if (wk->probe_auth.tries > IEEE80211_AUTH_MAX_TRIES) { 440 if (wk->probe_auth.tries > IEEE80211_AUTH_MAX_TRIES) {
432 printk(KERN_DEBUG "%s: direct probe to %pM timed out\n", 441 printk(KERN_DEBUG "%s: direct probe to %pM timed out\n",
@@ -450,7 +459,8 @@ ieee80211_direct_probe(struct ieee80211_work *wk)
450 * will not answer to direct packet in unassociated state. 459 * will not answer to direct packet in unassociated state.
451 */ 460 */
452 ieee80211_send_probe_req(sdata, NULL, wk->probe_auth.ssid, 461 ieee80211_send_probe_req(sdata, NULL, wk->probe_auth.ssid,
453 wk->probe_auth.ssid_len, NULL, 0); 462 wk->probe_auth.ssid_len, NULL, 0,
463 (u32) -1, true);
454 464
455 wk->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; 465 wk->timeout = jiffies + IEEE80211_AUTH_TIMEOUT;
456 run_again(local, wk->timeout); 466 run_again(local, wk->timeout);
@@ -465,6 +475,14 @@ ieee80211_authenticate(struct ieee80211_work *wk)
465 struct ieee80211_sub_if_data *sdata = wk->sdata; 475 struct ieee80211_sub_if_data *sdata = wk->sdata;
466 struct ieee80211_local *local = sdata->local; 476 struct ieee80211_local *local = sdata->local;
467 477
478 if (!wk->probe_auth.synced) {
479 int ret = drv_tx_sync(local, sdata, wk->filter_ta,
480 IEEE80211_TX_SYNC_AUTH);
481 if (ret)
482 return WORK_ACT_TIMEOUT;
483 }
484 wk->probe_auth.synced = true;
485
468 wk->probe_auth.tries++; 486 wk->probe_auth.tries++;
469 if (wk->probe_auth.tries > IEEE80211_AUTH_MAX_TRIES) { 487 if (wk->probe_auth.tries > IEEE80211_AUTH_MAX_TRIES) {
470 printk(KERN_DEBUG "%s: authentication with %pM" 488 printk(KERN_DEBUG "%s: authentication with %pM"
@@ -498,6 +516,14 @@ ieee80211_associate(struct ieee80211_work *wk)
498 struct ieee80211_sub_if_data *sdata = wk->sdata; 516 struct ieee80211_sub_if_data *sdata = wk->sdata;
499 struct ieee80211_local *local = sdata->local; 517 struct ieee80211_local *local = sdata->local;
500 518
519 if (!wk->assoc.synced) {
520 int ret = drv_tx_sync(local, sdata, wk->filter_ta,
521 IEEE80211_TX_SYNC_ASSOC);
522 if (ret)
523 return WORK_ACT_TIMEOUT;
524 }
525 wk->assoc.synced = true;
526
501 wk->assoc.tries++; 527 wk->assoc.tries++;
502 if (wk->assoc.tries > IEEE80211_ASSOC_MAX_TRIES) { 528 if (wk->assoc.tries > IEEE80211_ASSOC_MAX_TRIES) {
503 printk(KERN_DEBUG "%s: association with %pM" 529 printk(KERN_DEBUG "%s: association with %pM"
@@ -553,7 +579,7 @@ ieee80211_offchannel_tx(struct ieee80211_work *wk)
553 /* 579 /*
554 * After this, offchan_tx.frame remains but now is no 580 * After this, offchan_tx.frame remains but now is no
555 * longer a valid pointer -- we still need it as the 581 * longer a valid pointer -- we still need it as the
556 * cookie for canceling this work. 582 * cookie for canceling this work/status matching.
557 */ 583 */
558 ieee80211_tx_skb(wk->sdata, wk->offchan_tx.frame); 584 ieee80211_tx_skb(wk->sdata, wk->offchan_tx.frame);
559 585
@@ -1060,14 +1086,13 @@ static void ieee80211_work_work(struct work_struct *work)
1060 continue; 1086 continue;
1061 if (wk->chan != local->tmp_channel) 1087 if (wk->chan != local->tmp_channel)
1062 continue; 1088 continue;
1063 if (ieee80211_work_ct_coexists(wk->chan_type, 1089 if (!ieee80211_work_ct_coexists(wk->chan_type,
1064 local->tmp_channel_type)) 1090 local->tmp_channel_type))
1065 continue; 1091 continue;
1066 remain_off_channel = true; 1092 remain_off_channel = true;
1067 } 1093 }
1068 1094
1069 if (!remain_off_channel && local->tmp_channel) { 1095 if (!remain_off_channel && local->tmp_channel) {
1070 bool on_oper_chan = ieee80211_cfg_on_oper_channel(local);
1071 local->tmp_channel = NULL; 1096 local->tmp_channel = NULL;
1072 /* If tmp_channel wasn't operating channel, then 1097 /* If tmp_channel wasn't operating channel, then
1073 * we need to go back on-channel. 1098 * we need to go back on-channel.
@@ -1077,7 +1102,7 @@ static void ieee80211_work_work(struct work_struct *work)
1077 * we still need to do a hardware config. Currently, 1102 * we still need to do a hardware config. Currently,
1078 * we cannot be here while scanning, however. 1103 * we cannot be here while scanning, however.
1079 */ 1104 */
1080 if (ieee80211_cfg_on_oper_channel(local) && !on_oper_chan) 1105 if (!ieee80211_cfg_on_oper_channel(local))
1081 ieee80211_hw_config(local, 0); 1106 ieee80211_hw_config(local, 0);
1082 1107
1083 /* At the least, we need to disable offchannel_ps, 1108 /* At the least, we need to disable offchannel_ps,