Commit 4bd7c452 authored by Ivo van Doorn's avatar Ivo van Doorn Committed by David S. Miller

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: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2676c94d
...@@ -600,7 +600,7 @@ static void rt2400pci_link_tuner(struct rt2x00_dev *rt2x00dev) ...@@ -600,7 +600,7 @@ static void rt2400pci_link_tuner(struct rt2x00_dev *rt2x00dev)
static void rt2400pci_init_rxring(struct rt2x00_dev *rt2x00dev) static void rt2400pci_init_rxring(struct rt2x00_dev *rt2x00dev)
{ {
struct data_ring *ring = rt2x00dev->rx; struct data_ring *ring = rt2x00dev->rx;
struct data_desc *rxd; __le32 *rxd;
unsigned int i; unsigned int i;
u32 word; u32 word;
...@@ -630,7 +630,7 @@ static void rt2400pci_init_rxring(struct rt2x00_dev *rt2x00dev) ...@@ -630,7 +630,7 @@ static void rt2400pci_init_rxring(struct rt2x00_dev *rt2x00dev)
static void rt2400pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue) static void rt2400pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue)
{ {
struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue); struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
struct data_desc *txd; __le32 *txd;
unsigned int i; unsigned int i;
u32 word; u32 word;
...@@ -1017,7 +1017,7 @@ static int rt2400pci_set_device_state(struct rt2x00_dev *rt2x00dev, ...@@ -1017,7 +1017,7 @@ static int rt2400pci_set_device_state(struct rt2x00_dev *rt2x00dev,
* TX descriptor initialization * TX descriptor initialization
*/ */
static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
struct data_desc *txd, __le32 *txd,
struct txdata_entry_desc *desc, struct txdata_entry_desc *desc,
struct ieee80211_hdr *ieee80211hdr, struct ieee80211_hdr *ieee80211hdr,
unsigned int length, unsigned int length,
...@@ -1117,7 +1117,7 @@ static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, ...@@ -1117,7 +1117,7 @@ static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
static void rt2400pci_fill_rxdone(struct data_entry *entry, static void rt2400pci_fill_rxdone(struct data_entry *entry,
struct rxdata_entry_desc *desc) struct rxdata_entry_desc *desc)
{ {
struct data_desc *rxd = entry->priv; __le32 *rxd = entry->priv;
u32 word0; u32 word0;
u32 word2; u32 word2;
...@@ -1147,7 +1147,7 @@ static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev, const int queue) ...@@ -1147,7 +1147,7 @@ static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev, const int queue)
{ {
struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue); struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
struct data_entry *entry; struct data_entry *entry;
struct data_desc *txd; __le32 *txd;
u32 word; u32 word;
int tx_status; int tx_status;
int retry; int retry;
......
...@@ -803,8 +803,8 @@ ...@@ -803,8 +803,8 @@
/* /*
* DMA descriptor defines. * DMA descriptor defines.
*/ */
#define TXD_DESC_SIZE ( 8 * sizeof(struct data_desc) ) #define TXD_DESC_SIZE ( 8 * sizeof(__le32) )
#define RXD_DESC_SIZE ( 8 * sizeof(struct data_desc) ) #define RXD_DESC_SIZE ( 8 * sizeof(__le32) )
/* /*
* TX descriptor format for TX, PRIO, ATIM and Beacon Ring. * TX descriptor format for TX, PRIO, ATIM and Beacon Ring.
......
...@@ -691,7 +691,7 @@ dynamic_cca_tune: ...@@ -691,7 +691,7 @@ dynamic_cca_tune:
static void rt2500pci_init_rxring(struct rt2x00_dev *rt2x00dev) static void rt2500pci_init_rxring(struct rt2x00_dev *rt2x00dev)
{ {
struct data_ring *ring = rt2x00dev->rx; struct data_ring *ring = rt2x00dev->rx;
struct data_desc *rxd; __le32 *rxd;
unsigned int i; unsigned int i;
u32 word; u32 word;
...@@ -716,7 +716,7 @@ static void rt2500pci_init_rxring(struct rt2x00_dev *rt2x00dev) ...@@ -716,7 +716,7 @@ static void rt2500pci_init_rxring(struct rt2x00_dev *rt2x00dev)
static void rt2500pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue) static void rt2500pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue)
{ {
struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue); struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
struct data_desc *txd; __le32 *txd;
unsigned int i; unsigned int i;
u32 word; u32 word;
...@@ -1167,7 +1167,7 @@ static int rt2500pci_set_device_state(struct rt2x00_dev *rt2x00dev, ...@@ -1167,7 +1167,7 @@ static int rt2500pci_set_device_state(struct rt2x00_dev *rt2x00dev,
* TX descriptor initialization * TX descriptor initialization
*/ */
static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
struct data_desc *txd, __le32 *txd,
struct txdata_entry_desc *desc, struct txdata_entry_desc *desc,
struct ieee80211_hdr *ieee80211hdr, struct ieee80211_hdr *ieee80211hdr,
unsigned int length, unsigned int length,
...@@ -1251,7 +1251,7 @@ static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, ...@@ -1251,7 +1251,7 @@ static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
static void rt2500pci_fill_rxdone(struct data_entry *entry, static void rt2500pci_fill_rxdone(struct data_entry *entry,
struct rxdata_entry_desc *desc) struct rxdata_entry_desc *desc)
{ {
struct data_desc *rxd = entry->priv; __le32 *rxd = entry->priv;
u32 word0; u32 word0;
u32 word2; u32 word2;
...@@ -1278,7 +1278,7 @@ static void rt2500pci_txdone(struct rt2x00_dev *rt2x00dev, const int queue) ...@@ -1278,7 +1278,7 @@ static void rt2500pci_txdone(struct rt2x00_dev *rt2x00dev, const int queue)
{ {
struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue); struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
struct data_entry *entry; struct data_entry *entry;
struct data_desc *txd; __le32 *txd;
u32 word; u32 word;
int tx_status; int tx_status;
int retry; int retry;
......
...@@ -1082,8 +1082,8 @@ ...@@ -1082,8 +1082,8 @@
/* /*
* DMA descriptor defines. * DMA descriptor defines.
*/ */
#define TXD_DESC_SIZE ( 11 * sizeof(struct data_desc) ) #define TXD_DESC_SIZE ( 11 * sizeof(__le32) )
#define RXD_DESC_SIZE ( 11 * sizeof(struct data_desc) ) #define RXD_DESC_SIZE ( 11 * sizeof(__le32) )
/* /*
* TX descriptor format for TX, PRIO, ATIM and Beacon Ring. * TX descriptor format for TX, PRIO, ATIM and Beacon Ring.
......
...@@ -990,7 +990,7 @@ static int rt2500usb_set_device_state(struct rt2x00_dev *rt2x00dev, ...@@ -990,7 +990,7 @@ static int rt2500usb_set_device_state(struct rt2x00_dev *rt2x00dev,
* TX descriptor initialization * TX descriptor initialization
*/ */
static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
struct data_desc *txd, __le32 *txd,
struct txdata_entry_desc *desc, struct txdata_entry_desc *desc,
struct ieee80211_hdr *ieee80211hdr, struct ieee80211_hdr *ieee80211hdr,
unsigned int length, unsigned int length,
...@@ -1082,9 +1082,8 @@ static void rt2500usb_fill_rxdone(struct data_entry *entry, ...@@ -1082,9 +1082,8 @@ static void rt2500usb_fill_rxdone(struct data_entry *entry,
struct rxdata_entry_desc *desc) struct rxdata_entry_desc *desc)
{ {
struct urb *urb = entry->priv; struct urb *urb = entry->priv;
struct data_desc *rxd = (struct data_desc *)(entry->skb->data + __le32 *rxd = (__le32 *)(entry->skb->data +
(urb->actual_length - (urb->actual_length - entry->ring->desc_size));
entry->ring->desc_size));
u32 word0; u32 word0;
u32 word1; u32 word1;
...@@ -1682,7 +1681,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, ...@@ -1682,7 +1681,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw,
skb_push(skb, ring->desc_size); skb_push(skb, ring->desc_size);
memset(skb->data, 0, ring->desc_size); memset(skb->data, 0, ring->desc_size);
rt2x00lib_write_tx_desc(rt2x00dev, (struct data_desc *)skb->data, rt2x00lib_write_tx_desc(rt2x00dev, (__le32 *)skb->data,
(struct ieee80211_hdr *)(skb->data + (struct ieee80211_hdr *)(skb->data +
ring->desc_size), ring->desc_size),
skb->len - ring->desc_size, control); skb->len - ring->desc_size, control);
......
...@@ -703,8 +703,8 @@ ...@@ -703,8 +703,8 @@
/* /*
* DMA descriptor defines. * DMA descriptor defines.
*/ */
#define TXD_DESC_SIZE ( 5 * sizeof(struct data_desc) ) #define TXD_DESC_SIZE ( 5 * sizeof(__le32) )
#define RXD_DESC_SIZE ( 4 * sizeof(struct data_desc) ) #define RXD_DESC_SIZE ( 4 * sizeof(__le32) )
/* /*
* TX descriptor format for TX, PRIO, ATIM and Beacon Ring. * TX descriptor format for TX, PRIO, ATIM and Beacon Ring.
......
...@@ -488,7 +488,7 @@ struct rt2x00lib_ops { ...@@ -488,7 +488,7 @@ struct rt2x00lib_ops {
* TX control handlers * TX control handlers
*/ */
void (*write_tx_desc) (struct rt2x00_dev *rt2x00dev, void (*write_tx_desc) (struct rt2x00_dev *rt2x00dev,
struct data_desc *txd, __le32 *txd,
struct txdata_entry_desc *desc, struct txdata_entry_desc *desc,
struct ieee80211_hdr *ieee80211hdr, struct ieee80211_hdr *ieee80211hdr,
unsigned int length, unsigned int length,
...@@ -889,7 +889,7 @@ void rt2x00lib_rxdone(struct data_entry *entry, struct sk_buff *skb, ...@@ -889,7 +889,7 @@ void rt2x00lib_rxdone(struct data_entry *entry, struct sk_buff *skb,
* TX descriptor initializer * TX descriptor initializer
*/ */
void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev, void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
struct data_desc *txd, __le32 *txd,
struct ieee80211_hdr *ieee80211hdr, struct ieee80211_hdr *ieee80211hdr,
unsigned int length, unsigned int length,
struct ieee80211_tx_control *control); struct ieee80211_tx_control *control);
......
...@@ -578,7 +578,7 @@ EXPORT_SYMBOL_GPL(rt2x00lib_rxdone); ...@@ -578,7 +578,7 @@ EXPORT_SYMBOL_GPL(rt2x00lib_rxdone);
* TX descriptor initializer * TX descriptor initializer
*/ */
void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev, void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
struct data_desc *txd, __le32 *txd,
struct ieee80211_hdr *ieee80211hdr, struct ieee80211_hdr *ieee80211hdr,
unsigned int length, unsigned int length,
struct ieee80211_tx_control *control) struct ieee80211_tx_control *control)
......
...@@ -80,7 +80,7 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, ...@@ -80,7 +80,7 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
{ {
struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data;
struct data_entry *entry = rt2x00_get_data_entry(ring); struct data_entry *entry = rt2x00_get_data_entry(ring);
struct data_desc *txd = entry->priv; __le32 *txd = entry->priv;
u32 word; u32 word;
if (rt2x00_ring_full(ring)) { if (rt2x00_ring_full(ring)) {
...@@ -122,11 +122,11 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev) ...@@ -122,11 +122,11 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)
{ {
struct data_ring *ring = rt2x00dev->rx; struct data_ring *ring = rt2x00dev->rx;
struct data_entry *entry; struct data_entry *entry;
struct data_desc *rxd;
struct sk_buff *skb; struct sk_buff *skb;
struct ieee80211_hdr *hdr; struct ieee80211_hdr *hdr;
struct rxdata_entry_desc desc; struct rxdata_entry_desc desc;
int header_size; int header_size;
__le32 *rxd;
int align; int align;
u32 word; u32 word;
......
...@@ -26,20 +26,6 @@ ...@@ -26,20 +26,6 @@
#ifndef RT2X00RING_H #ifndef RT2X00RING_H
#define RT2X00RING_H #define RT2X00RING_H
/*
* data_desc
* Each data entry also contains a descriptor which is used by the
* device to determine what should be done with the packet and
* what the current status is.
* This structure is greatly simplified, but the descriptors
* are basically a list of little endian 32 bit values.
* Make the array by default 1 word big, this will allow us
* to use sizeof() correctly.
*/
struct data_desc {
__le32 word[1];
};
/* /*
* rxdata_entry_desc * rxdata_entry_desc
* Summary of information that has been read from the * Summary of information that has been read from the
...@@ -253,16 +239,16 @@ static inline int rt2x00_ring_free(struct data_ring *ring) ...@@ -253,16 +239,16 @@ static inline int rt2x00_ring_free(struct data_ring *ring)
/* /*
* TX/RX Descriptor access functions. * TX/RX Descriptor access functions.
*/ */
static inline void rt2x00_desc_read(struct data_desc *desc, static inline void rt2x00_desc_read(__le32 *desc,
const u8 word, u32 *value) const u8 word, u32 *value)
{ {
*value = le32_to_cpu(desc->word[word]); *value = le32_to_cpu(desc[word]);
} }
static inline void rt2x00_desc_write(struct data_desc *desc, static inline void rt2x00_desc_write(__le32 *desc,
const u8 word, const u32 value) const u8 word, const u32 value)
{ {
desc->word[word] = cpu_to_le32(value); desc[word] = cpu_to_le32(value);
} }
#endif /* RT2X00RING_H */ #endif /* RT2X00RING_H */
...@@ -113,7 +113,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) ...@@ -113,7 +113,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
struct data_entry *entry = (struct data_entry *)urb->context; struct data_entry *entry = (struct data_entry *)urb->context;
struct data_ring *ring = entry->ring; struct data_ring *ring = entry->ring;
struct rt2x00_dev *rt2x00dev = ring->rt2x00dev; struct rt2x00_dev *rt2x00dev = ring->rt2x00dev;
struct data_desc *txd = (struct data_desc *)entry->skb->data; __le32 *txd = (__le32 *)entry->skb->data;
u32 word; u32 word;
int tx_status; int tx_status;
...@@ -181,7 +181,7 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, ...@@ -181,7 +181,7 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
skb_push(skb, ring->desc_size); skb_push(skb, ring->desc_size);
memset(skb->data, 0, ring->desc_size); memset(skb->data, 0, ring->desc_size);
rt2x00lib_write_tx_desc(rt2x00dev, (struct data_desc *)skb->data, rt2x00lib_write_tx_desc(rt2x00dev, (__le32 *)skb->data,
(struct ieee80211_hdr *)(skb->data + (struct ieee80211_hdr *)(skb->data +
ring->desc_size), ring->desc_size),
skb->len - ring->desc_size, control); skb->len - ring->desc_size, control);
......
...@@ -996,7 +996,7 @@ static int rt61pci_load_firmware(struct rt2x00_dev *rt2x00dev, void *data, ...@@ -996,7 +996,7 @@ static int rt61pci_load_firmware(struct rt2x00_dev *rt2x00dev, void *data,
static void rt61pci_init_rxring(struct rt2x00_dev *rt2x00dev) static void rt61pci_init_rxring(struct rt2x00_dev *rt2x00dev)
{ {
struct data_ring *ring = rt2x00dev->rx; struct data_ring *ring = rt2x00dev->rx;
struct data_desc *rxd; __le32 *rxd;
unsigned int i; unsigned int i;
u32 word; u32 word;
...@@ -1021,7 +1021,7 @@ static void rt61pci_init_rxring(struct rt2x00_dev *rt2x00dev) ...@@ -1021,7 +1021,7 @@ static void rt61pci_init_rxring(struct rt2x00_dev *rt2x00dev)
static void rt61pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue) static void rt61pci_init_txring(struct rt2x00_dev *rt2x00dev, const int queue)
{ {
struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue); struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
struct data_desc *txd; __le32 *txd;
unsigned int i; unsigned int i;
u32 word; u32 word;
...@@ -1535,7 +1535,7 @@ static int rt61pci_set_device_state(struct rt2x00_dev *rt2x00dev, ...@@ -1535,7 +1535,7 @@ static int rt61pci_set_device_state(struct rt2x00_dev *rt2x00dev,
* TX descriptor initialization * TX descriptor initialization
*/ */
static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
struct data_desc *txd, __le32 *txd,
struct txdata_entry_desc *desc, struct txdata_entry_desc *desc,
struct ieee80211_hdr *ieee80211hdr, struct ieee80211_hdr *ieee80211hdr,
unsigned int length, unsigned int length,
...@@ -1679,7 +1679,7 @@ static int rt61pci_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1) ...@@ -1679,7 +1679,7 @@ static int rt61pci_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
static void rt61pci_fill_rxdone(struct data_entry *entry, static void rt61pci_fill_rxdone(struct data_entry *entry,
struct rxdata_entry_desc *desc) struct rxdata_entry_desc *desc)
{ {
struct data_desc *rxd = entry->priv; __le32 *rxd = entry->priv;
u32 word0; u32 word0;
u32 word1; u32 word1;
...@@ -1709,7 +1709,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev) ...@@ -1709,7 +1709,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)
struct data_ring *ring; struct data_ring *ring;
struct data_entry *entry; struct data_entry *entry;
struct data_entry *entry_done; struct data_entry *entry_done;
struct data_desc *txd; __le32 *txd;
u32 word; u32 word;
u32 reg; u32 reg;
u32 old_reg; u32 old_reg;
...@@ -2455,7 +2455,7 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -2455,7 +2455,7 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
skb_push(skb, TXD_DESC_SIZE); skb_push(skb, TXD_DESC_SIZE);
memset(skb->data, 0, TXD_DESC_SIZE); memset(skb->data, 0, TXD_DESC_SIZE);
rt2x00lib_write_tx_desc(rt2x00dev, (struct data_desc *)skb->data, rt2x00lib_write_tx_desc(rt2x00dev, (__le32 *)skb->data,
(struct ieee80211_hdr *)(skb->data + (struct ieee80211_hdr *)(skb->data +
TXD_DESC_SIZE), TXD_DESC_SIZE),
skb->len - TXD_DESC_SIZE, control); skb->len - TXD_DESC_SIZE, control);
......
...@@ -1246,8 +1246,8 @@ struct hw_pairwise_ta_entry { ...@@ -1246,8 +1246,8 @@ struct hw_pairwise_ta_entry {
/* /*
* DMA descriptor defines. * DMA descriptor defines.
*/ */
#define TXD_DESC_SIZE ( 16 * sizeof(struct data_desc) ) #define TXD_DESC_SIZE ( 16 * sizeof(__le32) )
#define RXD_DESC_SIZE ( 16 * sizeof(struct data_desc) ) #define RXD_DESC_SIZE ( 16 * sizeof(__le32) )
/* /*
* TX descriptor format for TX, PRIO and Beacon Ring. * TX descriptor format for TX, PRIO and Beacon Ring.
......
...@@ -1203,7 +1203,7 @@ static int rt73usb_set_device_state(struct rt2x00_dev *rt2x00dev, ...@@ -1203,7 +1203,7 @@ static int rt73usb_set_device_state(struct rt2x00_dev *rt2x00dev,
* TX descriptor initialization * TX descriptor initialization
*/ */
static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
struct data_desc *txd, __le32 *txd,
struct txdata_entry_desc *desc, struct txdata_entry_desc *desc,
struct ieee80211_hdr *ieee80211hdr, struct ieee80211_hdr *ieee80211hdr,
unsigned int length, unsigned int length,
...@@ -1350,7 +1350,7 @@ static int rt73usb_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1) ...@@ -1350,7 +1350,7 @@ static int rt73usb_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
static void rt73usb_fill_rxdone(struct data_entry *entry, static void rt73usb_fill_rxdone(struct data_entry *entry,
struct rxdata_entry_desc *desc) struct rxdata_entry_desc *desc)
{ {
struct data_desc *rxd = (struct data_desc *)entry->skb->data; __le32 *rxd = (__le32 *)entry->skb->data;
u32 word0; u32 word0;
u32 word1; u32 word1;
...@@ -1953,7 +1953,7 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -1953,7 +1953,7 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
skb_push(skb, TXD_DESC_SIZE); skb_push(skb, TXD_DESC_SIZE);
memset(skb->data, 0, TXD_DESC_SIZE); memset(skb->data, 0, TXD_DESC_SIZE);
rt2x00lib_write_tx_desc(rt2x00dev, (struct data_desc *)skb->data, rt2x00lib_write_tx_desc(rt2x00dev, (__le32 *)skb->data,
(struct ieee80211_hdr *)(skb->data + (struct ieee80211_hdr *)(skb->data +
TXD_DESC_SIZE), TXD_DESC_SIZE),
skb->len - TXD_DESC_SIZE, control); skb->len - TXD_DESC_SIZE, control);
......
...@@ -866,8 +866,8 @@ struct hw_pairwise_ta_entry { ...@@ -866,8 +866,8 @@ struct hw_pairwise_ta_entry {
/* /*
* DMA descriptor defines. * DMA descriptor defines.
*/ */
#define TXD_DESC_SIZE ( 6 * sizeof(struct data_desc) ) #define TXD_DESC_SIZE ( 6 * sizeof(__le32) )
#define RXD_DESC_SIZE ( 6 * sizeof(struct data_desc) ) #define RXD_DESC_SIZE ( 6 * sizeof(__le32) )
/* /*
* TX descriptor format for TX, PRIO and Beacon Ring. * TX descriptor format for TX, PRIO and Beacon Ring.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment