diff options
author | Ivo van Doorn <IvDoorn@gmail.com> | 2008-01-24 04:56:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:05:07 -0500 |
commit | 08992f7fb139c7dbaf593402312ee5a055352f05 (patch) | |
tree | cfa1459e4940cf493438a3db950b5339dae4ca88 /drivers/net/wireless/rt2x00/rt61pci.c | |
parent | 22c96c28b47ce74d78aad1afbed88b26f43ce24b (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/rt61pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 52622d32ea4c..0693b3920e68 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2408,6 +2408,9 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2408 | struct ieee80211_tx_control *control) | 2408 | struct ieee80211_tx_control *control) |
2409 | { | 2409 | { |
2410 | struct rt2x00_dev *rt2x00dev = hw->priv; | 2410 | struct rt2x00_dev *rt2x00dev = hw->priv; |
2411 | struct skb_desc *desc; | ||
2412 | struct data_ring *ring; | ||
2413 | struct data_entry *entry; | ||
2411 | 2414 | ||
2412 | /* | 2415 | /* |
2413 | * Just in case the ieee80211 doesn't set this, | 2416 | * Just in case the ieee80211 doesn't set this, |
@@ -2415,6 +2418,8 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2415 | * initialization. | 2418 | * initialization. |
2416 | */ | 2419 | */ |
2417 | control->queue = IEEE80211_TX_QUEUE_BEACON; | 2420 | control->queue = IEEE80211_TX_QUEUE_BEACON; |
2421 | ring = rt2x00lib_get_ring(rt2x00dev, control->queue); | ||
2422 | entry = rt2x00_get_data_entry(ring); | ||
2418 | 2423 | ||
2419 | /* | 2424 | /* |
2420 | * We need to append the descriptor in front of the | 2425 | * We need to append the descriptor in front of the |
@@ -2428,15 +2433,23 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2428 | } | 2433 | } |
2429 | 2434 | ||
2430 | /* | 2435 | /* |
2431 | * First we create the beacon. | 2436 | * Add the descriptor in front of the skb. |
2437 | */ | ||
2438 | skb_push(skb, ring->desc_size); | ||
2439 | memset(skb->data, 0, ring->desc_size); | ||
2440 | |||
2441 | /* | ||
2442 | * Fill in skb descriptor | ||
2432 | */ | 2443 | */ |
2433 | skb_push(skb, TXD_DESC_SIZE); | 2444 | desc = get_skb_desc(skb); |
2434 | memset(skb->data, 0, TXD_DESC_SIZE); | 2445 | desc->desc_len = ring->desc_size; |
2446 | desc->data_len = skb->len - ring->desc_size; | ||
2447 | desc->desc = skb->data; | ||
2448 | desc->data = skb->data + ring->desc_size; | ||
2449 | desc->ring = ring; | ||
2450 | desc->entry = entry; | ||
2435 | 2451 | ||
2436 | rt2x00lib_write_tx_desc(rt2x00dev, (__le32 *)skb->data, | 2452 | rt2x00lib_write_tx_desc(rt2x00dev, skb, control); |
2437 | (struct ieee80211_hdr *)(skb->data + | ||
2438 | TXD_DESC_SIZE), | ||
2439 | skb->len - TXD_DESC_SIZE, control); | ||
2440 | 2453 | ||
2441 | /* | 2454 | /* |
2442 | * Write entire beacon with descriptor to register, | 2455 | * Write entire beacon with descriptor to register, |