aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2400pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-05-10 07:46:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-21 21:47:34 -0400
commit7050ec821c52826b63835dde54ee3d71c7db4262 (patch)
treef8154413b4ed1e8ff01b6dbb1c79240dcce83dc8 /drivers/net/wireless/rt2x00/rt2400pci.c
parent4de36fe5abe077a4c65bf0b6a309865aa043e055 (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/rt2400pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 2c0cf394c78e..d3d9b189fd83 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1492,6 +1492,7 @@ static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
1492 struct rt2x00_intf *intf = vif_to_intf(control->vif); 1492 struct rt2x00_intf *intf = vif_to_intf(control->vif);
1493 struct queue_entry_priv_pci_tx *priv_tx; 1493 struct queue_entry_priv_pci_tx *priv_tx;
1494 struct skb_frame_desc *skbdesc; 1494 struct skb_frame_desc *skbdesc;
1495 struct txentry_desc txdesc;
1495 u32 reg; 1496 u32 reg;
1496 1497
1497 if (unlikely(!intf->beacon)) 1498 if (unlikely(!intf->beacon))
@@ -1499,6 +1500,14 @@ static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
1499 priv_tx = intf->beacon->priv_data; 1500 priv_tx = intf->beacon->priv_data;
1500 1501
1501 /* 1502 /*
1503 * Copy all TX descriptor information into txdesc,
1504 * after that we are free to use the skb->cb array
1505 * for our information.
1506 */
1507 intf->beacon->skb = skb;
1508 rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc, control);
1509
1510 /*
1502 * Fill in skb descriptor 1511 * Fill in skb descriptor
1503 */ 1512 */
1504 skbdesc = get_skb_frame_desc(skb); 1513 skbdesc = get_skb_frame_desc(skb);
@@ -1525,8 +1534,8 @@ static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
1525 * Write entire beacon with descriptor to register, 1534 * Write entire beacon with descriptor to register,
1526 * and kick the beacon generator. 1535 * and kick the beacon generator.
1527 */ 1536 */
1528 rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
1529 memcpy(priv_tx->data, skb->data, skb->len); 1537 memcpy(priv_tx->data, skb->data, skb->len);
1538 rt2x00queue_write_tx_descriptor(intf->beacon, &txdesc);
1530 rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, QID_BEACON); 1539 rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, QID_BEACON);
1531 1540
1532 return 0; 1541 return 0;