aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch
diff options
context:
space:
mode:
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);