summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/eeprom_9287.c
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2016-12-05 12:27:34 +0100
committerKalle Valo <kvalo@qca.qualcomm.com>2016-12-15 09:26:22 +0100
commitd8ec2e2a63e8136fc7d687cf75bcd034d9615c24 (patch)
treea641eddde8753da70bceb152d930345958314108 /drivers/net/wireless/ath/ath9k/eeprom_9287.c
parentath9k: indicate that the AR9003 EEPROM template values are little endian (diff)
downloadlinux-d8ec2e2a63e8136fc7d687cf75bcd034d9615c24.tar.xz
linux-d8ec2e2a63e8136fc7d687cf75bcd034d9615c24.zip
ath9k: Add an eeprom_ops callback for retrieving the eepmisc value
This allows deciding if we have to swap the EEPROM data (so it matches the system's native endianness) even if no byte-swapping (swab16, based on the first two bytes in the EEPROM) is needed. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom_9287.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_9287.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
index f483ba2d004b..e1ba9bc0afb8 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
@@ -986,6 +986,11 @@ static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah,
return ah->eeprom.map9287.modalHeader.spurChans[i].spurChan;
}
+static u8 ath9k_hw_ar9287_get_eepmisc(struct ath_hw *ah)
+{
+ return ah->eeprom.map9287.baseEepHeader.eepMisc;
+}
+
const struct eeprom_ops eep_ar9287_ops = {
.check_eeprom = ath9k_hw_ar9287_check_eeprom,
.get_eeprom = ath9k_hw_ar9287_get_eeprom,
@@ -995,5 +1000,6 @@ const struct eeprom_ops eep_ar9287_ops = {
.get_eeprom_rev = ath9k_hw_ar9287_get_eeprom_rev,
.set_board_values = ath9k_hw_ar9287_set_board_values,
.set_txpower = ath9k_hw_ar9287_set_txpower,
- .get_spur_channel = ath9k_hw_ar9287_get_spur_channel
+ .get_spur_channel = ath9k_hw_ar9287_get_spur_channel,
+ .get_eepmisc = ath9k_hw_ar9287_get_eepmisc
};