| 1 |
--- linux-source-2.6.17-orig/drivers/net/wireless/zd1211rw/zd_mac.c 2006-10-01 18:42:47.000000000 +0200 |
| 2 |
+++ linux-source-2.6.17-rawtx/drivers/net/wireless/zd1211rw/zd_mac.c 2007-04-01 22:35:50.000000000 +0200 |
| 3 |
@@ -716,6 +716,8 @@ |
| 4 |
u8 rt_rate; |
| 5 |
u16 rt_channel; |
| 6 |
u16 rt_chbitmask; |
| 7 |
+ u8 rt_antsignal; |
| 8 |
+ u8 rt_antnoise; |
| 9 |
} __attribute__((packed)); |
| 10 |
|
| 11 |
static void fill_rt_header(void *buffer, struct zd_mac *mac, |
| 12 |
@@ -729,7 +731,9 @@ |
| 13 |
hdr->rt_hdr.it_len = cpu_to_le16(sizeof(struct zd_rt_hdr)); |
| 14 |
hdr->rt_hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | |
| 15 |
(1 << IEEE80211_RADIOTAP_CHANNEL) | |
| 16 |
- (1 << IEEE80211_RADIOTAP_RATE)); |
| 17 |
+ (1 << IEEE80211_RADIOTAP_RATE) | |
| 18 |
+ (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | |
| 19 |
+ (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE)); |
| 20 |
|
| 21 |
hdr->rt_flags = 0; |
| 22 |
if (status->decryption_type & (ZD_RX_WEP64|ZD_RX_WEP128|ZD_RX_WEP256)) |
| 23 |
@@ -743,6 +747,12 @@ |
| 24 |
hdr->rt_chbitmask = cpu_to_le16(IEEE80211_CHAN_2GHZ | |
| 25 |
((status->frame_status & ZD_RX_FRAME_MODULATION_MASK) == |
| 26 |
ZD_RX_OFDM ? IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK)); |
| 27 |
+ |
| 28 |
+ hdr->rt_antsignal = status->signal_strength; |
| 29 |
+ if(status->frame_status & ZD_RX_OFDM) |
| 30 |
+ hdr->rt_antnoise = status->signal_strength - status->signal_quality_ofdm; |
| 31 |
+ else |
| 32 |
+ hdr->rt_antnoise = status->signal_strength - status->signal_quality_cck; |
| 33 |
} |
| 34 |
|
| 35 |
/* Returns 1 if the data packet is for us and 0 otherwise. */ |
| 36 |
@@ -834,7 +844,8 @@ |
| 37 |
const struct rx_status *status; |
| 38 |
|
| 39 |
*pstatus = status = zd_tail(buffer, length, sizeof(struct rx_status)); |
| 40 |
- if (status->frame_status & ZD_RX_ERROR) { |
| 41 |
+ if (status->frame_status & ZD_RX_ERROR |
| 42 |
+ || status->frame_status & ~0x21) { |
| 43 |
/* FIXME: update? */ |
| 44 |
return -EINVAL; |
| 45 |
} |