diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-09-03 09:30:55 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-09-11 11:52:01 -0400 |
commit | ea196fdbb982150c19854f90773cb8b9bf331049 (patch) | |
tree | a5088223229900aca5edefec1ef175c2e61a09bf /drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | |
parent | f1f270b25c6ece9ff65f7ad970850338a198d52f (diff) |
iwlwifi: fix and describe iwl_adjust_beacon_interval
The iwl_adjust_beacon_interval function is a bit
of black magic, so add comments to it describing
what it does. Also, in the case when there's no
beacon interval set, program the default into
the device (instead of adjusting, which results
in the max) since using the max in that case
interacts badly with dual-mode/PAN parameters.
Also update the PAN parameters accordingly and
use the same constant as here.
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-hcmd.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c index a63582f060f1..d86902b83630 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | |||
@@ -321,7 +321,7 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv) | |||
321 | bcnint = max_t(int, bcnint, | 321 | bcnint = max_t(int, bcnint, |
322 | ctx_bss->vif->bss_conf.beacon_int); | 322 | ctx_bss->vif->bss_conf.beacon_int); |
323 | if (!bcnint) | 323 | if (!bcnint) |
324 | bcnint = 100; | 324 | bcnint = DEFAULT_BEACON_INTERVAL; |
325 | slot0 = bcnint / 2; | 325 | slot0 = bcnint / 2; |
326 | slot1 = bcnint - slot0; | 326 | slot1 = bcnint - slot0; |
327 | 327 | ||
@@ -339,7 +339,7 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv) | |||
339 | slot0 = 0; | 339 | slot0 = 0; |
340 | slot1 = max_t(int, 1, ctx_pan->vif->bss_conf.dtim_period) * | 340 | slot1 = max_t(int, 1, ctx_pan->vif->bss_conf.dtim_period) * |
341 | ctx_pan->vif->bss_conf.beacon_int; | 341 | ctx_pan->vif->bss_conf.beacon_int; |
342 | slot1 = max_t(int, 100, slot1); | 342 | slot1 = max_t(int, DEFAULT_BEACON_INTERVAL, slot1); |
343 | 343 | ||
344 | if (test_bit(STATUS_SCAN_HW, &priv->status)) { | 344 | if (test_bit(STATUS_SCAN_HW, &priv->status)) { |
345 | slot0 = slot1 * 3 - 20; | 345 | slot0 = slot1 * 3 - 20; |