aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-01-28 11:30:52 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-30 15:48:36 -0500
commit2ed81710ccc0ccebe177481b8d4ac584f9c2b569 (patch)
tree98add62a2f8ec5439e8ff8c569eddc48607f89a3
parentdcc3ec04c14d6d840fdcc5be0ddd752a7daf7ec4 (diff)
iwlwifi: always restrict scan dwell in P2P
Whenever the PAN (P2P) context is active, it has timers in the uCode that prevent sleep, so scanning can't be out of channel for more than the beacon interval programmed into the device. Before this patch, a full scan including any passive channels when P2P was active would stall forever because it wouldn't find time to execute the passive requests (for default beacon intervals of 100 TU.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 2aea20bf0f1..7f2e3a1c80e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -414,10 +414,25 @@ static u16 iwl_limit_dwell(struct iwl_priv *priv, u16 dwell_time)
414 for_each_context(priv, ctx) { 414 for_each_context(priv, ctx) {
415 u16 value; 415 u16 value;
416 416
417 if (!iwl_is_associated_ctx(ctx)) 417 switch (ctx->staging.dev_type) {
418 continue; 418 case RXON_DEV_TYPE_P2P:
419 if (ctx->staging.dev_type == RXON_DEV_TYPE_P2P) 419 /* no timing constraints */
420 continue; 420 continue;
421 case RXON_DEV_TYPE_ESS:
422 default:
423 /* timing constraints if associated */
424 if (!iwl_is_associated_ctx(ctx))
425 continue;
426 break;
427 case RXON_DEV_TYPE_CP:
428 case RXON_DEV_TYPE_2STA:
429 /*
430 * These seem to always have timers for TBTT
431 * active in uCode even when not associated yet.
432 */
433 break;
434 }
435
421 value = ctx->beacon_int; 436 value = ctx->beacon_int;
422 if (!value) 437 if (!value)
423 value = IWL_PASSIVE_DWELL_BASE; 438 value = IWL_PASSIVE_DWELL_BASE;