qcacld-3.0: Add cfg to disable puncture in US LPI mode

Add cfg to disable puncture in US LPI mode per FCC requirement,
set to false by default.

Change-Id: Id01f952b2a74ad64216a66d2d292166211440c4b
CRs-Fixed: 3649640
This commit is contained in:
Jianmin Zhu
2023-10-27 08:42:07 +08:00
committed by Ravindra Konda
父節點 9b2e1dabd5
當前提交 a68e8b7311
共有 6 個文件被更改,包括 94 次插入1 次删除

查看文件

@@ -718,6 +718,32 @@
#define CFG_MLO_SAME_LINK_MLD_ADDR_CFG
#endif
/*
* <ini>
* eht_disable_punct_in_us_lpi - Flag to Disable eht puncture in US LPI mode
* @Min: false
* @Max: true
* @Default: false
*
* Related: None
*
* Supported Feature: 802.11be protocol
*
* Usage: Internal
*
* </ini>
*/
#define CFG_EHT_DISABLE_PUNCT_IN_US_LPI \
CFG_BOOL("eht_disable_punct_in_us_lpi", \
false, \
"Disable eht puncture in US LPI mode")
#ifdef WLAN_FEATURE_11BE
#define CFG_EHT_DISABLE_PUNCT_IN_US_LPI_CFG CFG(CFG_EHT_DISABLE_PUNCT_IN_US_LPI)
#else
#define CFG_EHT_DISABLE_PUNCT_IN_US_LPI_CFG
#endif
#define CFG_STA_ALL \
CFG(CFG_INFRA_STA_KEEP_ALIVE_PERIOD) \
CFG(CFG_STA_BSS_MAX_IDLE_PERIOD) \
@@ -743,5 +769,6 @@
CFG_MLO_MAX_SIMULTANEOUS_LINKS_CFG \
CFG_MLO_SUPPORT_LINK_BAND_CFG \
CFG_MLO_PREFER_PERCENTAGE_CFG \
CFG_MLO_SAME_LINK_MLD_ADDR_CFG
CFG_MLO_SAME_LINK_MLD_ADDR_CFG \
CFG_EHT_DISABLE_PUNCT_IN_US_LPI_CFG
#endif /* CFG_MLME_STA_H__ */

查看文件

@@ -1319,6 +1319,25 @@ bool wlan_mlme_get_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc);
void wlan_mlme_set_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc,
bool disable);
/**
* wlan_mlme_get_eht_disable_punct_in_us_lpi() - Get disable eht punct in us
* lpi mode flag.
* @psoc: psoc object
*
* Return: true if eht punct disabled in us lpi mode
*/
bool wlan_mlme_get_eht_disable_punct_in_us_lpi(struct wlan_objmgr_psoc *psoc);
/**
* wlan_mlme_set_eht_disable_punct_in_us_lpi() - Set disable eht punct in us
* lpi mode flag.
* @psoc: psoc object
* @flag: true if eht punct disabled in us lpi mode
*
* Return: void
*/
void wlan_mlme_set_eht_disable_punct_in_us_lpi(struct wlan_objmgr_psoc *psoc,
bool flag);
/**
* wlan_mlme_update_bw_no_punct() - update connected VDEV
* channel bandwidth without puncture bitmap for FCC requirement
@@ -1369,6 +1388,18 @@ void wlan_mlme_set_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc,
{
}
static inline
bool wlan_mlme_get_eht_disable_punct_in_us_lpi(struct wlan_objmgr_psoc *psoc)
{
return false;
}
static inline
void wlan_mlme_set_eht_disable_punct_in_us_lpi(struct wlan_objmgr_psoc *psoc,
bool flag)
{
}
static inline QDF_STATUS
wlan_mlme_update_bw_no_punct(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id)

查看文件

@@ -1818,6 +1818,7 @@ enum station_prefer_bw {
* @mlo_prefer_percentage: percentage to boost/reduce mlo scoring
* @epcs_capability: epcs capability enable or disable flag
* @usr_disable_eht: user disable the eht for STA
* @eht_disable_punct_in_us_lpi: Disable eht puncture in us lpi mode
*/
struct wlan_mlme_sta_cfg {
uint32_t sta_keep_alive_period;
@@ -1856,6 +1857,7 @@ struct wlan_mlme_sta_cfg {
#ifdef WLAN_FEATURE_11BE
bool epcs_capability;
bool usr_disable_eht;
bool eht_disable_punct_in_us_lpi;
#endif
};

查看文件

@@ -1397,6 +1397,27 @@ void wlan_mlme_set_epcs_capability(struct wlan_objmgr_psoc *psoc, bool flag)
mlme_obj->cfg.sta.epcs_capability = flag;
}
bool wlan_mlme_get_eht_disable_punct_in_us_lpi(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return false;
return mlme_obj->cfg.sta.eht_disable_punct_in_us_lpi;
}
void wlan_mlme_set_eht_disable_punct_in_us_lpi(struct wlan_objmgr_psoc *psoc, bool flag)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return;
mlme_debug("set mlme epcs capability to %d", flag);
mlme_obj->cfg.sta.eht_disable_punct_in_us_lpi = flag;
}
bool wlan_mlme_get_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
@@ -8031,6 +8052,9 @@ wlan_mlme_get_bw_no_punct(struct wlan_objmgr_psoc *psoc,
QDF_STATUS status = QDF_STATUS_E_FAILURE;
uint8_t country[REG_ALPHA2_LEN + 1];
if (!wlan_mlme_get_eht_disable_punct_in_us_lpi(psoc))
return status;
wlan_reg_read_current_country(psoc, country);
if (!wlan_reg_is_6ghz_chan_freq(bss_chan->ch_freq) ||
@@ -8077,6 +8101,9 @@ wlan_mlme_update_bw_no_punct(struct wlan_objmgr_psoc *psoc,
enum phy_ch_width new_ch_width;
struct wlan_objmgr_pdev *pdev;
if (!wlan_mlme_get_eht_disable_punct_in_us_lpi(psoc))
return status;
pdev = wlan_objmgr_get_pdev_by_id(psoc, 0,
WLAN_MLME_NB_ID);
if (!pdev) {