diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-12-22 12:29:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:09:08 -0800 |
commit | cecefb8e97695eef420aab43938c26141ab25344 (patch) | |
tree | a1d1f106df5104c1fc7a3d9c7c6b7243eda1f33e | |
parent | 8160c031491015299afacb95a1c1113ccbfefe54 (diff) |
bcm43xx annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 40 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_pio.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_xmit.c | 6 |
4 files changed, 29 insertions, 29 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx.h b/drivers/net/wireless/bcm43xx/bcm43xx.h index 5fdbf24d244..2ebd2edf586 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx.h @@ -481,9 +481,9 @@ struct bcm43xx_dmaring; struct bcm43xx_pioqueue; struct bcm43xx_initval { - u16 offset; - u16 size; - u32 value; + __be16 offset; + __be16 size; + __be32 value; } __attribute__((__packed__)); /* Values for bcm430x_sprominfo.locale */ diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 45683437a98..b96a325b6ec 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c @@ -793,27 +793,27 @@ static int bcm43xx_sprom_extract(struct bcm43xx_private *bcm) /* il0macaddr */ value = sprom[BCM43xx_SPROM_IL0MACADDR + 0]; - *(((u16 *)bcm->sprom.il0macaddr) + 0) = cpu_to_be16(value); + *(((__be16 *)bcm->sprom.il0macaddr) + 0) = cpu_to_be16(value); value = sprom[BCM43xx_SPROM_IL0MACADDR + 1]; - *(((u16 *)bcm->sprom.il0macaddr) + 1) = cpu_to_be16(value); + *(((__be16 *)bcm->sprom.il0macaddr) + 1) = cpu_to_be16(value); value = sprom[BCM43xx_SPROM_IL0MACADDR + 2]; - *(((u16 *)bcm->sprom.il0macaddr) + 2) = cpu_to_be16(value); + *(((__be16 *)bcm->sprom.il0macaddr) + 2) = cpu_to_be16(value); /* et0macaddr */ value = sprom[BCM43xx_SPROM_ET0MACADDR + 0]; - *(((u16 *)bcm->sprom.et0macaddr) + 0) = cpu_to_be16(value); + *(((__be16 *)bcm->sprom.et0macaddr) + 0) = cpu_to_be16(value); value = sprom[BCM43xx_SPROM_ET0MACADDR + 1]; - *(((u16 *)bcm->sprom.et0macaddr) + 1) = cpu_to_be16(value); + *(((__be16 *)bcm->sprom.et0macaddr) + 1) = cpu_to_be16(value); value = sprom[BCM43xx_SPROM_ET0MACADDR + 2]; - *(((u16 *)bcm->sprom.et0macaddr) + 2) = cpu_to_be16(value); + *(((__be16 *)bcm->sprom.et0macaddr) + 2) = cpu_to_be16(value); /* et1macaddr */ value = sprom[BCM43xx_SPROM_ET1MACADDR + 0]; - *(((u16 *)bcm->sprom.et1macaddr) + 0) = cpu_to_be16(value); + *(((__be16 *)bcm->sprom.et1macaddr) + 0) = cpu_to_be16(value); value = sprom[BCM43xx_SPROM_ET1MACADDR + 1]; - *(((u16 *)bcm->sprom.et1macaddr) + 1) = cpu_to_be16(value); + *(((__be16 *)bcm->sprom.et1macaddr) + 1) = cpu_to_be16(value); value = sprom[BCM43xx_SPROM_ET1MACADDR + 2]; - *(((u16 *)bcm->sprom.et1macaddr) + 2) = cpu_to_be16(value); + *(((__be16 *)bcm->sprom.et1macaddr) + 2) = cpu_to_be16(value); /* ethernet phy settings */ value = sprom[BCM43xx_SPROM_ETHPHY]; @@ -1059,7 +1059,7 @@ void bcm43xx_dummy_transmission(struct bcm43xx_private *bcm) } static void key_write(struct bcm43xx_private *bcm, - u8 index, u8 algorithm, const u16 *key) + u8 index, u8 algorithm, const __le16 *key) { unsigned int i, basic_wep = 0; u32 offset; @@ -1077,7 +1077,7 @@ static void key_write(struct bcm43xx_private *bcm, /* Write key payload, 8 little endian words */ offset = bcm->security_offset + (index * BCM43xx_SEC_KEYSIZE); for (i = 0; i < (BCM43xx_SEC_KEYSIZE / sizeof(u16)); i++) { - value = cpu_to_le16(key[i]); + value = le16_to_cpu(key[i]); bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, offset + (i * 2), value); @@ -1091,7 +1091,7 @@ static void key_write(struct bcm43xx_private *bcm, } static void keymac_write(struct bcm43xx_private *bcm, - u8 index, const u32 *addr) + u8 index, const __be32 *addr) { /* for keys 0-3 there is no associated mac address */ if (index < 4) @@ -1102,11 +1102,11 @@ static void keymac_write(struct bcm43xx_private *bcm, bcm43xx_shm_write32(bcm, BCM43xx_SHM_HWMAC, index * 2, - cpu_to_be32(*addr)); + be32_to_cpu(*addr)); bcm43xx_shm_write16(bcm, BCM43xx_SHM_HWMAC, (index * 2) + 1, - cpu_to_be16(*((u16 *)(addr + 1)))); + be16_to_cpu(*((__be16 *)(addr + 1)))); } else { if (index < 8) { TODO(); /* Put them in the macaddress filter */ @@ -1133,8 +1133,8 @@ static int bcm43xx_key_write(struct bcm43xx_private *bcm, return -EINVAL; memcpy(key, _key, key_len); - key_write(bcm, index, algorithm, (const u16 *)key); - keymac_write(bcm, index, (const u32 *)mac_addr); + key_write(bcm, index, algorithm, (const __le16 *)key); + keymac_write(bcm, index, (const __be32 *)mac_addr); bcm->key[index].algorithm = algorithm; @@ -1143,7 +1143,7 @@ static int bcm43xx_key_write(struct bcm43xx_private *bcm, static void bcm43xx_clear_keys(struct bcm43xx_private *bcm) { - static const u32 zero_mac[2] = { 0 }; + static const __be32 zero_mac[2] = { 0 }; unsigned int i,j, nr_keys = 54; u16 offset; @@ -2011,11 +2011,11 @@ err_noinitval: static void bcm43xx_upload_microcode(struct bcm43xx_private *bcm) { struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); - const u32 *data; + const __be32 *data; unsigned int i, len; /* Upload Microcode. */ - data = (u32 *)(phy->ucode->data); + data = (__be32 *)(phy->ucode->data); len = phy->ucode->size / sizeof(u32); bcm43xx_shm_control_word(bcm, BCM43xx_SHM_UCODE, 0x0000); for (i = 0; i < len; i++) { @@ -2025,7 +2025,7 @@ static void bcm43xx_upload_microcode(struct bcm43xx_private *bcm) } /* Upload PCM data. */ - data = (u32 *)(phy->pcm->data); + data = (__be32 *)(phy->pcm->data); len = phy->pcm->size / sizeof(u32); bcm43xx_shm_control_word(bcm, BCM43xx_SHM_PCM, 0x01ea); bcm43xx_write32(bcm, BCM43xx_MMIO_SHM_DATA, 0x00004000); diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_pio.c b/drivers/net/wireless/bcm43xx/bcm43xx_pio.c index c60c1743ea0..76ab109cd2d 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_pio.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_pio.c @@ -68,7 +68,7 @@ static u16 tx_get_next_word(struct bcm43xx_txhdr *txhdr, source = packet; i -= sizeof(*txhdr); } - ret = le16_to_cpu( *((u16 *)(source + i)) ); + ret = le16_to_cpu( *((__le16 *)(source + i)) ); *pos += 2; return ret; @@ -526,7 +526,7 @@ static void pio_rx_error(struct bcm43xx_pioqueue *queue, void bcm43xx_pio_rx(struct bcm43xx_pioqueue *queue) { - u16 preamble[21] = { 0 }; + __le16 preamble[21] = { 0 }; struct bcm43xx_rxhdr *rxhdr; u16 tmp, len, rxflags2; int i, preamble_readwords; @@ -601,7 +601,7 @@ data_ready: skb_put(skb, len); for (i = 0; i < len - 1; i += 2) { tmp = bcm43xx_pio_read(queue, BCM43xx_PIO_RXDATA); - *((u16 *)(skb->data + i)) = cpu_to_le16(tmp); + *((__le16 *)(skb->data + i)) = cpu_to_le16(tmp); } if (len % 2) { tmp = bcm43xx_pio_read(queue, BCM43xx_PIO_RXDATA); diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_xmit.c b/drivers/net/wireless/bcm43xx/bcm43xx_xmit.c index 3e246267169..f79fe11f9e8 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_xmit.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_xmit.c @@ -122,10 +122,10 @@ static void bcm43xx_generate_plcp_hdr(struct bcm43xx_plcp_hdr4 *plcp, __u8 *raw = plcp->raw; if (ofdm_modulation) { - *data = bcm43xx_plcp_get_ratecode_ofdm(bitrate); + u32 val = bcm43xx_plcp_get_ratecode_ofdm(bitrate); assert(!(octets & 0xF000)); - *data |= (octets << 5); - *data = cpu_to_le32(*data); + val |= (octets << 5); + *data = cpu_to_le32(val); } else { u32 plen; |