wifi: ath12k: update unsupported bandwidth flags in reg rules
authorHarshitha Prem <quic_hprem@quicinc.com>
Tue, 1 Jul 2025 13:59:02 +0000 (19:29 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 10 Jul 2025 14:29:44 +0000 (07:29 -0700)
commit2109e98503bc1c01c399feac68cc8b7faf6d0a4a
treed6e1513bf724a7ae7d022034037cc69842405aa7
parenta1bff3d6cc454d65a3a654cd3fcd0c90f1fb45fb
wifi: ath12k: update unsupported bandwidth flags in reg rules

The maximum bandwidth an interface can operate in is defined by the
configured country. However, currently, it is able to operate in
bandwidths greater than the allowed bandwidth. For example,
the Central African Republic (CF) supports a maximum bandwidth of 40 MHz
in both the 2 GHz and 5 GHz bands, but an interface is still able to
operate in bandwidths higher than 40 MHz. This issue arises because the
regulatory rules in the regd are not updated with these restrictions
received from firmware on the maximum bandwidth.

Hence, update the regulatory rules with unsupported bandwidth flags based
on the maximum bandwidth to ensure compliance with country-specific
regulations.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
Signed-off-by: Amith A <quic_amitajit@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250701135902.722851-1-quic_amitajit@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/reg.c