kernel: add missing config symbols for 4.9
[openwrt/staging/yousong.git] / package / kernel / mac80211 / patches / 557-ath9k-disable-bands-via-dt.patch
1 --- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
2 +++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
3 @@ -34,6 +34,14 @@ Optional properties:
4 ath9k wireless chip (in this case the calibration /
5 EEPROM data will be loaded from userspace using the
6 kernel firmware loader).
7 +- qca,disable-2ghz: Overrides the settings from the EEPROM and disables the
8 + 2.4GHz band. Setting this property is only needed
9 + when the RF circuit does not support the 2.4GHz band
10 + while it is enabled nevertheless in the EEPROM.
11 +- qca,disable-5ghz: Overrides the settings from the EEPROM and disables the
12 + 5GHz band. Setting this property is only needed when
13 + the RF circuit does not support the 5GHz band while
14 + it is enabled nevertheless in the EEPROM.
15 - mac-address: See ethernet.txt in the parent directory
16 - local-mac-address: See ethernet.txt in the parent directory
17
18 --- a/drivers/net/wireless/ath/ath9k/init.c
19 +++ b/drivers/net/wireless/ath/ath9k/init.c
20 @@ -571,6 +571,12 @@ static int ath9k_of_init(struct ath_soft
21
22 ath_dbg(common, CONFIG, "parsing configuration from OF node\n");
23
24 + if (of_property_read_bool(np, "qca,disable-2ghz"))
25 + ah->disable_2ghz = true;
26 +
27 + if (of_property_read_bool(np, "qca,disable-5ghz"))
28 + ah->disable_5ghz = true;
29 +
30 if (of_property_read_bool(np, "qca,no-eeprom")) {
31 /* ath9k-eeprom-<bus>-<id>.bin */
32 scnprintf(eeprom_name, sizeof(eeprom_name),