Optimize the scanning interval of schedule scan
authorsunyue5 <sunyue5@motorola.com>
Tue, 16 Apr 2019 11:24:17 +0000 (19:24 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:37:01 +0000 (17:37 +0800)
The peak of current is 80mA for schedule scan. In the past, the
interval of schedule scan is 20s, it would increase the average
current by 20mA.

This change is to optimize the scanning interval so that the
average current can be reduced to less than 1mA
Min_Period: 48s
Max_Period: 500s
Exponent: 10
Step count: 7

48s, 48s, 48s, 48s, 48s, 48s, 48s, 480s,..., 480s, ...

Change-Id: Ie0535267e531fc84ce49f9130774b1c575081a1d
Signed-off-by: sunyue5 <sunyue5@motorola.com>
Reviewed-on: https://gerrit.mot.com/1337433
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Submit-Approved: Jira Key

drivers/net/wireless/scsc/mlme.c

index 18d1e31ae39cc1023f53a88fe623374350445b69..dd5e49ff7ce599428aa6654df8e3c12b6034c309 100755 (executable)
@@ -1287,9 +1287,11 @@ int slsi_mlme_add_sched_scan(struct slsi_dev                    *sdev,
                0x01,                           /* OUI Subtype: Scan timing */
                0x00, 0x00, 0x00, 0x00,         /* Min_Period:  filled later in the function */
                0x00, 0x00, 0x00, 0x00,         /* Max_Period:  filled later in the function */
-               0x01,                           /* Exponent */
-               0x01,                           /* Step count */
-               0x00, 0x00                      /* Skip first period: false*/
+               /* BEGIN IKSAMP-7392, optimize pno scanning interval */
+               0x0a,                           /* Exponent */
+               0x07,                           /* Step count */
+               /* END IKSAMP-7392 */
+               0x00, 0x01                      /* Skip first period: true for scheduled scans*/
        };
 
        u8 ssid_filter_ie_hdr[] = {
@@ -1354,8 +1356,10 @@ int slsi_mlme_add_sched_scan(struct slsi_dev                    *sdev,
                return r;
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
-       SLSI_U32_TO_BUFF_LE(request->scan_plans->interval * 1000 * 1000, &scan_timing_ie[7]);
-       SLSI_U32_TO_BUFF_LE(request->scan_plans->interval * 1000 * 1000, &scan_timing_ie[11]);
+       // BEGIN IKSAMP-7392, optimize pno scanning interval
+       SLSI_U32_TO_BUFF_LE(48 * 1000 * 1000, &scan_timing_ie[7]);
+       SLSI_U32_TO_BUFF_LE(500 * 1000 * 1000, &scan_timing_ie[11]);
+       // END IKSAMP-7392
 #else
        SLSI_U32_TO_BUFF_LE(request->interval * 1000, &scan_timing_ie[7]);
        SLSI_U32_TO_BUFF_LE(request->interval * 1000, &scan_timing_ie[11]);