freebsd-skq/sys/dev/bwn
adrian 2997dc482e [bwn] implement firmware tx/rx versioning and fix RSSI calculation.
Different versions of firmware have different requirments for TX/RX
packet layouts (and other things, of course.)  Currently the driver
checks between 3xx and 4xx firmware by using the BWN_ISOLDFMT() macro,
which doesn't take into account the 5xx firmware (which I think I need
for the HT and N series PHY chips.  I'll know when I do the port.)
BWN_HDRSIZE() also needs to learn about the 5xx series firmware
as well.

So:

* add a firmware version enum
* populate it based on the firmware version we read at load time
* don't finish loading if the firmware is the 5xx firmware; any
  code using BWN_ISOLDFMT or BWN_HDRSIZE needs updating (most notably
  the TX and RX bits.)

Then, for RX RSSI:

* write down and reimplement the b43 rssi calculation method;
* use it for the correct PHYs (which are all the ones we support);
* do the RSSI calculation before radiotap, not after.

Tested:

* Broadcom BCM4312, STA mode

Obtained from:	Linux b43 (careful writing and reimplementing; lots of integer math..)
2016-05-05 07:04:38 +00:00
..
bwn_mac.c [bwn] [bhnd] initial support for using bhnd for if_bwn devices. 2016-05-04 23:38:27 +00:00
if_bwn_debug.h [bwn] [bhnd] initial support for using bhnd for if_bwn devices. 2016-05-04 23:38:27 +00:00
if_bwn_misc.h [bwn] migrate bwn_dummy_transmission() back to main, as it'll be used by other PHYs. 2016-05-03 03:24:27 +00:00
if_bwn_pci.c [bwn] [bhnd] initial support for using bhnd for if_bwn devices. 2016-05-04 23:38:27 +00:00
if_bwn_pcivar.h [bwn] [bhnd] initial support for using bhnd for if_bwn devices. 2016-05-04 23:38:27 +00:00
if_bwn_phy_g.c [bwn] migrate bwn_dummy_transmission() back to main, as it'll be used by other PHYs. 2016-05-03 03:24:27 +00:00
if_bwn_phy_g.h [bwn] break out the 'g' phy code into a separate source file. 2016-05-02 22:58:11 +00:00
if_bwn_phy_lp.c [bwn] break out the 'g' phy code into a separate source file. 2016-05-02 22:58:11 +00:00
if_bwn_phy_lp.h [bwn] break out the LP PHY code into a separate file. 2016-05-02 21:06:02 +00:00
if_bwn.c [bwn] implement firmware tx/rx versioning and fix RSSI calculation. 2016-05-05 07:04:38 +00:00
if_bwn.c.c [bwn] [bhnd] initial support for using bhnd for if_bwn devices. 2016-05-04 23:38:27 +00:00
if_bwnreg.h [bwn] add PHY types for later PHYs. 2016-05-03 03:27:11 +00:00
if_bwnvar.h [bwn] implement firmware tx/rx versioning and fix RSSI calculation. 2016-05-05 07:04:38 +00:00