qcacld-3.0: Update EHT IEs handling as per new definitions

EHT capabilities and EHT operation IE definitions are updated as per
new draft version D1.3. Update corresponding IE handling as per new
definitions.

Change-Id: I33edb03e99fd122e70ecd55b880a3e928884515b
CRs-Fixed: 3108224
This commit is contained in:
Deeksha Gupta
2022-01-11 15:33:57 +05:30
committed by Madan Koyyalamudi
parent 6c27033b50
commit c2fd20f11a
2 changed files with 91 additions and 25 deletions

View File

@@ -8442,6 +8442,7 @@ void lim_set_eht_caps(struct mac_context *mac, struct pe_session *session,
tDot11fIEeht_cap dot11_cap; tDot11fIEeht_cap dot11_cap;
tDot11fIEhe_cap dot11_he_cap; tDot11fIEhe_cap dot11_he_cap;
struct wlan_eht_cap_info *eht_cap; struct wlan_eht_cap_info *eht_cap;
bool is_band_2g = WLAN_REG_IS_24GHZ_CH_FREQ(session->curr_op_freq);
populate_dot11f_eht_caps(mac, session, &dot11_cap); populate_dot11f_eht_caps(mac, session, &dot11_cap);
populate_dot11f_he_caps(mac, session, &dot11_he_cap); populate_dot11f_he_caps(mac, session, &dot11_he_cap);
@@ -8457,8 +8458,16 @@ void lim_set_eht_caps(struct mac_context *mac, struct pe_session *session,
eht_cap->nsep_pri_access = dot11_cap.nsep_pri_access; eht_cap->nsep_pri_access = dot11_cap.nsep_pri_access;
eht_cap->eht_om_ctl = dot11_cap.eht_om_ctl; eht_cap->eht_om_ctl = dot11_cap.eht_om_ctl;
eht_cap->triggered_txop_sharing = eht_cap->triggered_txop_sharing_mode1 =
dot11_cap.triggered_txop_sharing; dot11_cap.triggered_txop_sharing_mode1;
eht_cap->triggered_txop_sharing_mode2 =
dot11_cap.triggered_txop_sharing_mode2;
eht_cap->restricted_twt =
dot11_cap.restricted_twt;
eht_cap->scs_traffic_desc =
dot11_cap.scs_traffic_desc;
eht_cap->max_mpdu_len =
dot11_cap.max_mpdu_len;
eht_cap->support_320mhz_6ghz = dot11_cap.support_320mhz_6ghz; eht_cap->support_320mhz_6ghz = dot11_cap.support_320mhz_6ghz;
eht_cap->ru_242tone_wt_20mhz = dot11_cap.ru_242tone_wt_20mhz; eht_cap->ru_242tone_wt_20mhz = dot11_cap.ru_242tone_wt_20mhz;
eht_cap->ndp_4x_eht_ltf_3dot2_us_gi = eht_cap->ndp_4x_eht_ltf_3dot2_us_gi =
@@ -8518,32 +8527,81 @@ void lim_set_eht_caps(struct mac_context *mac, struct pe_session *session,
dot11_cap.mu_bformer_le_80mhz; dot11_cap.mu_bformer_le_80mhz;
eht_cap->mu_bformer_160mhz = dot11_cap.mu_bformer_160mhz; eht_cap->mu_bformer_160mhz = dot11_cap.mu_bformer_160mhz;
eht_cap->mu_bformer_320mhz = dot11_cap.mu_bformer_320mhz; eht_cap->mu_bformer_320mhz = dot11_cap.mu_bformer_320mhz;
eht_cap->tb_sounding_feedback_rl =
dot11_cap.tb_sounding_feedback_rl;
if (!dot11_he_cap.chan_width_0 || if ((is_band_2g && !dot11_he_cap.chan_width_0) ||
(!dot11_he_cap.chan_width_1 && (!is_band_2g && !dot11_he_cap.chan_width_1 &&
!dot11_he_cap.chan_width_2 && !dot11_he_cap.chan_width_2 &&
!dot11_he_cap.chan_width_3)) { !dot11_he_cap.chan_width_3)) {
qdf_mem_copy(eht_cap->eht_mcs_map_20, eht_cap->bw_20_rx_max_nss_for_mcs_0_to_7 =
dot11_cap.eht_mcs_map_20, dot11_cap.bw_20_rx_max_nss_for_mcs_0_to_7;
EHT_CAP_20M_MCS_MAP_LEN); eht_cap->bw_20_tx_max_nss_for_mcs_0_to_7 =
dot11_cap.bw_20_tx_max_nss_for_mcs_0_to_7;
eht_cap->bw_20_rx_max_nss_for_mcs_8_and_9 =
dot11_cap.bw_20_rx_max_nss_for_mcs_8_and_9;
eht_cap->bw_20_tx_max_nss_for_mcs_8_and_9 =
dot11_cap.bw_20_tx_max_nss_for_mcs_8_and_9;
eht_cap->bw_20_rx_max_nss_for_mcs_10_and_11 =
dot11_cap.bw_20_rx_max_nss_for_mcs_10_and_11;
eht_cap->bw_20_tx_max_nss_for_mcs_10_and_11 =
dot11_cap.bw_20_tx_max_nss_for_mcs_10_and_11;
eht_cap->bw_20_rx_max_nss_for_mcs_12_and_13 =
dot11_cap.bw_20_rx_max_nss_for_mcs_12_and_13;
eht_cap->bw_20_tx_max_nss_for_mcs_12_and_13 =
dot11_cap.bw_20_tx_max_nss_for_mcs_12_and_13;
ie_start[1] += EHT_CAP_20M_MCS_MAP_LEN; ie_start[1] += EHT_CAP_20M_MCS_MAP_LEN;
} }
if (dot11_he_cap.chan_width_0 || dot11_he_cap.chan_width_1) {
qdf_mem_copy(eht_cap->eht_mcs_map_le_80, if ((is_band_2g && dot11_he_cap.chan_width_0) ||
dot11_cap.eht_mcs_map_le_80, (!is_band_2g && dot11_he_cap.chan_width_1)) {
EHT_CAP_80M_MCS_MAP_LEN); eht_cap->bw_le_80_rx_max_nss_for_mcs_0_to_9 =
dot11_cap.bw_le_80_rx_max_nss_for_mcs_0_to_9;
eht_cap->bw_le_80_tx_max_nss_for_mcs_0_to_9 =
dot11_cap.bw_le_80_tx_max_nss_for_mcs_0_to_9;
eht_cap->bw_le_80_rx_max_nss_for_mcs_10_and_11 =
dot11_cap.bw_le_80_rx_max_nss_for_mcs_10_and_11;
eht_cap->bw_le_80_tx_max_nss_for_mcs_10_and_11 =
dot11_cap.bw_le_80_tx_max_nss_for_mcs_10_and_11;
eht_cap->bw_le_80_rx_max_nss_for_mcs_12_and_13 =
dot11_cap.bw_le_80_rx_max_nss_for_mcs_12_and_13;
eht_cap->bw_le_80_tx_max_nss_for_mcs_12_and_13 =
dot11_cap.bw_le_80_tx_max_nss_for_mcs_12_and_13;
ie_start[1] += EHT_CAP_80M_MCS_MAP_LEN; ie_start[1] += EHT_CAP_80M_MCS_MAP_LEN;
} }
if (dot11_he_cap.chan_width_2) {
qdf_mem_copy(eht_cap->eht_mcs_map_160, if ((dot11_he_cap.chan_width_6 | dot11_he_cap.chan_width_5 |
dot11_cap.eht_mcs_map_160, dot11_he_cap.chan_width_4 | dot11_he_cap.chan_width_3 |
EHT_CAP_160M_MCS_MAP_LEN); dot11_he_cap.chan_width_2 | dot11_he_cap.chan_width_1 |
dot11_he_cap.chan_width_0) == 1) {
eht_cap->bw_160_rx_max_nss_for_mcs_0_to_9 =
dot11_cap.bw_160_rx_max_nss_for_mcs_0_to_9;
eht_cap->bw_160_tx_max_nss_for_mcs_0_to_9 =
dot11_cap.bw_160_tx_max_nss_for_mcs_0_to_9;
eht_cap->bw_160_rx_max_nss_for_mcs_10_and_11 =
dot11_cap.bw_160_rx_max_nss_for_mcs_10_and_11;
eht_cap->bw_160_tx_max_nss_for_mcs_10_and_11 =
dot11_cap.bw_160_tx_max_nss_for_mcs_10_and_11;
eht_cap->bw_160_rx_max_nss_for_mcs_12_and_13 =
dot11_cap.bw_160_rx_max_nss_for_mcs_12_and_13;
eht_cap->bw_160_tx_max_nss_for_mcs_12_and_13 =
dot11_cap.bw_160_tx_max_nss_for_mcs_12_and_13;
ie_start[1] += EHT_CAP_160M_MCS_MAP_LEN; ie_start[1] += EHT_CAP_160M_MCS_MAP_LEN;
} }
if (eht_cap->support_320mhz_6ghz) { if (eht_cap->support_320mhz_6ghz) {
qdf_mem_copy(eht_cap->eht_mcs_map_320, eht_cap->bw_320_rx_max_nss_for_mcs_0_to_9 =
dot11_cap.eht_mcs_map_320, dot11_cap.bw_320_rx_max_nss_for_mcs_0_to_9;
EHT_CAP_320M_MCS_MAP_LEN); eht_cap->bw_320_tx_max_nss_for_mcs_0_to_9 =
dot11_cap.bw_320_tx_max_nss_for_mcs_0_to_9;
eht_cap->bw_320_rx_max_nss_for_mcs_10_and_11 =
dot11_cap.bw_320_rx_max_nss_for_mcs_10_and_11;
eht_cap->bw_320_tx_max_nss_for_mcs_10_and_11 =
dot11_cap.bw_320_tx_max_nss_for_mcs_10_and_11;
eht_cap->bw_320_rx_max_nss_for_mcs_12_and_13 =
dot11_cap.bw_320_rx_max_nss_for_mcs_12_and_13;
eht_cap->bw_320_tx_max_nss_for_mcs_12_and_13 =
dot11_cap.bw_320_tx_max_nss_for_mcs_12_and_13;
ie_start[1] += EHT_CAP_320M_MCS_MAP_LEN; ie_start[1] += EHT_CAP_320M_MCS_MAP_LEN;
} }
} }
@@ -8570,7 +8628,13 @@ QDF_STATUS lim_send_eht_caps_ie(struct mac_context *mac_ctx,
eht_caps[1] = DOT11F_IE_EHT_CAP_MIN_LEN + 1; eht_caps[1] = DOT11F_IE_EHT_CAP_MIN_LEN + 1;
qdf_mem_copy(&eht_caps[2], EHT_CAP_OUI_TYPE, EHT_CAP_OUI_SIZE); qdf_mem_copy(&eht_caps[2], EHT_CAP_OUI_TYPE, EHT_CAP_OUI_SIZE);
lim_set_eht_caps(mac_ctx, session, eht_caps, eht_cap_total_len);
if (!session)
session = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
if (session)
lim_set_eht_caps(mac_ctx, session, eht_caps, eht_cap_total_len);
else
pe_err("session not found for given vdev_id %d", vdev_id);
status_2g = lim_send_ie(mac_ctx, vdev_id, DOT11F_EID_EHT_CAP, status_2g = lim_send_ie(mac_ctx, vdev_id, DOT11F_EID_EHT_CAP,
CDS_BAND_2GHZ, &eht_caps[2], CDS_BAND_2GHZ, &eht_caps[2],

View File

@@ -47,7 +47,8 @@ static void wma_convert_eht_cap(tDot11fIEeht_cap *eht_cap, uint32_t *mac_cap,
/* EHT MAC capabilities */ /* EHT MAC capabilities */
eht_cap->nsep_pri_access = WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(mac_cap); eht_cap->nsep_pri_access = WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(mac_cap);
eht_cap->eht_om_ctl = WMI_EHTCAP_MAC_EHTOMCTRL_GET(mac_cap); eht_cap->eht_om_ctl = WMI_EHTCAP_MAC_EHTOMCTRL_GET(mac_cap);
eht_cap->triggered_txop_sharing = WMI_EHTCAP_MAC_TRIGTXOP_GET(mac_cap); eht_cap->triggered_txop_sharing_mode1 =
WMI_EHTCAP_MAC_TRIGTXOP_GET(mac_cap);
/* EHT PHY capabilities */ /* EHT PHY capabilities */
eht_cap->support_320mhz_6ghz = WMI_EHTCAP_PHY_320MHZIN6GHZ_GET(phy_cap); eht_cap->support_320mhz_6ghz = WMI_EHTCAP_PHY_320MHZIN6GHZ_GET(phy_cap);
@@ -224,8 +225,8 @@ void wma_print_eht_cap(tDot11fIEeht_cap *eht_cap)
wma_nofl_debug("\tNSEP Priority Access: 0x%01x", wma_nofl_debug("\tNSEP Priority Access: 0x%01x",
eht_cap->nsep_pri_access); eht_cap->nsep_pri_access);
wma_nofl_debug("\tOM Control: 0x%01x", eht_cap->eht_om_ctl); wma_nofl_debug("\tOM Control: 0x%01x", eht_cap->eht_om_ctl);
wma_nofl_debug("\tTriggered TXOP Sharing: 0x%01x", wma_nofl_debug("\tTriggered TXOP Sharing mode-1: 0x%01x",
eht_cap->triggered_txop_sharing); eht_cap->triggered_txop_sharing_mode1);
/* EHT PHY Capabilities */ /* EHT PHY Capabilities */
wma_nofl_debug("\t320 MHz In 6 GHz: 0x%01x", wma_nofl_debug("\t320 MHz In 6 GHz: 0x%01x",
@@ -418,7 +419,8 @@ void wma_populate_peer_eht_cap(struct peer_assoc_params *peer,
/* EHT MAC Capabilities */ /* EHT MAC Capabilities */
WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(mac_cap, eht_cap->nsep_pri_access); WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(mac_cap, eht_cap->nsep_pri_access);
WMI_EHTCAP_MAC_EHTOMCTRL_SET(mac_cap, eht_cap->eht_om_ctl); WMI_EHTCAP_MAC_EHTOMCTRL_SET(mac_cap, eht_cap->eht_om_ctl);
WMI_EHTCAP_MAC_TRIGTXOP_SET(mac_cap, eht_cap->triggered_txop_sharing); WMI_EHTCAP_MAC_TRIGTXOP_SET(mac_cap,
eht_cap->triggered_txop_sharing_mode1);
/* EHT PHY Capabilities */ /* EHT PHY Capabilities */
WMI_EHTCAP_PHY_320MHZIN6GHZ_SET(phy_cap, eht_cap->support_320mhz_6ghz); WMI_EHTCAP_PHY_320MHZIN6GHZ_SET(phy_cap, eht_cap->support_320mhz_6ghz);