Skip to contentSkip to conversation

mac80211: Handle zero RTS threshold

PATCH In review Sujith Manoharan 2 participants 3 messages Jul 5, 2013 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Handle zero RTS threshold

From: Sujith Manoharan <[email protected]>

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."

---
 net/mac80211/tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/mac80211/tx.c +2 -1
index 4105d0c..50c7309 100644
@@ -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;
 	}
 
Signature · 1 line
1.8.3.2
maintainer
#1 lore raw
Quoted 7 lines · Sujith Manoharan

From: Sujith Manoharan <[email protected]>

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."

Maybe we should set it to 0xffffffff in cfg80211 to make it simpler for drivers?

johannes

#2 lore raw
Quoted 2 lines · Johannes Berg

Maybe we should set it to 0xffffffff in cfg80211 to make it simpler for drivers?

The patch is broken, please disregard it.

Sujith