Commit c6989fd5 authored by Arend Van Spriel's avatar Arend Van Spriel Committed by Kalle Valo

brcmfmac: use requested scan interval in scheduled scan

User-space can specify the interval for the scheduled scan. This
interval is found in scheduled scan plan. The driver supports only
one plan, which is legacy behaviour.
Reviewed-by: default avatarHante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: default avatarFranky Lin <franky.lin@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent dfe5b0d5
...@@ -6312,6 +6312,7 @@ static void brcmf_wiphy_pno_params(struct wiphy *wiphy) ...@@ -6312,6 +6312,7 @@ static void brcmf_wiphy_pno_params(struct wiphy *wiphy)
wiphy->max_sched_scan_ssids = BRCMF_PNO_MAX_PFN_COUNT; wiphy->max_sched_scan_ssids = BRCMF_PNO_MAX_PFN_COUNT;
wiphy->max_match_sets = BRCMF_PNO_MAX_PFN_COUNT; wiphy->max_match_sets = BRCMF_PNO_MAX_PFN_COUNT;
wiphy->max_sched_scan_ie_len = BRCMF_SCAN_IE_LEN_MAX; wiphy->max_sched_scan_ie_len = BRCMF_SCAN_IE_LEN_MAX;
wiphy->max_sched_scan_plan_interval = BRCMF_PNO_SCHED_SCAN_MAX_PERIOD;
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN; wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
} }
......
...@@ -63,6 +63,10 @@ static int brcmf_pno_config(struct brcmf_if *ifp, u32 scan_freq, ...@@ -63,6 +63,10 @@ static int brcmf_pno_config(struct brcmf_if *ifp, u32 scan_freq,
pfn_param.exp = BRCMF_PNO_FREQ_EXPO_MAX; pfn_param.exp = BRCMF_PNO_FREQ_EXPO_MAX;
/* set up pno scan fr */ /* set up pno scan fr */
if (scan_freq < BRCMF_PNO_SCHED_SCAN_MIN_PERIOD) {
brcmf_dbg(SCAN, "scan period too small, using minimum\n");
scan_freq = BRCMF_PNO_SCHED_SCAN_MIN_PERIOD;
}
pfn_param.scan_freq = cpu_to_le32(scan_freq); pfn_param.scan_freq = cpu_to_le32(scan_freq);
if (mscan) { if (mscan) {
...@@ -191,7 +195,7 @@ int brcmf_pno_start_sched_scan(struct brcmf_if *ifp, ...@@ -191,7 +195,7 @@ int brcmf_pno_start_sched_scan(struct brcmf_if *ifp,
} }
/* configure pno */ /* configure pno */
ret = brcmf_pno_config(ifp, BRCMF_PNO_SCHED_SCAN_PERIOD, 0, 0); ret = brcmf_pno_config(ifp, req->scan_plans[0].interval, 0, 0);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
...@@ -16,8 +16,10 @@ ...@@ -16,8 +16,10 @@
#ifndef _BRCMF_PNO_H #ifndef _BRCMF_PNO_H
#define _BRCMF_PNO_H #define _BRCMF_PNO_H
#define BRCMF_PNO_SCAN_COMPLETE 1 #define BRCMF_PNO_SCAN_COMPLETE 1
#define BRCMF_PNO_MAX_PFN_COUNT 16 #define BRCMF_PNO_MAX_PFN_COUNT 16
#define BRCMF_PNO_SCHED_SCAN_MIN_PERIOD 10
#define BRCMF_PNO_SCHED_SCAN_MAX_PERIOD 508
/** /**
* brcmf_pno_clean - disable and clear pno in firmware. * brcmf_pno_clean - disable and clear pno in firmware.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment