Page MenuHomeFreeBSD

D57020.id177907.diff
No OneTemporary

D57020.id177907.diff

diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c
--- a/sys/dev/wtap/if_wtap.c
+++ b/sys/dev/wtap/if_wtap.c
@@ -495,6 +495,7 @@
struct mbuf *m;
struct ieee80211_node *ni;
struct wtap_buf *bf;
+ int8_t rssi, nf;
#if 0
DWTAP_PRINTF("%s\n", __func__);
@@ -528,6 +529,15 @@
ieee80211_dump_pkt(ic, mtod(m, caddr_t), 0,0,0);
#endif
+ /*
+ * Use arbitrary but sane values, and do the correct conversion
+ * for net80211 using 0.5 dBm values relative to the noise floor.
+ */
+ nf = -95;
+ rssi = 42;
+ rssi -= nf;
+ rssi *= 2;
+
/*
* Locate the node for sender, track state, and then
* pass the (referenced) node up to the 802.11 layer
@@ -540,10 +550,10 @@
/*
* Sending station is known, dispatch directly.
*/
- ieee80211_input(ni, m, 1<<7, 10);
+ ieee80211_input(ni, m, rssi, nf);
ieee80211_free_node(ni);
} else {
- ieee80211_input_all(ic, m, 1<<7, 10);
+ ieee80211_input_all(ic, m, rssi, nf);
}
/* The mbufs are freed by the Net80211 stack */

File Metadata

Mime Type
text/plain
Expires
Fri, Jul 17, 4:46 AM (20 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33140233
Default Alt Text
D57020.id177907.diff (1 KB)

Event Timeline