--- /dev/null
+--- 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;
if (!ath9k_hw_private_ops(ah)->restore_chainmask)
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1406,7 +1406,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -1402,7 +1402,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
ath9k_hw_init_qos(ah);
if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
-@@ -576,7 +576,6 @@ struct ath_hw_private_ops {
+@@ -581,7 +581,6 @@ struct ath_hw_private_ops {
void (*set_delta_slope)(struct ath_hw *ah, struct ath9k_channel *chan);
bool (*rfbus_req)(struct ath_hw *ah);
void (*rfbus_done)(struct ath_hw *ah);