qcacld-3.0: Parse timer params in setpno iwpriv command
Currently, the setpno iwpriv command ignores timer related parameters.
Expand the setpno iwpriv command logic to parse timer related
parameters.
Change-Id: Ib318d3821e7da0fb7b2887d935ec5f5c706e6263
CRs-Fixed: 1076096
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index fdb4e5d..6112c75 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -9335,13 +9335,12 @@
* for each network:
* <ssid_len> <ssid> <authentication> <encryption>
* <ch_num> <channel_list optional> <bcast_type> <rssi_threshold>
- * <number of scan timers>
- * for each timer:
- * <scan_time> <scan_repeat>
+ * <scan_time (seconds)>
+ * <scan_repeat_count (0 means indefinite)>
* <suspend mode>
*
* e.g:
- * 1 2 4 test 0 0 3 1 6 11 2 40 5 test2 4 4 6 1 2 3 4 5 6 1 0 2 5 2 300 0 1
+ * 1 2 4 test 0 0 3 1 6 11 2 40 5 test2 4 4 6 1 2 3 4 5 6 1 0 5 2 1
*
* this translates into:
* -----------------------------
@@ -9357,10 +9356,8 @@
* search on 6 channels 1, 2, 3, 4, 5 and 6
* bcast type is non-bcast (directed probe will be sent)
* and must not meet any RSSI threshold
- * 2 scan timers:
* scan every 5 seconds 2 times
- * then scan every 300 seconds until stopped
- * enable on suspend
+ * enable on suspend
*/
static int __iw_set_pno(struct net_device *dev,
struct iw_request_info *info,
@@ -9526,6 +9523,17 @@
ptr += offset;
} /* For ucNetworkCount */
+ request.fast_scan_period = 0;
+ if (sscanf(ptr, "%u %n", &(request.fast_scan_period), &offset) > 0) {
+ request.fast_scan_period *= MSEC_PER_SEC;
+ ptr += offset;
+ }
+
+ request.fast_scan_max_cycles = 0;
+ if (sscanf(ptr, "%hhu %n", &(request.fast_scan_max_cycles),
+ &offset) > 0)
+ ptr += offset;
+
params = sscanf(ptr, "%hhu %n", &(mode), &offset);
request.modePNO = mode;