--- linux-2.6.24.4-softmac/net/ieee80211/ieee80211_tx.c 2008-01-24 23:58:37.000000000 +0100 +++ /usr/src/linux/net/ieee80211/ieee80211_tx.c 2008-04-12 22:10:40.000000000 +0200 @@ -292,6 +292,25 @@ int ieee80211_xmit(struct sk_buff *skb, goto success; } + /* If monitor mode, frame is already in 802.11 format and dont touch */ + if (ieee->iw_mode == IW_MODE_MONITOR) { + /* Create a txb with one skb */ + txb = ieee80211_alloc_txb(1, skb->len, + ieee->tx_headroom, GFP_ATOMIC); + if (unlikely(!txb)) { + printk(KERN_WARNING "%s: Could not allocate TXB\n", + ieee->dev->name); + goto failed; + } + + /* Copy given skb to the created one */ + skb_put(txb->fragments[0], skb->len - txb->fragments[0]->len); + memcpy(txb->fragments[0]->data, skb->data, skb->len); + + goto success; + } + + ether_type = ntohs(((struct ethhdr *)skb->data)->h_proto); crypt = ieee->crypt[ieee->tx_keyidx];