aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-10 21:25:49 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-11-16 10:46:49 -0500
commitefe54db8233a4b41e68cbe67ca2e30c48532078a (patch)
tree6100da86306314545734d4feea4409b8f7fddbf7
parent2b5f7a679c2ae34407f6cc9387e77b563578bfdc (diff)
iwlagn: fix PAN slot timing wrt. DTIM
When the DTIM is not 1, then the slot timing is in some cases required to be calclulated based on the DTIM interval instead of the beacon interval, fix that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
index ffb2f4111ad0..366340f3fb0f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
@@ -307,6 +307,7 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv)
307 307
308 if (ctx_bss->vif && ctx_pan->vif) { 308 if (ctx_bss->vif && ctx_pan->vif) {
309 int bcnint = ctx_pan->vif->bss_conf.beacon_int; 309 int bcnint = ctx_pan->vif->bss_conf.beacon_int;
310 int dtim = ctx_pan->vif->bss_conf.dtim_period ?: 1;
310 311
311 /* should be set, but seems unused?? */ 312 /* should be set, but seems unused?? */
312 cmd.flags |= cpu_to_le16(IWL_WIPAN_PARAMS_FLG_SLOTTED_MODE); 313 cmd.flags |= cpu_to_le16(IWL_WIPAN_PARAMS_FLG_SLOTTED_MODE);
@@ -329,10 +330,10 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv)
329 if (test_bit(STATUS_SCAN_HW, &priv->status) || 330 if (test_bit(STATUS_SCAN_HW, &priv->status) ||
330 (!ctx_bss->vif->bss_conf.idle && 331 (!ctx_bss->vif->bss_conf.idle &&
331 !ctx_bss->vif->bss_conf.assoc)) { 332 !ctx_bss->vif->bss_conf.assoc)) {
332 slot0 = bcnint * 3 - 20; 333 slot0 = dtim * bcnint * 3 - 20;
333 slot1 = 20; 334 slot1 = 20;
334 } else if (!ctx_pan->vif->bss_conf.idle && 335 } else if (!ctx_pan->vif->bss_conf.idle &&
335 !ctx_pan->vif->bss_conf.assoc) { 336 !ctx_pan->vif->bss_conf.assoc) {
336 slot1 = bcnint * 3 - 20; 337 slot1 = bcnint * 3 - 20;
337 slot0 = 20; 338 slot0 = 20;
338 } 339 }