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 18:09:08 -0500 |
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 5fdbf24d2443..2ebd2edf5862 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx.h | |||
@@ -481,9 +481,9 @@ struct bcm43xx_dmaring; | |||
481 | struct bcm43xx_pioqueue; | 481 | struct bcm43xx_pioqueue; |
482 | 482 | ||
483 | struct bcm43xx_initval { | 483 | struct bcm43xx_initval { |
484 | u16 offset; | 484 | __be16 offset; |
485 | u16 size; | 485 | __be16 size; |
486 | u32 value; | 486 | __be32 value; |
487 | } __attribute__((__packed__)); | 487 | } __attribute__((__packed__)); |
488 | 488 | ||
489 | /* Values for bcm430x_sprominfo.locale */ | 489 | /* Values for bcm430x_sprominfo.locale */ |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 45683437a98d..b96a325b6ec8 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) | |||
793 | 793 | ||
794 | /* il0macaddr */ | 794 | /* il0macaddr */ |
795 | value = sprom[BCM43xx_SPROM_IL0MACADDR + 0]; | 795 | value = sprom[BCM43xx_SPROM_IL0MACADDR + 0]; |
796 | *(((u16 *)bcm->sprom.il0macaddr) + 0) = cpu_to_be16(value); | 796 | *(((__be16 *)bcm->sprom.il0macaddr) + 0) = cpu_to_be16(value); |
797 | value = sprom[BCM43xx_SPROM_IL0MACADDR + 1]; | 797 | value = sprom[BCM43xx_SPROM_IL0MACADDR + 1]; |
798 | *(((u16 *)bcm->sprom.il0macaddr) + 1) = cpu_to_be16(value); | 798 | *(((__be16 *)bcm->sprom.il0macaddr) + 1) = cpu_to_be16(value); |
799 | value = sprom[BCM43xx_SPROM_IL0MACADDR + 2]; | 799 | value = sprom[BCM43xx_SPROM_IL0MACADDR + 2]; |
800 | *(((u16 *)bcm->sprom.il0macaddr) + 2) = cpu_to_be16(value); | 800 | *(((__be16 *)bcm->sprom.il0macaddr) + 2) = cpu_to_be16(value); |
801 | 801 | ||
802 | /* et0macaddr */ | 802 | /* et0macaddr */ |
803 | value = sprom[BCM43xx_SPROM_ET0MACADDR + 0]; | 803 | value = sprom[BCM43xx_SPROM_ET0MACADDR + 0]; |
804 | *(((u16 *)bcm->sprom.et0macaddr) + 0) = cpu_to_be16(value); | 804 | *(((__be16 *)bcm->sprom.et0macaddr) + 0) = cpu_to_be16(value); |
805 | value = sprom[BCM43xx_SPROM_ET0MACADDR + 1]; | 805 | value = sprom[BCM43xx_SPROM_ET0MACADDR + 1]; |
806 | *(((u16 *)bcm->sprom.et0macaddr) + 1) = cpu_to_be16(value); | 806 | *(((__be16 *)bcm->sprom.et0macaddr) + 1) = cpu_to_be16(value); |
807 | value = sprom[BCM43xx_SPROM_ET0MACADDR + 2]; | 807 | value = sprom[BCM43xx_SPROM_ET0MACADDR + 2]; |
808 | *(((u16 *)bcm->sprom.et0macaddr) + 2) = cpu_to_be16(value); | 808 | *(((__be16 *)bcm->sprom.et0macaddr) + 2) = cpu_to_be16(value); |
809 | 809 | ||
810 | /* et1macaddr */ | 810 | /* et1macaddr */ |
811 | value = sprom[BCM43xx_SPROM_ET1MACADDR + 0]; | 811 | value = sprom[BCM43xx_SPROM_ET1MACADDR + 0]; |
812 | *(((u16 *)bcm->sprom.et1macaddr) + 0) = cpu_to_be16(value); | 812 | *(((__be16 *)bcm->sprom.et1macaddr) + 0) = cpu_to_be16(value); |
813 | value = sprom[BCM43xx_SPROM_ET1MACADDR + 1]; | 813 | value = sprom[BCM43xx_SPROM_ET1MACADDR + 1]; |
814 | *(((u16 *)bcm->sprom.et1macaddr) + 1) = cpu_to_be16(value); | 814 | *(((__be16 *)bcm->sprom.et1macaddr) + 1) = cpu_to_be16(value); |
815 | value = sprom[BCM43xx_SPROM_ET1MACADDR + 2]; | 815 | value = sprom[BCM43xx_SPROM_ET1MACADDR + 2]; |
816 | *(((u16 *)bcm->sprom.et1macaddr) + 2) = cpu_to_be16(value); | 816 | *(((__be16 *)bcm->sprom.et1macaddr) + 2) = cpu_to_be16(value); |
817 | 817 | ||
818 | /* ethernet phy settings */ | 818 | /* ethernet phy settings */ |
819 | value = sprom[BCM43xx_SPROM_ETHPHY]; | 819 | value = sprom[BCM43xx_SPROM_ETHPHY]; |
@@ -1059,7 +1059,7 @@ void bcm43xx_dummy_transmission(struct bcm43xx_private *bcm) | |||
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | static void key_write(struct bcm43xx_private *bcm, | 1061 | static void key_write(struct bcm43xx_private *bcm, |
1062 | u8 index, u8 algorithm, const u16 *key) | 1062 | u8 index, u8 algorithm, const __le16 *key) |
1063 | { | 1063 | { |
1064 | unsigned int i, basic_wep = 0; | 1064 | unsigned int i, basic_wep = 0; |
1065 | u32 offset; | 1065 | u32 offset; |
@@ -1077,7 +1077,7 @@ static void key_write(struct bcm43xx_private *bcm, | |||
1077 | /* Write key payload, 8 little endian words */ | 1077 | /* Write key payload, 8 little endian words */ |
1078 | offset = bcm->security_offset + (index * BCM43xx_SEC_KEYSIZE); | 1078 | offset = bcm->security_offset + (index * BCM43xx_SEC_KEYSIZE); |
1079 | for (i = 0; i < (BCM43xx_SEC_KEYSIZE / sizeof(u16)); i++) { | 1079 | for (i = 0; i < (BCM43xx_SEC_KEYSIZE / sizeof(u16)); i++) { |
1080 | value = cpu_to_le16(key[i]); | 1080 | value = le16_to_cpu(key[i]); |
1081 | bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, | 1081 | bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, |
1082 | offset + (i * 2), value); | 1082 | offset + (i * 2), value); |
1083 | 1083 | ||
@@ -1091,7 +1091,7 @@ static void key_write(struct bcm43xx_private *bcm, | |||
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | static void keymac_write(struct bcm43xx_private *bcm, | 1093 | static void keymac_write(struct bcm43xx_private *bcm, |
1094 | u8 index, const u32 *addr) | 1094 | u8 index, const __be32 *addr) |
1095 | { | 1095 | { |
1096 | /* for keys 0-3 there is no associated mac address */ | 1096 | /* for keys 0-3 there is no associated mac address */ |
1097 | if (index < 4) | 1097 | if (index < 4) |
@@ -1102,11 +1102,11 @@ static void keymac_write(struct bcm43xx_private *bcm, | |||
1102 | bcm43xx_shm_write32(bcm, | 1102 | bcm43xx_shm_write32(bcm, |
1103 | BCM43xx_SHM_HWMAC, | 1103 | BCM43xx_SHM_HWMAC, |
1104 | index * 2, | 1104 | index * 2, |
1105 | cpu_to_be32(*addr)); | 1105 | be32_to_cpu(*addr)); |
1106 | bcm43xx_shm_write16(bcm, | 1106 | bcm43xx_shm_write16(bcm, |
1107 | BCM43xx_SHM_HWMAC, | 1107 | BCM43xx_SHM_HWMAC, |
1108 | (index * 2) + 1, | 1108 | (index * 2) + 1, |
1109 | cpu_to_be16(*((u16 *)(addr + 1)))); | 1109 | be16_to_cpu(*((__be16 *)(addr + 1)))); |
1110 | } else { | 1110 | } else { |
1111 | if (index < 8) { | 1111 | if (index < 8) { |
1112 | TODO(); /* Put them in the macaddress filter */ | 1112 | TODO(); /* Put them in the macaddress filter */ |
@@ -1133,8 +1133,8 @@ static int bcm43xx_key_write(struct bcm43xx_private *bcm, | |||
1133 | return -EINVAL; | 1133 | return -EINVAL; |
1134 | 1134 | ||
1135 | memcpy(key, _key, key_len); | 1135 | memcpy(key, _key, key_len); |
1136 | key_write(bcm, index, algorithm, (const u16 *)key); | 1136 | key_write(bcm, index, algorithm, (const __le16 *)key); |
1137 | keymac_write(bcm, index, (const u32 *)mac_addr); | 1137 | keymac_write(bcm, index, (const __be32 *)mac_addr); |
1138 | 1138 | ||
1139 | bcm->key[index].algorithm = algorithm; | 1139 | bcm->key[index].algorithm = algorithm; |
1140 | 1140 | ||
@@ -1143,7 +1143,7 @@ static int bcm43xx_key_write(struct bcm43xx_private *bcm, | |||
1143 | 1143 | ||
1144 | static void bcm43xx_clear_keys(struct bcm43xx_private *bcm) | 1144 | static void bcm43xx_clear_keys(struct bcm43xx_private *bcm) |
1145 | { | 1145 | { |
1146 | static const u32 zero_mac[2] = { 0 }; | 1146 | static const __be32 zero_mac[2] = { 0 }; |
1147 | unsigned int i,j, nr_keys = 54; | 1147 | unsigned int i,j, nr_keys = 54; |
1148 | u16 offset; | 1148 | u16 offset; |
1149 | 1149 | ||
@@ -2011,11 +2011,11 @@ err_noinitval: | |||
2011 | static void bcm43xx_upload_microcode(struct bcm43xx_private *bcm) | 2011 | static void bcm43xx_upload_microcode(struct bcm43xx_private *bcm) |
2012 | { | 2012 | { |
2013 | struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); | 2013 | struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); |
2014 | const u32 *data; | 2014 | const __be32 *data; |
2015 | unsigned int i, len; | 2015 | unsigned int i, len; |
2016 | 2016 | ||
2017 | /* Upload Microcode. */ | 2017 | /* Upload Microcode. */ |
2018 | data = (u32 *)(phy->ucode->data); | 2018 | data = (__be32 *)(phy->ucode->data); |
2019 | len = phy->ucode->size / sizeof(u32); | 2019 | len = phy->ucode->size / sizeof(u32); |
2020 | bcm43xx_shm_control_word(bcm, BCM43xx_SHM_UCODE, 0x0000); | 2020 | bcm43xx_shm_control_word(bcm, BCM43xx_SHM_UCODE, 0x0000); |
2021 | for (i = 0; i < len; i++) { | 2021 | for (i = 0; i < len; i++) { |
@@ -2025,7 +2025,7 @@ static void bcm43xx_upload_microcode(struct bcm43xx_private *bcm) | |||
2025 | } | 2025 | } |
2026 | 2026 | ||
2027 | /* Upload PCM data. */ | 2027 | /* Upload PCM data. */ |
2028 | data = (u32 *)(phy->pcm->data); | 2028 | data = (__be32 *)(phy->pcm->data); |
2029 | len = phy->pcm->size / sizeof(u32); | 2029 | len = phy->pcm->size / sizeof(u32); |
2030 | bcm43xx_shm_control_word(bcm, BCM43xx_SHM_PCM, 0x01ea); | 2030 | bcm43xx_shm_control_word(bcm, BCM43xx_SHM_PCM, 0x01ea); |
2031 | bcm43xx_write32(bcm, BCM43xx_MMIO_SHM_DATA, 0x00004000); | 2031 | 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 c60c1743ea06..76ab109cd2db 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, | |||
68 | source = packet; | 68 | source = packet; |
69 | i -= sizeof(*txhdr); | 69 | i -= sizeof(*txhdr); |
70 | } | 70 | } |
71 | ret = le16_to_cpu( *((u16 *)(source + i)) ); | 71 | ret = le16_to_cpu( *((__le16 *)(source + i)) ); |
72 | *pos += 2; | 72 | *pos += 2; |
73 | 73 | ||
74 | return ret; | 74 | return ret; |
@@ -526,7 +526,7 @@ static void pio_rx_error(struct bcm43xx_pioqueue *queue, | |||
526 | 526 | ||
527 | void bcm43xx_pio_rx(struct bcm43xx_pioqueue *queue) | 527 | void bcm43xx_pio_rx(struct bcm43xx_pioqueue *queue) |
528 | { | 528 | { |
529 | u16 preamble[21] = { 0 }; | 529 | __le16 preamble[21] = { 0 }; |
530 | struct bcm43xx_rxhdr *rxhdr; | 530 | struct bcm43xx_rxhdr *rxhdr; |
531 | u16 tmp, len, rxflags2; | 531 | u16 tmp, len, rxflags2; |
532 | int i, preamble_readwords; | 532 | int i, preamble_readwords; |
@@ -601,7 +601,7 @@ data_ready: | |||
601 | skb_put(skb, len); | 601 | skb_put(skb, len); |
602 | for (i = 0; i < len - 1; i += 2) { | 602 | for (i = 0; i < len - 1; i += 2) { |
603 | tmp = bcm43xx_pio_read(queue, BCM43xx_PIO_RXDATA); | 603 | tmp = bcm43xx_pio_read(queue, BCM43xx_PIO_RXDATA); |
604 | *((u16 *)(skb->data + i)) = cpu_to_le16(tmp); | 604 | *((__le16 *)(skb->data + i)) = cpu_to_le16(tmp); |
605 | } | 605 | } |
606 | if (len % 2) { | 606 | if (len % 2) { |
607 | tmp = bcm43xx_pio_read(queue, BCM43xx_PIO_RXDATA); | 607 | 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 3e2462671690..f79fe11f9e81 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, | |||
122 | __u8 *raw = plcp->raw; | 122 | __u8 *raw = plcp->raw; |
123 | 123 | ||
124 | if (ofdm_modulation) { | 124 | if (ofdm_modulation) { |
125 | *data = bcm43xx_plcp_get_ratecode_ofdm(bitrate); | 125 | u32 val = bcm43xx_plcp_get_ratecode_ofdm(bitrate); |
126 | assert(!(octets & 0xF000)); | 126 | assert(!(octets & 0xF000)); |
127 | *data |= (octets << 5); | 127 | val |= (octets << 5); |
128 | *data = cpu_to_le32(*data); | 128 | *data = cpu_to_le32(val); |
129 | } else { | 129 | } else { |
130 | u32 plen; | 130 | u32 plen; |
131 | 131 | ||