Skip to contentSkip to conversation

ath5k: AHB port. Use ath_bus_opts structure.

PATCH In review Wojciech Dubowik 2 participants 2 messages Nov 11, 2010 1 message not in the archive Atheros ATH5K wireless driver

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 7180198.951289487321198.JavaMail.wlan@CHBU500181

#1 lore raw

PATCH 2/9 ath5k: AHB port. Use ath_bus_opts structure.

In 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
index 308b79e..09c3ede 100644
@@ -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
index 0362f8e..aa6c32a 100644
@@ -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
#2 lore raw
Quoted 4 lines · Wojciech Dubowik

In 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.

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