qcacmn: Refine 5g bonded channel state with static puncturing
Refine reg_get_5g_bonded_channel_state_for_freq with static puncturing. Update channel state as CHANNEL_STATE_DFS or CHANNEL_STATE_ENABLE if its puncture bitmap is valid with given bandwidth. Change-Id: I3503c8bcf6094b9c98056809f1c304747ba97667 CRs-Fixed: 3106240
此提交包含在:
@@ -637,6 +637,9 @@ struct freq_range {
|
||||
* @mhz_freq_seg0: Center frequency for segment 0
|
||||
* @mhz_freq_seg1: Center frequency for segment 1
|
||||
* @reg_punc_bitmap: Output puncturing bitmap
|
||||
* @is_create_punc_bitmap: Whether puncturing bitmap is to be created or not
|
||||
* Parameter 'reg_punc_bitmap' is valid only if
|
||||
* is_create_punc_bitmap is true
|
||||
*/
|
||||
struct ch_params {
|
||||
enum phy_ch_width ch_width;
|
||||
@@ -647,6 +650,7 @@ struct ch_params {
|
||||
qdf_freq_t mhz_freq_seg1;
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
uint16_t reg_punc_bitmap;
|
||||
bool is_create_punc_bitmap;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -1346,6 +1346,31 @@ void wlan_reg_fill_channel_list(struct wlan_objmgr_pdev *pdev,
|
||||
enum phy_ch_width ch_width,
|
||||
qdf_freq_t band_center_320,
|
||||
struct reg_channel_list *chan_list);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_punc_bitmap_valid() - is puncture bitmap valid or not
|
||||
* @bw: Input channel width.
|
||||
* @puncture_bitmap Input puncture bitmap.
|
||||
*
|
||||
* Return: true if given puncture bitmap is valid
|
||||
*/
|
||||
bool wlan_reg_is_punc_bitmap_valid(enum phy_ch_width bw,
|
||||
uint16_t puncture_bitmap);
|
||||
|
||||
/**
|
||||
* wlan_reg_set_create_punc_bitmap() - set is_create_punc_bitmap of ch_params
|
||||
* @ch_params: ch_params to set
|
||||
* @is_create_punc_bitmap: is create punc bitmap
|
||||
*
|
||||
* Return: NULL
|
||||
*/
|
||||
void wlan_reg_set_create_punc_bitmap(struct ch_params *ch_params,
|
||||
bool is_create_punc_bitmap);
|
||||
#else
|
||||
static inline void wlan_reg_set_create_punc_bitmap(struct ch_params *ch_params,
|
||||
bool is_create_punc_bitmap)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -1093,13 +1093,18 @@ wlan_reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t freq,
|
||||
enum phy_ch_width bw)
|
||||
{
|
||||
struct ch_params params = {0};
|
||||
|
||||
if (bw == CH_WIDTH_320MHZ) {
|
||||
const struct bonded_channel_freq *bonded_chan_ptr_ptr = NULL;
|
||||
|
||||
return reg_get_5g_bonded_channel_for_freq(pdev, freq, bw,
|
||||
&bonded_chan_ptr_ptr);
|
||||
}
|
||||
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq, bw);
|
||||
|
||||
params.ch_width = bw;
|
||||
|
||||
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq, ¶ms);
|
||||
}
|
||||
|
||||
qdf_export_symbol(wlan_reg_get_5g_bonded_channel_state_for_freq);
|
||||
@@ -1111,7 +1116,11 @@ wlan_reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t freq,
|
||||
enum phy_ch_width bw)
|
||||
{
|
||||
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq, bw);
|
||||
struct ch_params params = {0};
|
||||
|
||||
params.ch_width = bw;
|
||||
|
||||
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq, ¶ms);
|
||||
}
|
||||
|
||||
qdf_export_symbol(wlan_reg_get_5g_bonded_channel_state_for_freq);
|
||||
@@ -1150,6 +1159,18 @@ void wlan_reg_fill_channel_list(struct wlan_objmgr_pdev *pdev,
|
||||
reg_fill_channel_list(pdev, freq, sec_ch_2g_freq, ch_width,
|
||||
band_center_320, chan_list);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_punc_bitmap_valid(enum phy_ch_width bw,
|
||||
uint16_t puncture_bitmap)
|
||||
{
|
||||
return reg_is_punc_bitmap_valid(bw, puncture_bitmap);
|
||||
}
|
||||
|
||||
void wlan_reg_set_create_punc_bitmap(struct ch_params *ch_params,
|
||||
bool is_create_punc_bitmap)
|
||||
{
|
||||
reg_set_create_punc_bitmap(ch_params, is_create_punc_bitmap);
|
||||
}
|
||||
#endif
|
||||
|
||||
enum channel_state
|
||||
@@ -1276,8 +1297,12 @@ wlan_reg_get_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
return reg_get_5g_bonded_channel_for_freq(pdev, freq, bw,
|
||||
&bonded_chan_ptr_ptr);
|
||||
} else {
|
||||
struct ch_params params = {0};
|
||||
|
||||
params.ch_width = bw;
|
||||
|
||||
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq,
|
||||
bw);
|
||||
¶ms);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1290,12 +1315,17 @@ wlan_reg_get_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
enum phy_ch_width bw,
|
||||
qdf_freq_t sec_freq)
|
||||
{
|
||||
if (WLAN_REG_IS_24GHZ_CH_FREQ(freq))
|
||||
if (WLAN_REG_IS_24GHZ_CH_FREQ(freq)) {
|
||||
return reg_get_2g_bonded_channel_state_for_freq(pdev, freq,
|
||||
sec_freq, bw);
|
||||
else
|
||||
} else {
|
||||
struct ch_params params = {0};
|
||||
|
||||
params.ch_width = bw;
|
||||
|
||||
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq,
|
||||
bw);
|
||||
¶ms);
|
||||
}
|
||||
}
|
||||
|
||||
qdf_export_symbol(wlan_reg_get_5g_bonded_channel_and_state_for_freq);
|
||||
|
新增問題並參考
封鎖使用者