diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-07-18 10:59:22 +0200 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-07-21 16:31:54 +0200 |
commit | bbb05cb55a1b57003b17d47b5a7ac809bab60f80 (patch) | |
tree | 5c3b6f5ec3f763cf5bc66fde0568ed40c6fc0750 /drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |
parent | iwlagn: write iq invert register for 105/135 device (diff) | |
download | linux-bbb05cb55a1b57003b17d47b5a7ac809bab60f80.tar.xz linux-bbb05cb55a1b57003b17d47b5a7ac809bab60f80.zip |
iwlagn: track beacon interval sent to device
Sometimes, when mac80211 changes the beacon
interval or when it isn't yet set in mac80211
before association, the uCode will sysassert
because we send it confusing RXON timing vs.
PAN parameters. To fix this, track the last
beacon interval sent to the device and use
that in PAN parameter calculations.
This fixes a bug during P2P group formation
as a client (and possibly association to a
regular AP) while connected to another AP.
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-agn-rxon.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index d78a4659dbff..d42ef1763a71 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c @@ -342,7 +342,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv) slot1 = priv->hw_roc_duration; slot0 = IWL_MIN_SLOT_TIME; } else if (ctx_bss->vif && ctx_pan->vif) { - int bcnint = ctx_pan->vif->bss_conf.beacon_int; + int bcnint = ctx_pan->beacon_int; int dtim = ctx_pan->vif->bss_conf.dtim_period ?: 1; /* should be set, but seems unused?? */ @@ -350,14 +350,13 @@ int iwlagn_set_pan_params(struct iwl_priv *priv) if (ctx_pan->vif->type == NL80211_IFTYPE_AP && bcnint && - bcnint != ctx_bss->vif->bss_conf.beacon_int) { + bcnint != ctx_bss->beacon_int) { IWL_ERR(priv, "beacon intervals don't match (%d, %d)\n", - ctx_bss->vif->bss_conf.beacon_int, - ctx_pan->vif->bss_conf.beacon_int); + ctx_bss->beacon_int, ctx_pan->beacon_int); } else bcnint = max_t(int, bcnint, - ctx_bss->vif->bss_conf.beacon_int); + ctx_bss->beacon_int); if (!bcnint) bcnint = DEFAULT_BEACON_INTERVAL; slot0 = bcnint / 2; @@ -376,7 +375,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv) } else if (ctx_pan->vif) { slot0 = 0; slot1 = max_t(int, 1, ctx_pan->vif->bss_conf.dtim_period) * - ctx_pan->vif->bss_conf.beacon_int; + ctx_pan->beacon_int; slot1 = max_t(int, DEFAULT_BEACON_INTERVAL, slot1); if (test_bit(STATUS_SCAN_HW, &priv->status)) { |