Commit 366c4aa
wifi: ath12k: fix handling of 6 GHz rules
commit 64a1ba4 upstream.
In the US country code, to avoid including 6 GHz rules in the 5 GHz rules
list, the number of 5 GHz rules is set to a default constant value of 4
(REG_US_5G_NUM_REG_RULES). However, if there are more than 4 valid 5 GHz
rules, the current logic will bypass the legitimate 6 GHz rules.
For example, if there are 5 valid 5 GHz rules and 1 valid 6 GHz rule, the
current logic will only consider 4 of the 5 GHz rules, treating the last
valid rule as a 6 GHz rule. Consequently, the actual 6 GHz rule is never
processed, leading to the eventual disabling of 6 GHz channels.
To fix this issue, instead of hardcoding the value to 4, use a helper
function to determine the number of 6 GHz rules present in the 5 GHz rules
list and ignore only those rules.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Cc: stable@vger.kernel.org
Fixes: d889913 ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Link: https://patch.msgid.link/20250123-fix_6ghz_rules_handling-v1-1-d734bfa58ff4@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent e6caf1c commit 366c4aa
2 files changed
+45
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4681 | 4681 | | |
4682 | 4682 | | |
4683 | 4683 | | |
| 4684 | + | |
| 4685 | + | |
| 4686 | + | |
| 4687 | + | |
| 4688 | + | |
| 4689 | + | |
| 4690 | + | |
| 4691 | + | |
| 4692 | + | |
| 4693 | + | |
| 4694 | + | |
| 4695 | + | |
| 4696 | + | |
| 4697 | + | |
| 4698 | + | |
| 4699 | + | |
4684 | 4700 | | |
4685 | 4701 | | |
4686 | 4702 | | |
| |||
4691 | 4707 | | |
4692 | 4708 | | |
4693 | 4709 | | |
| 4710 | + | |
4694 | 4711 | | |
4695 | 4712 | | |
4696 | 4713 | | |
| |||
4784 | 4801 | | |
4785 | 4802 | | |
4786 | 4803 | | |
4787 | | - | |
4788 | | - | |
4789 | | - | |
4790 | | - | |
4791 | | - | |
4792 | | - | |
4793 | | - | |
4794 | | - | |
4795 | | - | |
4796 | | - | |
4797 | | - | |
4798 | | - | |
4799 | | - | |
4800 | | - | |
4801 | 4804 | | |
4802 | 4805 | | |
4803 | 4806 | | |
| |||
4900 | 4903 | | |
4901 | 4904 | | |
4902 | 4905 | | |
| 4906 | + | |
| 4907 | + | |
| 4908 | + | |
| 4909 | + | |
| 4910 | + | |
| 4911 | + | |
| 4912 | + | |
| 4913 | + | |
| 4914 | + | |
| 4915 | + | |
| 4916 | + | |
| 4917 | + | |
| 4918 | + | |
| 4919 | + | |
| 4920 | + | |
| 4921 | + | |
| 4922 | + | |
| 4923 | + | |
| 4924 | + | |
| 4925 | + | |
| 4926 | + | |
| 4927 | + | |
4903 | 4928 | | |
4904 | | - | |
4905 | 4929 | | |
4906 | 4930 | | |
4907 | 4931 | | |
| |||
4913 | 4937 | | |
4914 | 4938 | | |
4915 | 4939 | | |
4916 | | - | |
| 4940 | + | |
| 4941 | + | |
| 4942 | + | |
| 4943 | + | |
| 4944 | + | |
| 4945 | + | |
4917 | 4946 | | |
4918 | 4947 | | |
4919 | 4948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3943 | 3943 | | |
3944 | 3944 | | |
3945 | 3945 | | |
3946 | | - | |
3947 | 3946 | | |
3948 | 3947 | | |
3949 | 3948 | | |
| |||
0 commit comments