aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00ring.h
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/wireless/rt2x00/rt2x00ring.h
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/wireless/rt2x00/rt2x00ring.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00ring.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00ring.h b/drivers/net/wireless/rt2x00/rt2x00ring.h
index 1a864d32cfb..ee6c423a53d 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 */