Commit Graph
30 Commits
Author SHA1 Message Date
Felix Fietkau eba6b2a327 mt76x2: rework tx power handling
There were a number of issues in the existing tx power handling code:

1. The EEPROM target power for chain 0 refers to the actual output power
after the channel and bandwidth delta have been added to the initial
channel gain. This means the delta values should not be added/subtracted
for the rate power calculation

2. When power is reduced significantly, the initial channel gain
underflows very quickly, while the per-rate power offsets are high.
This miscalculation causes effective tx power to be increased when it
should actually be lowered.

Fix this by trying to adjust the channel gain to the lowest power from
the rate table. In case of under- or overflow, compensate by adding an
appropriate delta to the rate power values.

This makes power configuration more accurate on a wider range of
configurable values

Signed-off-by: Felix Fietkau <[email protected]>
2018-02-24 10:24:26 +01:00
Felix Fietkau 58364a2ac4 mt76x2: initialize channel power limits
Signed-off-by: Felix Fietkau <[email protected]>
2017-12-03 21:45:43 +01:00
Felix Fietkau 1acde21849 mt76x2: add channel argument to eeprom tx power functions
Preparation for exposing maximum power to mac80211

Signed-off-by: Felix Fietkau <[email protected]>
2017-12-03 21:45:43 +01:00
Felix Fietkau 0532315f76 mt76x2: increase OFDM SIFS time
Fixes throughput issues in combination with LDPC

Signed-off-by: Felix Fietkau <[email protected]>
2017-12-03 21:45:43 +01:00
Felix Fietkau 0a0d16f817 mt76x2: sync tx power related values with reference driver
Signed-off-by: Felix Fietkau <[email protected]>
2017-11-16 20:34:46 +01:00
Felix Fietkau 4bc9aa9da7 mt76x2: add more gain tuning based on the latest reference driver
Signed-off-by: Felix Fietkau <[email protected]>
2017-11-16 20:34:46 +01:00
Felix Fietkau 60a4d67ca9 mt76x2: implement dynamic AGC tuning based on false packet detection count
Significantly improves radio performance

Signed-off-by: Felix Fietkau <[email protected]>
2017-11-16 20:34:46 +01:00
Felix Fietkau cc588c5e32 mt76x2: sync channel gain value with latest reference driver
Signed-off-by: Felix Fietkau <[email protected]>
2017-11-16 20:34:46 +01:00
Felix Fietkau fe7981687d mt76x2: fix LNA gain register annotation
Signed-off-by: Felix Fietkau <[email protected]>
2017-11-16 20:34:45 +01:00
Lorenzo BianconiandFelix Fietkau 9e7bb5309f mt76x2: phy: update dfs AGC parameters according to AGC_8 register
Signed-off-by: Lorenzo Bianconi <[email protected]>
2017-01-31 11:31:16 +01:00
Lorenzo BianconiandFelix Fietkau 6375fc1abe mt76x2: add hw radar detector
add hw DFS pattern detector support for mt76x2 based devices
DFS region supported:
 - FCC
 - ETSI
 - JAPAN_W53
 - JAPAN_W56

Signed-off-by: Lorenzo Bianconi <[email protected]>
2016-09-25 18:13:12 +02:00
Felix Fietkau d7f5112c09 mt76x2: fix checkpatch warnings
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-04 18:59:22 +02:00
Felix Fietkau b300bdc42e use the new bitfield accessor macros
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-04 17:37:26 +02:00
Felix Fietkau 53c1b7f6ac update my email address
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-04 17:33:28 +02:00
Felix Fietkau ced81a3458 relicense to ISC (except for util.h which is based on GPL'd kernel code
Signed-off-by: Felix Fietkau <[email protected]>
2016-07-12 08:38:46 +02:00
Lorenzo BianconiandFelix Fietkau 9a75c6caa0 mt76x2: phy: fix typo in rate-power configuration
fix typo in MT_TX_PWR_CFG_7 configuration for OFDM_54M max
tx power adjustment

Signed-off-by: Lorenzo Bianconi <[email protected]>
2016-07-11 09:56:58 +02:00
Lorenzo BianconiandFelix Fietkau caff56f908 mt76x2: phy: cosmetics
replace spaces with tabs in mt76x2_phy_set_txpower()

Signed-off-by: Lorenzo Bianconi <[email protected]>
2016-07-11 09:56:49 +02:00
Felix Fietkau 267e959c84 move mt76 rate power struct to mt76.h
Signed-off-by: Felix Fietkau <[email protected]>
2016-06-17 12:45:39 +02:00
Felix Fietkau 3c8a4bc30e mt76x2: implement survey support
Signed-off-by: Felix Fietkau <[email protected]>
2016-06-15 16:47:23 +02:00
Felix Fietkau 6c4b37be98 move dev->chandef to mt76 struct
Signed-off-by: Felix Fietkau <[email protected]>
2016-06-15 15:47:49 +02:00
Felix Fietkau e4c05ba162 use nl80211_band instead of ieee80211_band
Signed-off-by: Felix Fietkau <[email protected]>
2016-05-14 16:51:44 +02:00
Felix Fietkau 13c29223ef Use NL80211_BAND_2GHZ instead of IEEE80211_BAND_2GHZ
Signed-off-by: Felix Fietkau <[email protected]>
2016-05-14 16:49:30 +02:00
Felix Fietkau 81c6ab2d8c mt76x2: remove some unused code
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-25 18:24:52 +01:00
Felix Fietkau 079ad90fe2 update copyright lines
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-25 18:09:13 +01:00
Felix Fietkau 2044de5229 move mt76 state enum/storage to mt76.h
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 22:05:42 +01:00
Felix Fietkau b0f76bb5d9 move register poll functions to core
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 19:20:00 +01:00
Felix Fietkau 62ecfb9730 move more register accessor functions to mt76.h
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 18:01:45 +01:00
Felix Fietkau e20a9c13a5 move mmio functions/init to mt76.ko
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 17:52:00 +01:00
Felix Fietkau 00af5f3105 add accessor function for struct ieee80211_hw from mt76x2_dev
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 17:37:45 +01:00
Felix Fietkau a0ee20716f add a mt76x2_ prefix to all files
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 16:54:53 +01:00