Search Linux Wireless

Re: [Proposal]TX flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > Maybe we could create a socket option that would put a _socket_ into a
> > cooked monitor mode?  A "monitor mode socket" would accept and transmit
> > packets with radiotap and 802.11 headers and receive the packets that
> > the interface already receives, also with radiotap and 802.11 headers.
> > That interface could be optimized for use with hostapd and other similar
> > programs.  The driver could fill some data from the interface settings.
> >
> > The monitor mode, on the other hand, could be optimized for the
> > "hardcore" stuff when the driver interferes as little as possible.  Then
> > no special flags would be needed to pass the frame as is.
> >
> > --
> > Regards,
> > Pavel Roskin
> >
> 
> I don't think that is needed, as we already support multiple monitor
> interfaces (including a situation where some are cooked, others are
> raw).
> 

well after all.. for everyone who's interested I made a quick fix
considering the duration-problem. Perhaps on 2.6.34 there'll be
a stable/standardised solution for all those tx-packet-manipulation-stuff.
This is pretty much the same solution as on sequence-numbering..

---
 net/mac80211/tx.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index cbe53ed..8abf015 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -969,11 +969,18 @@ ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
 static ieee80211_tx_result debug_noinline
 ieee80211_tx_h_calculate_duration(struct ieee80211_tx_data *tx)
 {
+       struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
        struct sk_buff *skb = tx->skb;
        struct ieee80211_hdr *hdr;
        int next_len;
        bool group_addr;
 
+       /*
+        * Packet injection may want to control duration time.
+        */
+       if (unlikely(info->control.vif->type == NL80211_IFTYPE_MONITOR))
+               return TX_CONTINUE;
+
        do {
                hdr = (void *) skb->data;
                if (unlikely(ieee80211_is_pspoll(hdr->frame_control)))
-- 
1.6.4.4


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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux