qcacmn: Enable/Disable 6G edge channels ch2 and ch233

Enable lower 6G edge channel ch2 (5935MHz) for APL2 6G regdmn
using a service bit WMI_SERVICE_ENABLE_LOWER_6G_EDGE_CH_SUPP,
which is not enabled by default.
Also, disable upper 6G edge channel (7115MHz) using another
service bit WMI_SERVICE_DISABLE_UPPER_6G_EDGE_CH_SUPP, that
is enabled by default.

Change-Id: Ia7cb7f7d3165375178adbe70adb19b8671496b6d
CRs-Fixed: 2885623
这个提交包含在:
Gururaj Pandurangi
2021-02-22 15:46:35 -08:00
提交者 snandini
父节点 a2ac29d45c
当前提交 08148f21fa
修改 13 个文件,包含 376 行新增1 行删除

查看文件

@@ -1249,6 +1249,14 @@ struct wlan_lmac_if_reg_rx_ops {
uint8_t *bitmap);
QDF_STATUS (*reg_set_ext_tpc_supported)(struct wlan_objmgr_psoc *psoc,
bool val);
#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
QDF_STATUS
(*reg_set_lower_6g_edge_ch_supp)(struct wlan_objmgr_psoc *psoc,
bool val);
QDF_STATUS
(*reg_set_disable_upper_6g_edge_ch_supp)(struct wlan_objmgr_psoc *psoc,
bool val);
#endif
};
#ifdef CONVERGED_P2P_ENABLE

查看文件

@@ -303,6 +303,23 @@ static inline void wlan_lmac_if_register_master_list_ext_handler(
}
#endif
#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
static void wlan_lmac_if_register_6g_edge_chan_supp(
struct wlan_lmac_if_rx_ops *rx_ops)
{
rx_ops->reg_rx_ops.reg_set_lower_6g_edge_ch_supp =
tgt_reg_set_lower_6g_edge_ch_supp;
rx_ops->reg_rx_ops.reg_set_disable_upper_6g_edge_ch_supp =
tgt_reg_set_disable_upper_6g_edge_ch_supp;
}
#else
static inline void wlan_lmac_if_register_6g_edge_chan_supp(
struct wlan_lmac_if_rx_ops *rx_ops)
{
}
#endif
static void wlan_lmac_if_umac_reg_rx_ops_register(
struct wlan_lmac_if_rx_ops *rx_ops)
{
@@ -373,6 +390,8 @@ static void wlan_lmac_if_umac_reg_rx_ops_register(
rx_ops->reg_rx_ops.reg_set_ext_tpc_supported =
tgt_reg_set_ext_tpc_supported;
wlan_lmac_if_register_6g_edge_chan_supp(rx_ops);
}
#ifdef CONVERGED_P2P_ENABLE

查看文件

@@ -845,6 +845,50 @@ reg_modify_chan_list_for_5dot9_ghz_channels(struct wlan_objmgr_pdev *pdev,
}
}
#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
/**
* reg_modify_chan_list_for_6g_edge_channels() - Modify 6 GHz edge channels
*
* @pdev: Pointer to pdev object
* @chan_list: Current channel list
*
* This function disables lower 6G edge channel (5935MHz) if service bit
* wmi_service_lower_6g_edge_ch_supp is not set. If service bit is set
* the channels remain enabled. It disables upper 6G edge channel (7115MHz)
* if the service bit wmi_service_disable_upper_6g_edge_ch_supp is set, it
* is enabled by default.
*
*/
static void
reg_modify_chan_list_for_6g_edge_channels(struct wlan_objmgr_pdev *pdev,
struct regulatory_channel
*chan_list)
{
struct wlan_objmgr_psoc *psoc;
psoc = wlan_pdev_get_psoc(pdev);
if (!reg_is_lower_6g_edge_ch_supp(psoc)) {
chan_list[CHAN_ENUM_5935].state = CHANNEL_STATE_DISABLE;
chan_list[CHAN_ENUM_5935].chan_flags |=
REGULATORY_CHAN_DISABLED;
}
if (reg_is_upper_6g_edge_ch_disabled(psoc)) {
chan_list[CHAN_ENUM_7115].state = CHANNEL_STATE_DISABLE;
chan_list[CHAN_ENUM_7115].chan_flags |=
REGULATORY_CHAN_DISABLED;
}
}
#else
static inline void
reg_modify_chan_list_for_6g_edge_channels(struct wlan_objmgr_pdev *pdev,
struct regulatory_channel
*chan_list)
{
}
#endif
#ifdef DISABLE_UNII_SHARED_BANDS
/**
* reg_is_reg_unii_band_1_set() - Check UNII bitmap
@@ -1065,6 +1109,10 @@ void reg_compute_pdev_current_chan_list(struct wlan_regulatory_pdev_priv_obj
reg_modify_chan_list_for_max_chwidth(pdev_priv_obj->pdev_ptr,
pdev_priv_obj->cur_chan_list);
reg_modify_chan_list_for_6g_edge_channels(pdev_priv_obj->pdev_ptr,
pdev_priv_obj->
cur_chan_list);
}
void reg_reset_reg_rules(struct reg_rule_info *reg_rules)

查看文件

@@ -105,6 +105,10 @@ struct chan_change_cbk_entry {
* @domain_code_6g_ap: domain code for 6G AP
* @domain_code_6g_client: domain code for 6G client
* @is_ext_tpc_supported: Whether FW supports new WMI command for TPC
* @is_lower_6g_edge_ch_supported: whether lower 6ghz edge channel 5935MHz is
* supported
* @is_upper_6g_edge_ch_disabled: whether upper 6ghz edge channel 7115MHz is
* disabled
*/
struct wlan_regulatory_psoc_priv_obj {
struct mas_chan_params mas_chan_params[PSOC_MAX_PHY_REG_CAP];
@@ -162,6 +166,10 @@ struct wlan_regulatory_psoc_priv_obj {
uint8_t domain_code_6g_client[REG_CURRENT_MAX_AP_TYPE][REG_MAX_CLIENT_TYPE];
#endif
bool is_ext_tpc_supported;
#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
bool is_lower_6g_edge_ch_supported;
bool is_upper_6g_edge_ch_disabled;
#endif
};
/**

查看文件

@@ -4531,3 +4531,67 @@ bool reg_is_ext_tpc_supported(struct wlan_objmgr_psoc *psoc)
return psoc_priv_obj->is_ext_tpc_supported;
}
#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
QDF_STATUS
reg_set_lower_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc, bool val)
{
struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
psoc_priv_obj = reg_get_psoc_obj(psoc);
if (!IS_VALID_PSOC_REG_OBJ(psoc_priv_obj)) {
reg_err("psoc reg component is NULL");
return QDF_STATUS_E_FAILURE;
}
psoc_priv_obj->is_lower_6g_edge_ch_supported = val;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
reg_set_disable_upper_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc, bool val)
{
struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
psoc_priv_obj = reg_get_psoc_obj(psoc);
if (!IS_VALID_PSOC_REG_OBJ(psoc_priv_obj)) {
reg_err("psoc reg component is NULL");
return QDF_STATUS_E_FAILURE;
}
psoc_priv_obj->is_upper_6g_edge_ch_disabled = val;
return QDF_STATUS_SUCCESS;
}
bool reg_is_lower_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc)
{
struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
psoc_priv_obj = reg_get_psoc_obj(psoc);
if (!IS_VALID_PSOC_REG_OBJ(psoc_priv_obj)) {
reg_err("psoc reg component is NULL");
return false;
}
return psoc_priv_obj->is_lower_6g_edge_ch_supported;
}
bool reg_is_upper_6g_edge_ch_disabled(struct wlan_objmgr_psoc *psoc)
{
struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
psoc_priv_obj = reg_get_psoc_obj(psoc);
if (!IS_VALID_PSOC_REG_OBJ(psoc_priv_obj)) {
reg_err("psoc reg component is NULL");
return false;
}
return psoc_priv_obj->is_upper_6g_edge_ch_disabled;
}
#endif

查看文件

@@ -1614,4 +1614,45 @@ bool reg_is_ext_tpc_supported(struct wlan_objmgr_psoc *psoc);
*/
const struct bonded_channel_freq *
reg_get_bonded_chan_entry(qdf_freq_t freq, enum phy_ch_width chwidth);
#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
/**
* reg_set_lower_6g_edge_ch_supp() - Set if lower 6ghz edge channel is
* supported by FW
*
* @psoc: Pointer to psoc
* @val: value
*/
QDF_STATUS reg_set_lower_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc,
bool val);
/**
* reg_set_disable_upper_6g_edge_ch_supp() - Set if upper 6ghz edge channel is
* disabled by FW
*
* @psoc: Pointer to psoc
* @val: value
*/
QDF_STATUS
reg_set_disable_upper_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc,
bool val);
/**
* reg_is_lower_6g_edge_ch_supp() - Check whether 6GHz lower edge channel
* (5935 MHz) is supported.
* @psoc: pointer to psoc
*
* Return: true if edge channels are supported, else false
*/
bool reg_is_lower_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc);
/**
* reg_is_upper_6g_edge_ch_disabled() - Check whether 6GHz upper edge
* channel (7115 MHz) is disabled.
* @psoc: pointer to psoc
*
* Return: true if edge channels are supported, else false
*/
bool reg_is_upper_6g_edge_ch_disabled(struct wlan_objmgr_psoc *psoc);
#endif
#endif

查看文件

@@ -116,4 +116,39 @@ QDF_STATUS tgt_reg_set_5dot9_ghz_supported(struct wlan_objmgr_psoc *psoc,
QDF_STATUS tgt_reg_set_ext_tpc_supported(struct wlan_objmgr_psoc *psoc,
bool val);
#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
/**
* tgt_reg_set_lower_6g_edge_ch_supp() - Assign the value set by FW for lower
* 6ghz edge channel (5935 MHz) support
* @psoc: Pointer to psoc
* @val: value
*/
QDF_STATUS tgt_reg_set_lower_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc,
bool val);
/**
* tgt_reg_set_disable_upper_6g_edge_ch_supp() - Assign the value set by FW
* for upper 6G edge channel {7115MHz) disablement
* @psoc: Pointer to psoc
* @val: value
*/
QDF_STATUS
tgt_reg_set_disable_upper_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc,
bool val);
#else
static inline
QDF_STATUS tgt_reg_set_lower_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc,
bool val)
{
return QDF_STATUS_E_FAILURE;
}
static inline QDF_STATUS
tgt_reg_set_disable_upper_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc,
bool val)
{
return QDF_STATUS_E_FAILURE;
}
#endif
#endif

查看文件

@@ -123,3 +123,18 @@ QDF_STATUS tgt_reg_set_ext_tpc_supported(struct wlan_objmgr_psoc *psoc,
{
return reg_set_ext_tpc_supported(psoc, val);
}
#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
QDF_STATUS tgt_reg_set_lower_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc,
bool val)
{
return reg_set_lower_6g_edge_ch_supp(psoc, val);
}
QDF_STATUS
tgt_reg_set_disable_upper_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc,
bool val)
{
return reg_set_disable_upper_6g_edge_ch_supp(psoc, val);
}
#endif