aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-08-23 04:46:57 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-08-27 12:49:08 -0400
commitbde4530e9d2fa013b5674e4c9b066ed6d87ab45c (patch)
tree202594556826549d87cf482d36c32a16072bcf16 /drivers/net/wireless/iwlwifi/iwl-core.c
parentb01efe434bd6ea807eb72ba74fae11beab5c4c04 (diff)
iwlwifi: follow main beacon interval
It is necessary that the PAN context always use the same beacon interval as the BSS context unless it is in dual-station mode, ie. the PAN context is a station as well, so implement that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 91ca5173e862..a2b39fd4081e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -525,9 +525,16 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
525 */ 525 */
526 ctx->timing.atim_window = 0; 526 ctx->timing.atim_window = 0;
527 527
528 beacon_int = iwl_adjust_beacon_interval(beacon_int, 528 if (ctx->ctxid == IWL_RXON_CTX_PAN &&
529 (!ctx->vif || ctx->vif->type != NL80211_IFTYPE_STATION)) {
530 ctx->timing.beacon_interval =
531 priv->contexts[IWL_RXON_CTX_BSS].timing.beacon_interval;
532 beacon_int = le16_to_cpu(ctx->timing.beacon_interval);
533 } else {
534 beacon_int = iwl_adjust_beacon_interval(beacon_int,
529 priv->hw_params.max_beacon_itrvl * TIME_UNIT); 535 priv->hw_params.max_beacon_itrvl * TIME_UNIT);
530 ctx->timing.beacon_interval = cpu_to_le16(beacon_int); 536 ctx->timing.beacon_interval = cpu_to_le16(beacon_int);
537 }
531 538
532 tsf = priv->timestamp; /* tsf is modifed by do_div: copy it */ 539 tsf = priv->timestamp; /* tsf is modifed by do_div: copy it */
533 interval_tm = beacon_int * TIME_UNIT; 540 interval_tm = beacon_int * TIME_UNIT;