Linux wireless drivers development
 help / color / mirror / Atom feed
From: Sujith Manoharan <sujith@msujith.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] mac80211: Handle zero RTS threshold
Date: Fri,  5 Jul 2013 11:15:43 +0530	[thread overview]
Message-ID: <1373003143-29211-1-git-send-email-sujith@msujith.org> (raw)

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

The spec says:

"Setting this attribute to 0 has the effect of turning on the RTS/CTS
handshake for all frames of Data or Management type transmitted by this
STA."

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 net/mac80211/tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4105d0c..50c7309 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -651,7 +651,8 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
 		    tx->sdata->vif.type == NL80211_IFTYPE_ADHOC);
 
 	/* set up RTS protection if desired */
-	if (len > tx->local->hw.wiphy->rts_threshold) {
+	if (!tx->local->hw.wiphy->rts_threshold ||
+	    (len > tx->local->hw.wiphy->rts_threshold)) {
 		txrc.rts = true;
 	}
 
-- 
1.8.3.2


             reply	other threads:[~2013-07-05  5:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-05  5:45 Sujith Manoharan [this message]
2013-07-05  7:15 ` [PATCH] mac80211: Handle zero RTS threshold Johannes Berg
2013-07-05  8:51   ` Sujith Manoharan

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=1373003143-29211-1-git-send-email-sujith@msujith.org \
    --to=sujith@msujith.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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