diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-09-03 09:31:26 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-09-11 11:51:48 -0400 |
commit | f1f270b25c6ece9ff65f7ad970850338a198d52f (patch) | |
tree | 7e24575147b0e63b1451f6047bdac8b5032c5af7 /drivers | |
parent | 763cc3bf5c2ae189a929fce54759c5bd94b8ba16 (diff) |
iwlwifi: improve timing handling with dual-mode
In dual-mode, a number of scenarios need to be
considered, and the firmware can be very picky
about them. Adjust the timing (most importantly
the beacon interval) according to the different
modes.
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')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index f67cab5bc6f2..c393b20ae1c1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -529,10 +529,22 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
529 | ctx->timing.atim_window = 0; | 529 | ctx->timing.atim_window = 0; |
530 | 530 | ||
531 | if (ctx->ctxid == IWL_RXON_CTX_PAN && | 531 | if (ctx->ctxid == IWL_RXON_CTX_PAN && |
532 | (!ctx->vif || ctx->vif->type != NL80211_IFTYPE_STATION)) { | 532 | (!ctx->vif || ctx->vif->type != NL80211_IFTYPE_STATION) && |
533 | iwl_is_associated(priv, IWL_RXON_CTX_BSS) && | ||
534 | priv->contexts[IWL_RXON_CTX_BSS].vif && | ||
535 | priv->contexts[IWL_RXON_CTX_BSS].vif->bss_conf.beacon_int) { | ||
533 | ctx->timing.beacon_interval = | 536 | ctx->timing.beacon_interval = |
534 | priv->contexts[IWL_RXON_CTX_BSS].timing.beacon_interval; | 537 | priv->contexts[IWL_RXON_CTX_BSS].timing.beacon_interval; |
535 | beacon_int = le16_to_cpu(ctx->timing.beacon_interval); | 538 | beacon_int = le16_to_cpu(ctx->timing.beacon_interval); |
539 | } else if (ctx->ctxid == IWL_RXON_CTX_BSS && | ||
540 | iwl_is_associated(priv, IWL_RXON_CTX_PAN) && | ||
541 | priv->contexts[IWL_RXON_CTX_PAN].vif && | ||
542 | priv->contexts[IWL_RXON_CTX_PAN].vif->bss_conf.beacon_int && | ||
543 | (!iwl_is_associated_ctx(ctx) || !ctx->vif || | ||
544 | !ctx->vif->bss_conf.beacon_int)) { | ||
545 | ctx->timing.beacon_interval = | ||
546 | priv->contexts[IWL_RXON_CTX_PAN].timing.beacon_interval; | ||
547 | beacon_int = le16_to_cpu(ctx->timing.beacon_interval); | ||
536 | } else { | 548 | } else { |
537 | beacon_int = iwl_adjust_beacon_interval(beacon_int, | 549 | beacon_int = iwl_adjust_beacon_interval(beacon_int, |
538 | priv->hw_params.max_beacon_itrvl * TIME_UNIT); | 550 | priv->hw_params.max_beacon_itrvl * TIME_UNIT); |