qcacld-3.0: Intersect 40 MHz channel width in 2.4 GHz band

When sending WMI_VDEV_SET_IE_CMDID, do an intersection between
gChannelBondingMode24GHz and target capabilities for 40 MHz
channel width support and 20 MHz in 40 MHz HE PPDU in HE PHY
capabilities IE.

Change-Id: I9c2b3200f35fa6ffb11e5165cec64a23645241c3
CRs-Fixed: 2738040
This commit is contained in:
Jia Ding
2020-09-10 18:22:37 +08:00
committed by snandini
orang tua db68cb6c8b
melakukan 7ebfcd460b
2 mengubah file dengan 31 tambahan dan 0 penghapusan

Melihat File

@@ -5330,6 +5330,7 @@ struct ppet_hdr {
#define HE_CH_WIDTH_COMBINE(b0, b1, b2, b3, b4, b5, b6) \
((uint8_t)(b0) | ((b1) << 1) | ((b2) << 2) | ((b3) << 3) | \
((b4) << 4) | ((b5) << 5) | ((b6) << 6))
#define HE_CH_WIDTH_CLR_BIT(ch_wd, bit) (((ch_wd) >> (bit)) & ~1)
/*
* MCS values are interpreted as in IEEE 11ax-D1.4 spec onwards

Melihat File

@@ -69,6 +69,7 @@
#include <wlan_scan_ucfg_api.h>
#include <wlan_blm_api.h>
#include <lim_assoc_utils.h>
#include "wlan_mlme_ucfg_api.h"
/** -------------------------------------------------------------
\fn lim_delete_dialogue_token_list
@@ -7370,6 +7371,33 @@ void lim_set_he_caps(struct mac_context *mac, struct pe_session *session,
}
}
static void lim_intersect_he_ch_width_2g(struct mac_context *mac,
struct he_capability_info *he_cap)
{
struct wlan_objmgr_psoc *psoc;
uint32_t cbm_24ghz;
QDF_STATUS ret;
psoc = mac->psoc;
if (!psoc)
return;
ret = ucfg_mlme_get_channel_bonding_24ghz(psoc, &cbm_24ghz);
if (QDF_IS_STATUS_ERROR(ret))
return;
pe_debug("channel bonding mode 2.4GHz %d", cbm_24ghz);
if (!cbm_24ghz) {
/* B0: 40Mhz channel width in the 2.4GHz band */
he_cap->chan_width = HE_CH_WIDTH_CLR_BIT(he_cap->chan_width, 0);
he_cap->he_ppdu_20_in_40Mhz_2G = 0;
}
pe_debug("HE cap: chan_width: 0x%07x he_ppdu_20_in_40Mhz_2G %d",
he_cap->chan_width, he_cap->he_ppdu_20_in_40Mhz_2G);
}
QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx,
struct pe_session *session,
enum QDF_OPMODE device_mode,
@@ -7409,6 +7437,8 @@ QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx,
pe_err("Unable send HE Cap IE for 5GHZ band, status: %d",
status_5g);
lim_intersect_he_ch_width_2g(mac_ctx, he_cap);
status_2g = lim_send_ie(mac_ctx, vdev_id, DOT11F_EID_HE_CAP,
CDS_BAND_2GHZ, &he_caps[2],
he_caps[1] + 1);