summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorKevin Lo <kevlo@cvs.openbsd.org>2017-08-23 09:25:18 +0000
committerKevin Lo <kevlo@cvs.openbsd.org>2017-08-23 09:25:18 +0000
commitfda53ca869881135d3e9cccad121fb87821f9a67 (patch)
tree47f157a8890b9131be2b0facb1b5c58412f7e6f5 /sys/dev/usb
parent75bc7db4c957caff3e4edcde8dce1712de3ed081 (diff)
Fix up rssi calculations and r88e_rx_cck structure for RTL8188EU.
Tested with TL-WN725N v2 (rtl8188eu) on amd64. ok stsp@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_urtwn.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/if_urtwn.c b/sys/dev/usb/if_urtwn.c
index 74bb18c6559..e6e9cbd670e 100644
--- a/sys/dev/usb/if_urtwn.c
+++ b/sys/dev/usb/if_urtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtwn.c,v 1.74 2017/08/16 01:26:46 kevlo Exp $ */
+/* $OpenBSD: if_urtwn.c,v 1.75 2017/08/23 09:25:17 kevlo Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -1126,7 +1126,6 @@ urtwn_rx_frame(struct urtwn_softc *sc, uint8_t *buf, int pktlen)
tap->wr_flags = 0;
/* Map HW rate index to 802.11 rate. */
- tap->wr_flags = 2;
if (!(rxdw3 & R92C_RXDW3_HT)) {
switch (rate) {
/* CCK. */
@@ -1144,6 +1143,8 @@ urtwn_rx_frame(struct urtwn_softc *sc, uint8_t *buf, int pktlen)
case 10: tap->wr_rate = 96; break;
case 11: tap->wr_rate = 108; break;
}
+ if (rate <= 3)
+ tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
} else if (rate >= 12) { /* MCS0~15. */
/* Bit 7 set means HT MCS instead of rate. */
tap->wr_rate = 0x80 | (rate - 12);