mac80211: rename a misnamed ath9k patch
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 2 Dec 2012 20:41:37 +0000 (20:41 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 2 Dec 2012 20:41:37 +0000 (20:41 +0000)
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34463 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/mac80211/patches/569-ath9k-allow-to-disable-bands-via-platform-data.patch [new file with mode: 0644]
package/mac80211/patches/b01-ath9k-allow-to-disable-bands-via-platform-data.patch [deleted file]

diff --git a/package/mac80211/patches/569-ath9k-allow-to-disable-bands-via-platform-data.patch b/package/mac80211/patches/569-ath9k-allow-to-disable-bands-via-platform-data.patch
new file mode 100644 (file)
index 0000000..0a071ff
--- /dev/null
@@ -0,0 +1,70 @@
+--- a/include/linux/ath9k_platform.h
++++ b/include/linux/ath9k_platform.h
+@@ -31,6 +31,9 @@ struct ath9k_platform_data {
+       bool endian_check;
+       bool is_clk_25mhz;
++      bool disable_2ghz;
++      bool disable_5ghz;
++
+       int (*get_mac_revision)(void);
+       int (*external_reset)(void);
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -2413,17 +2413,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
+       }
+       eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);
+-      if ((eeval & (AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A)) == 0) {
+-              ath_err(common,
+-                      "no band has been marked as supported in EEPROM\n");
+-              return -EINVAL;
++
++      if (eeval & AR5416_OPFLAGS_11A) {
++              if (ah->disable_5ghz)
++                      ath_warn(common, "disabling 5GHz band\n");
++              else
++                      pCap->hw_caps |= ATH9K_HW_CAP_5GHZ;
+       }
+-      if (eeval & AR5416_OPFLAGS_11A)
+-              pCap->hw_caps |= ATH9K_HW_CAP_5GHZ;
++      if (eeval & AR5416_OPFLAGS_11G) {
++              if (ah->disable_2ghz)
++                      ath_warn(common, "disabling 2GHz band\n");
++              else
++                      pCap->hw_caps |= ATH9K_HW_CAP_2GHZ;
++      }
+-      if (eeval & AR5416_OPFLAGS_11G)
+-              pCap->hw_caps |= ATH9K_HW_CAP_2GHZ;
++      if ((pCap->hw_caps & (ATH9K_HW_CAP_2GHZ | ATH9K_HW_CAP_5GHZ)) == 0) {
++              ath_err(common, "both bands are disabled\n");
++              return -EINVAL;
++      }
+       if (AR_SREV_9485(ah) || AR_SREV_9285(ah) || AR_SREV_9330(ah))
+               chip_chainmask = 1;
+--- a/drivers/net/wireless/ath/ath9k/hw.h
++++ b/drivers/net/wireless/ath/ath9k/hw.h
+@@ -927,6 +927,8 @@ struct ath_hw {
+       bool is_clk_25mhz;
+       int (*get_mac_revision)(void);
+       int (*external_reset)(void);
++      bool disable_2ghz;
++      bool disable_5ghz;
+ };
+ struct ath_bus_ops {
+--- a/drivers/net/wireless/ath/ath9k/init.c
++++ b/drivers/net/wireless/ath/ath9k/init.c
+@@ -537,6 +537,8 @@ static int ath9k_init_softc(u16 devid, s
+               ah->is_clk_25mhz = pdata->is_clk_25mhz;
+               ah->get_mac_revision = pdata->get_mac_revision;
+               ah->external_reset = pdata->external_reset;
++              ah->disable_2ghz = pdata->disable_2ghz;
++              ah->disable_5ghz = pdata->disable_5ghz;
+               if (!pdata->endian_check)
+                       ah->ah_flags |= AH_NO_EEP_SWAP;
+       }
diff --git a/package/mac80211/patches/b01-ath9k-allow-to-disable-bands-via-platform-data.patch b/package/mac80211/patches/b01-ath9k-allow-to-disable-bands-via-platform-data.patch
deleted file mode 100644 (file)
index 0a071ff..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
---- a/include/linux/ath9k_platform.h
-+++ b/include/linux/ath9k_platform.h
-@@ -31,6 +31,9 @@ struct ath9k_platform_data {
-       bool endian_check;
-       bool is_clk_25mhz;
-+      bool disable_2ghz;
-+      bool disable_5ghz;
-+
-       int (*get_mac_revision)(void);
-       int (*external_reset)(void);
---- a/drivers/net/wireless/ath/ath9k/hw.c
-+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2413,17 +2413,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
-       }
-       eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);
--      if ((eeval & (AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A)) == 0) {
--              ath_err(common,
--                      "no band has been marked as supported in EEPROM\n");
--              return -EINVAL;
-+
-+      if (eeval & AR5416_OPFLAGS_11A) {
-+              if (ah->disable_5ghz)
-+                      ath_warn(common, "disabling 5GHz band\n");
-+              else
-+                      pCap->hw_caps |= ATH9K_HW_CAP_5GHZ;
-       }
--      if (eeval & AR5416_OPFLAGS_11A)
--              pCap->hw_caps |= ATH9K_HW_CAP_5GHZ;
-+      if (eeval & AR5416_OPFLAGS_11G) {
-+              if (ah->disable_2ghz)
-+                      ath_warn(common, "disabling 2GHz band\n");
-+              else
-+                      pCap->hw_caps |= ATH9K_HW_CAP_2GHZ;
-+      }
--      if (eeval & AR5416_OPFLAGS_11G)
--              pCap->hw_caps |= ATH9K_HW_CAP_2GHZ;
-+      if ((pCap->hw_caps & (ATH9K_HW_CAP_2GHZ | ATH9K_HW_CAP_5GHZ)) == 0) {
-+              ath_err(common, "both bands are disabled\n");
-+              return -EINVAL;
-+      }
-       if (AR_SREV_9485(ah) || AR_SREV_9285(ah) || AR_SREV_9330(ah))
-               chip_chainmask = 1;
---- a/drivers/net/wireless/ath/ath9k/hw.h
-+++ b/drivers/net/wireless/ath/ath9k/hw.h
-@@ -927,6 +927,8 @@ struct ath_hw {
-       bool is_clk_25mhz;
-       int (*get_mac_revision)(void);
-       int (*external_reset)(void);
-+      bool disable_2ghz;
-+      bool disable_5ghz;
- };
- struct ath_bus_ops {
---- a/drivers/net/wireless/ath/ath9k/init.c
-+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -537,6 +537,8 @@ static int ath9k_init_softc(u16 devid, s
-               ah->is_clk_25mhz = pdata->is_clk_25mhz;
-               ah->get_mac_revision = pdata->get_mac_revision;
-               ah->external_reset = pdata->external_reset;
-+              ah->disable_2ghz = pdata->disable_2ghz;
-+              ah->disable_5ghz = pdata->disable_5ghz;
-               if (!pdata->endian_check)
-                       ah->ah_flags |= AH_NO_EEP_SWAP;
-       }