ath5k: AHB port. Use ath_bus_opts structure.
PATCH 2/9 ath5k: AHB port. Use ath_bus_opts structure.
In reply to a message not in the archiveIn main ath folder ath_bus_opts is used to specify AHB/PCI/USB specific functions. Use it for ath5k since it's needed for AHB support. PCI initialization has been split to bus specific and common which have been moved to ath5k_attach.
--- drivers/net/wireless/ath/ath5k/ath5k.h | 5 + drivers/net/wireless/ath/ath5k/base.c | 343 +++++++++++++++++++------------- drivers/net/wireless/ath/ath5k/base.h | 1 + 3 files changed, 206 insertions(+), 143 deletions(-)
drivers/net/wireless/ath/ath5k/ath5k.h +5 -0
@@ -1303,6 +1303,11 @@ static inline void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg)iowrite32 (val, ah->ah_iobase + reg); } +static inline void ath5k_read_cachesize (struct ath_common *common,int *csz) +{ + common->bus_ops->read_cachesize (common, csz); +} +static inline u32 ath5k_hw_bitswap (u32 val,unsigned int bits) {u32 retval =0 , bit, i;
drivers/net/wireless/ath/ath5k/base.c +200 -143
452 lines not on this page · raw message
drivers/net/wireless/ath/ath5k/base.h +1 -0
@@ -172,6 +172,7 @@ struct ath5k_softc {struct pci_dev *pdev;struct device *dev;/* for dma mapping */ int irq; +u16 devid;void __iomem *iobase;/* address of the device */ struct mutex lock;/* dev-level lock */ struct ieee80211_hw *hw;/* IEEE 802.11 common */
Signature · 1 line
1.7.1
Quoted 4 lines · Wojciech Dubowik
In main ath folder
ath_bus_optsis used to specify AHB/PCI/USB specific functions. Use it for ath5k since it's needed for AHB support. PCI initialization has been split to bus specific and common which have been moved toath5k_attach.Signed-off-by Wojciech Dubowik <[email protected]>
Your patch commit log entry is way too long. Please trim it to around 76 characters per line or less. Also I'd prefer to help the reader of the code and make it clear that the work you do in ath5k_attach() is just to initialize the softc struct so please instead rename the routine to ath5k_init_softc() just as we do that in ath9k while you're at it. Later on (on a separate patch or series) you can also then rename ath5k_hw_attach() to ath5k_hw_init() as we did so on ath9k.
Luis