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
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html