From: Andy Green <andy@warmcat.com>
To: Michael Buesch <mb@bu3sch.de>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] mac80211: Monitor mode radiotap-based packet injection
Date: Sat, 17 Mar 2007 14:58:13 +0000 [thread overview]
Message-ID: <45FC0205.2020409@warmcat.com> (raw)
In-Reply-To: <200703171459.23246.mb@bu3sch.de>
Michael Buesch wrote:
>> +#define IEEE80211_TXCTL_INJECTED_PACKET (1<<10) /* tx into monitor IF */
>
> What is a driver supposed to do on this flag? More documentation, please.
Hi Michael -
The driver doesn't have to do anything with that flag... it's a private
mac80211-internal flag to get the attribute that the packet was injected
into a Monitor interface into ieee80211_tx_control where
__ieee80211_tx_prepare() can access that information. By then as I
understood it the information that the packet came in on the monitor
interface isn't available because we redirected it to the master
interface. That one bit of state, that the packet originated from a
send() to a Montitor Mode interface is the meaning of the flag.
Currently the information travels like this:
- ieee80211_subif_start_xmit() sees that it is a monitor mode interface
getting the packet.
- It sets ieee80211_tx_packet_data.is_injected_into_monitor, which
travels with the packet inside skb.cb.
- ieee80211_master_start_xmit() eventually gets the packet and
examines the ieee80211_tx_packet_data in the skb.cb. If
is_injected_into_monitor is set, it sets control.flags |=
IEEE80211_TXCTL_INJECTED_PACKET. This is done because at the start of
ieee80211_master_start_xmit() there is a comment
/*
* copy control out of the skb so other people can use skb->cb
*/
- finally the end user __ieee80211_tx_prepare() is able to find the
state information in control->flags & IEEE80211_TXCTL_INJECTED_PACKET
and work out if it expects a radiotap header prepended or not from that.
If there's a simpler way I'm happy to use it.
-Andy
next prev parent reply other threads:[~2007-03-17 14:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-17 10:58 [PATCH 0/2] Radiotap on Monitor Mode interfaces for rx and tx andy
2007-03-17 10:58 ` [PATCH 1/2] mac80211: Add radiotap support andy
2007-03-17 10:58 ` [PATCH 2/2] mac80211: Monitor mode radiotap-based packet injection andy
2007-03-17 13:59 ` Michael Buesch
2007-03-17 14:58 ` Andy Green [this message]
2007-03-17 15:06 ` Michael Buesch
2007-03-17 15:35 ` Andy Green
2007-03-17 21:30 ` Michael Wu
2007-03-17 21:51 ` Michael Wu
2007-03-17 22:09 ` Andy Green
2007-03-17 23:20 ` Michael Wu
2007-03-17 23:26 ` Andy Green
2007-03-18 9:00 ` Andy Green
2007-03-18 10:12 ` Andy Green
2007-03-17 22:05 ` Andy Green
-- strict thread matches above, loose matches on Subject: below --
2007-03-18 10:15 [PATCH 0/2] Try #3 Radiotap on Monitor Mode interfaces for rx and tx andy
2007-03-18 10:15 ` [PATCH 2/2] mac80211: Monitor mode radiotap-based packet injection andy
2007-03-19 5:55 ` Michael Wu
2007-03-19 10:54 ` Andy Green
2007-03-19 16:50 ` Michael Wu
2007-03-21 4:12 ` Joerg Mayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45FC0205.2020409@warmcat.com \
--to=andy@warmcat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).