From: sunyue5 Date: Tue, 16 Apr 2019 11:24:17 +0000 (+0800) Subject: Optimize the scanning interval of schedule scan X-Git-Tag: MMI-QSB30.62-17~132 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f179f751a748184e26f58bd0a372278d73621052;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Optimize the scanning interval of schedule scan 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 Reviewed-on: https://gerrit.mot.com/1337433 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Hua Tan Submit-Approved: Jira Key --- diff --git a/drivers/net/wireless/scsc/mlme.c b/drivers/net/wireless/scsc/mlme.c index 71ccc34f5f60..0ed3c0bfa577 100755 --- a/drivers/net/wireless/scsc/mlme.c +++ b/drivers/net/wireless/scsc/mlme.c @@ -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]);