aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorIvo van Doorn <IvDoorn@gmail.com>2008-01-24 03:48:03 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:03:03 -0500
commit4bd7c452a468af30bb3c4d9c3adcdaf3f3c6048c (patch)
tree87df588e208a8118c6aba89c85bddef2d0ed79c9 /drivers/net
parent2676c94d4e5994f92e57fa3ea680f1d652049d03 (diff)
rt2x00: Remove data_desc structure
Coverty indicated that data_desc with a single element array is bad coding style. This removes the structure and forces everybody to use __le32. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c10
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.h4
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c10
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.h4
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c9
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.h4
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h4
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00ring.h22
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c12
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.h4
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.h4
15 files changed, 44 insertions, 59 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index f2d0febbec49..8889f6d18dce 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -600,7 +600,7 @@ static void rt2400pci_link_tuner(struct rt2x00_dev *rt2x00dev)
600static void rt2400pci_init_rxring(struct rt2x00_dev *rt2x00dev) 600static void rt2400pci_init_rxring(struct rt2x00_dev *rt2x00dev)
601{ 601{
602 struct data_ring *ring = rt2x00dev->rx; 602 struct data_ring *ring = rt2x00dev->rx;
603 struct data_desc *rxd; 603 __le32 *rxd;
604 unsigned int i; 604 unsigned int i;
605 u32 word; 605 u32 word;
606 606
@@ -630,7 +630,7 @@ static void rt2400pci_init_rxring(struct rt2x00_dev *rt2x00dev)
630static void rt2400pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue) 630static void rt2400pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue)
631{ 631{
632 struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue); 632 struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
633 struct data_desc *txd; 633 __le32 *txd;
634 unsigned int i; 634 unsigned int i;
635 u32 word; 635 u32 word;
636 636
@@ -1017,7 +1017,7 @@ static int rt2400pci_set_device_state(struct rt2x00_dev *rt2x00dev,
1017 * TX descriptor initialization 1017 * TX descriptor initialization
1018 */ 1018 */
1019static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, 1019static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1020 struct data_desc *txd, 1020 __le32 *txd,
1021 struct txdata_entry_desc *desc, 1021 struct txdata_entry_desc *desc,
1022 struct ieee80211_hdr *ieee80211hdr, 1022 struct ieee80211_hdr *ieee80211hdr,
1023 unsigned int length, 1023 unsigned int length,
@@ -1117,7 +1117,7 @@ static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1117static void rt2400pci_fill_rxdone(struct data_entry *entry, 1117static void rt2400pci_fill_rxdone(struct data_entry *entry,
1118 struct rxdata_entry_desc *desc) 1118 struct rxdata_entry_desc *desc)
1119{ 1119{
1120 struct data_desc *rxd = entry->priv; 1120 __le32 *rxd = entry->priv;
1121 u32 word0; 1121 u32 word0;
1122 u32 word2; 1122 u32 word2;
1123 1123
@@ -1147,7 +1147,7 @@ static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev, const int queue)
1147{ 1147{
1148 struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue); 1148 struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
1149 struct data_entry *entry; 1149 struct data_entry *entry;
1150 struct data_desc *txd; 1150 __le32 *txd;
1151 u32 word; 1151 u32 word;
1152 int tx_status; 1152 int tx_status;
1153 int retry; 1153 int retry;
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.h b/drivers/net/wireless/rt2x00/rt2400pci.h
index ae22501f085d..f5dbde7b2015 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.h
+++ b/drivers/net/wireless/rt2x00/rt2400pci.h
@@ -803,8 +803,8 @@
803/* 803/*
804 * DMA descriptor defines. 804 * DMA descriptor defines.
805 */ 805 */
806#define TXD_DESC_SIZE ( 8 * sizeof(struct data_desc) ) 806#define TXD_DESC_SIZE ( 8 * sizeof(__le32) )
807#define RXD_DESC_SIZE ( 8 * sizeof(struct data_desc) ) 807#define RXD_DESC_SIZE ( 8 * sizeof(__le32) )
808 808
809/* 809/*
810 * TX descriptor format for TX, PRIO, ATIM and Beacon Ring. 810 * TX descriptor format for TX, PRIO, ATIM and Beacon Ring.
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 3d02c0d297e8..1dea9d800d47 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -691,7 +691,7 @@ dynamic_cca_tune:
691static void rt2500pci_init_rxring(struct rt2x00_dev *rt2x00dev) 691static void rt2500pci_init_rxring(struct rt2x00_dev *rt2x00dev)
692{ 692{
693 struct data_ring *ring = rt2x00dev->rx; 693 struct data_ring *ring = rt2x00dev->rx;
694 struct data_desc *rxd; 694 __le32 *rxd;
695 unsigned int i; 695 unsigned int i;
696 u32 word; 696 u32 word;
697 697
@@ -716,7 +716,7 @@ static void rt2500pci_init_rxring(struct rt2x00_dev *rt2x00dev)
716static void rt2500pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue) 716static void rt2500pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue)
717{ 717{
718 struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue); 718 struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
719 struct data_desc *txd; 719 __le32 *txd;
720 unsigned int i; 720 unsigned int i;
721 u32 word; 721 u32 word;
722 722
@@ -1167,7 +1167,7 @@ static int rt2500pci_set_device_state(struct rt2x00_dev *rt2x00dev,
1167 * TX descriptor initialization 1167 * TX descriptor initialization
1168 */ 1168 */
1169static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, 1169static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1170 struct data_desc *txd, 1170 __le32 *txd,
1171 struct txdata_entry_desc *desc, 1171 struct txdata_entry_desc *desc,
1172 struct ieee80211_hdr *ieee80211hdr, 1172 struct ieee80211_hdr *ieee80211hdr,
1173 unsigned int length, 1173 unsigned int length,
@@ -1251,7 +1251,7 @@ static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1251static void rt2500pci_fill_rxdone(struct data_entry *entry, 1251static void rt2500pci_fill_rxdone(struct data_entry *entry,
1252 struct rxdata_entry_desc *desc) 1252 struct rxdata_entry_desc *desc)
1253{ 1253{
1254 struct data_desc *rxd = entry->priv; 1254 __le32 *rxd = entry->priv;
1255 u32 word0; 1255 u32 word0;
1256 u32 word2; 1256 u32 word2;
1257 1257
@@ -1278,7 +1278,7 @@ static void rt2500pci_txdone(struct rt2x00_dev *rt2x00dev, const int queue)
1278{ 1278{
1279 struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue); 1279 struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
1280 struct data_entry *entry; 1280 struct data_entry *entry;
1281 struct data_desc *txd; 1281 __le32 *txd;
1282 u32 word; 1282 u32 word;
1283 int tx_status; 1283 int tx_status;
1284 int retry; 1284 int retry;
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.h b/drivers/net/wireless/rt2x00/rt2500pci.h
index d92aa56b2f4b..92ba0902d107 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.h
+++ b/drivers/net/wireless/rt2x00/rt2500pci.h
@@ -1082,8 +1082,8 @@
1082/* 1082/*
1083 * DMA descriptor defines. 1083 * DMA descriptor defines.
1084 */ 1084 */
1085#define TXD_DESC_SIZE ( 11 * sizeof(struct data_desc) ) 1085#define TXD_DESC_SIZE ( 11 * sizeof(__le32) )
1086#define RXD_DESC_SIZE ( 11 * sizeof(struct data_desc) ) 1086#define RXD_DESC_SIZE ( 11 * sizeof(__le32) )
1087 1087
1088/* 1088/*
1089 * TX descriptor format for TX, PRIO, ATIM and Beacon Ring. 1089 * TX descriptor format for TX, PRIO, ATIM and Beacon Ring.
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 164548fd22b7..c89103786b1c 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -990,7 +990,7 @@ static int rt2500usb_set_device_state(struct rt2x00_dev *rt2x00dev,
990 * TX descriptor initialization 990 * TX descriptor initialization
991 */ 991 */
992static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, 992static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
993 struct data_desc *txd, 993 __le32 *txd,
994 struct txdata_entry_desc *desc, 994 struct txdata_entry_desc *desc,
995 struct ieee80211_hdr *ieee80211hdr, 995 struct ieee80211_hdr *ieee80211hdr,
996 unsigned int length, 996 unsigned int length,
@@ -1082,9 +1082,8 @@ static void rt2500usb_fill_rxdone(struct data_entry *entry,
1082 struct rxdata_entry_desc *desc) 1082 struct rxdata_entry_desc *desc)
1083{ 1083{
1084 struct urb *urb = entry->priv; 1084 struct urb *urb = entry->priv;
1085 struct data_desc *rxd = (struct data_desc *)(entry->skb->data + 1085 __le32 *rxd = (__le32 *)(entry->skb->data +
1086 (urb->actual_length - 1086 (urb->actual_length - entry->ring->desc_size));
1087 entry->ring->desc_size));
1088 u32 word0; 1087 u32 word0;
1089 u32 word1; 1088 u32 word1;
1090 1089
@@ -1682,7 +1681,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw,
1682 skb_push(skb, ring->desc_size); 1681 skb_push(skb, ring->desc_size);
1683 memset(skb->data, 0, ring->desc_size); 1682 memset(skb->data, 0, ring->desc_size);
1684 1683
1685 rt2x00lib_write_tx_desc(rt2x00dev, (struct data_desc *)skb->data, 1684 rt2x00lib_write_tx_desc(rt2x00dev, (__le32 *)skb->data,
1686 (struct ieee80211_hdr *)(skb->data + 1685 (struct ieee80211_hdr *)(skb->data +
1687 ring->desc_size), 1686 ring->desc_size),
1688 skb->len - ring->desc_size, control); 1687 skb->len - ring->desc_size, control);
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.h b/drivers/net/wireless/rt2x00/rt2500usb.h
index 2741840fa14a..9e0433722e3d 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.h
+++ b/drivers/net/wireless/rt2x00/rt2500usb.h
@@ -703,8 +703,8 @@
703/* 703/*
704 * DMA descriptor defines. 704 * DMA descriptor defines.
705 */ 705 */
706#define TXD_DESC_SIZE ( 5 * sizeof(struct data_desc) ) 706#define TXD_DESC_SIZE ( 5 * sizeof(__le32) )
707#define RXD_DESC_SIZE ( 4 * sizeof(struct data_desc) ) 707#define RXD_DESC_SIZE ( 4 * sizeof(__le32) )
708 708
709/* 709/*
710 * TX descriptor format for TX, PRIO, ATIM and Beacon Ring. 710 * TX descriptor format for TX, PRIO, ATIM and Beacon Ring.
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index d18cca89eede..2cd2c9fab1a5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -488,7 +488,7 @@ struct rt2x00lib_ops {
488 * TX control handlers 488 * TX control handlers
489 */ 489 */
490 void (*write_tx_desc) (struct rt2x00_dev *rt2x00dev, 490 void (*write_tx_desc) (struct rt2x00_dev *rt2x00dev,
491 struct data_desc *txd, 491 __le32 *txd,
492 struct txdata_entry_desc *desc, 492 struct txdata_entry_desc *desc,
493 struct ieee80211_hdr *ieee80211hdr, 493 struct ieee80211_hdr *ieee80211hdr,
494 unsigned int length, 494 unsigned int length,
@@ -889,7 +889,7 @@ void rt2x00lib_rxdone(struct data_entry *entry, struct sk_buff *skb,
889 * TX descriptor initializer 889 * TX descriptor initializer
890 */ 890 */
891void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev, 891void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
892 struct data_desc *txd, 892 __le32 *txd,
893 struct ieee80211_hdr *ieee80211hdr, 893 struct ieee80211_hdr *ieee80211hdr,
894 unsigned int length, 894 unsigned int length,
895 struct ieee80211_tx_control *control); 895 struct ieee80211_tx_control *control);
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 360f03ae17a5..304830b8d16d 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -578,7 +578,7 @@ EXPORT_SYMBOL_GPL(rt2x00lib_rxdone);
578 * TX descriptor initializer 578 * TX descriptor initializer
579 */ 579 */
580void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev, 580void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
581 struct data_desc *txd, 581 __le32 *txd,
582 struct ieee80211_hdr *ieee80211hdr, 582 struct ieee80211_hdr *ieee80211hdr,
583 unsigned int length, 583 unsigned int length,
584 struct ieee80211_tx_control *control) 584 struct ieee80211_tx_control *control)
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index 04663eb31950..fa85771cbf47 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -80,7 +80,7 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
80{ 80{
81 struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; 81 struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data;
82 struct data_entry *entry = rt2x00_get_data_entry(ring); 82 struct data_entry *entry = rt2x00_get_data_entry(ring);
83 struct data_desc *txd = entry->priv; 83 __le32 *txd = entry->priv;
84 u32 word; 84 u32 word;
85 85
86 if (rt2x00_ring_full(ring)) { 86 if (rt2x00_ring_full(ring)) {
@@ -122,11 +122,11 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)
122{ 122{
123 struct data_ring *ring = rt2x00dev->rx; 123 struct data_ring *ring = rt2x00dev->rx;
124 struct data_entry *entry; 124 struct data_entry *entry;
125 struct data_desc *rxd;
126 struct sk_buff *skb; 125 struct sk_buff *skb;
127 struct ieee80211_hdr *hdr; 126 struct ieee80211_hdr *hdr;
128 struct rxdata_entry_desc desc; 127 struct rxdata_entry_desc desc;
129 int header_size; 128 int header_size;
129 __le32 *rxd;
130 int align; 130 int align;
131 u32 word; 131 u32 word;
132 132
diff --git a/drivers/net/wireless/rt2x00/rt2x00ring.h b/drivers/net/wireless/rt2x00/rt2x00ring.h
index 1a864d32cfbd..ee6c423a53d9 100644
--- a/drivers/net/wireless/rt2x00/rt2x00ring.h
+++ b/drivers/net/wireless/rt2x00/rt2x00ring.h
@@ -27,20 +27,6 @@
27#define RT2X00RING_H 27#define RT2X00RING_H
28 28
29/* 29/*
30 * data_desc
31 * Each data entry also contains a descriptor which is used by the
32 * device to determine what should be done with the packet and
33 * what the current status is.
34 * This structure is greatly simplified, but the descriptors
35 * are basically a list of little endian 32 bit values.
36 * Make the array by default 1 word big, this will allow us
37 * to use sizeof() correctly.
38 */
39struct data_desc {
40 __le32 word[1];
41};
42
43/*
44 * rxdata_entry_desc 30 * rxdata_entry_desc
45 * Summary of information that has been read from the 31 * Summary of information that has been read from the
46 * RX frame descriptor. 32 * RX frame descriptor.
@@ -253,16 +239,16 @@ static inline int rt2x00_ring_free(struct data_ring *ring)
253/* 239/*
254 * TX/RX Descriptor access functions. 240 * TX/RX Descriptor access functions.
255 */ 241 */
256static inline void rt2x00_desc_read(struct data_desc *desc, 242static inline void rt2x00_desc_read(__le32 *desc,
257 const u8 word, u32 *value) 243 const u8 word, u32 *value)
258{ 244{
259 *value = le32_to_cpu(desc->word[word]); 245 *value = le32_to_cpu(desc[word]);
260} 246}
261 247
262static inline void rt2x00_desc_write(struct data_desc *desc, 248static inline void rt2x00_desc_write(__le32 *desc,
263 const u8 word, const u32 value) 249 const u8 word, const u32 value)
264{ 250{
265 desc->word[word] = cpu_to_le32(value); 251 desc[word] = cpu_to_le32(value);
266} 252}
267 253
268#endif /* RT2X00RING_H */ 254#endif /* RT2X00RING_H */
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index d16f0a79d985..ab97b0600ec8 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -113,7 +113,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
113 struct data_entry *entry = (struct data_entry *)urb->context; 113 struct data_entry *entry = (struct data_entry *)urb->context;
114 struct data_ring *ring = entry->ring; 114 struct data_ring *ring = entry->ring;
115 struct rt2x00_dev *rt2x00dev = ring->rt2x00dev; 115 struct rt2x00_dev *rt2x00dev = ring->rt2x00dev;
116 struct data_desc *txd = (struct data_desc *)entry->skb->data; 116 __le32 *txd = (__le32 *)entry->skb->data;
117 u32 word; 117 u32 word;
118 int tx_status; 118 int tx_status;
119 119
@@ -181,7 +181,7 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
181 skb_push(skb, ring->desc_size); 181 skb_push(skb, ring->desc_size);
182 memset(skb->data, 0, ring->desc_size); 182 memset(skb->data, 0, ring->desc_size);
183 183
184 rt2x00lib_write_tx_desc(rt2x00dev, (struct data_desc *)skb->data, 184 rt2x00lib_write_tx_desc(rt2x00dev, (__le32 *)skb->data,
185 (struct ieee80211_hdr *)(skb->data + 185 (struct ieee80211_hdr *)(skb->data +
186 ring->desc_size), 186 ring->desc_size),
187 skb->len - ring->desc_size, control); 187 skb->len - ring->desc_size, control);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index a38a96230eca..f3c4cbe734ec 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -996,7 +996,7 @@ static int rt61pci_load_firmware(struct rt2x00_dev *rt2x00dev, void *data,
996static void rt61pci_init_rxring(struct rt2x00_dev *rt2x00dev) 996static void rt61pci_init_rxring(struct rt2x00_dev *rt2x00dev)
997{ 997{
998 struct data_ring *ring = rt2x00dev->rx; 998 struct data_ring *ring = rt2x00dev->rx;
999 struct data_desc *rxd; 999 __le32 *rxd;
1000 unsigned int i; 1000 unsigned int i;
1001 u32 word; 1001 u32 word;
1002 1002
@@ -1021,7 +1021,7 @@ static void rt61pci_init_rxring(struct rt2x00_dev *rt2x00dev)
1021static void rt61pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue) 1021static void rt61pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue)
1022{ 1022{
1023 struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue); 1023 struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
1024 struct data_desc *txd; 1024 __le32 *txd;
1025 unsigned int i; 1025 unsigned int i;
1026 u32 word; 1026 u32 word;
1027 1027
@@ -1535,7 +1535,7 @@ static int rt61pci_set_device_state(struct rt2x00_dev *rt2x00dev,
1535 * TX descriptor initialization 1535 * TX descriptor initialization
1536 */ 1536 */
1537static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, 1537static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1538 struct data_desc *txd, 1538 __le32 *txd,
1539 struct txdata_entry_desc *desc, 1539 struct txdata_entry_desc *desc,
1540 struct ieee80211_hdr *ieee80211hdr, 1540 struct ieee80211_hdr *ieee80211hdr,
1541 unsigned int length, 1541 unsigned int length,
@@ -1679,7 +1679,7 @@ static int rt61pci_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
1679static void rt61pci_fill_rxdone(struct data_entry *entry, 1679static void rt61pci_fill_rxdone(struct data_entry *entry,
1680 struct rxdata_entry_desc *desc) 1680 struct rxdata_entry_desc *desc)
1681{ 1681{
1682 struct data_desc *rxd = entry->priv; 1682 __le32 *rxd = entry->priv;
1683 u32 word0; 1683 u32 word0;
1684 u32 word1; 1684 u32 word1;
1685 1685
@@ -1709,7 +1709,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)
1709 struct data_ring *ring; 1709 struct data_ring *ring;
1710 struct data_entry *entry; 1710 struct data_entry *entry;
1711 struct data_entry *entry_done; 1711 struct data_entry *entry_done;
1712 struct data_desc *txd; 1712 __le32 *txd;
1713 u32 word; 1713 u32 word;
1714 u32 reg; 1714 u32 reg;
1715 u32 old_reg; 1715 u32 old_reg;
@@ -2455,7 +2455,7 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
2455 skb_push(skb, TXD_DESC_SIZE); 2455 skb_push(skb, TXD_DESC_SIZE);
2456 memset(skb->data, 0, TXD_DESC_SIZE); 2456 memset(skb->data, 0, TXD_DESC_SIZE);
2457 2457
2458 rt2x00lib_write_tx_desc(rt2x00dev, (struct data_desc *)skb->data, 2458 rt2x00lib_write_tx_desc(rt2x00dev, (__le32 *)skb->data,
2459 (struct ieee80211_hdr *)(skb->data + 2459 (struct ieee80211_hdr *)(skb->data +
2460 TXD_DESC_SIZE), 2460 TXD_DESC_SIZE),
2461 skb->len - TXD_DESC_SIZE, control); 2461 skb->len - TXD_DESC_SIZE, control);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.h b/drivers/net/wireless/rt2x00/rt61pci.h
index 50d9f6aa62ed..4c6524eedad0 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.h
+++ b/drivers/net/wireless/rt2x00/rt61pci.h
@@ -1246,8 +1246,8 @@ struct hw_pairwise_ta_entry {
1246/* 1246/*
1247 * DMA descriptor defines. 1247 * DMA descriptor defines.
1248 */ 1248 */
1249#define TXD_DESC_SIZE ( 16 * sizeof(struct data_desc) ) 1249#define TXD_DESC_SIZE ( 16 * sizeof(__le32) )
1250#define RXD_DESC_SIZE ( 16 * sizeof(struct data_desc) ) 1250#define RXD_DESC_SIZE ( 16 * sizeof(__le32) )
1251 1251
1252/* 1252/*
1253 * TX descriptor format for TX, PRIO and Beacon Ring. 1253 * TX descriptor format for TX, PRIO and Beacon Ring.
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 0cc815000d62..d89db266757c 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1203,7 +1203,7 @@ static int rt73usb_set_device_state(struct rt2x00_dev *rt2x00dev,
1203 * TX descriptor initialization 1203 * TX descriptor initialization
1204 */ 1204 */
1205static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, 1205static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1206 struct data_desc *txd, 1206 __le32 *txd,
1207 struct txdata_entry_desc *desc, 1207 struct txdata_entry_desc *desc,
1208 struct ieee80211_hdr *ieee80211hdr, 1208 struct ieee80211_hdr *ieee80211hdr,
1209 unsigned int length, 1209 unsigned int length,
@@ -1350,7 +1350,7 @@ static int rt73usb_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
1350static void rt73usb_fill_rxdone(struct data_entry *entry, 1350static void rt73usb_fill_rxdone(struct data_entry *entry,
1351 struct rxdata_entry_desc *desc) 1351 struct rxdata_entry_desc *desc)
1352{ 1352{
1353 struct data_desc *rxd = (struct data_desc *)entry->skb->data; 1353 __le32 *rxd = (__le32 *)entry->skb->data;
1354 u32 word0; 1354 u32 word0;
1355 u32 word1; 1355 u32 word1;
1356 1356
@@ -1953,7 +1953,7 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
1953 skb_push(skb, TXD_DESC_SIZE); 1953 skb_push(skb, TXD_DESC_SIZE);
1954 memset(skb->data, 0, TXD_DESC_SIZE); 1954 memset(skb->data, 0, TXD_DESC_SIZE);
1955 1955
1956 rt2x00lib_write_tx_desc(rt2x00dev, (struct data_desc *)skb->data, 1956 rt2x00lib_write_tx_desc(rt2x00dev, (__le32 *)skb->data,
1957 (struct ieee80211_hdr *)(skb->data + 1957 (struct ieee80211_hdr *)(skb->data +
1958 TXD_DESC_SIZE), 1958 TXD_DESC_SIZE),
1959 skb->len - TXD_DESC_SIZE, control); 1959 skb->len - TXD_DESC_SIZE, control);
diff --git a/drivers/net/wireless/rt2x00/rt73usb.h b/drivers/net/wireless/rt2x00/rt73usb.h
index b967df27886a..d49dcaacecee 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.h
+++ b/drivers/net/wireless/rt2x00/rt73usb.h
@@ -866,8 +866,8 @@ struct hw_pairwise_ta_entry {
866/* 866/*
867 * DMA descriptor defines. 867 * DMA descriptor defines.
868 */ 868 */
869#define TXD_DESC_SIZE ( 6 * sizeof(struct data_desc) ) 869#define TXD_DESC_SIZE ( 6 * sizeof(__le32) )
870#define RXD_DESC_SIZE ( 6 * sizeof(struct data_desc) ) 870#define RXD_DESC_SIZE ( 6 * sizeof(__le32) )
871 871
872/* 872/*
873 * TX descriptor format for TX, PRIO and Beacon Ring. 873 * TX descriptor format for TX, PRIO and Beacon Ring.