kernel: add missing config symbols for 4.9
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 551-ath9k-indicate-that-the-AR9003-EEPROM-template-value.patch
1 From e88ab4a2649d0fbf675193fb2c176f65375bdd2d Mon Sep 17 00:00:00 2001
2 From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
3 Date: Mon, 3 Oct 2016 00:29:08 +0200
4 Subject: [v2 PATCH 2/7] ath9k: indicate that the AR9003 EEPROM template values
5 are little endian
6
7 The eepMisc field was not set explicitly. The default value of 0 means
8 that the values in the EEPROM (template) should be interpreted as little
9 endian. However, this is not clear until comparing the AR9003 code with
10 the other EEPROM formats.
11 To make the code easier to understand we explicitly state that the values
12 are little endian - there are no functional changes with this patch.
13
14 Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
15 ---
16 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 10 +++++-----
17 drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 3 +++
18 2 files changed, 8 insertions(+), 5 deletions(-)
19
20 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
21 +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
22 @@ -53,7 +53,7 @@ static const struct ar9300_eeprom ar9300
23 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */
24 .opCapFlags = {
25 .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
26 - .eepMisc = 0,
27 + .eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN,
28 },
29 .rfSilent = 0,
30 .blueToothOptions = 0,
31 @@ -631,7 +631,7 @@ static const struct ar9300_eeprom ar9300
32 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */
33 .opCapFlags = {
34 .opFlags = AR5416_OPFLAGS_11A,
35 - .eepMisc = 0,
36 + .eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN,
37 },
38 .rfSilent = 0,
39 .blueToothOptions = 0,
40 @@ -1210,7 +1210,7 @@ static const struct ar9300_eeprom ar9300
41 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */
42 .opCapFlags = {
43 .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
44 - .eepMisc = 0,
45 + .eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN,
46 },
47 .rfSilent = 0,
48 .blueToothOptions = 0,
49 @@ -1789,7 +1789,7 @@ static const struct ar9300_eeprom ar9300
50 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */
51 .opCapFlags = {
52 .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
53 - .eepMisc = 0,
54 + .eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN,
55 },
56 .rfSilent = 0,
57 .blueToothOptions = 0,
58 @@ -2367,7 +2367,7 @@ static const struct ar9300_eeprom ar9300
59 .txrxMask = 0x33, /* 4 bits tx and 4 bits rx */
60 .opCapFlags = {
61 .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
62 - .eepMisc = 0,
63 + .eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN,
64 },
65 .rfSilent = 0,
66 .blueToothOptions = 0,
67 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
68 +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
69 @@ -69,6 +69,9 @@
70 #define AR9300_BASE_ADDR 0x3ff
71 #define AR9300_BASE_ADDR_512 0x1ff
72
73 +/* AR5416_EEPMISC_BIG_ENDIAN not set indicates little endian */
74 +#define AR9300_EEPMISC_LITTLE_ENDIAN 0
75 +
76 #define AR9300_OTP_BASE \
77 ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x30000 : 0x14000)
78 #define AR9300_OTP_STATUS \