diff --git a/umac/regulatory/core/src/reg_priv.h b/umac/regulatory/core/src/reg_priv.h index 3edc950ee4d4..7f20ba8f8310 100644 --- a/umac/regulatory/core/src/reg_priv.h +++ b/umac/regulatory/core/src/reg_priv.h @@ -73,6 +73,7 @@ struct wlan_regulatory_psoc_priv_obj { uint8_t ch_avoid_ind; struct unsafe_ch_list unsafe_chan_list; struct ch_avoid_ind_type avoid_freq_list; + enum restart_beaconing_on_ch_avoid_rule restart_beaconing; qdf_spinlock_t cbk_list_lock; }; diff --git a/umac/regulatory/core/src/reg_services.c b/umac/regulatory/core/src/reg_services.c index bf56ab4c8d86..2e0325b9bbbd 100644 --- a/umac/regulatory/core/src/reg_services.c +++ b/umac/regulatory/core/src/reg_services.c @@ -2673,6 +2673,7 @@ QDF_STATUS wlan_regulatory_psoc_obj_created_notification( soc_reg_obj->indoor_chan_enabled = true; soc_reg_obj->master_vdev_cnt = 0; soc_reg_obj->vdev_cnt_11d = 0; + soc_reg_obj->restart_beaconing = CH_AVOID_RULE_RESTART; for (i = 0; i < MAX_STA_VDEV_CNT; i++) soc_reg_obj->vdev_ids_11d[i] = INVALID_VDEV_ID; @@ -3259,6 +3260,7 @@ QDF_STATUS reg_set_config_vars(struct wlan_objmgr_psoc *psoc, psoc_priv_obj->indoor_chan_enabled = config_vars.indoor_chan_enabled; psoc_priv_obj->band_capability = config_vars.band_capability; + psoc_priv_obj->restart_beaconing = config_vars.restart_beaconing; status = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_REGULATORY_SB_ID); if (QDF_IS_STATUS_ERROR(status)) { @@ -3808,6 +3810,13 @@ QDF_STATUS reg_process_ch_avoid_event(struct wlan_objmgr_psoc *psoc, sizeof(struct unsafe_ch_list)); for (i = 0; i < ch_avoid_event->ch_avoid_range_cnt; i++) { + if ((CH_AVOID_RULE_RESTART_24G_ONLY == + psoc_priv_obj->restart_beaconing) && + REG_IS_5GHZ_FREQ(ch_avoid_event-> + avoid_freq_range[i].start_freq)) { + reg_debug("skipping 5Ghz LTE Coex unsafe channel range"); + continue; + } psoc_priv_obj->avoid_freq_list.avoid_freq_range[i].start_freq = ch_avoid_event->avoid_freq_range[i].start_freq; psoc_priv_obj->avoid_freq_list.avoid_freq_range[i].end_freq = diff --git a/umac/regulatory/core/src/reg_services.h b/umac/regulatory/core/src/reg_services.h index edaa1fab733e..5e906261d53d 100644 --- a/umac/regulatory/core/src/reg_services.h +++ b/umac/regulatory/core/src/reg_services.h @@ -55,6 +55,10 @@ ((chan_num >= REG_MIN_11P_CH_NUM) && \ (chan_num <= REG_MAX_11P_CH_NUM)) +#define REG_IS_5GHZ_FREQ(freq) \ + ((freq >= channel_map[MIN_5GHZ_CHANNEL].center_freq) && \ + (freq <= channel_map[MAX_5GHZ_CHANNEL].center_freq)) + #define REG_CH_NUM(ch_enum) channel_map[ch_enum].chan_num #define REG_CH_TO_FREQ(ch_enum) channel_map[ch_enum].center_freq diff --git a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h index d835006968bf..02c92e6ce215 100644 --- a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h +++ b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h @@ -738,6 +738,21 @@ enum band_info { BAND_5G, }; +/** + * enum restart_beaconing_on_ch_avoid_rule: control the beaconing entity to + * move away from active LTE channels + * @CH_AVOID_RULE_DO_NOT_RESTART: Do not move from active LTE + * channels + * @CH_AVOID_RULE_RESTART: Move from active LTE channels + * @CH_AVOID_RULE_RESTART_24G_ONLY: move from 2.4G active LTE + * channels only + */ +enum restart_beaconing_on_ch_avoid_rule { + CH_AVOID_RULE_DO_NOT_RESTART, + CH_AVOID_RULE_RESTART, + CH_AVOID_RULE_RESTART_24G_ONLY, +}; + /** * struct reg_config_vars * @enable_11d_support: enable 11d support @@ -746,6 +761,8 @@ enum band_info { * @band_capability: band capability * @dfs_disable: dfs disabled * @indoor_channel_support: indoor channel support + * @restart_beaconing: control the beaconing entity to move + * away from active LTE channels */ struct reg_config_vars { uint32_t enable_11d_support; @@ -754,6 +771,7 @@ struct reg_config_vars { enum band_info band_capability; uint32_t dfs_enabled; uint32_t indoor_chan_enabled; + enum restart_beaconing_on_ch_avoid_rule restart_beaconing; }; /**