mac80211: brcmfmac: firmware halt and scan cleanup
[openwrt/staging/chunkeey.git] / package / kernel / mac80211 / patches / 303-v4.15-0004-brcmfmac-use-msecs_to_jiffies-instead-of-calculation.patch
1 From df2d8388bc96c0f29d27d121f2a4cd054f8b3900 Mon Sep 17 00:00:00 2001
2 From: Arend Van Spriel <arend.vanspriel@broadcom.com>
3 Date: Wed, 8 Nov 2017 14:36:34 +0100
4 Subject: [PATCH] brcmfmac: use msecs_to_jiffies() instead of calculation using
5 HZ
6
7 Minor cleanup using provided macro to convert milliseconds interval
8 to jiffies in brcmf_cfg80211_escan().
9
10 Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
11 Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
12 Reviewed-by: Franky Lin <franky.lin@broadcom.com>
13 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
14 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 ---
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
20 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
21 @@ -1115,8 +1115,8 @@ brcmf_cfg80211_escan(struct wiphy *wiphy
22 goto scan_out;
23
24 /* Arm scan timeout timer */
25 - mod_timer(&cfg->escan_timeout, jiffies +
26 - BRCMF_ESCAN_TIMER_INTERVAL_MS * HZ / 1000);
27 + mod_timer(&cfg->escan_timeout,
28 + jiffies + msecs_to_jiffies(BRCMF_ESCAN_TIMER_INTERVAL_MS));
29
30 return 0;
31