qcacld-3.0: Add 20/40M check for vht when handle beacon
Add function wlan_mlme_convert_he_op_bw_to_phy_ch_width, check 80+80 or 160 with ccfs0 and ccfs1. Add 20M/40M check for vht bw with prim chan id and ccfs0. Change-Id: I01a407358d7c310f92c8a69004ebb002b615438a CRs-Fixed: 3511291
This commit is contained in:

committed by
Rahul Choudhary

parent
bf474955e2
commit
227d1e75f3
@@ -1070,13 +1070,34 @@ QDF_STATUS mlme_update_tgt_he_caps_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
/**
|
||||
* wlan_mlme_convert_vht_op_bw_to_phy_ch_width() - convert channel width in VHT
|
||||
* operation IE to phy_ch_width
|
||||
* @channel_width: channel width in VHT operation IE. If it is 0, please use HT
|
||||
* information IE to check whether it is 20MHz or 40MHz.
|
||||
* @channel_width: channel width in VHT operation IE.
|
||||
* @chan_id: channel id
|
||||
* @ccfs0: channel center frequency segment 0
|
||||
* @ccfs0: channel center frequency segment 1
|
||||
*
|
||||
* Return: phy_ch_width
|
||||
*/
|
||||
enum phy_ch_width wlan_mlme_convert_vht_op_bw_to_phy_ch_width(
|
||||
uint8_t channel_width);
|
||||
enum phy_ch_width
|
||||
wlan_mlme_convert_vht_op_bw_to_phy_ch_width(uint8_t channel_width,
|
||||
uint8_t chan_id,
|
||||
uint8_t ccfs0,
|
||||
uint8_t ccfs1);
|
||||
|
||||
/**
|
||||
* wlan_mlme_convert_he_6ghz_op_bw_to_phy_ch_width() - convert channel width in
|
||||
* he 6ghz peration IE to phy_ch_width
|
||||
* @channel_width: channel width in HE operation IE.
|
||||
* @chan_id: channel id
|
||||
* @ccfs0: channel center frequency segment 0
|
||||
* @ccfs0: channel center frequency segment 1
|
||||
*
|
||||
* Return: phy_ch_width
|
||||
*/
|
||||
enum phy_ch_width
|
||||
wlan_mlme_convert_he_6ghz_op_bw_to_phy_ch_width(uint8_t channel_width,
|
||||
uint8_t chan_id,
|
||||
uint8_t ccfs0,
|
||||
uint8_t ccfs1);
|
||||
|
||||
/**
|
||||
* wlan_mlme_chan_stats_scan_event_cb() - process connected channel stats
|
||||
|
@@ -6817,18 +6817,63 @@ wlan_mlme_send_ch_width_update_with_notify(struct wlan_objmgr_psoc *psoc,
|
||||
return status;
|
||||
}
|
||||
|
||||
enum phy_ch_width wlan_mlme_convert_vht_op_bw_to_phy_ch_width(
|
||||
uint8_t channel_width)
|
||||
enum phy_ch_width
|
||||
wlan_mlme_convert_vht_op_bw_to_phy_ch_width(uint8_t channel_width,
|
||||
uint8_t chan_id,
|
||||
uint8_t ccfs0,
|
||||
uint8_t ccfs1)
|
||||
{
|
||||
enum phy_ch_width phy_bw = CH_WIDTH_40MHZ;
|
||||
/** channel_width in vht op from 802.11-2020
|
||||
* Set to 0 for 20 MHz or 40 MHz BSS bandwidth.
|
||||
* Set to 1 for 80 MHz, 160 MHz or 80+80 MHz BSS
|
||||
* bandwidth.
|
||||
* Set to 2 for 160 MHz BSS bandwidth (deprecated).
|
||||
* Set to 3 for noncontiguous 80+80 MHz BSS
|
||||
* bandwidth (deprecated).
|
||||
* Values in the range 4 to 255 are reserved
|
||||
*
|
||||
* 80+80 not supported by MCC platform, so downgrade to 80
|
||||
*/
|
||||
enum phy_ch_width phy_bw = CH_WIDTH_20MHZ;
|
||||
|
||||
if (channel_width == WLAN_VHTOP_CHWIDTH_80)
|
||||
phy_bw = CH_WIDTH_80MHZ;
|
||||
else if (channel_width == WLAN_VHTOP_CHWIDTH_160)
|
||||
if (channel_width == WLAN_VHTOP_CHWIDTH_2040) {
|
||||
phy_bw = CH_WIDTH_20MHZ;
|
||||
if (abs(ccfs0 - chan_id) == 2)
|
||||
phy_bw = CH_WIDTH_40MHZ;
|
||||
} else if (channel_width == WLAN_VHTOP_CHWIDTH_80) {
|
||||
if (ccfs1 && (abs(ccfs1 - ccfs0) == 8))
|
||||
phy_bw = CH_WIDTH_160MHZ;
|
||||
else
|
||||
phy_bw = CH_WIDTH_80MHZ;
|
||||
} else if (channel_width == WLAN_VHTOP_CHWIDTH_160) {
|
||||
phy_bw = CH_WIDTH_160MHZ;
|
||||
/* 80 + 80 not supported */
|
||||
else if (channel_width == WLAN_VHTOP_CHWIDTH_80_80)
|
||||
} else if (channel_width == WLAN_VHTOP_CHWIDTH_80_80) {
|
||||
phy_bw = WLAN_VHTOP_CHWIDTH_80;
|
||||
}
|
||||
|
||||
return phy_bw;
|
||||
}
|
||||
|
||||
enum phy_ch_width
|
||||
wlan_mlme_convert_he_6ghz_op_bw_to_phy_ch_width(uint8_t channel_width,
|
||||
uint8_t chan_id,
|
||||
uint8_t ccfs0,
|
||||
uint8_t ccfs1)
|
||||
{
|
||||
enum phy_ch_width phy_bw = CH_WIDTH_20MHZ;
|
||||
|
||||
if (channel_width == WLAN_HE_6GHZ_CHWIDTH_20) {
|
||||
phy_bw = CH_WIDTH_20MHZ;
|
||||
} else if (channel_width == WLAN_HE_6GHZ_CHWIDTH_40) {
|
||||
phy_bw = CH_WIDTH_40MHZ;
|
||||
} else if (channel_width == WLAN_HE_6GHZ_CHWIDTH_80) {
|
||||
phy_bw = CH_WIDTH_80MHZ;
|
||||
} else if (channel_width == WLAN_HE_6GHZ_CHWIDTH_160_80_80) {
|
||||
phy_bw = CH_WIDTH_160MHZ;
|
||||
/* 80+80 not supported */
|
||||
if (ccfs1 && abs(ccfs0 - ccfs1) > 8)
|
||||
phy_bw = CH_WIDTH_80MHZ;
|
||||
}
|
||||
|
||||
return phy_bw;
|
||||
}
|
||||
|
Reference in New Issue
Block a user