qcacld-3.0: Add support for TDLS 11AX for 6Ghz band
Add support for TDLS 11AX for operations on 6Ghz band. Change-Id: I56e27f1e3560cd4374ba186f161bbc2ad945fe1d CRs-Fixed: 2990682
This commit is contained in:

committed by
Madan Koyyalamudi

parent
6610d8c5dd
commit
2ed83c128c
@@ -243,6 +243,13 @@ error:
|
||||
return status;
|
||||
}
|
||||
#ifdef WLAN_FEATURE_11AX
|
||||
static void tdls_pe_update_peer_6ghz_capa(struct tdls_add_sta_req *addstareq,
|
||||
struct tdls_update_peer_params *update_peer)
|
||||
{
|
||||
qdf_mem_copy(&addstareq->he_6ghz_cap, &update_peer->he_6ghz_cap,
|
||||
sizeof(update_peer->he_6ghz_cap));
|
||||
}
|
||||
|
||||
static void tdls_pe_update_peer_he_capa(struct tdls_add_sta_req *addstareq,
|
||||
struct tdls_update_peer_params *update_peer)
|
||||
{
|
||||
@@ -250,6 +257,8 @@ static void tdls_pe_update_peer_he_capa(struct tdls_add_sta_req *addstareq,
|
||||
qdf_mem_copy(&addstareq->he_cap,
|
||||
&update_peer->he_cap,
|
||||
sizeof(update_peer->he_cap));
|
||||
|
||||
tdls_pe_update_peer_6ghz_capa(addstareq, update_peer);
|
||||
}
|
||||
#else
|
||||
static void tdls_pe_update_peer_he_capa(struct tdls_add_sta_req *addstareq,
|
||||
|
@@ -787,6 +787,14 @@ struct hecap {
|
||||
uint16_t tx_he_mcs_map_80_80;
|
||||
} he_cap_mcs_info;
|
||||
} qdf_packed;
|
||||
|
||||
struct hecap_6ghz {
|
||||
/* Minimum MPDU Start Spacing B0..B2
|
||||
* Maximum A-MPDU Length Exponent B3..B5
|
||||
* Maximum MPDU Length B6..B7 */
|
||||
uint8_t a_mpdu_params; /* B0..B7 */
|
||||
uint8_t info; /* B8..B15 */
|
||||
};
|
||||
#endif
|
||||
|
||||
struct tdls_update_peer_params {
|
||||
@@ -804,6 +812,7 @@ struct tdls_update_peer_params {
|
||||
#ifdef WLAN_FEATURE_11AX
|
||||
uint8_t he_cap_len;
|
||||
struct hecap he_cap;
|
||||
struct hecap_6ghz he_6ghz_cap;
|
||||
#endif
|
||||
uint8_t uapsd_queues;
|
||||
uint8_t max_sp;
|
||||
@@ -1351,6 +1360,7 @@ struct tdls_add_sta_req {
|
||||
#ifdef WLAN_FEATURE_11AX
|
||||
uint8_t he_cap_len;
|
||||
struct hecap he_cap;
|
||||
struct hecap_6ghz he_6ghz_cap;
|
||||
#endif
|
||||
uint8_t uapsd_queues;
|
||||
uint8_t max_sp;
|
||||
|
@@ -1717,6 +1717,19 @@ struct he_capability_info {
|
||||
uint16_t tx_he_mcs_map_80_80;
|
||||
#endif
|
||||
} qdf_packed;
|
||||
|
||||
struct he_6ghz_capability_info {
|
||||
uint16_t min_mpdu_start_spacing:3;
|
||||
uint16_t max_ampdu_len_exp:3;
|
||||
uint16_t max_mpdu_len:2;
|
||||
|
||||
uint16_t reserved:1;
|
||||
uint16_t sm_pow_save:2;
|
||||
uint16_t rd_responder:1;
|
||||
uint16_t rx_ant_pattern_consistency:1;
|
||||
uint16_t tx_ant_pattern_consistency:1;
|
||||
uint16_t reserved2:2;
|
||||
} qdf_packed;
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@@ -187,6 +187,7 @@ typedef struct sDphHashNode {
|
||||
#ifdef WLAN_FEATURE_11AX
|
||||
tDot11fIEhe_cap he_config;
|
||||
uint16_t he_mcs_12_13_map;
|
||||
tDot11fIEhe_6ghz_band_cap he_6g_band_cap;
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
|
@@ -701,7 +701,8 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac,
|
||||
nss = mac->vdev_type_nss_2g.tdls;
|
||||
|
||||
nss = QDF_MIN(nss, mac->user_configured_nss);
|
||||
if (IS_DOT11_MODE_HT(selfDot11Mode)) {
|
||||
if (IS_DOT11_MODE_HT(selfDot11Mode) &&
|
||||
!lim_is_he_6ghz_band(pe_session)) {
|
||||
/* Include HT Capability IE */
|
||||
populate_dot11f_ht_caps(mac, pe_session, htCap);
|
||||
val_len = SIZE_OF_SUPPORTED_MCS_SET;
|
||||
@@ -783,6 +784,64 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac,
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11AX
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
|
||||
static void
|
||||
lim_tdls_populate_dot11f_6hgz_he_caps(struct mac_context *mac,
|
||||
struct tdls_add_sta_req *add_sta_req,
|
||||
tDot11fIEhe_6ghz_band_cap *pDot11f)
|
||||
{
|
||||
union {
|
||||
struct hecap_6ghz he_6ghz_cap;
|
||||
struct he_6ghz_capability_info dot11f;
|
||||
} peer_cfg;
|
||||
|
||||
if (!add_sta_req->he_6ghz_cap.a_mpdu_params &&
|
||||
!add_sta_req->he_6ghz_cap.info) {
|
||||
tdls_debug("6Ghz HE capabilities not present");
|
||||
return;
|
||||
}
|
||||
|
||||
qdf_mem_copy(&peer_cfg.he_6ghz_cap,
|
||||
&add_sta_req->he_6ghz_cap,
|
||||
sizeof(add_sta_req->he_6ghz_cap));
|
||||
|
||||
pDot11f->present = 1;
|
||||
pDot11f->min_mpdu_start_spacing =
|
||||
peer_cfg.dot11f.min_mpdu_start_spacing;
|
||||
pDot11f->max_ampdu_len_exp = peer_cfg.dot11f.max_ampdu_len_exp;
|
||||
pDot11f->max_mpdu_len = peer_cfg.dot11f.max_mpdu_len;
|
||||
pDot11f->sm_pow_save = peer_cfg.dot11f.sm_pow_save;
|
||||
pDot11f->rd_responder = peer_cfg.dot11f.rd_responder;
|
||||
pDot11f->rx_ant_pattern_consistency =
|
||||
peer_cfg.dot11f.rx_ant_pattern_consistency;
|
||||
pDot11f->tx_ant_pattern_consistency =
|
||||
peer_cfg.dot11f.tx_ant_pattern_consistency;
|
||||
|
||||
lim_log_he_6g_cap(mac, pDot11f);
|
||||
}
|
||||
|
||||
static void lim_populate_tdls_setup_6g_cap(struct mac_context *mac,
|
||||
tDot11fIEhe_6ghz_band_cap *hecap_6g,
|
||||
struct pe_session *session)
|
||||
{
|
||||
if (hecap_6g)
|
||||
populate_dot11f_he_6ghz_cap(mac, session, hecap_6g);
|
||||
}
|
||||
|
||||
#else
|
||||
static void
|
||||
lim_tdls_populate_dot11f_6hgz_he_caps(struct mac_context *mac,
|
||||
struct tdls_add_sta_req *add_sta_req,
|
||||
tDot11fIEhe_6ghz_band_cap *pDot11f)
|
||||
{
|
||||
}
|
||||
|
||||
static void lim_populate_tdls_setup_6g_cap(struct mac_context *mac,
|
||||
tDot11fIEhe_6ghz_band_cap *hecap_6g,
|
||||
struct pe_session *session)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static void lim_tdls_set_he_chan_width(tDot11fIEhe_cap *heCap,
|
||||
struct pe_session *session)
|
||||
@@ -816,12 +875,14 @@ static void lim_tdls_set_he_chan_width(tDot11fIEhe_cap *heCap,
|
||||
static void populate_dot11f_set_tdls_he_cap(struct mac_context *mac,
|
||||
uint32_t selfDot11Mode,
|
||||
tDot11fIEhe_cap *heCap,
|
||||
tDot11fIEhe_6ghz_band_cap *hecap_6g,
|
||||
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);
|
||||
lim_log_he_cap(mac, heCap);
|
||||
lim_populate_tdls_setup_6g_cap(mac, hecap_6g, session);
|
||||
} else {
|
||||
pe_debug("Not populating he cap as SelfDot11Mode not HE %d",
|
||||
selfDot11Mode);
|
||||
@@ -834,7 +895,9 @@ static void lim_tdls_fill_dis_rsp_he_cap(struct mac_context *mac,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
populate_dot11f_set_tdls_he_cap(mac, selfDot11Mode,
|
||||
&tdls_dis_rsp->he_cap, pe_session);
|
||||
&tdls_dis_rsp->he_cap,
|
||||
NULL,
|
||||
pe_session);
|
||||
}
|
||||
|
||||
static void lim_tdls_fill_setup_req_he_cap(struct mac_context *mac,
|
||||
@@ -843,7 +906,9 @@ static void lim_tdls_fill_setup_req_he_cap(struct mac_context *mac,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
populate_dot11f_set_tdls_he_cap(mac, selfDot11Mode,
|
||||
&tdls_setup_req->he_cap, pe_session);
|
||||
&tdls_setup_req->he_cap,
|
||||
&tdls_setup_req->he_6ghz_band_cap,
|
||||
pe_session);
|
||||
}
|
||||
|
||||
static void lim_tdls_fill_setup_rsp_he_cap(struct mac_context *mac,
|
||||
@@ -852,7 +917,9 @@ static void lim_tdls_fill_setup_rsp_he_cap(struct mac_context *mac,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
populate_dot11f_set_tdls_he_cap(mac, selfDot11Mode,
|
||||
&tdls_setup_rsp->he_cap, pe_session);
|
||||
&tdls_setup_rsp->he_cap,
|
||||
&tdls_setup_rsp->he_6ghz_band_cap,
|
||||
pe_session);
|
||||
}
|
||||
|
||||
static void lim_tdls_fill_setup_cnf_he_op(struct mac_context *mac,
|
||||
@@ -1039,6 +1106,10 @@ static void lim_tdls_update_node_he_caps(struct mac_context *mac,
|
||||
lim_tdls_set_he_chan_width(&sta->he_config, pe_session);
|
||||
|
||||
lim_log_he_cap(mac, &sta->he_config);
|
||||
|
||||
if (lim_is_he_6ghz_band(pe_session))
|
||||
lim_tdls_populate_dot11f_6hgz_he_caps(mac, add_sta_req,
|
||||
&sta->he_6g_band_cap);
|
||||
}
|
||||
|
||||
#else
|
||||
|
@@ -238,6 +238,27 @@ tdls_calc_channels_from_staparams(struct tdls_update_peer_params *req_info,
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11AX
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
|
||||
static void
|
||||
wlan_cfg80211_tdls_extract_6ghz_params(struct tdls_update_peer_params *req_info,
|
||||
struct station_parameters *params)
|
||||
{
|
||||
if (!params->he_6ghz_capa) {
|
||||
osif_debug("6 Ghz he_capa not present");
|
||||
return;
|
||||
}
|
||||
|
||||
qdf_mem_copy(&req_info->he_6ghz_cap, params->he_6ghz_capa,
|
||||
sizeof(params->he_6ghz_capa));
|
||||
}
|
||||
#else
|
||||
static void
|
||||
wlan_cfg80211_tdls_extract_6ghz_params(struct tdls_update_peer_params *req_info,
|
||||
struct station_parameters *params)
|
||||
{
|
||||
osif_debug("kernel don't support tdls 6 ghz band");
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info,
|
||||
@@ -261,6 +282,8 @@ wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info,
|
||||
qdf_mem_copy(&req_info->he_cap, params->he_capa,
|
||||
req_info->he_cap_len);
|
||||
|
||||
wlan_cfg80211_tdls_extract_6ghz_params(req_info, params);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user