All of lore.kernel.org
 help / color / mirror / Atom feed
* Radiotap injected rates
@ 2013-03-17 21:55 Karl Beldan
  2013-03-18 19:26 ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Karl Beldan @ 2013-03-17 21:55 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless; +Cc: Sam Leffler

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Radiotap injected rates
  2013-03-17 21:55 Radiotap injected rates Karl Beldan
@ 2013-03-18 19:26 ` Johannes Berg
  2013-03-18 19:54   ` Karl Beldan
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2013-03-18 19:26 UTC (permalink / raw)
  To: Karl Beldan; +Cc: linux-wireless, Sam Leffler

On Sun, 2013-03-17 at 22:55 +0100, Karl Beldan wrote:
> 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);

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

johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Radiotap injected rates
  2013-03-18 19:26 ` Johannes Berg
@ 2013-03-18 19:54   ` Karl Beldan
  2013-03-22 12:24     ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Karl Beldan @ 2013-03-18 19:54 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Sam Leffler

On Mon, Mar 18, 2013 at 08:26:08PM +0100, Johannes Berg wrote:
> On Sun, 2013-03-17 at 22:55 +0100, Karl Beldan wrote:
> > 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);
> 
> 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 :

> > +	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[i]))

If that changes anything to what you guessed.

 
Karl

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Radiotap injected rates
  2013-03-18 19:54   ` Karl Beldan
@ 2013-03-22 12:24     ` Johannes Berg
  2013-03-22 13:27       ` Karl Beldan
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2013-03-22 12:24 UTC (permalink / raw)
  To: Karl Beldan; +Cc: linux-wireless, Sam Leffler

On Mon, 2013-03-18 at 20:54 +0100, Karl Beldan wrote:

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

> 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 :
> 
> > > +	    !(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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Radiotap injected rates
  2013-03-22 12:24     ` Johannes Berg
@ 2013-03-22 13:27       ` Karl Beldan
  2013-03-22 13:32         ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Karl Beldan @ 2013-03-22 13:27 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Sam Leffler

On Fri, Mar 22, 2013 at 01:24:54PM +0100, Johannes Berg wrote:
> On Mon, 2013-03-18 at 20:54 +0100, Karl Beldan wrote:
> 
> > > 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 ...
> 
> > And, oops typo, I meant :
> > 
> > +	    !(info->flags & IEEE80211_TX_CTL_INJECTED && info->control.rates[0] != -1))
> > 
1)
> > with info->control.rates[0] properly set in the radiotap header parsing,
> > instead of :
> > 
> > > > +	    !(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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Radiotap injected rates
  2013-03-22 13:27       ` Karl Beldan
@ 2013-03-22 13:32         ` Johannes Berg
  2013-03-22 13:53           ` Karl Beldan
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2013-03-22 13:32 UTC (permalink / raw)
  To: Karl Beldan; +Cc: linux-wireless, Sam Leffler

On Fri, 2013-03-22 at 14:27 +0100, Karl Beldan wrote:

> > > And, oops typo, I meant :
> > > 
> > > +	    !(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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Radiotap injected rates
  2013-03-22 13:32         ` Johannes Berg
@ 2013-03-22 13:53           ` Karl Beldan
  2013-03-22 14:00             ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Karl Beldan @ 2013-03-22 13:53 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Sam Leffler

On Fri, Mar 22, 2013 at 02:32:05PM +0100, Johannes Berg wrote:
> On Fri, 2013-03-22 at 14:27 +0100, Karl Beldan wrote:
> 
> > > > And, oops typo, I meant :
> > > > 
> > > > +	    !(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.
> 
The only path I could see setting IEEE80211_TX_CTL_INJECTED seems
ieee80211_monitor_start_xmit, am I missing another one ?
 
Karl

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Radiotap injected rates
  2013-03-22 13:53           ` Karl Beldan
@ 2013-03-22 14:00             ` Johannes Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2013-03-22 14:00 UTC (permalink / raw)
  To: Karl Beldan; +Cc: linux-wireless, Sam Leffler

On Fri, 2013-03-22 at 14:53 +0100, Karl Beldan wrote:
> On Fri, Mar 22, 2013 at 02:32:05PM +0100, Johannes Berg wrote:
> > On Fri, 2013-03-22 at 14:27 +0100, Karl Beldan wrote:
> > 
> > > > > And, oops typo, I meant :
> > > > > 
> > > > > +	    !(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.
> > 
> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-03-22 14:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-17 21:55 Radiotap injected rates Karl Beldan
2013-03-18 19:26 ` Johannes Berg
2013-03-18 19:54   ` Karl Beldan
2013-03-22 12:24     ` Johannes Berg
2013-03-22 13:27       ` Karl Beldan
2013-03-22 13:32         ` Johannes Berg
2013-03-22 13:53           ` Karl Beldan
2013-03-22 14:00             ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.