From ab9c4aa6d055e6baeb42354d7de7ac7c27c2c7eb Mon Sep 17 00:00:00 2001 From: Gururaj Pandurangi Date: Tue, 25 Jan 2022 16:43:19 -0800 Subject: [PATCH] qcacmn: Add 6GHz edge channel support for SAP Modify 6GHz edge channels ch2 (5935MHz) and ch233 (7115MHz) for SAP and other beaconing entities. Add new wrapper API that calls original API reg_modify_chan_list_for_6g_edge_channels by passing secondary channel list. This API enables/disables these channels in sec current chan list based on service bits WMI_SERVICE_ENABLE_LOWER_6G_EDGE_CH_SUPP and WMI_SERVICE_DISABLE_UPPER_6G_EDGE_CH_SUPP. Change-Id: I545bd752c98244a6327c1bdb4ee80a1625c4944f CRs-Fixed: 3117774 --- .../regulatory/core/src/reg_build_chan_list.c | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/umac/regulatory/core/src/reg_build_chan_list.c b/umac/regulatory/core/src/reg_build_chan_list.c index 2bc4104389..5726a97820 100644 --- a/umac/regulatory/core/src/reg_build_chan_list.c +++ b/umac/regulatory/core/src/reg_build_chan_list.c @@ -1478,6 +1478,35 @@ reg_modify_6g_afc_chan_list(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj) } #endif /* CONFIG_BAND_6GHZ */ +#if defined(CONFIG_BAND_6GHZ) && (CONFIG_REG_CLIENT) +/** + * reg_modify_sec_chan_list_for_6g_edge_chan() - Modify 6 GHz edge channels + * for SAP (for MCC use case) + * + * @pdev_priv_obj: pointer to pdev_priv_obj. + * + * This is a wrapper function that calls the API + * reg_modify_chan_list_for_6g_edge_channels() by passing secondary channel + * list (used by beaconing entities like SAP). This API enables/disables 6GHz + * edge channels ch2 (5935 MHz) and ch233 (7115 MHz) based on service bits. + * + */ +static void +reg_modify_sec_chan_list_for_6g_edge_chan(struct wlan_regulatory_pdev_priv_obj + *pdev_priv_obj) +{ + reg_modify_chan_list_for_6g_edge_channels(pdev_priv_obj->pdev_ptr, + pdev_priv_obj-> + secondary_cur_chan_list); +} +#else +static inline void +reg_modify_sec_chan_list_for_6g_edge_chan(struct wlan_regulatory_pdev_priv_obj + *pdev_priv_obj) +{ +} +#endif + #ifdef FEATURE_WLAN_CH_AVOID_EXT struct chan_5g_center_freq center_5g[MAX_5G_CHAN_NUM] = { /*36*/ @@ -2351,6 +2380,8 @@ void reg_compute_pdev_current_chan_list(struct wlan_regulatory_pdev_priv_obj reg_populate_secondary_cur_chan_list(pdev_priv_obj); reg_modify_chan_list_for_avoid_chan_ext(pdev_priv_obj); + + reg_modify_sec_chan_list_for_6g_edge_chan(pdev_priv_obj); } void reg_reset_reg_rules(struct reg_rule_info *reg_rules)