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/rt2500pci.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/rt2500pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 6c31c5db0ca1..7de7980738f1 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1808,6 +1808,7 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1808 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 1808 | struct rt2x00_intf *intf = vif_to_intf(control->vif); |
1809 | struct queue_entry_priv_pci_tx *priv_tx; | 1809 | struct queue_entry_priv_pci_tx *priv_tx; |
1810 | struct skb_frame_desc *skbdesc; | 1810 | struct skb_frame_desc *skbdesc; |
1811 | struct txentry_desc txdesc; | ||
1811 | u32 reg; | 1812 | u32 reg; |
1812 | 1813 | ||
1813 | if (unlikely(!intf->beacon)) | 1814 | if (unlikely(!intf->beacon)) |
@@ -1816,6 +1817,14 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1816 | priv_tx = intf->beacon->priv_data; | 1817 | priv_tx = intf->beacon->priv_data; |
1817 | 1818 | ||
1818 | /* | 1819 | /* |
1820 | * Copy all TX descriptor information into txdesc, | ||
1821 | * after that we are free to use the skb->cb array | ||
1822 | * for our information. | ||
1823 | */ | ||
1824 | intf->beacon->skb = skb; | ||
1825 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc, control); | ||
1826 | |||
1827 | /* | ||
1819 | * Fill in skb descriptor | 1828 | * Fill in skb descriptor |
1820 | */ | 1829 | */ |
1821 | skbdesc = get_skb_frame_desc(skb); | 1830 | skbdesc = get_skb_frame_desc(skb); |
@@ -1842,8 +1851,8 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1842 | * Write entire beacon with descriptor to register, | 1851 | * Write entire beacon with descriptor to register, |
1843 | * and kick the beacon generator. | 1852 | * and kick the beacon generator. |
1844 | */ | 1853 | */ |
1845 | rt2x00lib_write_tx_desc(rt2x00dev, skb, control); | ||
1846 | memcpy(priv_tx->data, skb->data, skb->len); | 1854 | memcpy(priv_tx->data, skb->data, skb->len); |
1855 | rt2x00queue_write_tx_descriptor(intf->beacon, &txdesc); | ||
1847 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, QID_BEACON); | 1856 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, QID_BEACON); |
1848 | 1857 | ||
1849 | return 0; | 1858 | return 0; |