qcacmn: Update ML IE handling as per draft 2.0 new definitions

Update multi link IE definition as per 11BE draft 2.0 spec.

Change-Id: I120f1a99ef683f6bf0b9fb0ba3b5d157625639ca
CRs-Fixed: 3220212
Tento commit je obsažen v:
Deeksha Gupta
2022-06-15 15:28:19 +05:30
odevzdal Madan Koyyalamudi
rodič fe9866276b
revize b52e67679a
3 změnil soubory, kde provedl 67 přidání a 34 odebrání

Zobrazit soubor

@@ -1944,8 +1944,10 @@ enum wlan_ml_variant {
#define WLAN_ML_BV_CTRL_PBM_MEDIUMSYNCDELAYINFO_P ((uint16_t)BIT(2))
/* EML Capabilities Present */
#define WLAN_ML_BV_CTRL_PBM_EMLCAP_P ((uint16_t)BIT(3))
/* MLD Capabilities */
#define WLAN_ML_BV_CTRL_PBM_MLDCAP_P ((uint16_t)BIT(4))
/* MLD Capabilities and operation Present */
#define WLAN_ML_BV_CTRL_PBM_MLDCAPANDOP_P ((uint16_t)BIT(4))
/* MLD ID Present */
#define WLAN_ML_BV_CTRL_PBM_MLDID_P ((uint16_t)BIT(5))
/* Definitions related to Basic variant Multi-Link element Common Info field */
@@ -2097,6 +2099,9 @@ enum wlan_ml_bv_cinfo_emlcap_emlmrdelay {
* values instead of using a formula, and we reflect this accordingly using an
* enumeration.
* WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_0TU: Transition Timeout value of 0 TUs
* WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_128MU: Transition Timeout value of 128μs
* WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_256MU: Transition Timeout value of 256μs
* WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_512MU: Transition Timeout value of 512μs
* WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_1TU: Transition Timeout value of 1 TU
* WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_2TU: Transition Timeout value of 2 TUs
* WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_4TU: Transition Timeout value of 4 TUs
@@ -2114,40 +2119,48 @@ enum wlan_ml_bv_cinfo_emlcap_emlmrdelay {
*/
enum wlan_ml_bv_cinfo_emlcap_transtimeout {
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_0TU = 0,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_1TU = 1,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_2TU = 2,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_4TU = 3,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_8TU = 4,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_16TU = 5,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_32TU = 6,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_64TU = 7,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_128TU = 8,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_128MU = 1,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_256MU = 2,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_512MU = 3,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_1TU = 4,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_2TU = 5,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_4TU = 6,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_8TU = 7,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_16TU = 8,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_32TU = 9,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_64TU = 10,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_128TU = 11,
WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_INVALIDSTART,
};
/* Size in octets of MLD Capabilities subfield in Basic variant Multi-Link
* element Common Info field as per IEEE P802.11be/D1.5.
/* Size in octets of MLD Capabilities and operation subfield in Basic variant
* Multi-Link element Common Info field as per IEEE P802.11be/D1.5.
*/
#define WLAN_ML_BV_CINFO_MLDCAP_SIZE 2
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE 2
/* Definitions for sub-sub fields in MLD Capabilities subfield in Basic variant
* Multi-Link element Common Info field. Any unused bits are reserved.
*/
/* Maximum Number Of Simultaneous Links */
#define WLAN_ML_BV_CINFO_MLDCAP_MAXSIMULLINKS_IDX 0
#define WLAN_ML_BV_CINFO_MLDCAP_MAXSIMULLINKS_BITS 4
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_MAXSIMULLINKS_IDX 0
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_MAXSIMULLINKS_BITS 4
/* SRS Support */
#define WLAN_ML_BV_CINFO_MLDCAP_SRSSUPPORT_IDX 4
#define WLAN_ML_BV_CINFO_MLDCAP_SRSSUPPORT_BITS 1
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_SRSSUPPORT_IDX 4
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_SRSSUPPORT_BITS 1
/* TID-To-Link Mapping Negotiation Supported */
#define WLAN_ML_BV_CINFO_MLDCAP_TIDTOLINKMAPNEGSUPPORT_IDX 5
#define WLAN_ML_BV_CINFO_MLDCAP_TIDTOLINKMAPNEGSUPPORT_BITS 2
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_TIDTOLINKMAPNEGSUPPORT_IDX 5
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_TIDTOLINKMAPNEGSUPPORT_BITS 2
/* Frequency Separation For STR */
#define WLAN_ML_BV_CINFO_MLDCAP_STRFREQSEPARATION_IDX 7
#define WLAN_ML_BV_CINFO_MLDCAP_STRFREQSEPARATION_BITS 5
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_STRFREQSEPARATION_IDX 7
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_STRFREQSEPARATION_BITS 5
/* AAR Support */
#define WLAN_ML_BV_CINFO_MLDCAP_AARSUPPORT_IDX 12
#define WLAN_ML_BV_CINFO_MLDCAP_AARSUPPORT_BITS 1
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_AARSUPPORT_IDX 12
#define WLAN_ML_BV_CINFO_MLDCAPANDOP_AARSUPPORT_BITS 1
/* Size in octets of MLD ID subfield in Basic variant Multi-Link
* element Common Info field.
*/
#define WLAN_ML_BV_CINFO_MLDID_SIZE 1
/* Max value in octets of Common Info Length subfield of Common Info field in
* Basic variant Multi-Link element
@@ -2159,7 +2172,8 @@ enum wlan_ml_bv_cinfo_emlcap_transtimeout {
WLAN_ML_BSSPARAMCHNGCNT_SIZE + \
WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_SIZE + \
WLAN_ML_BV_CINFO_EMLCAP_SIZE + \
WLAN_ML_BV_CINFO_MLDCAP_SIZE)
WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE + \
WLAN_ML_BV_CINFO_MLDID_SIZE)
/* End of definitions related to Basic variant Multi-Link element Common Info
* field.

Zobrazit soubor

@@ -199,18 +199,33 @@ util_parse_multi_link_ctrl(uint8_t *mlieseqpayload,
}
/* Check if MLD cap is present */
if (presence_bm & WLAN_ML_BV_CTRL_PBM_MLDCAP_P) {
if (presence_bm & WLAN_ML_BV_CTRL_PBM_MLDCAPANDOP_P) {
if (mlieseqpayloadlen <
(parsed_payload_len +
WLAN_ML_BV_CINFO_MLDCAP_SIZE)) {
WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE)) {
mlo_err_rl("ML seq payload len %zu insufficient for MLD cap size %u after parsed payload len %zu.",
mlieseqpayloadlen,
WLAN_ML_BV_CINFO_MLDCAP_SIZE,
WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE,
parsed_payload_len);
return QDF_STATUS_E_PROTO;
}
parsed_payload_len += WLAN_ML_BV_CINFO_MLDCAP_SIZE;
parsed_payload_len += WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE;
}
/* Check if MLD ID is present */
if (presence_bm & WLAN_ML_BV_CTRL_PBM_MLDID_P) {
if (mlieseqpayloadlen <
(parsed_payload_len +
WLAN_ML_BV_CINFO_MLDID_SIZE)) {
mlo_err_rl("ML seq payload len %zu insufficient for MLD ID size %u after parsed payload len %zu.",
mlieseqpayloadlen,
WLAN_ML_BV_CINFO_MLDID_SIZE,
parsed_payload_len);
return QDF_STATUS_E_PROTO;
}
parsed_payload_len += WLAN_ML_BV_CINFO_MLDID_SIZE;
}
exp_cinfo_len = parsed_payload_len - WLAN_ML_CTRL_SIZE;
@@ -3108,16 +3123,16 @@ util_get_bvmlie_mldcap(uint8_t *mlieseq, qdf_size_t mlieseqlen,
return QDF_STATUS_E_PROTO;
}
if (presencebitmap & WLAN_ML_BV_CTRL_PBM_MLDCAP_P) {
if (presencebitmap & WLAN_ML_BV_CTRL_PBM_MLDCAPANDOP_P) {
/* Check if the value indicated in the Common Info Length
* subfield is sufficient to access the MLD capabilities.
*/
if (commoninfo_len < (mldcap_offset +
WLAN_ML_BV_CINFO_MLDCAP_SIZE))
WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE))
return QDF_STATUS_E_PROTO;
if ((sizeof(struct wlan_ie_multilink) + mldcap_offset +
WLAN_ML_BV_CINFO_MLDCAP_SIZE) >
WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE) >
mlieseqlen)
return QDF_STATUS_E_PROTO;

Zobrazit soubor

@@ -1879,9 +1879,13 @@ static uint8_t util_get_link_info_offset(uint8_t *ml_ie)
if (presencebm & WLAN_ML_BV_CTRL_PBM_EMLCAP_P)
parsed_ie_len += WLAN_ML_BV_CINFO_EMLCAP_SIZE;
/* Check if MLD cap is present */
if (presencebm & WLAN_ML_BV_CTRL_PBM_MLDCAP_P)
parsed_ie_len += WLAN_ML_BV_CINFO_MLDCAP_SIZE;
/* Check if MLD cap and op is present */
if (presencebm & WLAN_ML_BV_CTRL_PBM_MLDCAPANDOP_P)
parsed_ie_len += WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE;
/* Check if MLD ID is present */
if (presencebm & WLAN_ML_BV_CTRL_PBM_MLDID_P)
parsed_ie_len += WLAN_ML_BV_CINFO_MLDID_SIZE;
/* Offset calculation starts from the beginning of the ML IE (including
* EID) hence, adding the size of IE header to ML IE length.