mac80211: Handle zero RTS threshold
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."
Signed-off-by Sujith Manoharan <[email protected]>
--- net/mac80211/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/mac80211/tx.c +2 -1
@@ -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
Johannes Berg
maintainerQuoted 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
Quoted 2 lines · Johannes Berg
Maybe we should set it to
0xffffffffin cfg80211 to make it simpler for drivers?
The patch is broken, please disregard it.
Sujith