Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79379
b: refs/heads/master
c: 1230cb8
h: refs/heads/master
i:
  79377: 2372189
  79375: 4e4ebe2
v: v3
  • Loading branch information
Ivo van Doorn authored and David S. Miller committed Jan 28, 2008
1 parent d8068c0 commit fe205ba
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e34c6dcb36bbd5294cae2654c32e24b9787da3a
refs/heads/master: 1230cb83f46731ca4eaa57c480788ed3c9d05935
17 changes: 13 additions & 4 deletions trunk/drivers/net/wireless/rt2x00/rt2x00mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
*/
if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) {
ieee80211_stop_queues(hw);
return 0;
return NETDEV_TX_OK;
}

/*
Expand All @@ -110,15 +110,24 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
if (!is_rts_frame(frame_control) && !is_cts_frame(frame_control) &&
(control->flags & (IEEE80211_TXCTL_USE_RTS_CTS |
IEEE80211_TXCTL_USE_CTS_PROTECT))) {
if (rt2x00_ring_free(ring) <= 1)
if (rt2x00_ring_free(ring) <= 1) {
ieee80211_stop_queue(rt2x00dev->hw, control->queue);
return NETDEV_TX_BUSY;
}

if (rt2x00mac_tx_rts_cts(rt2x00dev, ring, skb, control))
if (rt2x00mac_tx_rts_cts(rt2x00dev, ring, skb, control)) {
ieee80211_stop_queue(rt2x00dev->hw, control->queue);
return NETDEV_TX_BUSY;
}
}

if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, ring, skb, control))
if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, ring, skb, control)) {
ieee80211_stop_queue(rt2x00dev->hw, control->queue);
return NETDEV_TX_BUSY;
}

if (rt2x00_ring_full(ring))
ieee80211_stop_queue(rt2x00dev->hw, control->queue);

if (rt2x00dev->ops->lib->kick_tx_queue)
rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, control->queue);
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/net/wireless/rt2x00/rt2x00pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
struct skb_desc *desc;
u32 word;

if (rt2x00_ring_full(ring)) {
ieee80211_stop_queue(rt2x00dev->hw, control->queue);
if (rt2x00_ring_full(ring))
return -EINVAL;
}

rt2x00_desc_read(txd, 0, &word);

Expand All @@ -99,7 +97,6 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
"Arrived at non-free entry in the non-full queue %d.\n"
"Please file bug report to %s.\n",
control->queue, DRV_PROJECT);
ieee80211_stop_queue(rt2x00dev->hw, control->queue);
return -EINVAL;
}

Expand All @@ -119,9 +116,6 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,

rt2x00_ring_index_inc(ring);

if (rt2x00_ring_full(ring))
ieee80211_stop_queue(rt2x00dev->hw, control->queue);

return 0;
}
EXPORT_SYMBOL_GPL(rt2x00pci_write_tx_data);
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/net/wireless/rt2x00/rt2x00usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,14 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
struct skb_desc *desc;
u32 length;

if (rt2x00_ring_full(ring)) {
ieee80211_stop_queue(rt2x00dev->hw, control->queue);
if (rt2x00_ring_full(ring))
return -EINVAL;
}

if (test_bit(ENTRY_OWNER_NIC, &entry->flags)) {
ERROR(rt2x00dev,
"Arrived at non-free entry in the non-full queue %d.\n"
"Please file bug report to %s.\n",
control->queue, DRV_PROJECT);
ieee80211_stop_queue(rt2x00dev->hw, control->queue);
return -EINVAL;
}

Expand Down Expand Up @@ -229,9 +226,6 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,

rt2x00_ring_index_inc(ring);

if (rt2x00_ring_full(ring))
ieee80211_stop_queue(rt2x00dev->hw, control->queue);

return 0;
}
EXPORT_SYMBOL_GPL(rt2x00usb_write_tx_data);
Expand Down

0 comments on commit fe205ba

Please sign in to comment.