mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-25 01:24:04 +02:00
a13513b090
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@24658 3c298f89-4303-0410-b956-a3cf2f4a3e73
43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
--- a/drivers/net/wireless/ath/regd.c
|
|
+++ b/drivers/net/wireless/ath/regd.c
|
|
@@ -342,6 +342,14 @@ int ath_reg_notifier_apply(struct wiphy
|
|
/* We always apply this */
|
|
ath_reg_apply_radar_flags(wiphy);
|
|
|
|
+ /*
|
|
+ * This would happen when we have sent a custom regulatory request
|
|
+ * a world regulatory domain and the scheduler hasn't yet processed
|
|
+ * any pending requests in the queue.
|
|
+ */
|
|
+ if (!request)
|
|
+ return 0;
|
|
+
|
|
switch (request->initiator) {
|
|
case NL80211_REGDOM_SET_BY_DRIVER:
|
|
case NL80211_REGDOM_SET_BY_CORE:
|
|
--- a/include/net/cfg80211.h
|
|
+++ b/include/net/cfg80211.h
|
|
@@ -1417,7 +1417,9 @@ struct ieee80211_txrx_stypes {
|
|
|
|
/**
|
|
* struct wiphy - wireless hardware description
|
|
- * @reg_notifier: the driver's regulatory notification callback
|
|
+ * @reg_notifier: the driver's regulatory notification callback,
|
|
+ * note that if your driver uses wiphy_apply_custom_regulatory()
|
|
+ * the reg_notifier's request can be passed as NULL
|
|
* @regd: the driver's regulatory domain, if one was requested via
|
|
* the regulatory_hint() API. This can be used by the driver
|
|
* on the reg_notifier() if it chooses to ignore future
|
|
--- a/net/wireless/reg.c
|
|
+++ b/net/wireless/reg.c
|
|
@@ -662,7 +662,8 @@ static int freq_reg_info_regd(struct wip
|
|
* Follow the driver's regulatory domain, if present, unless a country
|
|
* IE has been processed or a user wants to help complaince further
|
|
*/
|
|
- if (last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
|
|
+ if (!custom_regd &&
|
|
+ last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
|
|
last_request->initiator != NL80211_REGDOM_SET_BY_USER &&
|
|
wiphy->regd)
|
|
regd = wiphy->regd;
|