aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54pci.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-12-21 22:02:23 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:09:07 -0500
commit8160c031491015299afacb95a1c1113ccbfefe54 (patch)
treebdcf60ff2542dbafc8a0b9bb6d267d556772ba11 /drivers/net/wireless/p54pci.c
parent184a3b2c517531faac80b0d74c423dd26038cfd2 (diff)
p54pci: endianness annotations and fixes
->ring_control_dma is dma_addr_t, needs conversion to little-endian before __raw_writel()... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54pci.c')
-rw-r--r--drivers/net/wireless/p54pci.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/p54pci.c b/drivers/net/wireless/p54pci.c
index b7a3bde0b66d..fa527723fbe0 100644
--- a/drivers/net/wireless/p54pci.c
+++ b/drivers/net/wireless/p54pci.c
@@ -48,10 +48,10 @@ static int p54p_upload_firmware(struct ieee80211_hw *dev)
48 const struct firmware *fw_entry = NULL; 48 const struct firmware *fw_entry = NULL;
49 __le32 reg; 49 __le32 reg;
50 int err; 50 int err;
51 u32 *data; 51 __le32 *data;
52 u32 remains, left, device_addr; 52 u32 remains, left, device_addr;
53 53
54 P54P_WRITE(int_enable, 0); 54 P54P_WRITE(int_enable, cpu_to_le32(0));
55 P54P_READ(int_enable); 55 P54P_READ(int_enable);
56 udelay(10); 56 udelay(10);
57 57
@@ -82,7 +82,7 @@ static int p54p_upload_firmware(struct ieee80211_hw *dev)
82 82
83 p54_parse_firmware(dev, fw_entry); 83 p54_parse_firmware(dev, fw_entry);
84 84
85 data = (u32 *) fw_entry->data; 85 data = (__le32 *) fw_entry->data;
86 remains = fw_entry->size; 86 remains = fw_entry->size;
87 device_addr = ISL38XX_DEV_FIRMWARE_ADDR; 87 device_addr = ISL38XX_DEV_FIRMWARE_ADDR;
88 while (remains) { 88 while (remains) {
@@ -166,7 +166,7 @@ static int p54p_read_eeprom(struct ieee80211_hw *dev)
166 } 166 }
167 167
168 memset(ring_control, 0, sizeof(*ring_control)); 168 memset(ring_control, 0, sizeof(*ring_control));
169 P54P_WRITE(ring_control_base, priv->ring_control_dma); 169 P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma));
170 P54P_READ(ring_control_base); 170 P54P_READ(ring_control_base);
171 udelay(10); 171 udelay(10);
172 172
@@ -229,7 +229,7 @@ static int p54p_read_eeprom(struct ieee80211_hw *dev)
229 229
230 out: 230 out:
231 kfree(eeprom); 231 kfree(eeprom);
232 P54P_WRITE(int_enable, 0); 232 P54P_WRITE(int_enable, cpu_to_le32(0));
233 P54P_READ(int_enable); 233 P54P_READ(int_enable);
234 udelay(10); 234 udelay(10);
235 free_irq(priv->pdev->irq, priv); 235 free_irq(priv->pdev->irq, priv);
@@ -288,7 +288,7 @@ static irqreturn_t p54p_interrupt(int irq, void *dev_id)
288 288
289 spin_lock(&priv->lock); 289 spin_lock(&priv->lock);
290 reg = P54P_READ(int_ident); 290 reg = P54P_READ(int_ident);
291 if (unlikely(reg == 0xFFFFFFFF)) { 291 if (unlikely(reg == cpu_to_le32(0xFFFFFFFF))) {
292 spin_unlock(&priv->lock); 292 spin_unlock(&priv->lock);
293 return IRQ_HANDLED; 293 return IRQ_HANDLED;
294 } 294 }
@@ -425,7 +425,7 @@ static int p54p_open(struct ieee80211_hw *dev)
425 425
426 p54p_upload_firmware(dev); 426 p54p_upload_firmware(dev);
427 427
428 P54P_WRITE(ring_control_base, priv->ring_control_dma); 428 P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma));
429 P54P_READ(ring_control_base); 429 P54P_READ(ring_control_base);
430 wmb(); 430 wmb();
431 udelay(10); 431 udelay(10);
@@ -465,7 +465,7 @@ static void p54p_stop(struct ieee80211_hw *dev)
465 unsigned int i; 465 unsigned int i;
466 struct p54p_desc *desc; 466 struct p54p_desc *desc;
467 467
468 P54P_WRITE(int_enable, 0); 468 P54P_WRITE(int_enable, cpu_to_le32(0));
469 P54P_READ(int_enable); 469 P54P_READ(int_enable);
470 udelay(10); 470 udelay(10);
471 471