mac80211: merge pending regulatory fixes
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 18 Dec 2010 02:21:21 +0000 (02:21 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 18 Dec 2010 02:21:21 +0000 (02:21 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@24658 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/mac80211/patches/340-pending_regulatory_fixes.patch [new file with mode: 0644]
package/mac80211/patches/404-ath_regd_optional.patch
package/mac80211/patches/540-ath9k_disable_hw_rfkill.patch

diff --git a/package/mac80211/patches/340-pending_regulatory_fixes.patch b/package/mac80211/patches/340-pending_regulatory_fixes.patch
new file mode 100644 (file)
index 0000000..4fdb206
--- /dev/null
@@ -0,0 +1,42 @@
+--- 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;
index 9bda94b0371644224f098b5cc84051dffd60f9d3..9e44359a117d6d03d44f9652951a7f2d17b43645 100644 (file)
@@ -33,7 +33,7 @@
        if (!wiphy->bands[IEEE80211_BAND_5GHZ])
                return;
  
-@@ -449,6 +461,10 @@ ath_regd_init_wiphy(struct ath_regulator
+@@ -457,6 +469,10 @@ ath_regd_init_wiphy(struct ath_regulator
  {
        const struct ieee80211_regdomain *regd;
  
index 83cd9a1ce4b574aff65891625f72ae169c6f7d88..a74ea0da970ae5e6a5110b8218f7b4ffd99778bf 100644 (file)
@@ -82,7 +82,7 @@
        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)
@@ -93,7 +93,7 @@
  
 --- 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);