--- linux-source-2.6.17-orig/net/ieee80211/ieee80211_tx.c 2006-10-13 14:18:10.000000000 +0200 +++ linux/net/ieee80211/ieee80211_tx.c 2007-04-02 23:57:25.000000000 +0200 @@ -291,6 +291,23 @@ goto success; } + if(ieee->iw_mode == IW_MODE_MONITOR) + { + 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; + } + + txb->encrypted = 0; + txb->payload_size = skb->len; + memcpy(skb_put(txb->fragments[0],skb->len), skb->data, skb->len); + + goto success; + } + ether_type = ntohs(((struct ethhdr *)skb->data)->h_proto); crypt = ieee->crypt[ieee->tx_keyidx]; --- linux-source-2.6.17-orig/drivers/net/wireless/zd1211rw/zd_mac.c 2006-10-01 18:42:47.000000000 +0200 +++ linux/drivers/net/wireless/zd1211rw/zd_mac.c 2007-04-03 00:01:52.000000000 +0200 @@ -180,7 +180,16 @@ if (r < 0) goto disable_rx; + netif_carrier_on(netdev); + ieee80211softmac_start(netdev); + + if(!netif_queue_stopped(netdev)) + netif_start_queue(netdev); + else + netif_wake_queue(netdev); + + return 0; disable_rx: zd_chip_disable_rx(chip); @@ -716,6 +725,8 @@ u8 rt_rate; u16 rt_channel; u16 rt_chbitmask; + u8 rt_antsignal; + u8 rt_antnoise; } __attribute__((packed)); static void fill_rt_header(void *buffer, struct zd_mac *mac, @@ -729,7 +740,9 @@ hdr->rt_hdr.it_len = cpu_to_le16(sizeof(struct zd_rt_hdr)); hdr->rt_hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | (1 << IEEE80211_RADIOTAP_CHANNEL) | - (1 << IEEE80211_RADIOTAP_RATE)); + (1 << IEEE80211_RADIOTAP_RATE) | + (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | + (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE)); hdr->rt_flags = 0; if (status->decryption_type & (ZD_RX_WEP64|ZD_RX_WEP128|ZD_RX_WEP256)) @@ -743,6 +756,12 @@ hdr->rt_chbitmask = cpu_to_le16(IEEE80211_CHAN_2GHZ | ((status->frame_status & ZD_RX_FRAME_MODULATION_MASK) == ZD_RX_OFDM ? IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK)); + + hdr->rt_antsignal = status->signal_strength; + if(status->frame_status & ZD_RX_OFDM) + hdr->rt_antnoise = status->signal_strength - status->signal_quality_ofdm; + else + hdr->rt_antnoise = status->signal_strength - status->signal_quality_cck; } /* Returns 1 if the data packet is for us and 0 otherwise. */ @@ -834,7 +853,8 @@ const struct rx_status *status; *pstatus = status = zd_tail(buffer, length, sizeof(struct rx_status)); - if (status->frame_status & ZD_RX_ERROR) { + if (status->frame_status & ZD_RX_ERROR + || status->frame_status & ~0x21) { /* FIXME: update? */ return -EINVAL; }