kernel: fix wrong line for the +@DRIVER_WEXT_SUPPORT dependency in kmod-net-zd1201
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 542-ath9k-add-MAC-revision-detection-for-AR9330.patch
1 --- a/drivers/net/wireless/ath/ath9k/hw.c
2 +++ b/drivers/net/wireless/ath/ath9k/hw.c
3 @@ -252,6 +252,15 @@ static void ath9k_hw_read_revisions(stru
4 case AR5416_AR9100_DEVID:
5 ah->hw_version.macVersion = AR_SREV_VERSION_9100;
6 break;
7 + case AR9300_DEVID_AR9330:
8 + ah->hw_version.macVersion = AR_SREV_VERSION_9330;
9 + if (ah->get_mac_revision) {
10 + ah->hw_version.macRev = ah->get_mac_revision();
11 + } else {
12 + val = REG_READ(ah, AR_SREV);
13 + ah->hw_version.macRev = MS(val, AR_SREV_REVISION2);
14 + }
15 + return;
16 case AR9300_DEVID_AR9340:
17 ah->hw_version.macVersion = AR_SREV_VERSION_9340;
18 val = REG_READ(ah, AR_SREV);
19 --- a/drivers/net/wireless/ath/ath9k/hw.h
20 +++ b/drivers/net/wireless/ath/ath9k/hw.h
21 @@ -863,6 +863,7 @@ struct ath_hw {
22 u32 ent_mode;
23
24 bool is_clk_25mhz;
25 + int (*get_mac_revision)(void);
26 };
27
28 struct ath_bus_ops {
29 --- a/drivers/net/wireless/ath/ath9k/init.c
30 +++ b/drivers/net/wireless/ath/ath9k/init.c
31 @@ -575,6 +575,7 @@ static int ath9k_init_softc(u16 devid, s
32 sc->sc_ah->gpio_val = pdata->gpio_val;
33 sc->sc_ah->led_pin = pdata->led_pin;
34 ah->is_clk_25mhz = pdata->is_clk_25mhz;
35 + ah->get_mac_revision = pdata->get_mac_revision;
36 }
37
38 common = ath9k_hw_common(ah);
39 --- a/include/linux/ath9k_platform.h
40 +++ b/include/linux/ath9k_platform.h
41 @@ -30,6 +30,7 @@ struct ath9k_platform_data {
42 u32 gpio_val;
43
44 bool is_clk_25mhz;
45 + int (*get_mac_revision)(void);
46 };
47
48 #endif /* _LINUX_ATH9K_PLATFORM_H */