summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/p54pci.c16
-rw-r--r--drivers/net/wireless/p54pci.h4
2 files changed, 10 insertions, 10 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)
const struct firmware *fw_entry = NULL;
__le32 reg;
int err;
- u32 *data;
+ __le32 *data;
u32 remains, left, device_addr;
- P54P_WRITE(int_enable, 0);
+ P54P_WRITE(int_enable, cpu_to_le32(0));
P54P_READ(int_enable);
udelay(10);
@@ -82,7 +82,7 @@ static int p54p_upload_firmware(struct ieee80211_hw *dev)
p54_parse_firmware(dev, fw_entry);
- data = (u32 *) fw_entry->data;
+ data = (__le32 *) fw_entry->data;
remains = fw_entry->size;
device_addr = ISL38XX_DEV_FIRMWARE_ADDR;
while (remains) {
@@ -166,7 +166,7 @@ static int p54p_read_eeprom(struct ieee80211_hw *dev)
}
memset(ring_control, 0, sizeof(*ring_control));
- P54P_WRITE(ring_control_base, priv->ring_control_dma);
+ P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma));
P54P_READ(ring_control_base);
udelay(10);
@@ -229,7 +229,7 @@ static int p54p_read_eeprom(struct ieee80211_hw *dev)
out:
kfree(eeprom);
- P54P_WRITE(int_enable, 0);
+ P54P_WRITE(int_enable, cpu_to_le32(0));
P54P_READ(int_enable);
udelay(10);
free_irq(priv->pdev->irq, priv);
@@ -288,7 +288,7 @@ static irqreturn_t p54p_interrupt(int irq, void *dev_id)
spin_lock(&priv->lock);
reg = P54P_READ(int_ident);
- if (unlikely(reg == 0xFFFFFFFF)) {
+ if (unlikely(reg == cpu_to_le32(0xFFFFFFFF))) {
spin_unlock(&priv->lock);
return IRQ_HANDLED;
}
@@ -425,7 +425,7 @@ static int p54p_open(struct ieee80211_hw *dev)
p54p_upload_firmware(dev);
- P54P_WRITE(ring_control_base, priv->ring_control_dma);
+ P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma));
P54P_READ(ring_control_base);
wmb();
udelay(10);
@@ -465,7 +465,7 @@ static void p54p_stop(struct ieee80211_hw *dev)
unsigned int i;
struct p54p_desc *desc;
- P54P_WRITE(int_enable, 0);
+ P54P_WRITE(int_enable, cpu_to_le32(0));
P54P_READ(int_enable);
udelay(10);
diff --git a/drivers/net/wireless/p54pci.h b/drivers/net/wireless/p54pci.h
index 52feb597dc4a..5bedd7af385d 100644
--- a/drivers/net/wireless/p54pci.h
+++ b/drivers/net/wireless/p54pci.h
@@ -85,8 +85,8 @@ struct p54p_ring_control {
struct p54p_desc tx_mgmt[4];
} __attribute__ ((packed));
-#define P54P_READ(r) __raw_readl(&priv->map->r)
-#define P54P_WRITE(r, val) __raw_writel((__force u32)(val), &priv->map->r)
+#define P54P_READ(r) (__force __le32)__raw_readl(&priv->map->r)
+#define P54P_WRITE(r, val) __raw_writel((__force u32)(__le32)(val), &priv->map->r)
struct p54p_priv {
struct p54_common common;