qcacld-3.0: Add sr_enable_mode ini

Add sr_enable_mode ini to check SR(Spatial Reuse)
can be enabled for non-STA mode or not. If SR
can't be enabled for non-STA mode and concurrency
is not allowed then don't allow any SR operation.

Change-Id: I876882c48c54f216bc1d0efa4dccce63f2a2e63c
CRs-Fixed: 3311374
This commit is contained in:
Sheenam Monga
2022-10-28 10:40:00 +05:30
committed by Madan Koyyalamudi
parent b829eb06a6
commit d7ce2c63fe
7 changed files with 123 additions and 1 deletions

View File

@@ -1023,6 +1023,41 @@ enum debug_packet_log_type {
"", \
"Set mgmt action frame hw tx retry count")
#if defined(WLAN_FEATURE_SR)
/*
* <ini>
* sr_enable_modes - Modes for which SR(Spatial Reuse) feature can be enabled
* @Min: 0x00
* @Max: 0xf
* @Default: 0x1
*
* This ini is used to check for which mode SR feature is enabled
*
* Bit 0: Enable/Disable SR feature for STA
* Bit 1: Enable/Disable SR feature for SAP
* Bit 2: Enable/Disable SR feature for P2P CLI
* Bit 3: Enable/Disable SR feature for P2P GO
*
* Related: None
*
* Supported Feature: STA/SAP
*
* Usage: External
*
* </ini>
*/
#define CFG_SR_ENABLE_MODES CFG_INI_UINT( \
"sr_enable_modes",\
0x0,\
0xf,\
0x1,\
CFG_VALUE_OR_DEFAULT, \
"To decide for which mode SR feature is enabled")
#define CFG_SR_ENABLE_MODES_ALL CFG(CFG_SR_ENABLE_MODES)
#else
#define CFG_SR_ENABLE_MODES_ALL
#endif
#define CFG_GENERIC_ALL \
CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
@@ -1062,5 +1097,6 @@ enum debug_packet_log_type {
CFG(CFG_TX_RETRY_MULTIPLIER) \
CFG(CFG_MGMT_FRAME_HW_TX_RETRY_COUNT) \
CFG_RELAX_6GHZ_CONN_POLICY \
CFG_EMLSR_MODE_ENABLED
CFG_EMLSR_MODE_ENABLED \
CFG_SR_ENABLE_MODES_ALL
#endif /* __CFG_MLME_GENERIC_H */

View File

@@ -3984,4 +3984,17 @@ wlan_mlme_get_ch_width_from_phymode(enum wlan_phymode phy_mode);
*/
enum phy_ch_width
wlan_mlme_get_peer_ch_width(struct wlan_objmgr_psoc *psoc, uint8_t *mac);
#if defined(WLAN_FEATURE_SR)
/**
* wlan_mlme_get_sr_enable_modes() - get mode for which SR is enabled
*
* @psoc: psoc context
* @val: pointer to hold the value of SR(Spatial Reuse) enable modes
*
* Return: void
*/
void
wlan_mlme_get_sr_enable_modes(struct wlan_objmgr_psoc *psoc, uint8_t *val);
#endif
#endif /* _WLAN_MLME_API_H_ */

View File

@@ -1362,6 +1362,7 @@ struct wlan_user_mcc_quota {
* @enable_emlsr_mode: 11BE eMLSR mode support
* @safe_mode_enable: safe mode to bypass some strict 6 GHz checks for
* connection, bypass strict power levels
* @sr_enable_modes: modes for which SR(Spatial Reuse) is enabled
*/
struct wlan_mlme_generic {
uint32_t band_capability;
@@ -1420,6 +1421,9 @@ struct wlan_mlme_generic {
struct wlan_user_mcc_quota user_mcc_quota;
#endif
bool safe_mode_enable;
#if defined(WLAN_FEATURE_SR)
uint32_t sr_enable_modes;
#endif
};
/*

View File

@@ -4798,4 +4798,28 @@ ucfg_mlme_get_peer_ch_width(struct wlan_objmgr_psoc *psoc, uint8_t *mac)
*/
enum wlan_phymode
ucfg_mlme_get_vdev_phy_mode(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
#if defined(WLAN_FEATURE_SR)
/**
* ucfg_mlme_get_sr_enable_modes() - check for which mode SR is enabled
*
* @psoc: pointer to psoc object
* @val: SR(Spatial Reuse) enable modes
*
* Return: void
*/
static inline void
ucfg_mlme_get_sr_enable_modes(struct wlan_objmgr_psoc *psoc,
uint8_t *val)
{
wlan_mlme_get_sr_enable_modes(psoc, val);
}
#else
static inline void
ucfg_mlme_get_sr_enable_modes(struct wlan_objmgr_psoc *psoc,
uint8_t *val)
{
*val = 0;
}
#endif
#endif /* _WLAN_MLME_UCFG_API_H_ */