1 --- a/include/linux/ath9k_platform.h
2 +++ b/include/linux/ath9k_platform.h
3 @@ -31,6 +31,9 @@ struct ath9k_platform_data {
10 int (*get_mac_revision)(void);
11 int (*external_reset)(void);
13 --- a/drivers/net/wireless/ath/ath9k/hw.c
14 +++ b/drivers/net/wireless/ath/ath9k/hw.c
15 @@ -2429,17 +2429,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
18 eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);
19 - if ((eeval & (AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A)) == 0) {
21 - "no band has been marked as supported in EEPROM\n");
24 + if (eeval & AR5416_OPFLAGS_11A) {
25 + if (ah->disable_5ghz)
26 + ath_warn(common, "disabling 5GHz band\n");
28 + pCap->hw_caps |= ATH9K_HW_CAP_5GHZ;
31 - if (eeval & AR5416_OPFLAGS_11A)
32 - pCap->hw_caps |= ATH9K_HW_CAP_5GHZ;
33 + if (eeval & AR5416_OPFLAGS_11G) {
34 + if (ah->disable_2ghz)
35 + ath_warn(common, "disabling 2GHz band\n");
37 + pCap->hw_caps |= ATH9K_HW_CAP_2GHZ;
40 - if (eeval & AR5416_OPFLAGS_11G)
41 - pCap->hw_caps |= ATH9K_HW_CAP_2GHZ;
42 + if ((pCap->hw_caps & (ATH9K_HW_CAP_2GHZ | ATH9K_HW_CAP_5GHZ)) == 0) {
43 + ath_err(common, "both bands are disabled\n");
47 if (AR_SREV_9485(ah) ||
49 --- a/drivers/net/wireless/ath/ath9k/hw.h
50 +++ b/drivers/net/wireless/ath/ath9k/hw.h
51 @@ -929,6 +929,8 @@ struct ath_hw {
53 int (*get_mac_revision)(void);
54 int (*external_reset)(void);
60 --- a/drivers/net/wireless/ath/ath9k/init.c
61 +++ b/drivers/net/wireless/ath/ath9k/init.c
62 @@ -541,6 +541,8 @@ static int ath9k_init_softc(u16 devid, s
63 ah->is_clk_25mhz = pdata->is_clk_25mhz;
64 ah->get_mac_revision = pdata->get_mac_revision;
65 ah->external_reset = pdata->external_reset;
66 + ah->disable_2ghz = pdata->disable_2ghz;
67 + ah->disable_5ghz = pdata->disable_5ghz;
68 if (!pdata->endian_check)
69 ah->ah_flags |= AH_NO_EEP_SWAP;