aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-13 10:42:35 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-14 18:28:24 +0100
commita46d1fde4b5eb24e2d744230fdb307bbf821cdd7 (patch)
tree00441e22f0e1827ef7bc05894ad943e0346aaea3 /package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch
parentadf2fef5e8665e534d4895308d9e3325df7716ba (diff)
downloadupstream-a46d1fde4b5eb24e2d744230fdb307bbf821cdd7.tar.gz
upstream-a46d1fde4b5eb24e2d744230fdb307bbf821cdd7.tar.bz2
upstream-a46d1fde4b5eb24e2d744230fdb307bbf821cdd7.zip
mac80211: refresh patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch')
-rw-r--r--package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch50
1 files changed, 27 insertions, 23 deletions
diff --git a/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch b/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch
index 292ea8a558..04714f8169 100644
--- a/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch
+++ b/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch
@@ -349,6 +349,16 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
-
- integer = swab32(eep->modalHeader.antCtrlCommon);
- eep->modalHeader.antCtrlCommon = integer;
+-
+- for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) {
+- integer = swab32(eep->modalHeader.antCtrlChain[i]);
+- eep->modalHeader.antCtrlChain[i] = integer;
+- }
+-
+- for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
+- word = swab16(eep->modalHeader.spurChans[i].spurChan);
+- eep->modalHeader.spurChans[i].spurChan = word;
+- }
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.length);
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.checksum);
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.version);
@@ -358,18 +368,10 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.blueToothOptions);
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.deviceCap);
+ EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlCommon);
-
-- for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) {
-- integer = swab32(eep->modalHeader.antCtrlChain[i]);
-- eep->modalHeader.antCtrlChain[i] = integer;
-- }
++
+ for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++)
+ EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlChain[i]);
-
-- for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
-- word = swab16(eep->modalHeader.spurChans[i].spurChan);
-- eep->modalHeader.spurChans[i].spurChan = word;
-- }
++
+ for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++)
+ EEPROM_FIELD_SWAB16(
+ eep->modalHeader.spurChans[i].spurChan);
@@ -540,6 +542,16 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
-
- integer = swab32(eep->modalHeader.antCtrlCommon);
- eep->modalHeader.antCtrlCommon = integer;
+-
+- for (i = 0; i < AR9287_MAX_CHAINS; i++) {
+- integer = swab32(eep->modalHeader.antCtrlChain[i]);
+- eep->modalHeader.antCtrlChain[i] = integer;
+- }
+-
+- for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
+- word = swab16(eep->modalHeader.spurChans[i].spurChan);
+- eep->modalHeader.spurChans[i].spurChan = word;
+- }
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.length);
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.checksum);
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.version);
@@ -549,18 +561,10 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.blueToothOptions);
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.deviceCap);
+ EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlCommon);
-
-- for (i = 0; i < AR9287_MAX_CHAINS; i++) {
-- integer = swab32(eep->modalHeader.antCtrlChain[i]);
-- eep->modalHeader.antCtrlChain[i] = integer;
-- }
++
+ for (i = 0; i < AR9287_MAX_CHAINS; i++)
+ EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlChain[i]);
-
-- for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
-- word = swab16(eep->modalHeader.spurChans[i].spurChan);
-- eep->modalHeader.spurChans[i].spurChan = word;
-- }
++
+ for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++)
+ EEPROM_FIELD_SWAB16(
+ eep->modalHeader.spurChans[i].spurChan);
@@ -712,7 +716,8 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
if (need_swap) {
- u32 integer, j;
- u16 word;
--
++ u32 j;
+
- word = swab16(eep->baseEepHeader.length);
- eep->baseEepHeader.length = word;
-
@@ -733,8 +738,7 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
-
- word = swab16(eep->baseEepHeader.blueToothOptions);
- eep->baseEepHeader.blueToothOptions = word;
-+ u32 j;
-
+-
- word = swab16(eep->baseEepHeader.deviceCap);
- eep->baseEepHeader.deviceCap = word;
+ EEPROM_FIELD_SWAB16(eep->baseEepHeader.length);