qcacmn: Update dfs channel punc pattern from mlme
With the introduction of 11BE, channel puncturing becomes possible. Hence, the DFS channel structure should be updated with channel puncturing information. Change-Id: Ia1bccd55e7fadde2a49fb08bd30ff6b5b2cc6ba1
Этот коммит содержится в:

коммит произвёл
Madan Koyyalamudi

родитель
1bc1af8b6c
Коммит
dd76700b7d
@@ -714,6 +714,7 @@ struct dfs_filtertype {
|
||||
* @dfs_ch_mhz_freq_seg2: Channel center frequency of secondary segment
|
||||
* in MHZ applicable only for 80+80MHZ mode of
|
||||
* operation.
|
||||
* @dfs_ch_punc_pattern: Bitmap representing puncturing patterns.
|
||||
*/
|
||||
struct dfs_channel {
|
||||
uint16_t dfs_ch_freq;
|
||||
@@ -724,6 +725,16 @@ struct dfs_channel {
|
||||
uint8_t dfs_ch_vhtop_ch_freq_seg2;
|
||||
uint16_t dfs_ch_mhz_freq_seg1;
|
||||
uint16_t dfs_ch_mhz_freq_seg2;
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
/* If the bitmap is all 0 then nothing is punctured. If any bit is 1
|
||||
* then corresponding 20MHz sub-channel is puntured. For example, for
|
||||
* channel 100 (BW 240MHz), it will treated as a 320MHz channel and the
|
||||
* bit-map will be b1111_0000_0000_0000 (where the most significant bit
|
||||
* indicates the rightmost sub20channel and the least significant bit
|
||||
* indicates the leftmost sub20channel).
|
||||
*/
|
||||
uint16_t dfs_ch_punc_pattern;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2584,6 +2595,7 @@ static inline bool dfs_is_en302_502_applicable(struct wlan_dfs *dfs)
|
||||
* @dfs_chan_mhz_freq_seg1: Channel center frequency of primary segment in MHZ.
|
||||
* @dfs_chan_mhz_freq_seg2: Channel center frequency of secondary segment in MHZ
|
||||
* applicable only for 80+80MHZ mode of operation.
|
||||
* @dfs_chan_op_puncture_bitmap: Static channel puncturing of current channel.
|
||||
* @is_channel_updated: boolean to represent channel update.
|
||||
*/
|
||||
void dfs_set_current_channel_for_freq(struct wlan_dfs *dfs,
|
||||
@@ -2595,8 +2607,8 @@ void dfs_set_current_channel_for_freq(struct wlan_dfs *dfs,
|
||||
uint8_t dfs_chan_vhtop_freq_seg2,
|
||||
uint16_t dfs_chan_mhz_freq_seg1,
|
||||
uint16_t dfs_chan_mhz_freq_seg2,
|
||||
uint16_t dfs_chan_op_puncture_bitmap,
|
||||
bool *is_channel_updated);
|
||||
|
||||
#endif
|
||||
/**
|
||||
* dfs_get_nol_chfreq_and_chwidth() - Get channel freq and width from NOL list.
|
||||
|
@@ -678,6 +678,21 @@ bad:
|
||||
return error;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
static inline bool
|
||||
dfs_is_chan_punc_same_as_given_punc(struct dfs_channel *dfs_curchan,
|
||||
uint16_t dfs_chan_punc_pattern)
|
||||
{
|
||||
return (dfs_curchan->dfs_ch_punc_pattern == dfs_chan_punc_pattern);
|
||||
}
|
||||
#else
|
||||
static inline bool
|
||||
dfs_is_chan_punc_same_as_given_punc(struct dfs_channel *dfs_curchan,
|
||||
uint16_t dfs_chan_punc_pattern)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* dfs_is_curchan_same_as_given_chan() - Find if dfs_curchan has the same
|
||||
* channel parameters provided.
|
||||
@@ -697,7 +712,8 @@ dfs_is_curchan_same_as_given_chan(struct dfs_channel *dfs_curchan,
|
||||
uint64_t dfs_ch_flags,
|
||||
uint16_t dfs_ch_flagext,
|
||||
uint8_t dfs_ch_vhtop_ch_freq_seg1,
|
||||
uint8_t dfs_ch_vhtop_ch_freq_seg2)
|
||||
uint8_t dfs_ch_vhtop_ch_freq_seg2,
|
||||
uint16_t dfs_chan_punc_pattern)
|
||||
{
|
||||
if ((dfs_curchan->dfs_ch_freq == dfs_ch_freq) &&
|
||||
(dfs_curchan->dfs_ch_flags == dfs_ch_flags) &&
|
||||
@@ -705,12 +721,29 @@ dfs_is_curchan_same_as_given_chan(struct dfs_channel *dfs_curchan,
|
||||
(dfs_curchan->dfs_ch_vhtop_ch_freq_seg1 ==
|
||||
dfs_ch_vhtop_ch_freq_seg1) &&
|
||||
(dfs_curchan->dfs_ch_vhtop_ch_freq_seg2 ==
|
||||
dfs_ch_vhtop_ch_freq_seg2))
|
||||
dfs_ch_vhtop_ch_freq_seg2) &&
|
||||
(dfs_is_chan_punc_same_as_given_punc(dfs_curchan,
|
||||
dfs_chan_punc_pattern)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
static inline void
|
||||
dfs_set_cur_chan_punc_pattern(struct wlan_dfs *dfs,
|
||||
uint16_t dfs_ch_punc_pattern)
|
||||
{
|
||||
dfs->dfs_curchan->dfs_ch_punc_pattern = dfs_ch_punc_pattern;
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
dfs_set_cur_chan_punc_pattern(struct wlan_dfs *dfs,
|
||||
uint16_t dfs_ch_punc_pattern)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
void dfs_set_current_channel_for_freq(struct wlan_dfs *dfs,
|
||||
uint16_t dfs_chan_freq,
|
||||
@@ -721,6 +754,7 @@ void dfs_set_current_channel_for_freq(struct wlan_dfs *dfs,
|
||||
uint8_t dfs_chan_vhtop_freq_seg2,
|
||||
uint16_t dfs_chan_mhz_freq_seg1,
|
||||
uint16_t dfs_chan_mhz_freq_seg2,
|
||||
uint16_t dfs_ch_punc_pattern,
|
||||
bool *is_channel_updated)
|
||||
{
|
||||
if (is_channel_updated)
|
||||
@@ -737,7 +771,8 @@ void dfs_set_current_channel_for_freq(struct wlan_dfs *dfs,
|
||||
dfs_chan_flags,
|
||||
dfs_chan_flagext,
|
||||
dfs_chan_vhtop_freq_seg1,
|
||||
dfs_chan_vhtop_freq_seg2)) {
|
||||
dfs_chan_vhtop_freq_seg2,
|
||||
dfs_ch_punc_pattern)) {
|
||||
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
|
||||
"dfs_curchan already updated");
|
||||
return;
|
||||
@@ -757,6 +792,7 @@ void dfs_set_current_channel_for_freq(struct wlan_dfs *dfs,
|
||||
dfs->dfs_curchan->dfs_ch_vhtop_ch_freq_seg2 = dfs_chan_vhtop_freq_seg2;
|
||||
dfs->dfs_curchan->dfs_ch_mhz_freq_seg1 = dfs_chan_mhz_freq_seg1;
|
||||
dfs->dfs_curchan->dfs_ch_mhz_freq_seg2 = dfs_chan_mhz_freq_seg2;
|
||||
dfs_set_cur_chan_punc_pattern(dfs, dfs_ch_punc_pattern);
|
||||
|
||||
if (is_channel_updated)
|
||||
*is_channel_updated = true;
|
||||
|
@@ -134,6 +134,8 @@ extern struct dfs_to_mlme global_dfs_to_mlme;
|
||||
* @dfs_ch_mhz_freq_seg1: Channel center frequency of primary segment in MHZ.
|
||||
* @dfs_ch_mhz_freq_seg2: Channel center frequency of secondary segment in MHZ
|
||||
* applicable only for 80+80MHZ mode of operation.
|
||||
* @dfs_ch_op_puncturing: Puncturing pattern followed in current operating
|
||||
* channel.
|
||||
* @is_channel_updated: Boolean to represent channel update.
|
||||
*/
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
@@ -147,6 +149,7 @@ tgt_dfs_set_current_channel_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t dfs_ch_vhtop_ch_freq_seg2,
|
||||
uint16_t dfs_ch_mhz_freq_seg1,
|
||||
uint16_t dfs_ch_mhz_freq_seg2,
|
||||
uint16_t dfs_ch_op_puncturing,
|
||||
bool *is_channel_updated);
|
||||
#endif
|
||||
|
||||
|
@@ -101,6 +101,7 @@ tgt_dfs_set_current_channel_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t dfs_chan_vhtop_freq_seg2,
|
||||
uint16_t dfs_chan_mhz_freq_seg1,
|
||||
uint16_t dfs_chan_mhz_freq_seg2,
|
||||
uint16_t dfs_chan_punc_pattern,
|
||||
bool *is_channel_updated)
|
||||
{
|
||||
struct wlan_dfs *dfs;
|
||||
@@ -123,6 +124,7 @@ tgt_dfs_set_current_channel_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
dfs_chan_vhtop_freq_seg2,
|
||||
dfs_chan_mhz_freq_seg1,
|
||||
dfs_chan_mhz_freq_seg2,
|
||||
dfs_chan_punc_pattern,
|
||||
is_channel_updated);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
@@ -1842,6 +1842,7 @@ struct wlan_lmac_if_dfs_rx_ops {
|
||||
uint8_t ic_vhtop_ch_freq_seg2,
|
||||
uint16_t dfs_ch_mhz_freq_seg1,
|
||||
uint16_t dfs_ch_mhz_freq_seg2,
|
||||
uint16_t dfs_ch_punc_pattern,
|
||||
bool *is_channel_updated);
|
||||
#endif
|
||||
#ifdef DFS_COMPONENT_ENABLE
|
||||
|
@@ -126,6 +126,13 @@ vdev_mgr_start_param_update_11be(struct vdev_mlme_obj *mlme_obj,
|
||||
param->eht_ops = mlme_obj->proto.eht_ops_info.eht_ops;
|
||||
param->channel.puncture_pattern = des_chan->puncture_bitmap;
|
||||
}
|
||||
|
||||
static inline void
|
||||
vdev_mgr_set_cur_chan_punc_pattern(struct wlan_channel *des_chan,
|
||||
uint16_t *puncture_bitmap)
|
||||
{
|
||||
*puncture_bitmap = des_chan->puncture_bitmap;
|
||||
}
|
||||
#else
|
||||
static void
|
||||
vdev_mgr_start_param_update_11be(struct vdev_mlme_obj *mlme_obj,
|
||||
@@ -133,6 +140,13 @@ vdev_mgr_start_param_update_11be(struct vdev_mlme_obj *mlme_obj,
|
||||
struct wlan_channel *des_chan)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
vdev_mgr_set_cur_chan_punc_pattern(struct wlan_channel *des_chan,
|
||||
uint16_t *puncture_bitmap)
|
||||
{
|
||||
*puncture_bitmap = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static QDF_STATUS vdev_mgr_start_param_update(
|
||||
@@ -147,6 +161,7 @@ static QDF_STATUS vdev_mgr_start_param_update(
|
||||
enum QDF_OPMODE op_mode;
|
||||
bool is_dfs_chan_updated = false;
|
||||
struct vdev_mlme_mbss_11ax *mbss;
|
||||
uint16_t puncture_bitmap;
|
||||
|
||||
vdev = mlme_obj->vdev;
|
||||
if (!vdev) {
|
||||
@@ -172,6 +187,7 @@ static QDF_STATUS vdev_mgr_start_param_update(
|
||||
op_mode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
if (vdev_mgr_is_opmode_sap_or_p2p_go(op_mode) &&
|
||||
vdev_mgr_is_49G_5G_chan_freq(des_chan->ch_freq)) {
|
||||
vdev_mgr_set_cur_chan_punc_pattern(des_chan, &puncture_bitmap);
|
||||
tgt_dfs_set_current_channel_for_freq(pdev, des_chan->ch_freq,
|
||||
des_chan->ch_flags,
|
||||
des_chan->ch_flagext,
|
||||
@@ -180,6 +196,7 @@ static QDF_STATUS vdev_mgr_start_param_update(
|
||||
des_chan->ch_freq_seg2,
|
||||
des_chan->ch_cfreq1,
|
||||
des_chan->ch_cfreq2,
|
||||
puncture_bitmap,
|
||||
&is_dfs_chan_updated);
|
||||
if (des_chan->ch_cfreq2)
|
||||
param->channel.dfs_set_cfreq2 =
|
||||
|
Ссылка в новой задаче
Block a user