linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: [PATCH 1/9] rt2x00: Support hardware RTS and CTS-to-self frames
Date: Mon, 21 Apr 2008 18:59:48 +0200	[thread overview]
Message-ID: <200804211859.48443.IvDoorn@gmail.com> (raw)
In-Reply-To: <200804211858.46659.IvDoorn@gmail.com>

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>
---
 drivers/net/wireless/rt2x00/rt2x00mac.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index c206b50..e46d406 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,
 	 * create and queue that frame first. But make sure we have
 	 * at least enough entries available to send this CTS/RTS
 	 * frame as well as the data frame.
+	 * Note that when the driver has set the set_rts_threshold()
+	 * callback function it doesn't need software generation of
+	 * neither RTS or CTS-to-self frames and handles everything
+	 * inside the hardware.
 	 */
 	frame_control = le16_to_cpu(ieee80211hdr->frame_control);
 	if (!is_rts_frame(frame_control) && !is_cts_frame(frame_control) &&
 	    (control->flags & (IEEE80211_TXCTL_USE_RTS_CTS |
-			       IEEE80211_TXCTL_USE_CTS_PROTECT))) {
+			       IEEE80211_TXCTL_USE_CTS_PROTECT)) &&
+	    !rt2x00dev->ops->hw->set_rts_threshold) {
 		if (rt2x00queue_available(queue) <= 1) {
 			ieee80211_stop_queue(rt2x00dev->hw, control->queue);
 			return NETDEV_TX_BUSY;
-- 
1.5.4.5


       reply	other threads:[~2008-04-21 16:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200804211858.46659.IvDoorn@gmail.com>
2008-04-21 16:59 ` Ivo van Doorn [this message]
2008-04-21 16:59 ` [PATCH 2/9] rt2x00: Remove DRIVER_SUPPORT_MIXED_INTERFACES Ivo van Doorn
2008-04-21 17:00 ` [PATCH 3/9] rt2x00: Don't enable short preamble for 1MBs Ivo van Doorn
2008-04-21 17:00 ` [PATCH 4/9] rt2x00: Use rt2x00 queue numbering Ivo van Doorn
2008-04-21 17:17   ` Johannes Berg
2008-04-21 17:30     ` Ivo van Doorn
2008-04-21 17:58       ` Ivo van Doorn
2008-04-21 17:56         ` Johannes Berg
2008-04-21 21:40           ` Ivo van Doorn
2008-04-21 17:01 ` [PATCH 5/9] rt2x00: Fix quality/activity led handling Ivo van Doorn
2008-04-21 17:01 ` [PATCH 6/9] rt2x00: Clarify supported chipsets in Kconfig Ivo van Doorn
2008-04-21 17:01 ` [PATCH 7/9] rt2x00: Add helper macros Ivo van Doorn
2008-04-21 17:02 ` [PATCH 8/9] rt2x00: Fix kernel-doc Ivo van Doorn
2008-04-21 17:02 ` [PATCH 9/9] rt2x00: Release rt2x00 2.1.5 Ivo van Doorn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200804211859.48443.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rt2400-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).