qcacld-3.0: Update EHT cap IE as per current country code

On set country code, host updates EHT cap IE to FW via
WMI_VDEV_SET_IE_CMDID command. 320 MHz BW capability in
EHT cap IE should be as per new country code.

Change-Id: I7f71002023d1a15b04126570b19dc85fa36db949
CRs-Fixed: 3668691
This commit is contained in:
Abhinav Kumar
2023-11-21 06:55:51 -08:00
zatwierdzone przez Ravindra Konda
rodzic cff8c42a4e
commit 15ed8393b6
2 zmienionych plików z 20 dodań i 1 usunięć

Wyświetl plik

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -1711,6 +1711,9 @@ 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;

Wyświetl plik

@@ -9016,6 +9016,21 @@ void lim_log_eht_op(struct mac_context *mac, tDot11fIEeht_op *eht_ops,
eht_ops, sizeof(tDot11fIEeht_op));
}
static void
lim_revise_eht_caps(struct mac_context *mac, tDot11fIEeht_cap *eht_cap)
{
uint32_t country_max_allowed_bw;
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;
}
if (country_max_allowed_bw < BW_320_MHZ)
eht_cap->support_320mhz_6ghz = 0;
}
void lim_set_eht_caps(struct mac_context *mac,
uint8_t *ie_start, uint32_t num_bytes, uint8_t band,
uint8_t vdev_id)
@@ -9035,6 +9050,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);
populate_dot11f_he_caps_by_band(mac, is_band_2g, &dot11_he_cap,
NULL);
lim_log_eht_cap(mac, &dot11_cap);