aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-04-21 12:59:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-07 15:02:20 -0400
commit2d9ccf842905063f774c28f329ac5ab3a84d3571 (patch)
tree1d1b0df1c2030fd5edea8d3406eef955dfac2657 /drivers/net/wireless/rt2x00
parente40ac414c0130358f9eb068f4993a37f013621be (diff)
rt2x00: Support hardware RTS and CTS-to-self frames
If the driver has set the set_rts_threshold() callback function to mac80211 it is capable of generating RTS and CTS-to-self frames inside the hardware and rt2x00lib doesn't have to create them in software. Only rt2800pci and rt2800usb support this feature. 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')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index c206b5092070..e46d406637f7 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -118,11 +118,16 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
118 * create and queue that frame first. But make sure we have 118 * create and queue that frame first. But make sure we have
119 * at least enough entries available to send this CTS/RTS 119 * at least enough entries available to send this CTS/RTS
120 * frame as well as the data frame. 120 * frame as well as the data frame.
121 * Note that when the driver has set the set_rts_threshold()
122 * callback function it doesn't need software generation of
123 * neither RTS or CTS-to-self frames and handles everything
124 * inside the hardware.
121 */ 125 */
122 frame_control = le16_to_cpu(ieee80211hdr->frame_control); 126 frame_control = le16_to_cpu(ieee80211hdr->frame_control);
123 if (!is_rts_frame(frame_control) && !is_cts_frame(frame_control) && 127 if (!is_rts_frame(frame_control) && !is_cts_frame(frame_control) &&
124 (control->flags & (IEEE80211_TXCTL_USE_RTS_CTS | 128 (control->flags & (IEEE80211_TXCTL_USE_RTS_CTS |
125 IEEE80211_TXCTL_USE_CTS_PROTECT))) { 129 IEEE80211_TXCTL_USE_CTS_PROTECT)) &&
130 !rt2x00dev->ops->hw->set_rts_threshold) {
126 if (rt2x00queue_available(queue) <= 1) { 131 if (rt2x00queue_available(queue) <= 1) {
127 ieee80211_stop_queue(rt2x00dev->hw, control->queue); 132 ieee80211_stop_queue(rt2x00dev->hw, control->queue);
128 return NETDEV_TX_BUSY; 133 return NETDEV_TX_BUSY;