From 9305e680b132942e31834bb7c84b66e88a0c2807 Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Tue, 27 Oct 2020 14:38:23 +0530 Subject: [PATCH] qcacmn: Enhance the ini scan_mode_6ghz for RNR scan optimization Add the below values to scan_mode_6ghz enum, 1. SCAN_MODE_6G_RNR_ONLY: Scan the channels (PSC and non-PSC) found in RNR-IEs while scanning 2g and 5g bands. Host fills all PSC and non-PSC channels in the scan request and set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND for each channel. 2. SCAN_MODE_6G_PSC_DUTY_CYCLE: Scan the complete PSC channel list for every duty cycle. For every duty cycle scan, host fills all 6g channels and sets the flag FLAG_SCAN_ONLY_IF_RNR_FOUND only for non-PSC channels. Rest of the scans will be done only on RNR channels(PSC and non-PSC). 3. SCAN_MODE_6G_ALL_DUTY_CYCLE: Scan the complete 6g(PSC and non-PSC) channel list for every duty cycle. For every duty cycle scan, host fills all 6g channels and doesn't set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND for any 6g channel(PSC/non-PSC). Rest of the scans will be done only on RNR(PSC/non-PSC) channels. Change the default ini value to PSC_DUTY_CYCLE. Change-Id: I73bc08d973bd57dbe2ba6644c3842da9ce850cec CRs-Fixed: 2806406 --- umac/scan/dispatcher/inc/wlan_scan_cfg.h | 36 +++++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/umac/scan/dispatcher/inc/wlan_scan_cfg.h b/umac/scan/dispatcher/inc/wlan_scan_cfg.h index 9c422369ef..609bfd59fc 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_cfg.h +++ b/umac/scan/dispatcher/inc/wlan_scan_cfg.h @@ -27,14 +27,31 @@ /** * enum scan_mode_6ghz - scan mode for 6GHz * @SCAN_MODE_6G_NO_CHANNEL: Remove 6GHz channels in the scan request - * @SCAN_MODE_6G_PSC_CHANNEL: Allow/Add 6Ghz PSC channels to scan request - * @SCAN_MODE_6G_ALL_CHANNEL: Allow all the 6Ghz channels + * @SCAN_MODE_6G_PSC_CHANNEL: Scan only 6Ghz PSC channels and non-PSC + * through RNR IE + * @SCAN_MODE_6G_ALL_CHANNEL: Scan all the 6Ghz channels + * @SCAN_MODE_6G_RNR_ONLY: Scan the channels (both PSC and non-PSC) found in + * RNR-IEs while scanning 2g and 5g bands. Host fills all PSC and non-PSC + * channels in the scan request and set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND + * for each channel. + * @SCAN_MODE_6G_PSC_DUTY_CYCLE: Scan the complete PSC channel list for every + * duty cycle. For every duty cycle scan, host fills all 6g channels and sets + * the flag FLAG_SCAN_ONLY_IF_RNR_FOUND only for non-PSC channels. Rest of the + * scans will be done only on RNR channels (PSC and non-PSC). + * @SCAN_MODE_6G_ALL_DUTY_CYCLE: Scan the complete 6g(PSC and non-PSC) channel + * list for every duty cycle. For every duty cycle scan, host fills all 6g + * channels and doesn't set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND for any 6g + * (PSC/non-PSC) channels. Rest of the scans will be done only on RNR (PSC and + * non-PSC channels). */ enum scan_mode_6ghz { SCAN_MODE_6G_NO_CHANNEL, SCAN_MODE_6G_PSC_CHANNEL, SCAN_MODE_6G_ALL_CHANNEL, - SCAN_MODE_6G_MAX = SCAN_MODE_6G_ALL_CHANNEL, + SCAN_MODE_6G_RNR_ONLY, + SCAN_MODE_6G_PSC_DUTY_CYCLE, + SCAN_MODE_6G_ALL_DUTY_CYCLE, + SCAN_MODE_6G_MAX = SCAN_MODE_6G_ALL_DUTY_CYCLE, }; /* @@ -1209,6 +1226,17 @@ enum scan_mode_6ghz { * 0 - Remove 6GHz channels in the scan request * 1 - Allow/Add 6Ghz PSC channels to scan request * 2 - Allow all the 6Ghz channels + * 3 - Scan the channels (both PSC and non-PSC) found in RNR-IEs while scanning + * 2g and 5g bands. Host fills all PSC and non-PSC channels in the scan + * request and set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND for each channel. + * 4 - Scan the complete PSC channel list for every duty cycle. For every + * duty cycle scan, host fills all 6g channels and sets the flag + * FLAG_SCAN_ONLY_IF_RNR_FOUND only for non-PSC channels. Rest of the scans + * will be done only on RNR channels (PSC and non-PSC). + * 5 - Scan the complete 6g(PSC and non-PSC) channel list for every duty cycle. + * For every duty cycle scan, host fills all 6g channels and doesn't set the + * flag FLAG_SCAN_ONLY_IF_RNR_FOUND for any 6g (PSC/non-PSC) channels. Rest + * of the scans will be done only on RNR (PSC and non-PSC channels). * * Related: SCAN * @@ -1220,7 +1248,7 @@ enum scan_mode_6ghz { "scan_mode_6ghz", \ SCAN_MODE_6G_NO_CHANNEL, \ SCAN_MODE_6G_MAX, \ - PLATFORM_VALUE(SCAN_MODE_6G_PSC_CHANNEL, \ + PLATFORM_VALUE(SCAN_MODE_6G_PSC_DUTY_CYCLE, \ SCAN_MODE_6G_ALL_CHANNEL), \ CFG_VALUE_OR_DEFAULT, \ "6ghz scan mode")