diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-04-09 14:46:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-16 14:53:22 -0400 |
commit | 171afcd4ba093b50cd2fb33fe2371fbc1f7fd389 (patch) | |
tree | 88622a1891176fc1271f3f866ef239d6872dd674 /drivers/net | |
parent | 3a245766901a9dfdc3f53457a7954b369b50f281 (diff) |
rt2x00: Only free skb when beacon_update fails
In rt2x00lib_intf_scheduled_iter() we use the hw->beacon_update()
callback function. This means that it should behave similarly as mac80211
when that uses the function.
This means that the skb should only be freed when beacon_update() has failed,
otherwise the driver is the owner and is responsible for freeing the buffer.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 0361524d193c..f8fe7a139a8a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -433,11 +433,9 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac, | |||
433 | 433 | ||
434 | if (delayed_flags & DELAYED_UPDATE_BEACON) { | 434 | if (delayed_flags & DELAYED_UPDATE_BEACON) { |
435 | skb = ieee80211_beacon_get(rt2x00dev->hw, vif, &control); | 435 | skb = ieee80211_beacon_get(rt2x00dev->hw, vif, &control); |
436 | if (skb) { | 436 | if (skb && rt2x00dev->ops->hw->beacon_update(rt2x00dev->hw, |
437 | rt2x00dev->ops->hw->beacon_update(rt2x00dev->hw, skb, | 437 | skb, &control)) |
438 | &control); | ||
439 | dev_kfree_skb(skb); | 438 | dev_kfree_skb(skb); |
440 | } | ||
441 | } | 439 | } |
442 | 440 | ||
443 | if (delayed_flags & DELAYED_CONFIG_ERP) | 441 | if (delayed_flags & DELAYED_CONFIG_ERP) |