aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt73usb.c
diff options
context:
space:
mode:
authorIvo van Doorn <IvDoorn@gmail.com>2008-01-24 04:56:25 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:05:07 -0500
commit08992f7fb139c7dbaf593402312ee5a055352f05 (patch)
treecfa1459e4940cf493438a3db950b5339dae4ca88 /drivers/net/wireless/rt2x00/rt73usb.c
parent22c96c28b47ce74d78aad1afbed88b26f43ce24b (diff)
rt2x00: Add skb descriptor
Use the skb->cb field to add a frame description that can be used to transfer information passed each rt2x00 layer. This reduces the required arguments for rt2x00lib_write_tx_desc(). 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/rt73usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 49180de321e4..8093a4d49335 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1965,6 +1965,9 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
1965 struct ieee80211_tx_control *control) 1965 struct ieee80211_tx_control *control)
1966{ 1966{
1967 struct rt2x00_dev *rt2x00dev = hw->priv; 1967 struct rt2x00_dev *rt2x00dev = hw->priv;
1968 struct skb_desc *desc;
1969 struct data_ring *ring;
1970 struct data_entry *entry;
1968 int timeout; 1971 int timeout;
1969 1972
1970 /* 1973 /*
@@ -1973,17 +1976,27 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
1973 * initialization. 1976 * initialization.
1974 */ 1977 */
1975 control->queue = IEEE80211_TX_QUEUE_BEACON; 1978 control->queue = IEEE80211_TX_QUEUE_BEACON;
1979 ring = rt2x00lib_get_ring(rt2x00dev, control->queue);
1980 entry = rt2x00_get_data_entry(ring);
1976 1981
1977 /* 1982 /*
1978 * First we create the beacon. 1983 * Add the descriptor in front of the skb.
1979 */ 1984 */
1980 skb_push(skb, TXD_DESC_SIZE); 1985 skb_push(skb, ring->desc_size);
1981 memset(skb->data, 0, TXD_DESC_SIZE); 1986 memset(skb->data, 0, ring->desc_size);
1982 1987
1983 rt2x00lib_write_tx_desc(rt2x00dev, (__le32 *)skb->data, 1988 /*
1984 (struct ieee80211_hdr *)(skb->data + 1989 * Fill in skb descriptor
1985 TXD_DESC_SIZE), 1990 */
1986 skb->len - TXD_DESC_SIZE, control); 1991 desc = get_skb_desc(skb);
1992 desc->desc_len = ring->desc_size;
1993 desc->data_len = skb->len - ring->desc_size;
1994 desc->desc = skb->data;
1995 desc->data = skb->data + ring->desc_size;
1996 desc->ring = ring;
1997 desc->entry = entry;
1998
1999 rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
1987 2000
1988 /* 2001 /*
1989 * Write entire beacon with descriptor to register, 2002 * Write entire beacon with descriptor to register,