|
@@ -150,39 +150,42 @@ static void wlan_scan_rand_attrs(struct wlan_objmgr_vdev *vdev,
|
|
* Return: None
|
|
* Return: None
|
|
*/
|
|
*/
|
|
static void
|
|
static void
|
|
-wlan_config_sched_scan_plan(struct pno_scan_req_params *pno_req,
|
|
|
|
|
|
+wlan_config_sched_scan_plan(struct wlan_objmgr_psoc *psoc,
|
|
|
|
+ struct pno_scan_req_params *pno_req,
|
|
struct cfg80211_sched_scan_request *request)
|
|
struct cfg80211_sched_scan_request *request)
|
|
{
|
|
{
|
|
|
|
+ if (!ucfg_scan_get_user_config_sched_scan_plan(psoc) ||
|
|
|
|
+ request->n_scan_plans == 1) {
|
|
|
|
+ pno_req->fast_scan_period =
|
|
|
|
+ request->scan_plans[0].interval * MSEC_PER_SEC;
|
|
|
|
+ /*
|
|
|
|
+ * if only one scan plan is configured from framework
|
|
|
|
+ * then both fast and slow scan should be configured with the
|
|
|
|
+ * same value that is why fast scan cycles are hardcoded to one
|
|
|
|
+ */
|
|
|
|
+ pno_req->fast_scan_max_cycles = 1;
|
|
|
|
+ pno_req->slow_scan_period =
|
|
|
|
+ request->scan_plans[0].interval * MSEC_PER_SEC;
|
|
|
|
+ }
|
|
/*
|
|
/*
|
|
* As of now max 2 scan plans were supported by firmware
|
|
* As of now max 2 scan plans were supported by firmware
|
|
* if number of scan plan supported by firmware increased below logic
|
|
* if number of scan plan supported by firmware increased below logic
|
|
* must change.
|
|
* must change.
|
|
*/
|
|
*/
|
|
- if (request->n_scan_plans == SCAN_PNO_MAX_PLAN_REQUEST) {
|
|
|
|
|
|
+ else if (request->n_scan_plans == SCAN_PNO_MAX_PLAN_REQUEST) {
|
|
pno_req->fast_scan_period =
|
|
pno_req->fast_scan_period =
|
|
request->scan_plans[0].interval * MSEC_PER_SEC;
|
|
request->scan_plans[0].interval * MSEC_PER_SEC;
|
|
pno_req->fast_scan_max_cycles =
|
|
pno_req->fast_scan_max_cycles =
|
|
request->scan_plans[0].iterations;
|
|
request->scan_plans[0].iterations;
|
|
pno_req->slow_scan_period =
|
|
pno_req->slow_scan_period =
|
|
request->scan_plans[1].interval * MSEC_PER_SEC;
|
|
request->scan_plans[1].interval * MSEC_PER_SEC;
|
|
- } else if (request->n_scan_plans == 1) {
|
|
|
|
- pno_req->fast_scan_period =
|
|
|
|
- request->scan_plans[0].interval * MSEC_PER_SEC;
|
|
|
|
- /*
|
|
|
|
- * if only one scan plan is configured from framework
|
|
|
|
- * then both fast and slow scan should be configured with the
|
|
|
|
- * same value that is why fast scan cycles are hardcoded to one
|
|
|
|
- */
|
|
|
|
- pno_req->fast_scan_max_cycles = 1;
|
|
|
|
- pno_req->slow_scan_period =
|
|
|
|
- request->scan_plans[0].interval * MSEC_PER_SEC;
|
|
|
|
} else {
|
|
} else {
|
|
osif_err("Invalid number of scan plans %d !!",
|
|
osif_err("Invalid number of scan plans %d !!",
|
|
request->n_scan_plans);
|
|
request->n_scan_plans);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#else
|
|
#else
|
|
-#define wlan_config_sched_scan_plan(pno_req, request) \
|
|
|
|
|
|
+#define wlan_config_sched_scan_plan(psoc, pno_req, request) \
|
|
__wlan_config_sched_scan_plan(pno_req, request, psoc)
|
|
__wlan_config_sched_scan_plan(pno_req, request, psoc)
|
|
|
|
|
|
static void
|
|
static void
|
|
@@ -566,7 +569,7 @@ int wlan_cfg80211_sched_scan_start(struct wlan_objmgr_vdev *vdev,
|
|
* switches slow_scan_period. This is less frequent scans and firmware
|
|
* switches slow_scan_period. This is less frequent scans and firmware
|
|
* shall be in slow_scan_period mode until next PNO Start.
|
|
* shall be in slow_scan_period mode until next PNO Start.
|
|
*/
|
|
*/
|
|
- wlan_config_sched_scan_plan(req, request);
|
|
|
|
|
|
+ wlan_config_sched_scan_plan(psoc, req, request);
|
|
req->delay_start_time = wlan_config_sched_scan_start_delay(request);
|
|
req->delay_start_time = wlan_config_sched_scan_start_delay(request);
|
|
req->scan_backoff_multiplier = scan_backoff_multiplier;
|
|
req->scan_backoff_multiplier = scan_backoff_multiplier;
|
|
|
|
|