Optimize the scanning interval of schedule scan
authorsunyue5 <sunyue5@motorola.com>
Tue, 16 Apr 2019 11:24:17 +0000 (19:24 +0800)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:32:01 +0000 (17:32 +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 71ccc34f5f607691078a04e4064394aae37d42fe..0ed3c0bfa5772a51baf6061897e48ca6c6fb9320 100755 (executable)
@@ -1218,8 +1218,10 @@ 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 */
+               /* BEGIN IKSAMP-7392, optimize pno scanning interval */
+               0x0a,                           /* Exponent */
+               0x07,                           /* Step count */
+               /* END IKSAMP-7392 */
                0x00, 0x01                      /* Skip first period: true for scheduled scans*/
        };
 
@@ -1285,8 +1287,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]);