linux/net/wireless
Raj Kumar Bhagat 13ba6794d2 wifi: cfg80211: allow reg update by driver even if wiphy->regd is set
Currently regulatory update by driver is not allowed when the
wiphy->regd is already set and drivers_request->intersect is false.

During wiphy registration, some drivers (ath10k does this currently)
first register the world regulatory to cfg80211 using
wiphy_apply_custom_regulatory(). The driver then obtain the current
operating country and tries to update the correct regulatory to
cfg80211 using regulatory_hint().

But at this point, wiphy->regd is already set to world regulatory.
Also, since this is the first request from driver after the world
regulatory is set this will result in drivers_request->intersect
set to false. In this condition the driver request regulatory is not
allowed to update to cfg80211 in reg_set_rd_driver(). This restricts
the device operation to the world regulatory.

This driver request to update the regulatory with current operating
country is valid and should be updated to cfg80211. Hence allow
regulatory update by driver even if the wiphy->regd is already set
and driver_request->intersect is false.

Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://lore.kernel.org/r/20230421061312.13722-1-quic_rajkbhag@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-09-13 12:34:01 +02:00
..
certs cfg80211: ship certificates as hex files 2017-12-19 09:28:01 +01:00
tests wifi: cfg80211: add first kunit tests, for element defrag 2023-09-11 12:32:16 +02:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
ap.c wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
chan.c wifi: cfg80211: annotate iftype_data pointer with sparse 2023-09-11 11:27:23 +02:00
core.c wifi: cfg80211: annotate iftype_data pointer with sparse 2023-09-11 11:27:23 +02:00
core.h wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
debugfs.c wifi: cfg80211: debugfs: fix return type in ht40allow_map_read() 2022-08-25 10:04:46 +02:00
debugfs.h
ethtool.c wifi: cfg80211: use strscpy to replace strlcpy 2022-07-15 11:43:12 +02:00
ibss.c wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
Kconfig wifi: cfg80211: add first kunit tests, for element defrag 2023-09-11 12:32:16 +02:00
lib80211_crypt_ccmp.c wifi: use struct_group to copy addresses 2022-09-03 16:40:06 +02:00
lib80211_crypt_tkip.c wifi: lib80211: remove unused variables iv32 and iv16 2023-09-13 12:33:58 +02:00
lib80211_crypt_wep.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
lib80211.c lib80211: Remove unused macro DRV_NAME 2020-09-18 11:53:00 +02:00
Makefile wifi: cfg80211: add first kunit tests, for element defrag 2023-09-11 12:32:16 +02:00
mesh.c wifi: cfg80211: remove scan_width support 2023-09-13 11:10:50 +02:00
mlme.c wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
nl80211.c wifi: nl80211: additions to NL80211_CMD_SET_BEACON 2023-09-13 12:34:01 +02:00
nl80211.h wifi: nl80211: Remove unused declaration nl80211_pmsr_dump_results() 2023-08-22 21:40:40 +02:00
ocb.c wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
of.c
pmsr.c wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
radiotap.c mac80211: Use flex-array for radiotap header bitmap 2021-08-13 09:58:25 +02:00
rdev-ops.h wifi: cfg80211: modify prototype for change_beacon 2023-09-13 12:34:01 +02:00
reg.c wifi: cfg80211: allow reg update by driver even if wiphy->regd is set 2023-09-13 12:34:01 +02:00
reg.h wifi: cfg80211: reg: fix various kernel-doc issues 2023-09-11 12:32:39 +02:00
scan.c wifi: cfg80211: remove scan_width support 2023-09-13 11:10:50 +02:00
sme.c wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
sysfs.c wifi: cfg80211: add flush functions for wiphy work 2023-09-11 11:27:19 +02:00
sysfs.h
trace.c
trace.h wifi: cfg80211: modify prototype for change_beacon 2023-09-13 12:34:01 +02:00
util.c wifi: cfg80211: remove scan_width support 2023-09-13 11:10:50 +02:00
wext-compat.c wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
wext-compat.h wifi: cfg80211: Avoid clashing function prototypes 2022-11-16 11:31:47 +02:00
wext-core.c wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point() 2023-06-19 12:05:27 +02:00
wext-priv.c
wext-proc.c proc: introduce proc_create_net{,_data} 2018-05-16 07:24:30 +02:00
wext-sme.c wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
wext-spy.c wireless: wext-spy: Fix out-of-bounds warning 2021-06-23 10:57:17 +02:00