diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-05-10 07:46:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:47:34 -0400 |
commit | 7050ec821c52826b63835dde54ee3d71c7db4262 (patch) | |
tree | f8154413b4ed1e8ff01b6dbb1c79240dcce83dc8 /drivers/net/wireless/rt2x00/rt73usb.c | |
parent | 4de36fe5abe077a4c65bf0b6a309865aa043e055 (diff) |
rt2x00: Split rt2x00lib_write_tx_desc()
Split rt2x00lib_write_tx_desc() up into a TX descriptor initializor
and TX descriptor writer.
This split is required to properly allow mac80211 to move its
tx_control structure into the skb->cb array.
The rt2x00queue_create_tx_descriptor() function will read all tx control
information and convert it into a rt2x00 TX descriptor information structure.
After that function is complete, we have all information we needed from the
tx control structure and are free to start writing into the skb->cb array
for our own purposes.
rt2x00queue_write_tx_descriptor() will be in charge of really sending
the TX descriptor to the hardware and kicking the TX queue.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 1bcf8c132cdc..bc44116a8a3e 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1956,6 +1956,7 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1956 | struct rt2x00_dev *rt2x00dev = hw->priv; | 1956 | struct rt2x00_dev *rt2x00dev = hw->priv; |
1957 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 1957 | struct rt2x00_intf *intf = vif_to_intf(control->vif); |
1958 | struct skb_frame_desc *skbdesc; | 1958 | struct skb_frame_desc *skbdesc; |
1959 | struct txentry_desc txdesc; | ||
1959 | unsigned int beacon_base; | 1960 | unsigned int beacon_base; |
1960 | u32 reg; | 1961 | u32 reg; |
1961 | 1962 | ||
@@ -1963,6 +1964,14 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1963 | return -ENOBUFS; | 1964 | return -ENOBUFS; |
1964 | 1965 | ||
1965 | /* | 1966 | /* |
1967 | * Copy all TX descriptor information into txdesc, | ||
1968 | * after that we are free to use the skb->cb array | ||
1969 | * for our information. | ||
1970 | */ | ||
1971 | intf->beacon->skb = skb; | ||
1972 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc, control); | ||
1973 | |||
1974 | /* | ||
1966 | * Add the descriptor in front of the skb. | 1975 | * Add the descriptor in front of the skb. |
1967 | */ | 1976 | */ |
1968 | skb_push(skb, intf->beacon->queue->desc_size); | 1977 | skb_push(skb, intf->beacon->queue->desc_size); |
@@ -1994,7 +2003,7 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1994 | * Write entire beacon with descriptor to register, | 2003 | * Write entire beacon with descriptor to register, |
1995 | * and kick the beacon generator. | 2004 | * and kick the beacon generator. |
1996 | */ | 2005 | */ |
1997 | rt2x00lib_write_tx_desc(rt2x00dev, skb, control); | 2006 | rt2x00queue_write_tx_descriptor(intf->beacon, &txdesc); |
1998 | beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx); | 2007 | beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx); |
1999 | rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_WRITE, | 2008 | rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_WRITE, |
2000 | USB_VENDOR_REQUEST_OUT, beacon_base, 0, | 2009 | USB_VENDOR_REQUEST_OUT, beacon_base, 0, |