Commit Graph
17 Commits
Author SHA1 Message Date
Felix Fietkau a11b67348a mt76: fix tx power issues
- tx power is stored in the channels after ieee80211_register_hw, so
  chan->orig_mpwr needs to be updated as well
- for non-TSSI devices, mt76x2e needs to use a different target power value
  from the EEPROM
- fix a rounding error in a few places (need to round up, not down)

Signed-off-by: Felix Fietkau <[email protected]>
2019-03-27 12:54:48 +01:00
Felix Fietkau 8ee225996f mt76: mt76x2: fix 2.4 GHz channel gain settings
AGC register 35, 37 override for the low gain setting should only be done
on 5 GHz. Also, 2.4 GHz needs a different value for register 35

Signed-off-by: Felix Fietkau <[email protected]>
2019-03-03 15:12:19 +01:00
Felix Fietkau d2c682325d mt76: mt76x2: fix external LNA gain settings
Devices with external LNA need different values for AGC registers 8 and 9

Signed-off-by: Felix Fietkau <[email protected]>
2019-03-03 15:10:44 +01:00
Felix Fietkau a9d4c0ea0d mt76: mt76x2: avoid running DPD calibration if tx is blocked
Doing so could lead to hangs

Signed-off-by: Felix Fietkau <[email protected]>
2019-02-03 13:52:14 +01:00
Felix Fietkau fea7ad804e mt76: move mt76x02_phy_get_min_avg_rssi to mt76 core
This will be used by mt7603 as well

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-05 17:06:59 +01:00
Stanislaw GruszkaandFelix Fietkau 88f68838d9 mt76: remove wait argument from mt76x02_mcu_calibrate
We always wait for CMD_CALIBRATION_OP mcu message, but wait argument is used
for do additional MT_MCU_COM_REG0 register operations, which are needed
for mt76x2e devices and we can use appropriate check instead of wait argument.

Signed-off-by: Stanislaw Gruszka <[email protected]>
2018-11-13 20:56:41 +01:00
Stanislaw GruszkaandFelix Fietkau 663b197401 mt76x02: assure we update gain after scan
Assure that after we initialize dev->cal.low_gain to -1 this
will cause update gain calibration. Otherwise this might or
might not happen depending on value of second bit of low_gain
and values read from registers in mt76x02_phy_adjust_vga_gain().

Signed-off-by: Stanislaw Gruszka <[email protected]>
2018-11-01 18:29:27 +01:00
Lorenzo BianconiandFelix Fietkau ba9d4247f2 mt76x0: pci: add DFS support
Introduce dfs support in mt76x0e driver and unlock radar channels

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-23 11:14:20 +02:00
Lorenzo BianconiandFelix Fietkau 1f3f767371 mt76x2u: align channel gain logic to mt76x2 one
Update vga tuning algorithm to the one used in mt76x2 driver

Signed-off-by: Lorenzo Bianconi <[email protected]>
2018-10-15 14:03:14 +02:00
Lorenzo BianconiandFelix Fietkau f82134f75a mt76: move mt76x02_phy_set_band in mt76x02-lib module
Move mt76x02_phy_set_band routine in mt76x02_phy.c since
it is shared between mt76x0 and mt76x2 drivers and remove
duplicated code

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-15 14:03:01 +02:00
Lorenzo BianconiandFelix Fietkau 1775717f55 mt76: move mt76x02_phy_set_bw in mt76x02-lib module
Move mt76x02_phy_set_bw routine in mt76x02_phy.c since
it is shared between mt76x0 and mt76x2 drivers and remove
duplicated code

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-15 14:03:01 +02:00
Lorenzo BianconiandFelix Fietkau 48950cb615 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_eeprom.c
Use mt76x02_dev data structure as reference in mt76x02_eeprom.c
instead of mt76_dev

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-08 13:47:02 +02:00
Lorenzo BianconiandFelix Fietkau 214eab7c5b mt76: use mt76x02_dev instead of mt76_dev in mt76x02_phy.c
Use mt76x02_dev data structure as reference in mt76x02_phy.c
instead of mt76_dev

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-08 13:47:02 +02:00
Lorenzo BianconiandFelix Fietkau 1945d571f4 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mcu.c
Use mt76x02_dev data structure as reference in mt76x02_mcu.c
instead of mt76_dev

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-08 13:47:02 +02:00
Lorenzo BianconiandFelix Fietkau abd1daa150 mt76x2: move mt76x2_dev in mt76x02_util.h
Move mt76x2_dev in mt76x02_util.h and rename it in mt76x02_dev
in order to be shared between mt76x2 and mt76x0 driver

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-05 19:59:24 +02:00
Lorenzo BianconiandFelix Fietkau e802b5cef4 mt76: move mt76x02_phy_get_min_avg_rssi in mt76x02_phy.c
Move mt76x02_phy_get_min_avg_rssi in mt76x02-lib module since
it will be used by mt76x0 driver in order to unify rxwi parsing

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-05 19:59:24 +02:00
Lorenzo BianconiandFelix Fietkau c6b192623f mt76x2: move mt76x2 source files to mt76x2 folder
Move mt76x2 and mt76x2u drivers to mt76x2 subfolder and
leave just shared code in mt76 root folder

Acked-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-01 13:54:56 +02:00