qcacmn: Restrict max tbtt info length to current max supported length

Currently if the TBTT length is more than max supported length
driver doesn't the mld information from the RNR IE. This leads
to SLO rather than MLO.

Add the fix to restrict the max length to current supported max
length which helps to parse the ML information further
results in ML association.

CRs-Fixed: 3679296
Change-Id: Id8c58044be162f638ed5e74e0fd04aa0b77780f5
This commit is contained in:
Arun Kumar Khandavalli
2023-12-11 17:41:54 +05:30
committed by Ravindra Konda
szülő 803410c7fc
commit a6fb445d02
2 fájl változott, egészen pontosan 26 új sor hozzáadva és 9 régi sor törölve

Fájl megtekintése

@@ -479,6 +479,9 @@ struct neighbor_ap_info_field {
* short ssid, bss params and 20MHz PSD
* bssid, short ssid, bss params, 20MHz PSD and MLD param
* @TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM:
* @TBTT_NEIGHBOR_AP_PARAM_AFTER_LAST: This is to calculate the max supported
* param length and maintain it in TBTT_NEIGHBOR_AP_PARAM_MAX
* @TBTT_NEIGHBOR_AP_PARAM_MAX: This is to track the max supported param length
*/
enum tbtt_information_field {
TBTT_NEIGHBOR_AP_OFFSET_ONLY = 1,
@@ -491,7 +494,11 @@ enum tbtt_information_field {
TBTT_NEIGHBOR_AP_BSSSID_S_SSID = 11,
TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM = 12,
TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD = 13,
TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM = 16
TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM = 16,
/* keep last */
TBTT_NEIGHBOR_AP_PARAM_AFTER_LAST,
TBTT_NEIGHBOR_AP_PARAM_MAX = TBTT_NEIGHBOR_AP_PARAM_AFTER_LAST - 1,
};
/**

Fájl megtekintése

@@ -998,13 +998,12 @@ util_scan_is_hidden_ssid(struct ie_ssid *ssid)
}
#ifdef WLAN_FEATURE_11BE_MLO
static void
util_scan_update_rnr_mld(struct rnr_bss_info *rnr,
struct neighbor_ap_info_field *ap_info, uint8_t *data)
static void util_scan_update_rnr_mld(struct rnr_bss_info *rnr, uint8_t *data,
uint8_t tbtt_info_length)
{
bool mld_info_present = false;
switch (ap_info->tbtt_header.tbtt_info_length) {
switch (tbtt_info_length) {
case TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM:
qdf_mem_copy(&rnr->mld_info, &data[13],
sizeof(struct rnr_mld_info));
@@ -1015,9 +1014,9 @@ util_scan_update_rnr_mld(struct rnr_bss_info *rnr,
rnr->mld_info_valid = mld_info_present;
}
#else
static void
util_scan_update_rnr_mld(struct rnr_bss_info *rnr,
struct neighbor_ap_info_field *ap_info, uint8_t *data)
static inline void
util_scan_update_rnr_mld(struct rnr_bss_info *rnr, uint8_t *data,
uint8_t tbtt_info_length)
{
}
#endif
@@ -1031,6 +1030,17 @@ util_scan_update_rnr(struct rnr_bss_info *rnr,
tbtt_info_length = ap_info->tbtt_header.tbtt_info_length;
/*
* Max TBTT sub-element length in RNR IE is 255 bytes and AP can send
* data above defined length and the bytes in excess to this length
* shall be treated as reserved.
*
* Limit the TBTT sub-element read operation to current supported
* length i.e TBTT_NEIGHBOR_AP_PARAM_MAX
*/
if (tbtt_info_length > TBTT_NEIGHBOR_AP_PARAM_MAX)
tbtt_info_length = TBTT_NEIGHBOR_AP_PARAM_MAX;
switch (tbtt_info_length) {
case TBTT_NEIGHBOR_AP_OFFSET_ONLY:
/* Dont store it skip*/
@@ -1062,7 +1072,7 @@ util_scan_update_rnr(struct rnr_bss_info *rnr,
break;
case TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM:
util_scan_update_rnr_mld(rnr, ap_info, data);
util_scan_update_rnr_mld(rnr, data, tbtt_info_length);
fallthrough;
case TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD:
rnr->psd_20mhz = data[12];