diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-11-11 18:01:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-25 16:32:54 -0500 |
commit | 0e3de99846489424c2cba952e0a52c269f01009a (patch) | |
tree | 2af7bc7b61f28e9defae8b5886a959060affb357 /drivers/net/wireless/rt2x00/rt2x00mac.c | |
parent | 0f829b1d6f499447052f98098e41fd6a091eadd0 (diff) |
rt2x00: Fix TX failure path
The callback function write_tx_data() can only fail
when our ENTRY_OWNER_DEVICE_DATA flag on a queue entry
failed to determine the entry was not available and
it is in fact still owned by the hardware.
This means that if that function fails the queue
must be stopped in mac80211.
When rt2x00queue_get_queue() returns NULL in the TX
path, it means mac80211 has passed us an invalid queue,
although this should be impossible, it shouldn't hurt
if we send mac80211 a signal to stop the queue either.
Both issues can simply be resolved by removing their
manual failure handler and making them use the failure path
provided in rt2x00mac_tx().
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/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 48636b0dd895..4c0395729066 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -132,8 +132,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
132 | ERROR(rt2x00dev, | 132 | ERROR(rt2x00dev, |
133 | "Attempt to send packet over invalid queue %d.\n" | 133 | "Attempt to send packet over invalid queue %d.\n" |
134 | "Please file bug report to %s.\n", qid, DRV_PROJECT); | 134 | "Please file bug report to %s.\n", qid, DRV_PROJECT); |
135 | dev_kfree_skb_any(skb); | 135 | goto exit_fail; |
136 | return NETDEV_TX_OK; | ||
137 | } | 136 | } |
138 | 137 | ||
139 | /* | 138 | /* |