ath9k: Store HW version information in a separate structure
PATCH 4/10 ath9k: Store HW version information in a separate structure
This patch moves all the HW version/revision specific information into a separate structure.
Signed-off-by Sujith <[email protected]>
--- drivers/net/wireless/ath9k/ahb.c | 8 ++-- drivers/net/wireless/ath9k/eeprom.c | 4 +- drivers/net/wireless/ath9k/hw.c | 62 ++++++++++++++++++----------------- drivers/net/wireless/ath9k/hw.h | 21 +++++++----- drivers/net/wireless/ath9k/pci.c | 8 ++-- drivers/net/wireless/ath9k/reg.h | 54 +++++++++++++++++------------- 6 files changed, 84 insertions(+), 73 deletions(-)
drivers/net/wireless/ath9k/ahb.c +4 -4
@@ -132,10 +132,10 @@ static int ath_ahb_probe(struct platform_device *pdev)"%s: Atheros AR%s MAC/BB Rev:%x, " "AR%s RF Rev:%x, mem=0x%lx, irq=%d\n" ,wiphy_name (hw->wiphy), -ath_mac_bb_name (ah->ah_macVersion), - ah->ah_macRev, -ath_rf_name ((ah->ah_analog5GhzRev &AR_RADIO_SREV_MAJOR )), - ah->ah_phyRev, +ath_mac_bb_name (ah->hw_version.macVersion), + ah->hw_version.macRev, +ath_rf_name ((ah->hw_version.analog5GhzRev &AR_RADIO_SREV_MAJOR )), + ah->hw_version.phyRev, (unsigned long)mem, irq);return 0 ;
drivers/net/wireless/ath9k/eeprom.c +2 -2
@@ -1989,7 +1989,7 @@ static void ath9k_hw_set_def_addac(struct ath_hal *ah,struct ar5416_eeprom_def *eep = &ahp->ah_eeprom.def;u8 biaslevel; -if (ah->ah_macVersion !=AR_SREV_VERSION_9160 ) +if (ah->hw_version.macVersion !=AR_SREV_VERSION_9160 )return ;if (ar5416_get_eep_rev (ahp) <AR5416_EEP_MINOR_VER_7 )
@@ -2043,7 +2043,7 @@ static void ath9k_hw_set_4k_addac(struct ath_hal *ah,struct ar5416_eeprom_4k *eep = &ahp->ah_eeprom.map4k;u8 biaslevel; -if (ah->ah_macVersion !=AR_SREV_VERSION_9160 ) +if (ah->hw_version.macVersion !=AR_SREV_VERSION_9160 )return ;if (ar5416_get_eep_rev (ahp) <AR5416_EEP_MINOR_VER_7 )
drivers/net/wireless/ath9k/hw.c +32 -30
167 lines not on this page · raw message
drivers/net/wireless/ath9k/hw.h +12 -9
@@ -406,16 +406,19 @@ enum { ATH9K_RESET_COLD, }; -struct ath_hal { -u32 ah_magic; -u16 ah_devid; -u16 ah_subvendorid; -u32 ah_macVersion; -u16 ah_macRev; -u16 ah_phyRev; -u16 ah_analog5GhzRev; -u16 ah_analog2GhzRev; +struct ath9k_hw_version { +u32 magic; +u16 devid; +u16 subvendorid; +u32 macVersion; +u16 macRev; +u16 phyRev; +u16 analog5GhzRev; +u16 analog2GhzRev; +}; +struct ath_hal { +struct ath9k_hw_version hw_version;void __iomem *ah_sh;struct ath_softc *ah_sc;
drivers/net/wireless/ath9k/pci.c +4 -4
@@ -190,10 +190,10 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)"%s: Atheros AR%s MAC/BB Rev:%x " "AR%s RF Rev:%x: mem=0x%lx, irq=%d\n" ,wiphy_name (hw->wiphy), -ath_mac_bb_name (ah->ah_macVersion), - ah->ah_macRev, -ath_rf_name ((ah->ah_analog5GhzRev &AR_RADIO_SREV_MAJOR )), - ah->ah_phyRev, +ath_mac_bb_name (ah->hw_version.macVersion), + ah->hw_version.macRev, +ath_rf_name ((ah->hw_version.analog5GhzRev &AR_RADIO_SREV_MAJOR )), + ah->hw_version.phyRev, (unsigned long)mem, pdev->irq);return 0 ;
drivers/net/wireless/ath9k/reg.h +30 -24
81 lines not on this page · raw message
Signature · 1 line
1.6.1