qcacld-3.0: Set eht_capable accordingly for TDLS
Set parameter add_sta_params->eht_capable accordingly whether the peer STA support it or not. Change-Id: Ib3664be74ece59804321e187fea889610c0a2a86 CRs-Fixed: 3454661
This commit is contained in:

committed by
Madan Koyyalamudi

parent
741c1961d2
commit
5f512ff2ec
@@ -432,6 +432,27 @@ static void tdls_pe_update_peer_he_capa(struct tdls_add_sta_req *addstareq,
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
static inline void
|
||||
tdls_pe_update_peer_eht_capa(struct tdls_add_sta_req *addstareq,
|
||||
struct tdls_update_peer_params *update_peer)
|
||||
{
|
||||
if (update_peer->ehtcap_present) {
|
||||
addstareq->ehtcap_present = update_peer->ehtcap_present;
|
||||
addstareq->eht_cap_len = update_peer->eht_cap_len;
|
||||
qdf_mem_copy(&addstareq->eht_cap,
|
||||
&update_peer->eht_cap,
|
||||
sizeof(update_peer->eht_cap));
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
tdls_pe_update_peer_eht_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
|
||||
@@ -493,6 +514,7 @@ static QDF_STATUS tdls_pe_update_peer(struct tdls_update_peer_request *req)
|
||||
&update_peer->vht_cap,
|
||||
sizeof(update_peer->vht_cap));
|
||||
tdls_pe_update_peer_he_capa(addstareq, update_peer);
|
||||
tdls_pe_update_peer_eht_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,
|
||||
|
@@ -843,6 +843,28 @@ struct hecap_6ghz {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
/**
|
||||
* struct ehtcapfixed - EHT capabilities fixed data
|
||||
* @mac_cap_info: MAC capabilities
|
||||
* @phy_cap_info: PHY capabilities
|
||||
*/
|
||||
struct ehtcapfixed {
|
||||
uint8_t mac_cap_info[2];
|
||||
uint8_t phy_cap_info[9];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ehtcap - EHT capabilities
|
||||
* @eht_cap_fixed: fixed parts, see &ehtcapfixed
|
||||
* @optional: optional parts
|
||||
*/
|
||||
struct ehtcap {
|
||||
struct ehtcapfixed eht_cap_fixed;
|
||||
uint8_t optional[];
|
||||
} qdf_packed;
|
||||
#endif
|
||||
|
||||
struct tdls_update_peer_params {
|
||||
uint8_t peer_addr[QDF_MAC_ADDR_SIZE];
|
||||
uint32_t peer_type;
|
||||
@@ -859,6 +881,11 @@ struct tdls_update_peer_params {
|
||||
uint8_t he_cap_len;
|
||||
struct hecap he_cap;
|
||||
struct hecap_6ghz he_6ghz_cap;
|
||||
#endif
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
uint8_t ehtcap_present;
|
||||
uint8_t eht_cap_len;
|
||||
struct ehtcap eht_cap;
|
||||
#endif
|
||||
uint8_t uapsd_queues;
|
||||
uint8_t max_sp;
|
||||
@@ -1395,6 +1422,9 @@ struct tdls_send_mgmt_request {
|
||||
* @he_cap_len: he capability length
|
||||
* @he_cap: he capability
|
||||
* @he_6ghz_cap: HE 6 GHz capability
|
||||
* @ehtcap_present: eht capability present
|
||||
* @eht_cap_len: eht capability length
|
||||
* @eht_cap: eht capability
|
||||
* @uapsd_queues: uapsd queue as sSirMacQosInfoStation
|
||||
* @max_sp: maximum service period
|
||||
* @is_pmf: is PMF active
|
||||
@@ -1419,6 +1449,11 @@ struct tdls_add_sta_req {
|
||||
uint8_t he_cap_len;
|
||||
struct hecap he_cap;
|
||||
struct hecap_6ghz he_6ghz_cap;
|
||||
#endif
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
uint8_t ehtcap_present;
|
||||
uint8_t eht_cap_len;
|
||||
struct ehtcap eht_cap;
|
||||
#endif
|
||||
uint8_t uapsd_queues;
|
||||
uint8_t max_sp;
|
||||
|
@@ -2394,6 +2394,10 @@ lim_add_sta(struct mac_context *mac_ctx,
|
||||
|
||||
lim_update_sta_eht_capable(mac_ctx, add_sta_params, sta_ds,
|
||||
session_entry);
|
||||
|
||||
lim_update_tdls_sta_eht_capable(mac_ctx, add_sta_params, sta_ds,
|
||||
session_entry);
|
||||
|
||||
lim_update_sta_mlo_info(session_entry, add_sta_params, sta_ds);
|
||||
|
||||
add_sta_params->maxAmpduDensity = sta_ds->htAMpduDensity;
|
||||
|
@@ -3420,6 +3420,27 @@ lim_reg_bw_to_ht_ch_width(uint16_t reg_max_bw)
|
||||
return reg_max_bw > 20 ? CH_WIDTH_40MHZ : CH_WIDTH_20MHZ;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
static void
|
||||
lim_tdls_populate_dot11f_eht_caps(struct pe_session *pe_session,
|
||||
tDphHashNode *sta,
|
||||
struct tdls_add_sta_req *add_sta_req)
|
||||
{
|
||||
if (add_sta_req->ehtcap_present) {
|
||||
pe_debug("copy eht config from pe_session");
|
||||
qdf_mem_copy(&sta->eht_config, &pe_session->eht_config,
|
||||
sizeof(sta->eht_config));
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
lim_tdls_populate_dot11f_eht_caps(struct pe_session *pe_session,
|
||||
tDphHashNode *sta,
|
||||
struct tdls_add_sta_req *add_sta_req)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* update HASH node entry info
|
||||
*/
|
||||
@@ -3446,6 +3467,8 @@ static void lim_tdls_update_hash_node_info(struct mac_context *mac,
|
||||
sta->rmfEnabled = add_sta_req->is_pmf;
|
||||
}
|
||||
|
||||
lim_tdls_populate_dot11f_eht_caps(pe_session, sta, add_sta_req);
|
||||
|
||||
reg_max_bw = wlan_reg_get_max_chwidth(mac->pdev,
|
||||
pe_session->curr_op_freq);
|
||||
|
||||
|
@@ -8779,6 +8779,23 @@ void lim_update_stads_eht_capable(tpDphHashNode sta_ds, tpSirAssocReq assoc_req)
|
||||
sta_ds->mlmStaContext.eht_capable = assoc_req->eht_cap.present;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
void lim_update_tdls_sta_eht_capable(struct mac_context *mac,
|
||||
tpAddStaParams add_sta_params,
|
||||
tpDphHashNode sta_ds,
|
||||
struct pe_session *session_entry)
|
||||
{
|
||||
if (sta_ds->staType == STA_ENTRY_TDLS_PEER) {
|
||||
if (!sta_ds->eht_config.present)
|
||||
add_sta_params->eht_capable = 0;
|
||||
}
|
||||
|
||||
pe_debug("tdls eht_capable: %d", add_sta_params->eht_capable);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void lim_update_sta_eht_capable(struct mac_context *mac,
|
||||
tpAddStaParams add_sta_params,
|
||||
tpDphHashNode sta_ds,
|
||||
|
@@ -1963,6 +1963,30 @@ void lim_update_sta_eht_capable(struct mac_context *mac,
|
||||
tpDphHashNode sta_ds,
|
||||
struct pe_session *session_entry);
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
/**
|
||||
* lim_update_tdls_sta_eht_capable(): Update eht_capable in add tdls sta params
|
||||
* @mac: pointer to MAC context
|
||||
* @add_sta_params: pointer to add sta params
|
||||
* @sta_ds: pointer to dph hash table entry
|
||||
* @session_entry: pointer to PE session
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void lim_update_tdls_sta_eht_capable(struct mac_context *mac,
|
||||
tpAddStaParams add_sta_params,
|
||||
tpDphHashNode sta_ds,
|
||||
struct pe_session *session_entry);
|
||||
#else
|
||||
static inline
|
||||
void lim_update_tdls_sta_eht_capable(struct mac_context *mac,
|
||||
tpAddStaParams add_sta_params,
|
||||
tpDphHashNode sta_ds,
|
||||
struct pe_session *session_entry)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* lim_update_session_eht_capable_chan_switch(): Update eht_capable in PE
|
||||
* session
|
||||
@@ -2081,6 +2105,14 @@ void lim_update_stads_eht_bw_320mhz(struct pe_session *session,
|
||||
*/
|
||||
bool lim_is_session_chwidth_320mhz(struct pe_session *session);
|
||||
#else
|
||||
static inline
|
||||
void lim_update_tdls_sta_eht_capable(struct mac_context *mac,
|
||||
tpAddStaParams add_sta_params,
|
||||
tpDphHashNode sta_ds,
|
||||
struct pe_session *session_entry)
|
||||
{
|
||||
}
|
||||
|
||||
static inline bool lim_is_session_eht_capable(struct pe_session *session)
|
||||
{
|
||||
return false;
|
||||
|
@@ -396,6 +396,30 @@ wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
static void
|
||||
wlan_cfg80211_tdls_extract_eht_params(struct tdls_update_peer_params *req_info,
|
||||
struct station_parameters *params)
|
||||
{
|
||||
if (params->link_sta_params.eht_capa) {
|
||||
osif_debug("eht capa is present");
|
||||
req_info->ehtcap_present = 1;
|
||||
req_info->eht_cap_len = params->link_sta_params.eht_capa_len;
|
||||
qdf_mem_copy(&req_info->eht_cap,
|
||||
params->link_sta_params.eht_capa,
|
||||
sizeof(struct ehtcap));
|
||||
} else {
|
||||
req_info->ehtcap_present = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void
|
||||
wlan_cfg80211_tdls_extract_eht_params(struct tdls_update_peer_params *req_info,
|
||||
struct station_parameters *params)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CFG80211_LINK_STA_PARAMS_PRESENT
|
||||
static void
|
||||
wlan_cfg80211_tdls_extract_params(struct wlan_objmgr_vdev *vdev,
|
||||
@@ -489,6 +513,8 @@ wlan_cfg80211_tdls_extract_params(struct wlan_objmgr_vdev *vdev,
|
||||
tdls_6g_support);
|
||||
else
|
||||
osif_debug("tdls ax disabled");
|
||||
|
||||
wlan_cfg80211_tdls_extract_eht_params(req_info, params);
|
||||
}
|
||||
#else
|
||||
static void
|
||||
@@ -580,6 +606,8 @@ wlan_cfg80211_tdls_extract_params(struct wlan_objmgr_vdev *vdev,
|
||||
tdls_6g_support);
|
||||
else
|
||||
osif_debug("tdls ax disabled");
|
||||
|
||||
wlan_cfg80211_tdls_extract_eht_params(req_info, params);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user