Skip to contentSkip to conversation

Radiotap injected rates

DISCUSSION Karl Beldan 2 participants 8 messages Mar 17, 2013 – Mar 22, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

Some time ago the rate selection for radiotap injected frames did not make it essentially for mac80211 getting short in IEEE80211_TX_CTL_*s.

Would it be acceptable to replace the originally proposed:

- if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL))
+ if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) &&
+ !(info->flags & IEEE80211_TX_CTL_NO_RC))
CALL_TXH(ieee80211_tx_h_rate_ctrl);

with something like :

- if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL))
+ if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) &&
+ !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[i]))

		CALL_TXH(ieee80211_tx_h_rate_ctrl);

?

Karl

#1 lore raw
Quoted 18 lines · Karl Beldan

Hi,

Some time ago the rate selection for radiotap injected frames did not make it essentially for mac80211 getting short in IEEE80211_TX_CTL_*s.

Would it be acceptable to replace the originally proposed:

(quoted diff) +2 -1
-	if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL))
+	if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) &&
+	    !(info->flags & IEEE80211_TX_CTL_NO_RC))
 		CALL_TXH(ieee80211_tx_h_rate_ctrl);

with something like :

(quoted diff) +2 -1
-	if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL))
+	if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) &&
+	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[i]))
Quoted 1 line
		CALL_TXH(ieee80211_tx_h_rate_ctrl);

No, older wpa_supplicant/hostapd still use monitor interfaces for management frame transmissions, and require rate control.

johannes

#2 lore raw
Quoted 16 lines · Johannes Berg
Quoted 15 lines · Karl Beldan

Hi,

Some time ago the rate selection for radiotap injected frames did not make it essentially for mac80211 getting short in IEEE80211_TX_CTL_*s.

Would it be acceptable to replace the originally proposed:

(quoted diff) +2 -1
-	if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL))
+	if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) &&
+	    !(info->flags & IEEE80211_TX_CTL_NO_RC))
 		CALL_TXH(ieee80211_tx_h_rate_ctrl);

with something like :

Quoted 8 lines
Quoted 4 lines
(quoted diff) +2 -1
-	if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL))
+	if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) &&
+	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[i]))
		CALL_TXH(ieee80211_tx_h_rate_ctrl);

No, older wpa_supplicant/hostapd still use monitor interfaces for management frame transmissions, and require rate control.

Since they require rate control, I guess they don't pass any radiotap IEEE80211_RADIOTAP_{RATE,MCS} ? In that case that wouldn't disturb them.

And, oops typo, I meant :

+ !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[0] != -1))

with info->control.rates[0] properly set in the radiotap header parsing, instead of :

Quoted 1 line

Review

Quoted 1 line
(quoted diff) +1 -0
+	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[i]))

If that changes anything to what you guessed.

Karl

#3 lore raw
Quoted 6 lines · Karl Beldan
Quoted 3 lines

No, older wpa_supplicant/hostapd still use monitor interfaces for management frame transmissions, and require rate control.

Since they require rate control, I guess they don't pass any radiotap IEEE80211_RADIOTAP_{RATE,MCS} ? In that case that wouldn't disturb them.

Yeah, indeed, I wasn't looking right ...

Quoted 10 lines

And, oops typo, I meant :

(quoted diff) +1 -0
+	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[0] != -1))

with info->control.rates[0] properly set in the radiotap header parsing, instead of :

Quoted 1 line

Review

Quoted 1 line
(quoted diff) +1 -0
+	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[i]))

If that changes anything to what you guessed.

Well actually this won't work anyway because control.rates[] isn't initialized to -1.

johannes

#4 lore raw
Quoted 9 lines · Johannes Berg
Quoted 6 lines · Karl Beldan
Quoted 3 lines

No, older wpa_supplicant/hostapd still use monitor interfaces for management frame transmissions, and require rate control.

Since they require rate control, I guess they don't pass any radiotap IEEE80211_RADIOTAP_{RATE,MCS} ? In that case that wouldn't disturb them.

Quoted 6 lines

Yeah, indeed, I wasn't looking right ...

Review

Quoted 4 lines

And, oops typo, I meant :

(quoted diff) +1 -0
+	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[0] != -1))

1)

Quoted 10 lines
Quoted 6 lines

with info->control.rates[0] properly set in the radiotap header parsing, instead of :

Quoted 1 line

Review

Quoted 1 line
(quoted diff) +1 -0
+	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[i]))

If that changes anything to what you guessed.

Well actually this won't work anyway because control.rates[] isn't initialized to -1.

Of course we would set info->control.rates[0] to -1 by default in ieee80211_parse_tx_radiotap and set it to something else if we parse a IEEE80211_RADIOTAP_{RATE,MCS} (i.e what I was referring to in 1b).

Karl

#5 lore raw
Quoted 10 lines · Karl Beldan
Quoted 7 lines

Review

Quoted 4 lines

And, oops typo, I meant :

(quoted diff) +1 -0
+	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[0] != -1))

Well actually this won't work anyway because control.rates[] isn't initialized to -1.

Of course we would set info->control.rates[0] to -1 by default in ieee80211_parse_tx_radiotap and set it to something else if we parse a IEEE80211_RADIOTAP_{RATE,MCS} (i.e what I was referring to in 1b).

That still wouldn't work though, there are other paths leading to point you're looking at. You'd have to set it always, which would probably work but is tricky to ensure at the right points.

johannes

#6 lore raw
Quoted 9 lines · Johannes Berg
Quoted 7 lines · Karl Beldan
Quoted 7 lines

Review

Quoted 4 lines

And, oops typo, I meant :

(quoted diff) +1 -0
+	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[0] != -1))

Well actually this won't work anyway because control.rates[] isn't initialized to -1.

Quoted 8 lines
Quoted 3 lines

Of course we would set info->control.rates[0] to -1 by default in ieee80211_parse_tx_radiotap and set it to something else if we parse a IEEE80211_RADIOTAP_{RATE,MCS} (i.e what I was referring to in 1b).

That still wouldn't work though, there are other paths leading to point you're looking at. You'd have to set it always, which would probably work but is tricky to ensure at the right points.

The only path I could see setting IEEE80211_TX_CTL_INJECTED seems ieee80211_monitor_start_xmit, am I missing another one ?

Karl

#7 lore raw
Quoted 14 lines · Karl Beldan
Quoted 13 lines · Johannes Berg
Quoted 10 lines · Karl Beldan
Quoted 7 lines

Review

Quoted 4 lines

And, oops typo, I meant :

(quoted diff) +1 -0
+	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[0] != -1))

Well actually this won't work anyway because control.rates[] isn't initialized to -1.

Of course we would set info->control.rates[0] to -1 by default in ieee80211_parse_tx_radiotap and set it to something else if we parse a IEEE80211_RADIOTAP_{RATE,MCS} (i.e what I was referring to in 1b).

Quoted 6 lines
Quoted 4 lines

That still wouldn't work though, there are other paths leading to point you're looking at. You'd have to set it always, which would probably work but is tricky to ensure at the right points.

The only path I could see setting IEEE80211_TX_CTL_INJECTED seems ieee80211_monitor_start_xmit, am I missing another one ?

No, I guess not, I'm probably not paying enough attention here ...

johannes