From: Johannes Berg Date: Mon, 30 Aug 2010 13:12:00 +0000 (-0700) Subject: iwlwifi: fix PAN parameters while scanning X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=27eafdda7714d5b189c175e71ab22c72c90ba93e;p=openwrt%2Fstaging%2Fblogic.git iwlwifi: fix PAN parameters while scanning 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 Signed-off-by: Wey-Yi Guy --- diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c index 6fb52abafc8d..d03ba6a8e64a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c @@ -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);