[mac80211] compat should not depend on pcmcia or usb
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch
1 --- a/drivers/net/wireless/ath/ath9k/hw.c
2 +++ b/drivers/net/wireless/ath/ath9k/hw.c
3 @@ -381,11 +381,8 @@ static void ath9k_hw_init_defaults(struc
4 ah->hw_version.magic = AR5416_MAGIC;
5 ah->hw_version.subvendorid = 0;
6
7 - ah->ah_flags = 0;
8 if (ah->hw_version.devid == AR5416_AR9100_DEVID)
9 ah->hw_version.macVersion = AR_SREV_VERSION_9100;
10 - if (!AR_SREV_9100(ah))
11 - ah->ah_flags = AH_USE_EEPROM;
12
13 ah->atim_window = 0;
14 ah->sta_id1_defaults = AR_STA_ID1_CRPT_MIC_ENABLE;
15 --- a/drivers/net/wireless/ath/ath9k/main.c
16 +++ b/drivers/net/wireless/ath/ath9k/main.c
17 @@ -15,6 +15,7 @@
18 */
19
20 #include <linux/nl80211.h>
21 +#include <linux/ath9k_platform.h>
22 #include "ath9k.h"
23 #include "btcoex.h"
24
25 --- a/drivers/net/wireless/ath/ath9k/init.c
26 +++ b/drivers/net/wireless/ath/ath9k/init.c
27 @@ -531,6 +531,7 @@ static int ath9k_init_softc(u16 devid, s
28 {
29 struct ath_hw *ah = NULL;
30 struct ath_common *common;
31 + struct ath9k_platform_data *pdata;
32 int ret = 0, i;
33 int csz = 0;
34
35 @@ -542,6 +543,10 @@ static int ath9k_init_softc(u16 devid, s
36 ah->hw_version.subsysid = subsysid;
37 sc->sc_ah = ah;
38
39 + pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
40 + if (!pdata)
41 + ah->ah_flags |= AH_USE_EEPROM;
42 +
43 common = ath9k_hw_common(ah);
44 common->ops = &ath9k_common_ops;
45 common->bus_ops = bus_ops;