|
@@ -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];
|