mirror of
https://github.com/opnsense/src.git
synced 2026-06-06 23:32:52 -04:00
This is an attempt to reverse engineer what the actual transmit power calculations are doing and apply net80211 limits on them. It doesn't look as simple as just applying the check at the end - there are plenty of places where offsets are calculated between different PHY modes and 1 / 2 antenna MCS transmit rates. There are also some places where the offset being added is negative, so handle the potential underflow so when things hit 0, they don't just wrap and cause the maximum transmit power into the registers. This is being done to aide in power/performance debugging - if there are issues with the transmit power being wrongly calculated and are too high, the output waveform will be distorted and it will effect performance. Being able to drop the transmit power by a few dB here and there can quickly identify if this is happening (because suddenly higher MCS rates / OFDM rates suddenly work better!) I've tested each NIC through the transmit power values from 0 dBm to 30dBm via ifconfig (and they're all capped far before that, normally around 20-25dBm) and they're not underflowing. Locally tested: * RTL8192CU, STA * RTL8192EU, STA * RTL8188EU, STA Differential Revision: https://reviews.freebsd.org/D47987 Reviewed by: bz, imp |
||
|---|---|---|
| .. | ||
| pci | ||
| rtl8188e | ||
| rtl8192c | ||
| rtl8192e | ||
| rtl8812a | ||
| rtl8821a | ||
| usb | ||
| if_rtwn.c | ||
| if_rtwn_beacon.c | ||
| if_rtwn_beacon.h | ||
| if_rtwn_calib.c | ||
| if_rtwn_calib.h | ||
| if_rtwn_cam.c | ||
| if_rtwn_cam.h | ||
| if_rtwn_debug.h | ||
| if_rtwn_efuse.c | ||
| if_rtwn_efuse.h | ||
| if_rtwn_fw.c | ||
| if_rtwn_fw.h | ||
| if_rtwn_nop.h | ||
| if_rtwn_ridx.h | ||
| if_rtwn_rx.c | ||
| if_rtwn_rx.h | ||
| if_rtwn_task.c | ||
| if_rtwn_task.h | ||
| if_rtwn_tx.c | ||
| if_rtwn_tx.h | ||
| if_rtwnreg.h | ||
| if_rtwnvar.h | ||