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/rt2500usb.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/rt2500usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 3be4c7ea8dd1..6fe713a1d758 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1676,6 +1676,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, | |||
1676 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 1676 | struct rt2x00_intf *intf = vif_to_intf(control->vif); |
1677 | struct queue_entry_priv_usb_bcn *priv_bcn; | 1677 | struct queue_entry_priv_usb_bcn *priv_bcn; |
1678 | struct skb_frame_desc *skbdesc; | 1678 | struct skb_frame_desc *skbdesc; |
1679 | struct txentry_desc txdesc; | ||
1679 | int pipe = usb_sndbulkpipe(usb_dev, 1); | 1680 | int pipe = usb_sndbulkpipe(usb_dev, 1); |
1680 | int length; | 1681 | int length; |
1681 | u16 reg; | 1682 | u16 reg; |
@@ -1686,6 +1687,14 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, | |||
1686 | priv_bcn = intf->beacon->priv_data; | 1687 | priv_bcn = intf->beacon->priv_data; |
1687 | 1688 | ||
1688 | /* | 1689 | /* |
1690 | * Copy all TX descriptor information into txdesc, | ||
1691 | * after that we are free to use the skb->cb array | ||
1692 | * for our information. | ||
1693 | */ | ||
1694 | intf->beacon->skb = skb; | ||
1695 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc, control); | ||
1696 | |||
1697 | /* | ||
1689 | * Add the descriptor in front of the skb. | 1698 | * Add the descriptor in front of the skb. |
1690 | */ | 1699 | */ |
1691 | skb_push(skb, intf->beacon->queue->desc_size); | 1700 | skb_push(skb, intf->beacon->queue->desc_size); |
@@ -1713,7 +1722,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, | |||
1713 | rt2x00_set_field16(®, TXRX_CSR19_BEACON_GEN, 0); | 1722 | rt2x00_set_field16(®, TXRX_CSR19_BEACON_GEN, 0); |
1714 | rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg); | 1723 | rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg); |
1715 | 1724 | ||
1716 | rt2x00lib_write_tx_desc(rt2x00dev, skb, control); | 1725 | rt2x00queue_write_tx_descriptor(intf->beacon, &txdesc); |
1717 | 1726 | ||
1718 | /* | 1727 | /* |
1719 | * USB devices cannot blindly pass the skb->len as the | 1728 | * USB devices cannot blindly pass the skb->len as the |