1 --- a/include/linux/ath9k_platform.h
2 +++ b/include/linux/ath9k_platform.h
3 @@ -34,6 +34,8 @@ struct ath9k_platform_data {
10 int (*get_mac_revision)(void);
11 int (*external_reset)(void);
12 --- a/drivers/net/wireless/ath/ath9k/hw.c
13 +++ b/drivers/net/wireless/ath/ath9k/hw.c
14 @@ -2323,17 +2323,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
17 eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);
18 - if ((eeval & (AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A)) == 0) {
20 - "no band has been marked as supported in EEPROM\n");
23 + if (eeval & AR5416_OPFLAGS_11A) {
24 + if (ah->disable_5ghz)
25 + ath_warn(common, "disabling 5GHz band\n");
27 + pCap->hw_caps |= ATH9K_HW_CAP_5GHZ;
30 - if (eeval & AR5416_OPFLAGS_11A)
31 - pCap->hw_caps |= ATH9K_HW_CAP_5GHZ;
32 + if (eeval & AR5416_OPFLAGS_11G) {
33 + if (ah->disable_2ghz)
34 + ath_warn(common, "disabling 2GHz band\n");
36 + pCap->hw_caps |= ATH9K_HW_CAP_2GHZ;
39 - if (eeval & AR5416_OPFLAGS_11G)
40 - pCap->hw_caps |= ATH9K_HW_CAP_2GHZ;
41 + if ((pCap->hw_caps & (ATH9K_HW_CAP_2GHZ | ATH9K_HW_CAP_5GHZ)) == 0) {
42 + ath_err(common, "both bands are disabled\n");
46 if (AR_SREV_9485(ah) ||
48 --- a/drivers/net/wireless/ath/ath9k/hw.h
49 +++ b/drivers/net/wireless/ath/ath9k/hw.h
50 @@ -932,6 +932,8 @@ struct ath_hw {
52 int (*get_mac_revision)(void);
53 int (*external_reset)(void);
57 const struct firmware *eeprom_blob;
59 --- a/drivers/net/wireless/ath/ath9k/init.c
60 +++ b/drivers/net/wireless/ath/ath9k/init.c
61 @@ -722,6 +722,8 @@ static int ath9k_init_softc(u16 devid, s
62 ah->is_clk_25mhz = pdata->is_clk_25mhz;
63 ah->get_mac_revision = pdata->get_mac_revision;
64 ah->external_reset = pdata->external_reset;
65 + ah->disable_2ghz = pdata->disable_2ghz;
66 + ah->disable_5ghz = pdata->disable_5ghz;
67 if (!pdata->endian_check)
68 ah->ah_flags |= AH_NO_EEP_SWAP;