From 2a3115434a773fdc34ea125890f75fbc0b34dcaf Mon Sep 17 00:00:00 2001 From: Alexander Bondar Date: Sun, 15 Sep 2013 16:17:48 +0200 Subject: [PATCH] iwlwifi: mvm: fix scan request's suspend time parameter This fix is related to a scan request when associated (bgscan). FW expects suspend time parameter in micro seconds while the driver provides a value in time units. This bug leads to a high traffic latency when scan is requested while traffic is in progress. Signed-off-by: Alexander Bondar Signed-off-by: Johannes Berg --- drivers/net/wireless/iwlwifi/mvm/scan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index 621fb71f282a..3a06832e8e90 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c @@ -93,10 +93,10 @@ static inline __le32 iwl_mvm_scan_max_out_time(struct ieee80211_vif *vif) static inline __le32 iwl_mvm_scan_suspend_time(struct ieee80211_vif *vif) { - if (vif->bss_conf.assoc) - return cpu_to_le32(vif->bss_conf.beacon_int); - else + if (!vif->bss_conf.assoc) return 0; + + return cpu_to_le32(ieee80211_tu_to_usec(vif->bss_conf.beacon_int)); } static inline __le32 -- 2.39.5