qcacld-3.0: Introduce new ini to configure disconnect/idle roam scans

Add new ini to configure required parameters to trigger
disconnect/idle roam scan:
1.enable_disconnect_roam_offload
	When this ini is enabled firmware will trigger roam scan
	and roam to a new ap if candidate is found and it will
	not forward the deauth frame to the host driver. If
	roaming fails after this deauth, then firmware will
	forward the deauth frame to the host. If roaming is
	successful, we will follow the normal roam synch event
	path.
2.enable_idle_roam
	When this ini is enabled firmware will trigger roam scan
	and roam to a new ap if current connected AP rssi falls
	below the threshold. To consider the connection as idle,
	the following conditions should be met:
		1. When user space sends "SET SUSPENDMODE"
		   command with value 0.
		2. No TX/RX data for idle time configured
		3. Connected AP rssi change doesn't exceed the
		   threshold
		4. Connected AP rssi false below minimum rssi.
3. idle_roam_rssi_delta
	RSSI change in current connected AP above/below which
	idle roam scan will be triggered if other criteria is
	met.
4. idle_roam_inactive_time
	Time duration in milliseconds for which the connection is
	to be considered idle.
5. idle_data_packet_count
	number of tx/rx packets below which the connection is
	idle.

Change-Id: Ibd1c91656ecd681f8dc83bc77197668a7f3bfa3f
CRs-Fixed: 2427132
This commit is contained in:
Pragaspathi Thilagaraj 2019-03-28 23:12:51 +05:30 committed by nshrivas
parent cd131ae9dc
commit 14f72de820
4 changed files with 237 additions and 2 deletions

View File

@ -1458,6 +1458,19 @@ static void mlme_init_roam_offload_cfg(struct wlan_objmgr_psoc *psoc,
{
lfr->lfr3_roaming_offload =
cfg_get(psoc, CFG_LFR3_ROAMING_OFFLOAD);
lfr->enable_disconnect_roam_offload =
cfg_get(psoc, CFG_LFR_ENABLE_DISCONNECT_ROAM);
lfr->enable_idle_roam =
cfg_get(psoc, CFG_LFR_ENABLE_IDLE_ROAM);
lfr->idle_roam_rssi_delta =
cfg_get(psoc, CFG_LFR_IDLE_ROAM_RSSI_DELTA);
lfr->idle_roam_inactive_time =
cfg_get(psoc, CFG_LFR_IDLE_ROAM_INACTIVE_TIME);
lfr->idle_data_packet_count =
cfg_get(psoc, CFG_LFR_IDLE_ROAM_PACKET_COUNT);
lfr->idle_roam_min_rssi = cfg_get(psoc, CFG_LFR_IDLE_ROAM_MIN_RSSI);
lfr->idle_roam_band = cfg_get(psoc, CFG_LFR_IDLE_ROAM_BAND);
}
#else

View File

@ -1971,7 +1971,9 @@
* WMI_ROAM_TRIGGER_REASON_BTM - 10
* WMI_ROAM_TRIGGER_REASON_UNIT_TEST - 11
* WMI_ROAM_TRIGGER_REASON_BSS_LOAD - 12
* WMI_ROAM_TRIGGER_REASON_MAX - 13
* WMI_ROAM_TRIGGER_REASON_DEAUTH - 13
* WMI_ROAM_TRIGGER_REASON_IDLE - 14
* WMI_ROAM_TRIGGER_REASON_MAX - 15
*
* For Ex: 0xDA (PER, LOW_RSSI, HIGH_RSSI, MAWC, DENSE)
*
@ -2061,7 +2063,208 @@
1, \
"enable roam offload")
#define ROAM_OFFLOAD_ALL CFG(CFG_LFR3_ROAMING_OFFLOAD)
/*
* <ini>
* enable_disconnect_roam_offload - Enable/Disable emergency roaming during
* deauth/disassoc
* @Min: 0 - Disabled
* @Max: 1 - Enabled
* @Default: 1
*
* When this ini is enabled firmware will trigger roam scan and roam to a new ap
* if candidate is found and it will not send the deauth/disassoc frame to
* the host driver.
* If roaming fails after this deauth, then firmware will send
* WMI_ROAM_REASON_DEAUTH event to the host. If roaming is successful, driver
* follows the normal roam synch event path.
*
* Supported Feature: Roaming
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_LFR_ENABLE_DISCONNECT_ROAM CFG_INI_BOOL( \
"enable_disconnect_roam_offload", \
true, \
"Enable/Disable roaming on deauth/disassoc from AP")
/*
* <ini>
* enable_idle_roam - Enable/Disable idle roaming
* @Min: 0 - Disabled
* @Max: 1 - Enabled
* @Default: 0
*
* When this ini is enabled firmware will trigger roam scan and roam to a new
* ap if current connected AP rssi falls below the threshold. To consider the
* connection as idle, the following conditions should be met if this ini
* "enable_idle_roam" is enabled:
* 1. User space sends "SET SUSPENDMODE" command with value 0.
* 2. No TX/RX data for idle time configured via ini "idle_roam_inactive_time".
* 3. Connected AP rssi change doesn't exceed a specific delta value.
* (configured via ini idle_roam_rssi_delta)
* 4. Connected AP rssi falls below minimum rssi (configured via ini
* "idle_roam_min_rssi").
*
* Supported Feature: Roaming
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_LFR_ENABLE_IDLE_ROAM CFG_INI_BOOL( \
"enable_idle_roam", \
false, \
"Enable/Disable idle roam")
/*
* <ini>
* idle_roam_rssi_delta - This threshold is the criteria to decide whether DUT
* is idle or moving. If rssi delta is more than configured thresold then its
* considered as not idle. RSSI delta is entered in dBm. Idle roaming can be
* triggered if the connected AP rssi change exceeds or falls below the
* rssi delta and if other criteria of ini "enable_idle_roam" is met
* @Min: 0
* @Max: 50
* @Default: 5
*
* Related: enable_idle_roam
*
* Supported Feature: Roaming
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_LFR_IDLE_ROAM_RSSI_DELTA CFG_INI_UINT( \
"idle_roam_rssi_delta", \
0, \
50, \
5, \
CFG_VALUE_OR_DEFAULT, \
"Configure RSSI delta to start idle roam")
/*
* <ini>
* idle_roam_inactive_time - Time duration in millseconds for which the
* connection is idle.
* @Min: 0
* @Max: 0xFFFFFFFF
* @Default: 10000
*
* This ini is used to configure the time in seconds for which the connection
* candidate is idle and after which idle roam scan can be triggered if
* other criteria of ini "enable_idle_roam" is met.
*
* Related: enable_idle_roam
*
* Supported Feature: Roaming
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_LFR_IDLE_ROAM_INACTIVE_TIME CFG_INI_UINT( \
"idle_roam_inactive_time", \
0, \
0xFFFFFFFF, \
10000, \
CFG_VALUE_OR_DEFAULT, \
"Configure RSSI delta to start idle roam")
/*
* <ini>
* idle_data_packet_count - No of tx/rx packets above which the connection is
* not idle.
* @Min: 0
* @Max: 0xFFFFFFFF
* @Default: 10
*
* This ini is used to configure the acceptable number of tx/rx packets below
* which the connection is idle. Ex: If idle_data_packet_count is 10
* and if the tx/rx packet count is less than 10, the connection is
* idle. If there are more than 10 packets, the connection is active one.
*
* Related: enable_idle_roam
*
* Supported Feature: Roaming
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_LFR_IDLE_ROAM_PACKET_COUNT CFG_INI_UINT( \
"idle_data_packet_count", \
0, \
0xFFFFFFFF, \
10, \
CFG_VALUE_OR_DEFAULT, \
"Configure idle packet count")
/*
* <ini>
* idle_roam_min_rssi - Minimum RSSI of connected AP, below which
* idle roam scan can be triggered if other criteria of ini "enable_idle_roam"
* is met.
* @Min: -96
* @Max: 0
* @Default: -65
*
* Related: enable_idle_roam
*
* Supported Feature: Roaming
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_LFR_IDLE_ROAM_MIN_RSSI CFG_INI_INT( \
"idle_roam_min_rssi", \
-96, \
0, \
-65, \
CFG_VALUE_OR_DEFAULT, \
"Configure idle roam minimum RSSI")
/*
* <ini>
* idle_roam_band - Band on which idle roam scan will be
* enabled
* @Min: 0
* @Max: 2
* @Default: 0
*
* Value 0 - Allow idle roam on both bands
* Value 1 - Allow idle roam only on 2G band
* Value 2 - Allow idle roam only on 5G band
*
* Related: enable_idle_roam
*
* Supported Feature: Roaming
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_LFR_IDLE_ROAM_BAND CFG_INI_UINT( \
"idle_roam_band", \
0, \
2, \
0, \
CFG_VALUE_OR_DEFAULT, \
"Band on which idle roam needs to be enabled")
#define ROAM_OFFLOAD_ALL \
CFG(CFG_LFR3_ROAMING_OFFLOAD) \
CFG(CFG_LFR_ENABLE_DISCONNECT_ROAM) \
CFG(CFG_LFR_ENABLE_IDLE_ROAM) \
CFG(CFG_LFR_IDLE_ROAM_RSSI_DELTA) \
CFG(CFG_LFR_IDLE_ROAM_INACTIVE_TIME) \
CFG(CFG_LFR_IDLE_ROAM_PACKET_COUNT) \
CFG(CFG_LFR_IDLE_ROAM_MIN_RSSI) \
CFG(CFG_LFR_IDLE_ROAM_BAND) \
#else
#define ROAM_OFFLOAD_ALL
#endif

View File

@ -984,6 +984,8 @@
* ROAM_TRIGGER_REASON_BTM - B10,
* ROAM_TRIGGER_REASON_UNIT_TEST - B11,
* ROAM_TRIGGER_REASON_BSS_LOAD - B12
* ROAM_TRIGGER_REASON_DISASSOC - B13
* ROAM_TRIGGER_REASON_IDLE_ROAM - B14
*
* When the bit corresponding to a particular roam trigger reason
* is set, the value of "roam_score_delta" is expected over the

View File

@ -1259,6 +1259,16 @@ struct bss_load_trigger {
* @mawc_roam_enabled: Enable/Disable MAWC during roaming
* @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
* @lfr3_roaming_offload: Enable/disable roam offload feature
* @enable_disconnect_roam_offload: enable disassoc/deauth roam scan.
* @enable_idle_roam: flag to enable/disable idle roam in fw
* @idle_roam_rssi_delta: rssi delta of connected ap which is used to
* identify if the AP is idle or in motion
* @idle_roam_inactive_time: Timeout value in seconds, above which the
* connection is idle
* @idle_data_packet_count: data packet count measured during inactive time,
* below which the connection is idle.
* @idle_roam_min_rssi: Minimum rssi of connected AP to be considered for
* idle roam trigger.
* @early_stop_scan_enable: Set early stop scan
* @enable_5g_band_pref: Enable preference for 5G from INI
* @ese_enabled: Enable ESE feature
@ -1340,6 +1350,13 @@ struct wlan_mlme_lfr_cfg {
bool enable_fast_roam_in_concurrency;
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
bool lfr3_roaming_offload;
bool enable_disconnect_roam_offload;
bool enable_idle_roam;
uint32_t idle_roam_rssi_delta;
uint32_t idle_roam_inactive_time;
uint32_t idle_data_packet_count;
uint32_t idle_roam_band;
int32_t idle_roam_min_rssi;
#endif
bool early_stop_scan_enable;
bool enable_5g_band_pref;