svn commit: r299795 - head/sys/dev/bwn
Adrian Chadd
adrian at FreeBSD.org
Sat May 14 23:43:44 UTC 2016
Author: adrian
Date: Sat May 14 23:43:43 2016
New Revision: 299795
URL: https://svnweb.freebsd.org/changeset/base/299795
Log:
[bwn] decode the RX RSSI for PHY-N.
I'm still figuring this out, but it at least works somewhat.
Modified:
head/sys/dev/bwn/if_bwn.c
Modified: head/sys/dev/bwn/if_bwn.c
==============================================================================
--- head/sys/dev/bwn/if_bwn.c Sat May 14 23:43:05 2016 (r299794)
+++ head/sys/dev/bwn/if_bwn.c Sat May 14 23:43:43 2016 (r299795)
@@ -5726,6 +5726,13 @@ bwn_rxeof(struct bwn_mac *mac, struct mb
!! (phystat0 & BWN_RX_PHYST0_GAINCTL),
!! (phystat3 & BWN_RX_PHYST3_TRSTATE));
break;
+ case BWN_PHYTYPE_N:
+ /* Broadcom has code for min/avg, but always used max */
+ if (rxhdr->phy.n.power0 == 16 || rxhdr->phy.n.power0 == 32)
+ rssi = max(rxhdr->phy.n.power1, rxhdr->ps2.n.power2);
+ else
+ rssi = max(rxhdr->phy.n.power0, rxhdr->phy.n.power1);
+ break;
default:
/* XXX TODO: implement rssi for other PHYs */
break;
More information about the svn-src-head
mailing list