Skip to content

Commit

Permalink
iwlwifi: fix PAN parameters while scanning
Browse files Browse the repository at this point in the history
When only the PAN side was active, we gave no
time to the WLAN context, which is OK unless
we are scanning, which always happens on the
WLAN context. Fix this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
  • Loading branch information
Johannes Berg authored and Wey-Yi Guy committed Sep 11, 2010
1 parent 6e6ebf4 commit 27eafdd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv)
slot1 = max_t(int, 1, ctx_pan->vif->bss_conf.dtim_period) *
ctx_pan->vif->bss_conf.beacon_int;
slot1 = max_t(int, 100, slot1);

if (test_bit(STATUS_SCAN_HW, &priv->status)) {
slot0 = slot1 * 3 - 20;
slot1 = 20;
}
}

cmd.slots[0].width = cpu_to_le16(slot0);
Expand Down

0 comments on commit 27eafdd

Please sign in to comment.