Dump mcu command code in hex and related prefix to help debugging
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Get rid of init work since firmware loading is already performed in
mt7921_init_hardware
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
When the EEPROM data is read from flash, it can contain pre-calibration
data, which can save calibration time.
Note that group_cal can save 30% bootup calibration time, and dpd_cal can
save 75% channel switching time.
Tested-by: Bo Jiao <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
For MT7663, the availability of the patch files is used to detect, which
corresponding firmware is going to be used (AP firmware or STA offload
firmware). If the ROM patch was already applied, it could attempt to
load the wrong firmware (without considering the alternative).
Signed-off-by: Felix Fietkau <[email protected]>
MT7663 uses different bits for communicating reset commands/status between MCU
and host. Also add an extra initial reset command.
Signed-off-by: Felix Fietkau <[email protected]>
After DMA reset, tx status information for queued frames will never arrive.
Flush the queue to free skbs immediately instead of waiting for a timeout
Signed-off-by: Felix Fietkau <[email protected]>
We should use ieee80211_free_txskb() to report skb status avoid wrong
aql accounting after reset.
Cc: [email protected]
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
In mt7615_mac_reset_work(), make sure freeing skbs after mt7615_dma_reset().
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
In mt7915_mac_reset_work(), make sure freeing skbs after mt7915_dma_reset().
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
mt7915_tx_token_put() should get call before mt76_free_pending_txwi().
Fixes: f285dfb98562 ("mt76: mt7915: reset token when mac_reset happens")
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
mt7615_tx_token_put() should get call before mt76_free_pending_txwi().
Fixes: a6275e934605 ("mt76: mt7615: reset token when mac_reset happens")
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Fix ofdm rate index and ldpc setting in rate setting field of tx
descriptor.
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Rework mt7915_tm_set_tx_len() with mt76_testmode_alloc_skb() to support
larger packet based on a longer tx_time.
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Add support to send larger packet in testmode to meet requirements
of some test cases.
The limit of max packet size is determined based on tx rate mode setting.
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Report trace event related to MCU_EVENT_LP_INFO that is sent by the mcu
when it is ready to enter in deep sleep state
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Ensures that header translation is disabled for interfaces that do not support
it.
Fixes: bb1262e7199b ("mt76: mt7615: add support for rx decapsulation offload")
Signed-off-by: Felix Fietkau <[email protected]>
Resolve the following checkpatch.pl script warning:
WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Add mmio.c in order to use mt76_bus_ops throughout the driver.
It will be also shared with the future APSoC revision.
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Frame reception timestamp (low 32-bits) that indicates the value of the
local TSF timer value at the time the first bit of the MAC header in the
received frame (PPDU unit) arriving at the MAC.
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Reduce the data latency during hw_scan by the split scan which would switch
back to operational channel right after scanning each channel done.
Suggested-by: Asda Wen <[email protected]>
Suggested-by: Soul Huang <[email protected]>
Co-developed-by: YN Chen <[email protected]>
Signed-off-by: YN Chen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Use mt76_wr to directly access MT_PCIE_MAC_INT_ENABLE because we used the
remapped address 0x10000 as the base to operate PCIe interrupt.
Fixes: c7b646385a3f ("mt76: mt7921: add wifi reset support")
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Fix the second insert module causing the device hangs after remove module.
Fixes: 1c099ab44727 ("mt76: mt7921: add MCU support")
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
dwell time for the scan is not configurable according to the current
firmware submitted into linux-firmware.git, so leave the dwell time 0 to
indicate the dwell time always determined by the firmware.
Fixes: 399090ef9605 ("mt76: mt76_connac: move hw_scan and sched_scan routine in mt76_connac_mcu module")
Suggested-by: Soul Huang <[email protected]>
Co-developed-by: YN Chen <[email protected]>
Signed-off-by: YN Chen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Fix the Wake-on-WoWLAN failure should rely on ARP Information is being
updated in time to the firmware.
Fixes: ffa1bf97425b ("mt76: mt7921: introduce PM support")
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
When receiving an A-MSDU containing only a single subframe, status->last_amsdu
is set, but no previous head is present in the rx A-MSDU queue.
In this case, the A-MSDU subframe will be held until the next one is received,
potentially causing significant extra latency.
Rework the code to make it easier to read and less convoluted, and release the
newly created head if status->last_amsdu is set.
Signed-off-by: Felix Fietkau <[email protected]>
Reset wifi subsystem when MCU is already running.
Fixes firmware download failure after soft reboot on systems where the PCIe
reset could not be performed properly.
Signed-off-by: Ryder Lee <[email protected]>
Co-developed-by: Felix Fietkau <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
ieee80211_beacon_get_template() returns NULL when beacon state is disabled.
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
ieee80211_beacon_get_template() returns NULL when beacon state is disabled,
so beacon_offload cannot be disabled for some devices.
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Rework mt7921_mcu_debug_msg_event routing removing unnecessary
assignments and relying on wiphy_info
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Make sure the mcu is not in sleep mode before sending mcu messages in
mt7921_remove_interface routine.
Fixes: 1d8efc741df80 ("mt76: mt7921: introduce Runtime PM support")
Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Co-developed-by: Leon Yen <[email protected]>
Signed-off-by: Leon Yen <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Similar to mt7921 driver, make sure the mcu is not in sleep mode before
sending mcu messages in mt7615_remove_interface routine.
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Guobin Huang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Similar to the mt7915 driver, deleting a key with the previous key index
deletes the current key. Rework the code to better keep track of
multiple keys and check for the key index before deleting the current
key
Signed-off-by: Lorenzo Bianconi <[email protected]>
After chip reset, the DMA scheduler needs to be initialized as well.
Since the code is PCI/SoC specific, move it to pci_mac.c, so that it
can depend on a function in dma.c
Signed-off-by: Felix Fietkau <[email protected]>
The same as mt7615. Keep BSS_INFO_BASIC enabled throughout interfaces
life cycle.
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
BSS_INFO_BASIC is never called alone with inactive state, which always
follows beacon offload disable, so keep it enabled throughout interfaces
life cycle. Inactive state also removes sta record of all connected
stations, thurs causes connection lost which defeats the purpose of CSA.
Lastly, this is especially an unexpected behavior that keeping mt7622
failing beacon buffer recyled when scanning channels.
bss_conf change is updated with active state only, so just overwrite it.
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>