qcacld-3.0: Fix the HE 160MHz BW related capability settings

Reset the HE 160MHz bandwidth related capabilities if the
connection mode has lower bandwidth.
Set the 160MHz support in HE channel width capability if
AP is 160MHz capable and current operating mode is 80MHz.

Change-Id: Iddb678ac7543875a3a7d15bb38e13dd27086360b
CRs-Fixed: 2674741
This commit is contained in:
Kiran Kumar Lokere
2020-04-28 16:26:40 -07:00
committed by nshrivas
parent 4d187fa0f2
commit a49d6b9742
4 changed files with 63 additions and 20 deletions

View File

@@ -789,7 +789,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
sme_start_bss_req->center_freq_seg0; sme_start_bss_req->center_freq_seg0;
session->ch_center_freq_seg1 = session->ch_center_freq_seg1 =
sme_start_bss_req->center_freq_seg1; sme_start_bss_req->center_freq_seg1;
lim_update_he_bw_cap_mcs(session); lim_update_he_bw_cap_mcs(session, NULL);
} }
/* Delete pre-auth list if any */ /* Delete pre-auth list if any */

View File

@@ -201,25 +201,34 @@ static void lim_check_he_ldpc_cap(struct pe_session *session,
} }
} }
void lim_update_he_bw_cap_mcs(struct pe_session *session) void lim_update_he_bw_cap_mcs(struct pe_session *session,
tSirProbeRespBeacon *beacon)
{ {
uint8_t is_80mhz;
if (!session->he_capable) if (!session->he_capable)
return; return;
if (session->ch_width <= CH_WIDTH_80MHZ) { if ((session->opmode == QDF_STA_MODE ||
*(uint16_t *)session->he_config.rx_he_mcs_map_160 = session->opmode == QDF_P2P_CLIENT_MODE) &&
HE_MCS_ALL_DISABLED; beacon && beacon->he_cap.present) {
*(uint16_t *)session->he_config.tx_he_mcs_map_160 = if (!beacon->he_cap.chan_width_2)
HE_MCS_ALL_DISABLED; is_80mhz = 1;
*(uint16_t *)session->he_config.rx_he_mcs_map_80_80 = else if (beacon->he_cap.chan_width_2 &&
HE_MCS_ALL_DISABLED; (*(uint16_t *)beacon->he_cap.rx_he_mcs_map_160 ==
*(uint16_t *)session->he_config.tx_he_mcs_map_80_80 = HE_MCS_ALL_DISABLED))
HE_MCS_ALL_DISABLED; is_80mhz = 1;
else
is_80mhz = 0;
} else {
is_80mhz = 1;
}
if (session->ch_width <= CH_WIDTH_80MHZ && is_80mhz) {
session->he_config.chan_width_2 = 0;
session->he_config.chan_width_3 = 0;
} else if (session->ch_width == CH_WIDTH_160MHZ) { } else if (session->ch_width == CH_WIDTH_160MHZ) {
*(uint16_t *)session->he_config.rx_he_mcs_map_80_80 = session->he_config.chan_width_3 = 0;
HE_MCS_ALL_DISABLED;
*(uint16_t *)session->he_config.tx_he_mcs_map_80_80 =
HE_MCS_ALL_DISABLED;
} }
/* Reset the > 20MHz caps for 20MHz connection */ /* Reset the > 20MHz caps for 20MHz connection */
if (session->ch_width == CH_WIDTH_20MHZ) { if (session->ch_width == CH_WIDTH_20MHZ) {
@@ -234,6 +243,33 @@ void lim_update_he_bw_cap_mcs(struct pe_session *session)
session->he_config.he_ppdu_20_in_160_80p80Mhz = 0; session->he_config.he_ppdu_20_in_160_80p80Mhz = 0;
session->he_config.he_ppdu_80_in_160_80p80Mhz = 0; session->he_config.he_ppdu_80_in_160_80p80Mhz = 0;
} }
if (WLAN_REG_IS_24GHZ_CH_FREQ(session->curr_op_freq)) {
session->he_config.chan_width_1 = 0;
session->he_config.chan_width_2 = 0;
session->he_config.chan_width_3 = 0;
session->he_config.chan_width_5 = 0;
session->he_config.chan_width_6 = 0;
} else {
session->he_config.chan_width_0 = 0;
session->he_config.chan_width_4 = 0;
session->he_config.chan_width_6 = 0;
}
if (!session->he_config.chan_width_2) {
session->he_config.bfee_sts_gt_80 = 0;
session->he_config.num_sounding_gt_80 = 0;
session->he_config.he_ppdu_20_in_160_80p80Mhz = 0;
session->he_config.he_ppdu_80_in_160_80p80Mhz = 0;
*(uint16_t *)session->he_config.rx_he_mcs_map_160 =
HE_MCS_ALL_DISABLED;
*(uint16_t *)session->he_config.tx_he_mcs_map_160 =
HE_MCS_ALL_DISABLED;
}
if (!session->he_config.chan_width_3) {
*(uint16_t *)session->he_config.rx_he_mcs_map_80_80 =
HE_MCS_ALL_DISABLED;
*(uint16_t *)session->he_config.tx_he_mcs_map_80_80 =
HE_MCS_ALL_DISABLED;
}
} }
#else #else
static inline void lim_extract_he_op(struct pe_session *session, static inline void lim_extract_he_op(struct pe_session *session,
@@ -501,7 +537,7 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
} }
lim_check_he_ldpc_cap(session, beacon_struct); lim_check_he_ldpc_cap(session, beacon_struct);
lim_extract_he_op(session, beacon_struct); lim_extract_he_op(session, beacon_struct);
lim_update_he_bw_cap_mcs(session); lim_update_he_bw_cap_mcs(session, beacon_struct);
/* Extract the UAPSD flag from WMM Parameter element */ /* Extract the UAPSD flag from WMM Parameter element */
if (beacon_struct->wmeEdcaPresent) if (beacon_struct->wmeEdcaPresent)
*uapsd = beacon_struct->edcaParams.qosInfo.uapsd; *uapsd = beacon_struct->edcaParams.qosInfo.uapsd;

View File

@@ -1250,10 +1250,12 @@ static inline bool lim_is_session_he_capable(struct pe_session *session)
/** /**
* lim_update_he_bw_cap_mcs(): Update he mcs map per bandwidth * lim_update_he_bw_cap_mcs(): Update he mcs map per bandwidth
* @session_entry: pointer to PE session * @session_entry: pointer to PE session
* @beacon: pointer to beacon
* *
* Return: None * Return: None
*/ */
void lim_update_he_bw_cap_mcs(struct pe_session *session); void lim_update_he_bw_cap_mcs(struct pe_session *session,
tSirProbeRespBeacon *beacon);
static inline bool lim_is_he_6ghz_band(struct pe_session *session) static inline bool lim_is_he_6ghz_band(struct pe_session *session)
{ {
@@ -1483,7 +1485,8 @@ static inline bool lim_is_session_he_capable(struct pe_session *session)
return false; return false;
} }
static inline void lim_update_he_bw_cap_mcs(struct pe_session *session) static inline void lim_update_he_bw_cap_mcs(struct pe_session *session,
tSirProbeRespBeacon *beacon)
{ {
} }

View File

@@ -12065,11 +12065,15 @@ int sme_update_he_tx_bfee_nsts(mac_handle_t mac_handle, uint8_t session_id,
sme_err("No session for id %d", session_id); sme_err("No session for id %d", session_id);
return -EINVAL; return -EINVAL;
} }
if (cfg_in_range(CFG_HE_BFEE_STS_LT80, cfg_val)) if (cfg_in_range(CFG_HE_BFEE_STS_LT80, cfg_val)) {
mac_ctx->mlme_cfg->he_caps.dot11_he_cap.bfee_sts_lt_80 = mac_ctx->mlme_cfg->he_caps.dot11_he_cap.bfee_sts_lt_80 =
cfg_val; cfg_val;
else mac_ctx->mlme_cfg->he_caps.dot11_he_cap.bfee_sts_gt_80 =
cfg_val;
} else {
return -EINVAL; return -EINVAL;
}
csr_update_session_he_cap(mac_ctx, session); csr_update_session_he_cap(mac_ctx, session);
return 0; return 0;