* [PATCH 1/2] mac80211: document only injected *_RADIOTAP_* flags
@ 2016-02-24 15:25 Sven Eckelmann
2016-02-24 15:25 ` [PATCH 2/2] mac80211: fix parsing of 40Mhz in injected radiotap header Sven Eckelmann
2016-03-03 15:00 ` [PATCH 1/2] mac80211: document only injected *_RADIOTAP_* flags Johannes Berg
0 siblings, 2 replies; 3+ messages in thread
From: Sven Eckelmann @ 2016-02-24 15:25 UTC (permalink / raw)
To: linux-wireless; +Cc: Lorenzo Bianconi, Johannes Berg, Sven Eckelmann
Not the internal flags but the radiotap flags are parsed when the monitor
injected frames are prepared for transmission. Thus the documentation
should only document these.
Reported-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Fixes: 5ec3aed9ba4c ("mac80211: Parse legacy and HT rate in injected frames")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
Documentation/networking/mac80211-injection.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/networking/mac80211-injection.txt b/Documentation/networking/mac80211-injection.txt
index ec8f934..0a459e4 100644
--- a/Documentation/networking/mac80211-injection.txt
+++ b/Documentation/networking/mac80211-injection.txt
@@ -37,8 +37,8 @@ radiotap headers and used to control injection:
HT 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_RADIOTAP_MCS_SGI: use short guard interval
+ IEEE80211_RADIOTAP_MCS_BW_40: send in HT40 mode
* IEEE80211_RADIOTAP_DATA_RETRIES
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] mac80211: fix parsing of 40Mhz in injected radiotap header
2016-02-24 15:25 [PATCH 1/2] mac80211: document only injected *_RADIOTAP_* flags Sven Eckelmann
@ 2016-02-24 15:25 ` Sven Eckelmann
2016-03-03 15:00 ` [PATCH 1/2] mac80211: document only injected *_RADIOTAP_* flags Johannes Berg
1 sibling, 0 replies; 3+ messages in thread
From: Sven Eckelmann @ 2016-02-24 15:25 UTC (permalink / raw)
To: linux-wireless; +Cc: Lorenzo Bianconi, Johannes Berg, Sven Eckelmann
The MCS bandwidth part of the radiotap header is 2 bits wide. The full 2
bit have to compared against IEEE80211_RADIOTAP_MCS_BW_40 and not only if
the first bit is set. Otherwise IEEE80211_RADIOTAP_MCS_BW_40 can be
confused with IEEE80211_RADIOTAP_MCS_BW_20U.
Fixes: 5ec3aed9ba4c ("mac80211: Parse legacy and HT rate in injected frames")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
net/mac80211/tx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3a7475f..60c26a5 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1691,7 +1691,7 @@ static bool ieee80211_parse_tx_radiotap(struct ieee80211_local *local,
bool rate_found = false;
u8 rate_retries = 0;
u16 rate_flags = 0;
- u8 mcs_known, mcs_flags;
+ u8 mcs_known, mcs_flags, mcs_bw;
int i;
info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
@@ -1767,8 +1767,9 @@ static bool ieee80211_parse_tx_radiotap(struct ieee80211_local *local,
mcs_flags & IEEE80211_RADIOTAP_MCS_SGI)
rate_flags |= IEEE80211_TX_RC_SHORT_GI;
+ mcs_bw = mcs_flags & IEEE80211_RADIOTAP_MCS_BW_MASK;
if (mcs_known & IEEE80211_RADIOTAP_MCS_HAVE_BW &&
- mcs_flags & IEEE80211_RADIOTAP_MCS_BW_40)
+ mcs_bw == IEEE80211_RADIOTAP_MCS_BW_40)
rate_flags |= IEEE80211_TX_RC_40_MHZ_WIDTH;
break;
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/2] mac80211: document only injected *_RADIOTAP_* flags
2016-02-24 15:25 [PATCH 1/2] mac80211: document only injected *_RADIOTAP_* flags Sven Eckelmann
2016-02-24 15:25 ` [PATCH 2/2] mac80211: fix parsing of 40Mhz in injected radiotap header Sven Eckelmann
@ 2016-03-03 15:00 ` Johannes Berg
1 sibling, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2016-03-03 15:00 UTC (permalink / raw)
To: Sven Eckelmann, linux-wireless; +Cc: Lorenzo Bianconi
On Wed, 2016-02-24 at 16:25 +0100, Sven Eckelmann wrote:
> Not the internal flags but the radiotap flags are parsed when the
> monitor
> injected frames are prepared for transmission. Thus the documentation
> should only document these.
>
Both applied.
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-03 15:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24 15:25 [PATCH 1/2] mac80211: document only injected *_RADIOTAP_* flags Sven Eckelmann
2016-02-24 15:25 ` [PATCH 2/2] mac80211: fix parsing of 40Mhz in injected radiotap header Sven Eckelmann
2016-03-03 15:00 ` [PATCH 1/2] mac80211: document only injected *_RADIOTAP_* flags 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).