diff --git a/target_if/init_deinit/inc/service_ready_param.h b/target_if/init_deinit/inc/service_ready_param.h index dd31d4da60..a1b358ab8b 100644 --- a/target_if/init_deinit/inc/service_ready_param.h +++ b/target_if/init_deinit/inc/service_ready_param.h @@ -354,6 +354,7 @@ struct wlan_psoc_host_spectral_scaling_params { * @supports_aSpectral: Agile Spectral support for this chain mask. * @supports_aSpectral_160: Agile Spectral support in 160 MHz. * @supports_aDFS_160: Agile DFS support in 160 MHz for this chain mask. + * @supports_aDFS_320: Agile DFS support in 320 MHz for this chain mask. * @chain_mask_2G: 2G support for this chain mask. * @chain_mask_5G: 5G support for this chain mask. * @chain_mask_tx: Tx support for this chain mask. @@ -373,7 +374,10 @@ struct wlan_psoc_host_chainmask_capabilities { supports_aSpectral:1, supports_aSpectral_160:1, supports_aDFS_160:1, - reserved:19, +#ifdef WLAN_FEATURE_11BE + supports_aDFS_320:1, +#endif + reserved:17, chain_mask_2G:1, chain_mask_5G:1, chain_mask_tx:1, diff --git a/umac/dfs/core/src/dfs.h b/umac/dfs/core/src/dfs.h index 2ebc3508f1..a28a8a6a38 100644 --- a/umac/dfs/core/src/dfs.h +++ b/umac/dfs/core/src/dfs.h @@ -410,6 +410,7 @@ * Agile detector in true 160MHz supported devices). * @DETECTOR_ID_2: Detector ID 2 (Agile detector in 80p80MHZ supported devices). * @AGILE_DETECTOR_ID_TRUE_160MHZ: Agile detector ID in true 160MHz devices. + * @AGILE_DETECTOR_11BE: Agile detector ID in true 320 MHz devices. * @AGILE_DETECTOR_ID_80p80: Agile detector ID in 80p80MHz supported devices. * @INVALID_DETECTOR_ID: Invalid detector id. */ @@ -418,6 +419,7 @@ enum detector_id { DETECTOR_ID_1, DETECTOR_ID_2, AGILE_DETECTOR_ID_TRUE_160MHZ = DETECTOR_ID_1, + AGILE_DETECTOR_11BE = DETECTOR_ID_1, AGILE_DETECTOR_ID_80P80 = DETECTOR_ID_2, INVALID_DETECTOR_ID, }; @@ -1125,6 +1127,7 @@ struct dfs_rcac_params { * @dfs_use_puncture: User configured value for enabling or * disabling DFS puncturing feature. * @dfs_agile_rcac_ucfg: User configuration for Rolling CAC. + * @dfs_fw_adfs_support_320: Target Agile DFS support for 320 BW. * @dfs_fw_adfs_support_non_160: Target Agile DFS support for non-160 BWs. * @dfs_fw_adfs_support_160: Target Agile DFS support for 160 BW. * @dfs_allow_hw_pulses: Allow/Block HW pulses. When synthetic @@ -1304,6 +1307,9 @@ struct wlan_dfs { uint8_t dfs_agile_precac_ucfg:1, #if defined(QCA_SUPPORT_ADFS_RCAC) dfs_agile_rcac_ucfg:1, +#endif +#ifdef WLAN_FEATURE_11BE + dfs_fw_adfs_support_320:1, #endif dfs_fw_adfs_support_non_160:1, dfs_fw_adfs_support_160:1; diff --git a/umac/dfs/core/src/dfs_zero_cac.h b/umac/dfs/core/src/dfs_zero_cac.h index 3c5e3ee399..17cd9f83ce 100644 --- a/umac/dfs/core/src/dfs_zero_cac.h +++ b/umac/dfs/core/src/dfs_zero_cac.h @@ -394,7 +394,7 @@ dfs_decide_precac_preferred_chan_for_freq(struct wlan_dfs *dfs, uint16_t dfs_get_ieeechan_for_precac_for_freq(struct wlan_dfs *dfs, uint16_t exclude_pri_chan_freq, uint16_t exclude_sec_chan_freq, - uint8_t bandwidth); + uint16_t bandwidth); #endif /** @@ -480,6 +480,18 @@ void dfs_set_agilecac_chan_for_freq(struct wlan_dfs *dfs, uint16_t sec_chan_freq); #endif +/** + * dfs_compute_agile_and_curchan_width() - Compute the agile/current channel + * width from dfs structure. + * @dfs: Pointer to wlan_dfs structure. + * @agile_ch_width: Agile channel width. + * @cur_ch_width: Current home channel width. + */ +void +dfs_compute_agile_and_curchan_width(struct wlan_dfs *dfs, + enum phy_ch_width *agile_ch_width, + enum phy_ch_width *cur_ch_width); + /** * dfs_agile_precac_start() - Start agile precac. * @dfs: Pointer to wlan_dfs structure. @@ -506,12 +518,14 @@ void dfs_start_agile_precac_timer(struct wlan_dfs *dfs, * @dfs: Pointer to wlan_dfs structure. * @fw_adfs_support_160: aDFS enabled when pdev is on 160/80P80MHz. * @fw_adfs_support_non_160: aDFS enabled when pdev is on 20/40/80MHz. + * @fw_adfs_support_320: aDFS enabled when pdev is on 320 MHz. * * Return: void. */ void dfs_set_fw_adfs_support(struct wlan_dfs *dfs, bool fw_adfs_support_160, - bool fw_adfs_support_non_160); + bool fw_adfs_support_non_160, + bool fw_adfs_support_320); #else static inline void dfs_find_pdev_for_agile_precac(struct wlan_objmgr_pdev *pdev, uint8_t *cur_agile_dfs_index) @@ -542,6 +556,13 @@ dfs_set_agilecac_chan_for_freq(struct wlan_dfs *dfs, } #endif +static inline void +dfs_compute_agile_and_curchan_width(struct wlan_dfs *dfs, + enum phy_ch_width *agile_ch_width, + enum phy_ch_width *cur_ch_width) +{ +} + static inline void dfs_agile_precac_start(struct wlan_dfs *dfs) { } @@ -556,7 +577,8 @@ dfs_start_agile_precac_timer(struct wlan_dfs *dfs, static inline void dfs_set_fw_adfs_support(struct wlan_dfs *dfs, bool fw_adfs_support_160, - bool fw_adfs_support_non_160) + bool fw_adfs_support_non_160, + bool fw_adfs_support_320) { } #endif @@ -1041,6 +1063,16 @@ QDF_STATUS dfs_agile_sm_destroy(struct dfs_soc_priv_obj *dfs_soc_obj); */ bool dfs_is_agile_cac_enabled(struct wlan_dfs *dfs); +/* dfs_translate_chwidth_enum2val() - Translate the given channel width enum + * to it's value. + * @dfs: Pointer to WLAN DFS structure. + * @chwidth: Channel width enum of the pdev's current channel. + * + * Return: The Bandwidth value for the given channel width enum. + */ +uint16_t +dfs_translate_chwidth_enum2val(struct wlan_dfs *dfs, + enum phy_ch_width chwidth); #else static inline @@ -1068,6 +1100,12 @@ static inline bool dfs_is_agile_cac_enabled(struct wlan_dfs *dfs) { return false; } + +static inline uint16_t dfs_translate_chwidth_enum2val(struct wlan_dfs *dfs, + enum phy_ch_width chwidth) +{ + return false; +} #endif /* QCA_SUPPORT_AGILE_DFS */ #ifdef QCA_SUPPORT_ADFS_RCAC diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h index 23243a2cff..82dcf0551c 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h @@ -554,17 +554,20 @@ tgt_dfs_send_subchan_marking(struct wlan_objmgr_pdev *pdev, bool subchanmark) * @pdev: Pointer to pdev object. * @fw_adfs_support_160: aDFS enabled when pdev is on 160/80P80MHz. * @fw_adfs_support_non_160: aDFS enabled when pdev is on 20/40/80MHz. + * @fw_adfs_support_320: aDFS enabled when pdev is on 320 MHz. * * Return: void. */ void tgt_dfs_set_fw_adfs_support(struct wlan_objmgr_pdev *pdev, bool fw_adfs_support_160, - bool fw_adfs_support_non_160); + bool fw_adfs_support_non_160, + bool fw_adfs_support_320); #else static inline void tgt_dfs_set_fw_adfs_support(struct wlan_objmgr_pdev *pdev, bool fw_adfs_support_160, - bool fw_adfs_support_non_160) + bool fw_adfs_support_non_160, + bool fw_adfs_support_320) { } #endif diff --git a/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c b/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c index fc8622bd98..d2c8de7fe7 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c @@ -789,7 +789,8 @@ qdf_export_symbol(tgt_dfs_send_subchan_marking); #ifdef QCA_SUPPORT_AGILE_DFS void tgt_dfs_set_fw_adfs_support(struct wlan_objmgr_pdev *pdev, bool fw_adfs_support_160, - bool fw_adfs_support_non_160) + bool fw_adfs_support_non_160, + bool fw_adfs_support_320) { struct wlan_dfs *dfs; @@ -801,7 +802,8 @@ void tgt_dfs_set_fw_adfs_support(struct wlan_objmgr_pdev *pdev, dfs_set_fw_adfs_support(dfs, fw_adfs_support_160, - fw_adfs_support_non_160); + fw_adfs_support_non_160, + fw_adfs_support_320); } qdf_export_symbol(tgt_dfs_set_fw_adfs_support); diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index 9ff8d2bba3..ce19a771d1 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h @@ -2263,7 +2263,8 @@ struct wlan_lmac_if_dfs_rx_ops { bool (*dfs_is_hw_pulses_allowed)(struct wlan_objmgr_pdev *pdev); void (*dfs_set_fw_adfs_support)(struct wlan_objmgr_pdev *pdev, bool fw_adfs_support_160, - bool fw_adfs_support_non_160); + bool fw_adfs_support_non_160, + bool fw_adfs_support_320); void (*dfs_reset_dfs_prevchan)(struct wlan_objmgr_pdev *pdev); void (*dfs_init_tmp_psoc_nol)(struct wlan_objmgr_pdev *pdev, uint8_t num_radios);