From ffdc4cbe5b17c83af779f45de8536c6ece297e42 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 11 May 2010 17:23:03 +0200 Subject: ath9k_hw: clean up EEPROM endian handling on AR9003 Remove the double swapping of the descriptor data structure, instead keep it little-endian (native format of the eeprom data), and byteswap on access. This allows sparse to verify endian access to the eeprom struct. Signed-off-by: Felix Fietkau Signed-off-by: John W. Linville --- drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/net/wireless/ath/ath9k/ar9003_eeprom.h') diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h index d8c0318f416f..23fb353c3bba 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h @@ -169,7 +169,7 @@ enum CompressAlgorithm { }; struct ar9300_base_eep_hdr { - u16 regDmn[2]; + __le16 regDmn[2]; /* 4 bits tx and 4 bits rx */ u8 txrxMask; struct eepFlags opCapFlags; @@ -199,16 +199,16 @@ struct ar9300_base_eep_hdr { u8 rxBandSelectGpio; u8 txrxgain; /* SW controlled internal regulator fields */ - u32 swreg; + __le32 swreg; } __packed; struct ar9300_modal_eep_header { /* 4 idle, t1, t2, b (4 bits per setting) */ - u32 antCtrlCommon; + __le32 antCtrlCommon; /* 4 ra1l1, ra2l1, ra1l2, ra2l2, ra12 */ - u32 antCtrlCommon2; + __le32 antCtrlCommon2; /* 6 idle, t, r, rx1, rx12, b (2 bits each) */ - u16 antCtrlChain[AR9300_MAX_CHAINS]; + __le16 antCtrlChain[AR9300_MAX_CHAINS]; /* 3 xatten1_db for AR9280 (0xa20c/b20c 5:0) */ u8 xatten1DB[AR9300_MAX_CHAINS]; /* 3 xatten1_margin for merlin (0xa20c/b20c 16:12 */ -- cgit v1.2.3