Commit Graph

9 Commits

Author SHA1 Message Date
Felix Fietkau
10ece0086f mt76: mt76x0: fix RF frontend initialization for external PA
When loading EEPROM data from flash, the RF frontend settings need to be
initialized from flash data. Without this, the chip loads the wrong values
from its internal eFuse ROM.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Stanislaw Gruszka
5a3f1cc288 mt76x02: add hrtimer for pre TBTT for USB
Add timer and work for pre TBTT for USB devices. For now code
doesn't do anyting useful, just add hrtimer which synchronize
with hardware MT_TBTT_TIMER.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01 13:03:56 +02:00
Lorenzo Bianconi
5c9decdfbb mt76: add led support to mt76x0e driver
Move mt76x02 led support in mt76x02-lib module in order to
add tpt led trigger to mt76x0e driver

Tested-by: LGA1150 <dqfext@gmail.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-01-11 15:10:19 +01:00
Lorenzo Bianconi
f82ce8d9bd mt76: add energy detect CCA support to mt76x{0,2}e drivers
Ported from the reference driver. Should fix compliance with ETSI
regulatories on preventing transmission while energy detect values
are above the threshold.
The code has been tested using an ath9k device running tx99 as
noise generator

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-01-11 15:10:18 +01:00
Stanislaw Gruszka
26a7b54731 mt76x02: set protection according to ht operation element
Configure protection based on information that are provided to
us either by remote AP or by hostapd via HT operation IE.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-01-11 15:10:17 +01:00
Stanislaw Gruszka
493d2dfab3 mt76x02: fixup MT_PROT_RATE_* defines
On new mt76 chips, phy mode is configured by last 3 bits
of rate value. Hence OFDM bit is marked by 0x2000
instead of 0x4000.

Acked-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-01-11 15:10:17 +01:00
Stanislaw Gruszka
6f223a3dab mt76x0: correct RF access via RF_CSR register.
PCIe version don't use MCU for RF registers access. We need
to correct RF CSR method to support up to 127 RF registers.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-10-13 17:39:10 +02:00
Stanislaw Gruszka
797ea24078 mt76: merge mt76x0/regs.h into mt76x02_regs.h
Add missed definitions for mt76x0 into mt76x02_regs.h. Remove
mt76x0/regs.h and fixup mt76x0 code to adjust to some diffrent
registers/fields names.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-09-04 11:02:44 +03:00
Stanislaw Gruszka
89e1b1bc07 mt76: rename mt76x2_regs.h
MAC registers are the same for mt76x0 and mt76x2. Rename mt76x2_regs.h
file to reflect that.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-09-04 11:02:41 +03:00