aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-05-15 06:55:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-21 21:48:11 -0400
commite039fa4a4195ac4ee895e6f3d1334beed63256fe (patch)
treecfd0762d73df96b73052378be7b157c4ac6e7035 /drivers/net/wireless/b43legacy/main.c
parente24549485f859be6518929bb1c9c0257d79f033d (diff)
mac80211: move TX info into skb->cb
This patch converts mac80211 and all drivers to have transmit information and status in skb->cb rather than allocating extra memory for it and copying all the data around. To make it fit, a union is used where only data that is necessary for all steps is kept outside of the union. A number of fixes were done by Ivo, as well as the rt2x00 part of this patch. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy/main.c')
-rw-r--r--drivers/net/wireless/b43legacy/main.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index b05a507ed44d..f706ca65f159 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2358,8 +2358,7 @@ static int b43legacy_rng_init(struct b43legacy_wl *wl)
2358} 2358}
2359 2359
2360static int b43legacy_op_tx(struct ieee80211_hw *hw, 2360static int b43legacy_op_tx(struct ieee80211_hw *hw,
2361 struct sk_buff *skb, 2361 struct sk_buff *skb)
2362 struct ieee80211_tx_control *ctl)
2363{ 2362{
2364 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); 2363 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
2365 struct b43legacy_wldev *dev = wl->current_dev; 2364 struct b43legacy_wldev *dev = wl->current_dev;
@@ -2373,10 +2372,10 @@ static int b43legacy_op_tx(struct ieee80211_hw *hw,
2373 /* DMA-TX is done without a global lock. */ 2372 /* DMA-TX is done without a global lock. */
2374 if (b43legacy_using_pio(dev)) { 2373 if (b43legacy_using_pio(dev)) {
2375 spin_lock_irqsave(&wl->irq_lock, flags); 2374 spin_lock_irqsave(&wl->irq_lock, flags);
2376 err = b43legacy_pio_tx(dev, skb, ctl); 2375 err = b43legacy_pio_tx(dev, skb);
2377 spin_unlock_irqrestore(&wl->irq_lock, flags); 2376 spin_unlock_irqrestore(&wl->irq_lock, flags);
2378 } else 2377 } else
2379 err = b43legacy_dma_tx(dev, skb, ctl); 2378 err = b43legacy_dma_tx(dev, skb);
2380out: 2379out:
2381 if (unlikely(err)) 2380 if (unlikely(err))
2382 return NETDEV_TX_BUSY; 2381 return NETDEV_TX_BUSY;
@@ -3409,7 +3408,7 @@ static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw,
3409 * field, but that would probably require resizing and moving of data 3408 * field, but that would probably require resizing and moving of data
3410 * within the beacon template. Simply request a new beacon and let 3409 * within the beacon template. Simply request a new beacon and let
3411 * mac80211 do the hard work. */ 3410 * mac80211 do the hard work. */
3412 beacon = ieee80211_beacon_get(hw, wl->vif, NULL); 3411 beacon = ieee80211_beacon_get(hw, wl->vif);
3413 if (unlikely(!beacon)) 3412 if (unlikely(!beacon))
3414 return -ENOMEM; 3413 return -ENOMEM;
3415 spin_lock_irqsave(&wl->irq_lock, flags); 3414 spin_lock_irqsave(&wl->irq_lock, flags);
@@ -3420,8 +3419,7 @@ static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw,
3420} 3419}
3421 3420
3422static int b43legacy_op_ibss_beacon_update(struct ieee80211_hw *hw, 3421static int b43legacy_op_ibss_beacon_update(struct ieee80211_hw *hw,
3423 struct sk_buff *beacon, 3422 struct sk_buff *beacon)
3424 struct ieee80211_tx_control *ctl)
3425{ 3423{
3426 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); 3424 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
3427 unsigned long flags; 3425 unsigned long flags;