qcacld-3.0: Fix failed to roam to 320 MHz AP issue

When create vdev, CC is US, max_allowed_bw was 160 MHz, so host set EHT
cap without 320 MHz supported to F/W.
Then APPs reset CC to Japan, max_allowed_bw became 320 MHz, but host
didn’t update eht cap with 320 MHz to F/W correctly especially when
STA disconnected. So F/W can’t roamed to AP with 320 MHz BW.

To fix it, if max_allowed_bw become 320 MHz after CC changed, update eht
cap with 320 MHz supported to F/W correctly, if sta disconnected, update
CAP IE too.

Change-Id: Ifda240e6edd7fe123bf4f29b875d7792c1232463
CRs-Fixed: 3877506
This commit is contained in:
Jianmin Zhu 2024-07-23 15:16:32 +08:00 committed by Ravindra Konda
parent d3fabead6c
commit 794ea74570
2 changed files with 15 additions and 5 deletions

View File

@ -1680,6 +1680,11 @@ static void hdd_country_change_update_sta(struct hdd_context *hdd_ctx)
* continue to next statement
*/
case QDF_STA_MODE:
hdd_debug("Update vdev %d CAP IE", link_info->vdev_id);
sme_set_vdev_ies_per_band(hdd_ctx->mac_handle,
link_info->vdev_id,
QDF_STA_MODE);
sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(link_info);
new_phy_mode = wlan_reg_get_max_phymode(pdev,
@ -1718,9 +1723,6 @@ static void hdd_country_change_update_sta(struct hdd_context *hdd_ctx)
pdev,
link_info->vdev_id);
}
sme_set_vdev_ies_per_band(hdd_ctx->mac_handle,
link_info->vdev_id,
QDF_STA_MODE);
break;
default:
break;

View File

@ -9034,18 +9034,26 @@ void lim_log_eht_op(struct mac_context *mac, tDot11fIEeht_op *eht_ops,
}
static void
lim_revise_eht_caps(struct mac_context *mac, tDot11fIEeht_cap *eht_cap)
lim_revise_eht_caps_per_band(struct mac_context *mac, enum cds_band_type band,
tDot11fIEeht_cap *eht_cap)
{
uint32_t country_max_allowed_bw;
if (band == CDS_BAND_2GHZ)
return;
country_max_allowed_bw = wlan_reg_get_country_max_allowed_bw(mac->pdev);
if (!country_max_allowed_bw) {
pe_debug("Failed to get country_max_allowed_bw");
return;
} else {
pe_debug("max_allowed_bw %d", country_max_allowed_bw);
}
if (country_max_allowed_bw < BW_320_MHZ)
eht_cap->support_320mhz_6ghz = 0;
else if (country_max_allowed_bw == BW_320_MHZ)
eht_cap->support_320mhz_6ghz = 1;
}
void lim_set_eht_caps(struct mac_context *mac,
@ -9067,7 +9075,7 @@ void lim_set_eht_caps(struct mac_context *mac,
is_band_2g = true;
populate_dot11f_eht_caps_by_band(mac, is_band_2g, &dot11_cap, NULL);
lim_revise_eht_caps(mac, &dot11_cap);
lim_revise_eht_caps_per_band(mac, band, &dot11_cap);
populate_dot11f_he_caps_by_band(mac, is_band_2g, &dot11_he_cap,
NULL);
lim_log_eht_cap(mac, &dot11_cap);