qcacld-3.0: Update cfg80211_sched_scan_request for Kernel upgrade

Commit: 3b06d27 ("cfg80211: Add multiple scan plans for scheduled scan")

Above commit introduces the scan_plan to include the interval parameters,
to support configuring multiple sched scan, and is merged since Kernel 4.4.

Change-Id: I9e232cfd6f82408fb2e21bef905b6e044951089d
CRs-fixed: 966054
This commit is contained in:
Ryan Hsu 2016-01-21 13:59:35 -08:00 • committed by Vishwajith Upendra
commit 6bf33b327c

View file

@ -2227,13 +2227,26 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
}
/*
* Driver gets only one time interval which is hard coded in
* supplicant for 10000ms. Taking power consumption into account
* firmware after gPNOScanTimerRepeatValue times fast_scan_period
* switches slow_scan_period. This is less frequent scans and firmware
* shall be in slow_scan_period mode until next PNO Start.
* Before Kernel 4.4
* Driver gets only one time interval which is hard coded in
* supplicant for 10000ms.
*
* After Kernel 4.4
* User can configure multiple scan_plans, each scan would have
* separate scan cycle and interval. For our use case, we would
* only have supplicant set one scan_plan, and firmware also support
* only one as well, so pick up the first index.
*
* Taking power consumption into account
* firmware after gPNOScanTimerRepeatValue times fast_scan_period
* switches slow_scan_period. This is less frequent scans and firmware
* shall be in slow_scan_period mode until next PNO Start.
*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) || defined(WITH_BACKPORTS)
pPnoRequest->fast_scan_period = request->scan_plans[0].interval;
#else
pPnoRequest->fast_scan_period = request->interval;
#endif
pPnoRequest->fast_scan_max_cycles =
config->configPNOScanTimerRepeatValue;
pPnoRequest->slow_scan_period =
@ -2241,7 +2254,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
pPnoRequest->fast_scan_period;
hdd_info("Base scan interval: %d sec PNOScanTimerRepeatValue: %d",
(request->interval / 1000),
(pPnoRequest->fast_scan_period / 1000),
config->configPNOScanTimerRepeatValue);
pPnoRequest->modePNO = SIR_PNO_MODE_IMMEDIATE;