* [PATCH v2 0/2] add VHT radiotap parsing support to mac80211
@ 2016-02-19 10:43 Lorenzo Bianconi
2016-02-19 10:43 ` [PATCH v2 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes Lorenzo Bianconi
2016-02-19 10:43 ` [PATCH v2 2/2] mac80211: parse VHT info in injected frames Lorenzo Bianconi
0 siblings, 2 replies; 9+ messages in thread
From: Lorenzo Bianconi @ 2016-02-19 10:43 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
Changelog:
v2:
- added cfg80211 patch to the patchset
Lorenzo Bianconi (2):
cfg80211: add radiotap VHT info to rtap_namespace_sizes
mac80211: parse VHT info in injected frames
Documentation/networking/mac80211-injection.txt | 10 ++++++++
net/mac80211/tx.c | 31 +++++++++++++++++++++++++
net/wireless/radiotap.c | 1 +
3 files changed, 42 insertions(+)
--
2.5.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes
2016-02-19 10:43 [PATCH v2 0/2] add VHT radiotap parsing support to mac80211 Lorenzo Bianconi
@ 2016-02-19 10:43 ` Lorenzo Bianconi
2016-02-23 10:18 ` Johannes Berg
2016-02-19 10:43 ` [PATCH v2 2/2] mac80211: parse VHT info in injected frames Lorenzo Bianconi
1 sibling, 1 reply; 9+ messages in thread
From: Lorenzo Bianconi @ 2016-02-19 10:43 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
Add IEEE80211_RADIOTAP_VHT entry to rtap_namespace_sizes array in order to
define alignment and size of VHT info in tx radiotap
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
---
net/wireless/radiotap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/wireless/radiotap.c b/net/wireless/radiotap.c
index 722da61..6582d15 100644
--- a/net/wireless/radiotap.c
+++ b/net/wireless/radiotap.c
@@ -43,6 +43,7 @@ static const struct radiotap_align_size rtap_namespace_sizes[] = {
[IEEE80211_RADIOTAP_DATA_RETRIES] = { .align = 1, .size = 1, },
[IEEE80211_RADIOTAP_MCS] = { .align = 1, .size = 3, },
[IEEE80211_RADIOTAP_AMPDU_STATUS] = { .align = 4, .size = 8, },
+ [IEEE80211_RADIOTAP_VHT] = { .align = 2, .size = 12, },
/*
* add more here as they are defined in radiotap.h
*/
--
2.5.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] mac80211: parse VHT info in injected frames
2016-02-19 10:43 [PATCH v2 0/2] add VHT radiotap parsing support to mac80211 Lorenzo Bianconi
2016-02-19 10:43 ` [PATCH v2 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes Lorenzo Bianconi
@ 2016-02-19 10:43 ` Lorenzo Bianconi
2016-02-23 10:10 ` Johannes Berg
1 sibling, 1 reply; 9+ messages in thread
From: Lorenzo Bianconi @ 2016-02-19 10:43 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap().
That capability has been tested using a d-link dir-860l rev b1 running
OpenWrt trunk and mt76 driver
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
---
Documentation/networking/mac80211-injection.txt | 10 ++++++++
net/mac80211/tx.c | 31 +++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/Documentation/networking/mac80211-injection.txt b/Documentation/networking/mac80211-injection.txt
index ec8f934..ef57cc0 100644
--- a/Documentation/networking/mac80211-injection.txt
+++ b/Documentation/networking/mac80211-injection.txt
@@ -45,6 +45,16 @@ radiotap headers and used to control injection:
number of retries when either IEEE80211_RADIOTAP_RATE or
IEEE80211_RADIOTAP_MCS was used
+ * IEEE80211_RADIOTAP_VHT
+
+ VHT rate for the transmission (only for devices without own rate control).
+ Also some flags are parsed
+
+ IEEE80211_TX_RC_SHORT_GI: use short guard interval
+ IEEE80211_TX_RC_40_MHZ_WIDTH: send in HT40 mode
+ IEEE80211_TX_RC_80_MHZ_WIDTH: send in HT80 mode
+ IEEE80211_TX_RC_160_MHZ_WIDTH: send in HT160 mode
+
The injection code can also skip all other currently defined radiotap fields
facilitating replay of captured radiotap headers directly.
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 7bb67fa..17db889 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1692,6 +1692,8 @@ static bool ieee80211_parse_tx_radiotap(struct ieee80211_local *local,
u8 rate_retries = 0;
u16 rate_flags = 0;
u8 mcs_known, mcs_flags;
+ u16 vht_known;
+ u8 vht_mcs = 0, vht_nss = 0;
int i;
info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
@@ -1772,6 +1774,32 @@ static bool ieee80211_parse_tx_radiotap(struct ieee80211_local *local,
rate_flags |= IEEE80211_TX_RC_40_MHZ_WIDTH;
break;
+ case IEEE80211_RADIOTAP_VHT:
+ vht_known = get_unaligned_le16(iterator.this_arg);
+ rate_found = true;
+
+ rate_flags = IEEE80211_TX_RC_VHT_MCS;
+ if ((vht_known & IEEE80211_RADIOTAP_VHT_KNOWN_GI) &&
+ (iterator.this_arg[2] &
+ IEEE80211_RADIOTAP_VHT_FLAG_SGI))
+ rate_flags |= IEEE80211_TX_RC_SHORT_GI;
+ if (vht_known &
+ IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH) {
+ if (iterator.this_arg[3] == 1)
+ rate_flags |=
+ IEEE80211_TX_RC_40_MHZ_WIDTH;
+ else if (iterator.this_arg[3] == 4)
+ rate_flags |=
+ IEEE80211_TX_RC_80_MHZ_WIDTH;
+ else if (iterator.this_arg[3] == 11)
+ rate_flags |=
+ IEEE80211_TX_RC_160_MHZ_WIDTH;
+ }
+
+ vht_mcs = iterator.this_arg[4] >> 4;
+ vht_nss = iterator.this_arg[4] & 0xF;
+ break;
+
/*
* Please update the file
* Documentation/networking/mac80211-injection.txt
@@ -1797,6 +1825,9 @@ static bool ieee80211_parse_tx_radiotap(struct ieee80211_local *local,
if (rate_flags & IEEE80211_TX_RC_MCS) {
info->control.rates[0].idx = rate;
+ } else if (rate_flags & IEEE80211_TX_RC_VHT_MCS) {
+ ieee80211_rate_set_vht(info->control.rates, vht_mcs,
+ vht_nss);
} else {
for (i = 0; i < sband->n_bitrates; i++) {
if (rate * 5 != sband->bitrates[i].bitrate)
--
2.5.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] mac80211: parse VHT info in injected frames
2016-02-19 10:43 ` [PATCH v2 2/2] mac80211: parse VHT info in injected frames Lorenzo Bianconi
@ 2016-02-23 10:10 ` Johannes Berg
2016-02-23 10:29 ` Lorenzo Bianconi
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2016-02-23 10:10 UTC (permalink / raw)
To: Lorenzo Bianconi, linux-wireless
On Fri, 2016-02-19 at 11:43 +0100, Lorenzo Bianconi wrote:
> Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap().
> That capability has been tested using a d-link dir-860l rev b1
> running
> OpenWrt trunk and mt76 driver
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
> ---
> Documentation/networking/mac80211-injection.txt | 10 ++++++++
> net/mac80211/tx.c | 31
> +++++++++++++++++++++++++
> 2 files changed, 41 insertions(+)
>
> diff --git a/Documentation/networking/mac80211-injection.txt
> b/Documentation/networking/mac80211-injection.txt
> index ec8f934..ef57cc0 100644
> --- a/Documentation/networking/mac80211-injection.txt
> +++ b/Documentation/networking/mac80211-injection.txt
> @@ -45,6 +45,16 @@ radiotap headers and used to control injection:
> number of retries when either IEEE80211_RADIOTAP_RATE or
> IEEE80211_RADIOTAP_MCS was used
>
> + * IEEE80211_RADIOTAP_VHT
> +
> + VHT rate for the transmission (only for devices without own rate
> control).
> + Also some flags are parsed
> +
> + IEEE80211_TX_RC_SHORT_GI: use short guard interval
> + IEEE80211_TX_RC_40_MHZ_WIDTH: send in HT40 mode
> + IEEE80211_TX_RC_80_MHZ_WIDTH: send in HT80 mode
> + IEEE80211_TX_RC_160_MHZ_WIDTH: send in HT160 mode
>
This makes no sense, those are mac80211 internal flags, should document
the radiotap flags here, not what they map to internally.
johannes
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes
2016-02-19 10:43 ` [PATCH v2 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes Lorenzo Bianconi
@ 2016-02-23 10:18 ` Johannes Berg
0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2016-02-23 10:18 UTC (permalink / raw)
To: Lorenzo Bianconi, linux-wireless
On Fri, 2016-02-19 at 11:43 +0100, Lorenzo Bianconi wrote:
> Add IEEE80211_RADIOTAP_VHT entry to rtap_namespace_sizes array in
> order to
> define alignment and size of VHT info in tx radiotap
>
Applied this though.
johannes
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] mac80211: parse VHT info in injected frames
2016-02-23 10:10 ` Johannes Berg
@ 2016-02-23 10:29 ` Lorenzo Bianconi
2016-02-23 10:42 ` Johannes Berg
0 siblings, 1 reply; 9+ messages in thread
From: Lorenzo Bianconi @ 2016-02-23 10:29 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
I used the previous commit scheme (mac80211: Parse legacy and HT rate
in injected frames).
I will rewrite the documentation. Should I send v3 or a different patch?
Regards,
Lorenzo
On Tue, Feb 23, 2016 at 11:10 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Fri, 2016-02-19 at 11:43 +0100, Lorenzo Bianconi wrote:
>> Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap().
>> That capability has been tested using a d-link dir-860l rev b1
>> running
>> OpenWrt trunk and mt76 driver
>>
>> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
>> ---
>> Documentation/networking/mac80211-injection.txt | 10 ++++++++
>> net/mac80211/tx.c | 31
>> +++++++++++++++++++++++++
>> 2 files changed, 41 insertions(+)
>>
>> diff --git a/Documentation/networking/mac80211-injection.txt
>> b/Documentation/networking/mac80211-injection.txt
>> index ec8f934..ef57cc0 100644
>> --- a/Documentation/networking/mac80211-injection.txt
>> +++ b/Documentation/networking/mac80211-injection.txt
>> @@ -45,6 +45,16 @@ radiotap headers and used to control injection:
>> number of retries when either IEEE80211_RADIOTAP_RATE or
>> IEEE80211_RADIOTAP_MCS was used
>>
>> + * IEEE80211_RADIOTAP_VHT
>> +
>> + VHT rate for the transmission (only for devices without own rate
>> control).
>> + Also some flags are parsed
>> +
>> + IEEE80211_TX_RC_SHORT_GI: use short guard interval
>> + IEEE80211_TX_RC_40_MHZ_WIDTH: send in HT40 mode
>> + IEEE80211_TX_RC_80_MHZ_WIDTH: send in HT80 mode
>> + IEEE80211_TX_RC_160_MHZ_WIDTH: send in HT160 mode
>>
> This makes no sense, those are mac80211 internal flags, should document
> the radiotap flags here, not what they map to internally.
>
> johannes
--
UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch;
unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp;
umount; make clean; sleep
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] mac80211: parse VHT info in injected frames
2016-02-23 10:29 ` Lorenzo Bianconi
@ 2016-02-23 10:42 ` Johannes Berg
2016-02-23 10:49 ` Lorenzo Bianconi
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2016-02-23 10:42 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: linux-wireless
On Tue, 2016-02-23 at 11:29 +0100, Lorenzo Bianconi wrote:
> I used the previous commit scheme (mac80211: Parse legacy and HT rate
> in injected frames).
Oh, I merged something similar there? My mistake.
> I will rewrite the documentation. Should I send v3 or a different
> patch?
>
Please resend, I didn't apply this. Perhaps you can (separately?) fix
the HT documentation as well then?
Thanks,
johannes
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] mac80211: parse VHT info in injected frames
2016-02-23 10:42 ` Johannes Berg
@ 2016-02-23 10:49 ` Lorenzo Bianconi
2016-02-23 10:55 ` Johannes Berg
0 siblings, 1 reply; 9+ messages in thread
From: Lorenzo Bianconi @ 2016-02-23 10:49 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
> On Tue, 2016-02-23 at 11:29 +0100, Lorenzo Bianconi wrote:
>> I used the previous commit scheme (mac80211: Parse legacy and HT rate
>> in injected frames).
>
> Oh, I merged something similar there? My mistake.
>
No worries :)
>> I will rewrite the documentation. Should I send v3 or a different
>> patch?
>>
>
> Please resend, I didn't apply this. Perhaps you can (separately?) fix
> the HT documentation as well then?
>
Should I resend just 2/2 or the first one as well? Ok, I will fix the
documentation in another patch
> Thanks,
> johannes
Regards,
Lorenzo
--
UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch;
unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp;
umount; make clean; sleep
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] mac80211: parse VHT info in injected frames
2016-02-23 10:49 ` Lorenzo Bianconi
@ 2016-02-23 10:55 ` Johannes Berg
0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2016-02-23 10:55 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: linux-wireless
On Tue, 2016-02-23 at 11:49 +0100, Lorenzo Bianconi wrote:
> > On Tue, 2016-02-23 at 11:29 +0100, Lorenzo Bianconi wrote:
> > > I used the previous commit scheme (mac80211: Parse legacy and HT
> > > rate
> > > in injected frames).
> >
> > Oh, I merged something similar there? My mistake.
> >
>
> No worries :)
>
> > > I will rewrite the documentation. Should I send v3 or a different
> > > patch?
> > >
> >
> > Please resend, I didn't apply this. Perhaps you can (separately?)
> > fix
> > the HT documentation as well then?
> >
>
> Should I resend just 2/2 or the first one as well? Ok, I will fix the
> documentation in another patch
>
I applied the first one, no need to resend that.
Thanks!
johannes
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-02-23 10:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-19 10:43 [PATCH v2 0/2] add VHT radiotap parsing support to mac80211 Lorenzo Bianconi
2016-02-19 10:43 ` [PATCH v2 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes Lorenzo Bianconi
2016-02-23 10:18 ` Johannes Berg
2016-02-19 10:43 ` [PATCH v2 2/2] mac80211: parse VHT info in injected frames Lorenzo Bianconi
2016-02-23 10:10 ` Johannes Berg
2016-02-23 10:29 ` Lorenzo Bianconi
2016-02-23 10:42 ` Johannes Berg
2016-02-23 10:49 ` Lorenzo Bianconi
2016-02-23 10:55 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).