diff --git a/components/tdls/core/src/wlan_tdls_cmds_process.c b/components/tdls/core/src/wlan_tdls_cmds_process.c index 265b58c1b1..6074dc91c9 100644 --- a/components/tdls/core/src/wlan_tdls_cmds_process.c +++ b/components/tdls/core/src/wlan_tdls_cmds_process.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -242,7 +242,21 @@ error: qdf_mem_free(delstareq); return status; } - +#ifdef WLAN_FEATURE_11AX +static void tdls_pe_update_peer_he_capa(struct tdls_add_sta_req *addstareq, + struct tdls_update_peer_params *update_peer) +{ + addstareq->he_cap_len = update_peer->he_cap_len; + qdf_mem_copy(&addstareq->he_cap, + &update_peer->he_cap, + sizeof(update_peer->he_cap)); +} +#else +static void tdls_pe_update_peer_he_capa(struct tdls_add_sta_req *addstareq, + struct tdls_update_peer_params *update_peer) +{ +} +#endif /** * tdls_pe_update_peer() - send TDLS update peer request to PE * @req: TDLS update peer request @@ -303,6 +317,7 @@ static QDF_STATUS tdls_pe_update_peer(struct tdls_update_peer_request *req) qdf_mem_copy(&addstareq->vht_cap, &update_peer->vht_cap, sizeof(update_peer->vht_cap)); + tdls_pe_update_peer_he_capa(addstareq, update_peer); addstareq->supported_rates_length = update_peer->supported_rates_len; addstareq->is_pmf = update_peer->is_pmf; qdf_mem_copy(&addstareq->supported_rates, diff --git a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h index 4ae3784b58..8f1053e6b4 100644 --- a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h +++ b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -761,6 +761,21 @@ struct vhtcap { struct vhtmcsinfo supp_mcs; }; +/** + * struct hecap - HE capabilities + * + * This structure is the "HE capabilities element" as + * described in 802.11ax D4.0 section 9.4.2.232.3 + * @mac_cap_info: MAC capability info + * @phycap_info: Phy Capability info + */ +#ifdef WLAN_FEATURE_11AX +struct hecap { + uint8_t mac_cap_info[6]; + uint8_t phycap_info[11]; +}; +#endif + struct tdls_update_peer_params { uint8_t peer_addr[QDF_MAC_ADDR_SIZE]; uint32_t peer_type; @@ -773,6 +788,10 @@ struct tdls_update_peer_params { struct htcap_cmn_ie ht_cap; uint8_t vhtcap_present; struct vhtcap vht_cap; +#ifdef WLAN_FEATURE_11AX + uint8_t he_cap_len; + struct hecap he_cap; +#endif uint8_t uapsd_queues; uint8_t max_sp; uint8_t supported_channels_len; @@ -1295,6 +1314,8 @@ struct tdls_send_mgmt_request { * @ht_cap: ht capability * @vhtcap_present: vht capability present * @vht_cap: vht capability + * @he_cap_len: he capability length + * @he_cap: he capability * @uapsd_queues: uapsd queue as sSirMacQosInfoStation * @max_sp: maximum service period */ @@ -1314,6 +1335,10 @@ struct tdls_add_sta_req { struct htcap_cmn_ie ht_cap; uint8_t vhtcap_present; struct vhtcap vht_cap; +#ifdef WLAN_FEATURE_11AX + uint8_t he_cap_len; + struct hecap he_cap; +#endif uint8_t uapsd_queues; uint8_t max_sp; bool is_pmf; diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 2cf4334716..2fca40c4b1 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -2087,6 +2087,13 @@ static bool lim_is_add_sta_params_he_capable(tpAddStaParams add_sta_params) return add_sta_params->he_capable; } +static void lim_add_tdls_sta_he_config(tpAddStaParams add_sta_params, + tpDphHashNode sta_ds) +{ + pe_debug("Adding tdls he capabilities"); + qdf_mem_copy(&add_sta_params->he_config, &sta_ds->he_config, + sizeof(add_sta_params->he_config)); +} #else static void lim_update_he_stbc_capable(tpAddStaParams add_sta_params) {} @@ -2099,6 +2106,11 @@ static bool lim_is_add_sta_params_he_capable(tpAddStaParams add_sta_params) { return false; } + +static void lim_add_tdls_sta_he_config(tpAddStaParams add_sta_params, + tpDphHashNode sta_ds) +{ +} #endif /** @@ -2377,6 +2389,7 @@ lim_add_sta(struct mac_context *mac_ctx, pe_debug("Sta type is TDLS_PEER, ht_caps: 0x%x, vht_caps: 0x%x", add_sta_params->ht_caps, add_sta_params->vht_caps); + lim_add_tdls_sta_he_config(add_sta_params, sta_ds); } #endif diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index 2b0ca9d5dc..29a8557658 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -117,7 +117,8 @@ typedef enum tdlsLinkSetupStatus { enum tdls_peer_capability { TDLS_PEER_HT_CAP = 0, TDLS_PEER_VHT_CAP = 1, - TDLS_PEER_WMM_CAP = 2 + TDLS_PEER_WMM_CAP = 2, + TDLS_PEER_HE_CAP = 3 } e_tdls_peer_capability; #define LINK_IDEN_ADDR_OFFSET(x) (&(x)->LinkIdentifier) @@ -778,19 +779,296 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac, vhtCap->present = 0; } pe_debug("VHT present: %hu, Chan Width: %hu", - vhtCap->present, vhtCap->supportedChannelWidthSet); + vhtCap->present, vhtCap->supportedChannelWidthSet); } +#ifdef WLAN_FEATURE_11AX +static void lim_tdls_set_he_chan_width(tDot11fIEhe_cap *heCap, + struct pe_session *session) +{ + if (lim_is_session_he_capable(session)) { + heCap->chan_width_0 = session->he_config.chan_width_0 & + heCap->chan_width_0; + heCap->chan_width_1 = session->he_config.chan_width_1 & + heCap->chan_width_1; + heCap->chan_width_2 = session->he_config.chan_width_2 & + heCap->chan_width_2; + heCap->chan_width_3 = session->he_config.chan_width_3 & + heCap->chan_width_3; + heCap->chan_width_4 = session->he_config.chan_width_4 & + heCap->chan_width_4; + heCap->chan_width_5 = session->he_config.chan_width_5 & + heCap->chan_width_5; + heCap->chan_width_6 = session->he_config.chan_width_6 & + heCap->chan_width_6; + } else { + if (session->ch_width == CH_WIDTH_20MHZ) { + heCap->chan_width_0 = 0; + heCap->chan_width_1 = 0; + } + /* Right now, no support for ch_width 160 Mhz or 80P80 Mhz in 5 Ghz*/ + heCap->chan_width_2 = 0; + heCap->chan_width_3 = 0; + } +} + +static void populate_dot11f_set_tdls_he_cap(struct mac_context *mac, + uint32_t selfDot11Mode, + tDot11fIEhe_cap *heCap, + struct pe_session *session) +{ + if (IS_DOT11_MODE_HE(selfDot11Mode)) { + populate_dot11f_he_caps(mac, NULL, heCap); + lim_tdls_set_he_chan_width(heCap, session); + } +} + +static void lim_tdls_fill_dis_rsp_he_cap(struct mac_context *mac, + uint32_t selfDot11Mode, + tDot11fTDLSDisRsp *tdls_dis_rsp, + struct pe_session *pe_session) +{ + populate_dot11f_set_tdls_he_cap(mac, selfDot11Mode, + &tdls_dis_rsp->he_cap, pe_session); +} + +static void lim_tdls_fill_setup_req_he_cap(struct mac_context *mac, + uint32_t selfDot11Mode, + tDot11fTDLSSetupReq *tdls_setup_req, + struct pe_session *pe_session) +{ + populate_dot11f_set_tdls_he_cap(mac, selfDot11Mode, + &tdls_setup_req->he_cap, pe_session); +} + +static void lim_tdls_fill_setup_rsp_he_cap(struct mac_context *mac, + uint32_t selfDot11Mode, + tDot11fTDLSSetupRsp *tdls_setup_rsp, + struct pe_session *pe_session) +{ + populate_dot11f_set_tdls_he_cap(mac, selfDot11Mode, + &tdls_setup_rsp->he_cap, pe_session); +} + +static void lim_tdls_fill_setup_cnf_he_op(struct mac_context *mac, + uint32_t peer_capability, + tDot11fTDLSSetupCnf *tdls_setup_cnf, + struct pe_session *pe_session) +{ + if (CHECK_BIT(peer_capability, TDLS_PEER_HE_CAP)) + populate_dot11f_he_operation(mac, + pe_session, + &tdls_setup_cnf->he_op); +} + +static void lim_tdls_populate_he_matching_rate_set(struct mac_context *mac_ctx, + tpDphHashNode stads, + uint8_t nss, + struct pe_session *session) +{ + lim_populate_he_mcs_set(mac_ctx, &stads->supportedRates, + &stads->he_config, session, nss); +} + +static QDF_STATUS +lim_tdls_populate_dot11f_he_caps(struct mac_context *mac, + struct tdls_add_sta_req *add_sta_req, + tDot11fIEhe_cap *pDot11f) +{ + uint32_t chan_width; + union { + struct hecap nCfgValue; + struct he_capability_info he_cap; + } uHECapInfo; + + qdf_mem_copy(&uHECapInfo.nCfgValue, &add_sta_req->he_cap, + sizeof(uHECapInfo.nCfgValue)); + + pDot11f->htc_he = uHECapInfo.he_cap.htc_he; + pDot11f->twt_request = uHECapInfo.he_cap.twt_request; + pDot11f->twt_responder = uHECapInfo.he_cap.twt_responder; + pDot11f->fragmentation = uHECapInfo.he_cap.fragmentation; + pDot11f->max_num_frag_msdu_amsdu_exp = + uHECapInfo.he_cap.max_num_frag_msdu_amsdu_exp; + pDot11f->min_frag_size = uHECapInfo.he_cap.min_frag_size; + pDot11f->trigger_frm_mac_pad = uHECapInfo.he_cap.trigger_frm_mac_pad; + pDot11f->multi_tid_aggr_rx_supp = + uHECapInfo.he_cap.multi_tid_aggr_rx_supp; + pDot11f->he_link_adaptation = uHECapInfo.he_cap.he_link_adaptation; + pDot11f->all_ack = uHECapInfo.he_cap.all_ack; + pDot11f->trigd_rsp_sched = uHECapInfo.he_cap.trigd_rsp_sched; + pDot11f->a_bsr = uHECapInfo.he_cap.a_bsr; + pDot11f->broadcast_twt = uHECapInfo.he_cap.broadcast_twt; + pDot11f->ba_32bit_bitmap = uHECapInfo.he_cap.ba_32bit_bitmap; + pDot11f->mu_cascade = uHECapInfo.he_cap.mu_cascade; + pDot11f->ack_enabled_multitid = uHECapInfo.he_cap.ack_enabled_multitid; + pDot11f->omi_a_ctrl = uHECapInfo.he_cap.omi_a_ctrl; + pDot11f->ofdma_ra = uHECapInfo.he_cap.ofdma_ra; + pDot11f->max_ampdu_len_exp_ext = + uHECapInfo.he_cap.max_ampdu_len_exp_ext; + pDot11f->amsdu_frag = uHECapInfo.he_cap.amsdu_frag; + pDot11f->flex_twt_sched = uHECapInfo.he_cap.flex_twt_sched; + pDot11f->rx_ctrl_frame = uHECapInfo.he_cap.rx_ctrl_frame; + + pDot11f->bsrp_ampdu_aggr = uHECapInfo.he_cap.bsrp_ampdu_aggr; + pDot11f->qtp = uHECapInfo.he_cap.qtp; + pDot11f->a_bqr = uHECapInfo.he_cap.a_bqr; + pDot11f->spatial_reuse_param_rspder = + uHECapInfo.he_cap.spatial_reuse_param_rspder; + pDot11f->ops_supp = uHECapInfo.he_cap.ops_supp; + pDot11f->ndp_feedback_supp = uHECapInfo.he_cap.ndp_feedback_supp; + pDot11f->amsdu_in_ampdu = uHECapInfo.he_cap.amsdu_in_ampdu; + + chan_width = uHECapInfo.he_cap.chan_width; + pDot11f->chan_width_0 = HE_CH_WIDTH_GET_BIT(chan_width, 0); + pDot11f->chan_width_1 = HE_CH_WIDTH_GET_BIT(chan_width, 1); + pDot11f->chan_width_2 = HE_CH_WIDTH_GET_BIT(chan_width, 2); + pDot11f->chan_width_3 = HE_CH_WIDTH_GET_BIT(chan_width, 3); + pDot11f->chan_width_4 = HE_CH_WIDTH_GET_BIT(chan_width, 4); + pDot11f->chan_width_5 = HE_CH_WIDTH_GET_BIT(chan_width, 5); + pDot11f->chan_width_6 = HE_CH_WIDTH_GET_BIT(chan_width, 6); + + pDot11f->rx_pream_puncturing = uHECapInfo.he_cap.rx_pream_puncturing; + pDot11f->device_class = uHECapInfo.he_cap.device_class; + pDot11f->ldpc_coding = uHECapInfo.he_cap.ldpc_coding; + pDot11f->he_1x_ltf_800_gi_ppdu = + uHECapInfo.he_cap.he_1x_ltf_800_gi_ppdu; + pDot11f->midamble_tx_rx_max_nsts = + uHECapInfo.he_cap.midamble_tx_rx_max_nsts; + pDot11f->he_4x_ltf_3200_gi_ndp = + uHECapInfo.he_cap.he_4x_ltf_3200_gi_ndp; + pDot11f->tb_ppdu_tx_stbc_lt_80mhz = + uHECapInfo.he_cap.tb_ppdu_tx_stbc_lt_80mhz; + pDot11f->rx_stbc_lt_80mhz = uHECapInfo.he_cap.rx_stbc_lt_80mhz; + pDot11f->tb_ppdu_tx_stbc_gt_80mhz = + uHECapInfo.he_cap.tb_ppdu_tx_stbc_gt_80mhz; + pDot11f->rx_stbc_gt_80mhz = uHECapInfo.he_cap.rx_stbc_gt_80mhz; + pDot11f->doppler = uHECapInfo.he_cap.doppler; + pDot11f->ul_mu = uHECapInfo.he_cap.ul_mu; + pDot11f->dcm_enc_tx = uHECapInfo.he_cap.dcm_enc_tx; + pDot11f->dcm_enc_rx = uHECapInfo.he_cap.dcm_enc_rx; + pDot11f->ul_he_mu = uHECapInfo.he_cap.ul_he_mu; + pDot11f->su_beamformer = uHECapInfo.he_cap.su_beamformer; + + pDot11f->su_beamformee = uHECapInfo.he_cap.su_beamformee; + pDot11f->mu_beamformer = uHECapInfo.he_cap.mu_beamformer; + pDot11f->bfee_sts_lt_80 = uHECapInfo.he_cap.bfee_sts_lt_80; + pDot11f->bfee_sts_gt_80 = uHECapInfo.he_cap.bfee_sts_gt_80; + pDot11f->num_sounding_lt_80 = uHECapInfo.he_cap.num_sounding_lt_80; + pDot11f->num_sounding_gt_80 = uHECapInfo.he_cap.num_sounding_gt_80; + pDot11f->su_feedback_tone16 = uHECapInfo.he_cap.su_feedback_tone16; + pDot11f->mu_feedback_tone16 = uHECapInfo.he_cap.mu_feedback_tone16; + pDot11f->codebook_su = uHECapInfo.he_cap.codebook_su; + pDot11f->codebook_mu = uHECapInfo.he_cap.codebook_mu; + pDot11f->beamforming_feedback = uHECapInfo.he_cap.beamforming_feedback; + pDot11f->he_er_su_ppdu = uHECapInfo.he_cap.he_er_su_ppdu; + pDot11f->dl_mu_mimo_part_bw = uHECapInfo.he_cap.dl_mu_mimo_part_bw; + pDot11f->ppet_present = uHECapInfo.he_cap.ppet_present; + pDot11f->srp = uHECapInfo.he_cap.srp; + pDot11f->power_boost = uHECapInfo.he_cap.power_boost; + + pDot11f->he_ltf_800_gi_4x = uHECapInfo.he_cap.he_ltf_800_gi_4x; + pDot11f->max_nc = uHECapInfo.he_cap.max_nc; + pDot11f->er_he_ltf_800_gi_4x = uHECapInfo.he_cap.er_he_ltf_800_gi_4x; + pDot11f->he_ppdu_20_in_40Mhz_2G = + uHECapInfo.he_cap.he_ppdu_20_in_40Mhz_2G; + pDot11f->he_ppdu_20_in_160_80p80Mhz = + uHECapInfo.he_cap.he_ppdu_20_in_160_80p80Mhz; + pDot11f->he_ppdu_80_in_160_80p80Mhz = + uHECapInfo.he_cap.he_ppdu_80_in_160_80p80Mhz; + pDot11f->er_1x_he_ltf_gi = + uHECapInfo.he_cap.er_1x_he_ltf_gi; + pDot11f->midamble_tx_rx_1x_he_ltf = + uHECapInfo.he_cap.midamble_tx_rx_1x_he_ltf; + pDot11f->reserved2 = uHECapInfo.he_cap.reserved2; + + pDot11f->rx_he_mcs_map_lt_80 = uHECapInfo.he_cap.rx_he_mcs_map_lt_80; + pDot11f->tx_he_mcs_map_lt_80 = uHECapInfo.he_cap.tx_he_mcs_map_lt_80; + if (pDot11f->chan_width_2) { + *((uint16_t *)pDot11f->rx_he_mcs_map_160) = + uHECapInfo.he_cap.rx_he_mcs_map_160; + *((uint16_t *)pDot11f->tx_he_mcs_map_160) = + uHECapInfo.he_cap.tx_he_mcs_map_160; + } + if (pDot11f->chan_width_3) { + *((uint16_t *)pDot11f->rx_he_mcs_map_80_80) = + uHECapInfo.he_cap.rx_he_mcs_map_80_80; + *((uint16_t *)pDot11f->tx_he_mcs_map_80_80) = + uHECapInfo.he_cap.tx_he_mcs_map_80_80; + } + lim_log_he_cap(mac, pDot11f); + + return QDF_STATUS_SUCCESS; +} + +static void lim_tdls_update_node_he_caps(struct mac_context *mac, + struct tdls_add_sta_req *add_sta_req, + tDphHashNode *sta, + struct pe_session *pe_session) +{ + pe_debug("Populating HE IEs"); + lim_tdls_populate_dot11f_he_caps(mac, add_sta_req, &sta->he_config); + if (sta->he_config.present) + sta->mlmStaContext.he_capable = 1; + + if (pe_session && sta->he_config.present) + lim_tdls_set_he_chan_width(&sta->he_config, pe_session); +} + +#else +static void lim_tdls_fill_dis_rsp_he_cap(struct mac_context *mac, + uint32_t selfDot11Mode, + tDot11fTDLSDisRsp *tdls_dis_rsp, + struct pe_session *pe_session) +{ +} + +static void lim_tdls_fill_setup_req_he_cap(struct mac_context *mac, + uint32_t selfDot11Mode, + tDot11fTDLSSetupReq *tdls_setup_req, + struct pe_session *pe_session) +{ +} + +static void lim_tdls_fill_setup_rsp_he_cap(struct mac_context *mac, + uint32_t selfDot11Mode, + tDot11fTDLSSetupRsp *tdls_setup_rsp, + struct pe_session *pe_session) +{ +} + +static void lim_tdls_fill_setup_cnf_he_op(struct mac_context *mac, + uint32_t peer_capability, + tDot11fTDLSSetupCnf *tdls_setup_cnf, + struct pe_session *pe_session) +{ +} + +static void lim_tdls_populate_he_matching_rate_set(struct mac_context *mac_ctx, + tpDphHashNode stads, + uint8_t nss, + struct pe_session *session) +{ +} + +static void lim_tdls_update_node_he_caps(struct mac_context *mac, + struct tdls_add_sta_req *add_sta_req, + tDphHashNode *sta, + struct pe_session *pe_session) +{ +} +#endif + /* * Send TDLS discovery response frame on direct link. */ static QDF_STATUS lim_send_tdls_dis_rsp_frame(struct mac_context *mac, - struct qdf_mac_addr peer_mac, - uint8_t dialog, - struct pe_session *pe_session, - uint8_t *addIe, - uint16_t addIeLen) + struct qdf_mac_addr peer_mac, + uint8_t dialog, + struct pe_session *pe_session, + uint8_t *addIe, + uint16_t addIeLen) { tDot11fTDLSDisRsp *tdls_dis_rsp; uint16_t caps = 0; @@ -866,7 +1144,11 @@ static QDF_STATUS lim_send_tdls_dis_rsp_frame(struct mac_context *mac, /* Populate HT/VHT Capabilities */ populate_dot11f_tdls_ht_vht_cap(mac, selfDot11Mode, &tdls_dis_rsp->HTCaps, - &tdls_dis_rsp->VHTCaps, pe_session); + &tdls_dis_rsp->VHTCaps, + pe_session); + + lim_tdls_fill_dis_rsp_he_cap(mac, selfDot11Mode, tdls_dis_rsp, + pe_session); /* Populate TDLS offchannel param only if offchannel is enabled * and TDLS Channel Switching is not prohibited by AP in ExtCap @@ -1244,10 +1526,13 @@ QDF_STATUS lim_send_tdls_link_setup_req_frame(struct mac_context *mac, selfDot11Mode = mac->mlme_cfg->dot11_mode.dot11_mode; /* Populate HT/VHT Capabilities */ + populate_dot11f_tdls_ht_vht_cap(mac, selfDot11Mode, &tdls_setup_req->HTCaps, - &tdls_setup_req->VHTCaps, pe_session); - + &tdls_setup_req->VHTCaps, + pe_session); + lim_tdls_fill_setup_req_he_cap(mac, selfDot11Mode, tdls_setup_req, + pe_session); /* Populate AID */ populate_dotf_tdls_vht_aid(mac, selfDot11Mode, peer_mac, &tdls_setup_req->AID, pe_session); @@ -1723,10 +2008,11 @@ lim_send_tdls_setup_rsp_frame(struct mac_context *mac, selfDot11Mode = mac->mlme_cfg->dot11_mode.dot11_mode; /* Populate HT/VHT Capabilities */ - populate_dot11f_tdls_ht_vht_cap(mac, selfDot11Mode, - &setup_rsp->HTCaps, + populate_dot11f_tdls_ht_vht_cap(mac, selfDot11Mode, &setup_rsp->HTCaps, &setup_rsp->VHTCaps, pe_session); + lim_tdls_fill_setup_rsp_he_cap(mac, selfDot11Mode, setup_rsp, + pe_session); /* Populate AID */ populate_dotf_tdls_vht_aid(mac, selfDot11Mode, peer_mac, &setup_rsp->AID, pe_session); @@ -1939,6 +2225,9 @@ QDF_STATUS lim_send_tdls_link_setup_cnf_frame(struct mac_context *mac, populate_dot11f_ht_info(mac, &setup_cnf->HTInfo, pe_session); } + lim_tdls_fill_setup_cnf_he_op(mac, peerCapability, setup_cnf, + pe_session); + /* * now we pack it. First, how much space are we going to need? */ @@ -2289,7 +2578,6 @@ lim_tdls_populate_dot11f_vht_caps(struct mac_context *mac, lim_log_vht_cap(mac, pDot11f); return QDF_STATUS_SUCCESS; - } /** @@ -2409,6 +2697,9 @@ lim_tdls_populate_matching_rate_set(struct mac_context *mac_ctx, } lim_populate_vht_mcs_set(mac_ctx, &stads->supportedRates, vht_caps, session_entry, nss, NULL); + + lim_tdls_populate_he_matching_rate_set(mac_ctx, stads, nss, + session_entry); /** * Set the erpEnabled bit if the phy is in G mode and at least * one A rate is supported @@ -2515,6 +2806,8 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac, WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ; } + lim_tdls_update_node_he_caps(mac, add_sta_req, sta, pe_session); + /* * Calculate the Secondary Coannel Offset if our * own channel bonding state is enabled @@ -2545,6 +2838,7 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac, /* TDLS Dummy AddSTA does not have HTCap,VHTCap,Rates info , is it OK ?? */ + lim_tdls_populate_matching_rate_set(mac, sta, add_sta_req->supported_rates, add_sta_req->supported_rates_length, diff --git a/os_if/tdls/src/wlan_cfg80211_tdls.c b/os_if/tdls/src/wlan_cfg80211_tdls.c index 2ab7b3c67b..a40804b6f7 100644 --- a/os_if/tdls/src/wlan_cfg80211_tdls.c +++ b/os_if/tdls/src/wlan_cfg80211_tdls.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -237,6 +237,33 @@ tdls_calc_channels_from_staparams(struct tdls_update_peer_params *req_info, req_info->supported_channels_len); } +#ifdef WLAN_FEATURE_11AX +static void +wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info, + struct station_parameters *params) +{ + if (!params->he_capa) { + osif_debug("he_capa not present"); + } else { + qdf_mem_copy(&req_info->he_cap, params->he_capa, + sizeof(struct hecap)); + if (!params->he_capa_len) { + osif_debug("he_capa_len not present"); + } else { + qdf_mem_copy(&req_info->he_cap_len, + ¶ms->he_capa_len, + sizeof(uint8_t)); + } + } +} +#else +static void +wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info, + struct station_parameters *params) +{ +} +#endif + static void wlan_cfg80211_tdls_extract_params(struct tdls_update_peer_params *req_info, struct station_parameters *params) @@ -319,6 +346,8 @@ wlan_cfg80211_tdls_extract_params(struct tdls_update_peer_params *req_info, osif_debug("TDLS peer pmf capable"); req_info->is_pmf = 1; } + + wlan_cfg80211_tdls_extract_he_params(req_info, params); } int wlan_cfg80211_tdls_update_peer(struct wlan_objmgr_vdev *vdev,