Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162725667
D57020.id177907.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D57020.id177907.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D57020: wtap: use typed rssi and noise floor values
Attached
Detach File
Event Timeline
Log In to Comment