Reported-by: AngeloGioacchino Del Regno <email address hidden>
Closes: https://<email address hidden>/
Fixes: 09382d8f8641 ("wifi: mt76: mt7921: update the channel usage when the regd domain changed")
Signed-off-by: Ming Yen Hsieh <email address hidden>
Signed-off-by: Deren Wu <email address hidden>
Tested-by: AngeloGioacchino Del Regno <email address hidden>
Reviewed-by: AngeloGioacchino Del Regno <email address hidden>
Signed-off-by: Kalle Valo <email address hidden>
Link: https://lore.kernel.org/r/<email address hidden>
(cherry picked from commit 169b7acb847e8dc656cd2289a91ff668f72405a0)
Signed-off-by: You-Sheng Yang <email address hidden>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).
As found with Coccinelle[1], add __counted_by for struct mt76_rx_tid.
The 5.9/6GHz channel license of a certain platform device has been
regulated in various countries. That may be difference with standard
Liunx regulatory domain settings. In this case, when .reg_notifier()
called for regulatory change, mt792x chipset should update the channel
usage based on clc or dts configurations.
Channel would be disabled by following cases.
* clc report the particular UNII-x is disabled.
* dts enabled and the channel is not configured.
Signed-off-by: Ming Yen Hsieh <email address hidden>
Co-developed-by: Deren Wu <email address hidden>
Signed-off-by: Deren Wu <email address hidden>
Signed-off-by: Felix Fietkau <email address hidden>
(cherry picked from commit 09382d8f8641bc12fffc41a93eb9b37be0e653c0)
Signed-off-by: You-Sheng Yang <email address hidden>
The clc event can report the radio configuration for the corresponding
country and the driver would take it as regulatory information of a
certain platform device.
This patch would change the clc commnad from no-waiting to waiting for
event. For backward compatible, we also add a new nic capability tag
to indicate the firmware did support this new clc event from now on.
Signed-off-by: Ming Yen Hsieh <email address hidden>
Co-developed-by: Deren Wu <email address hidden>
Signed-off-by: Deren Wu <email address hidden>
Signed-off-by: Felix Fietkau <email address hidden>
(cherry picked from commit 4fc8df50fd41c2762d893211487be0ecb24c6a05)
Signed-off-by: You-Sheng Yang <email address hidden>
There are several power type should be supported in 6GHz band. mt7921
apply 6GHz power type from AP settings and clc will setup the
corresponding regulatory power.
Signed-off-by: Ming Yen Hsieh <email address hidden>
Co-developed-by: Deren Wu <email address hidden>
Signed-off-by: Deren Wu <email address hidden>
Signed-off-by: Felix Fietkau <email address hidden>
(cherry picked from commit 51ba0e3a15eb1643116a93674e230e11b9499592)
Signed-off-by: You-Sheng Yang <email address hidden>
Signed-off-by: Ming Yen Hsieh <email address hidden>
Signed-off-by: Felix Fietkau <email address hidden>
(cherry picked from commit 7801da3388567c78f79d5ed96a5527de264fdef7)
Signed-off-by: You-Sheng Yang <email address hidden>
mt76_connac_mcu_get_nic_capability() is used by mt7921 only. It
would be better to put the code in chip folder. And we can provide
more chip capability information in mt792x_phy without making
mt76_phy much bigger.
The three functions would be moved to mt7921 folder and renamed.
mt76_connac_mcu_parse_tx_resource()
mt76_connac_mcu_parse_phy_cap()
mt76_connac_mcu_get_nic_capability()
Signed-off-by: Deren Wu <email address hidden>
Signed-off-by: Felix Fietkau <email address hidden>
(cherry picked from commit dab35009fc1c6dc1598e832016594161988d8f68)
Signed-off-by: You-Sheng Yang <email address hidden>
mt76_dma_rx_cleanup would be frequenetly called up to reset the dma rings
to be freshed as new ones when switching back from the deep sleep mode to
the active mode on mt7921 and mt7922.
Shrink the scope of spin_lock_bh in mt76_dma_rx_cleanup being held up
to allow the kernel scheduler to be able to switch other tasks in time
by reducing the latency.
Signed-off-by: Sean Wang <email address hidden>
Signed-off-by: Felix Fietkau <email address hidden>
(cherry picked from commit ef444ad00474bc5ebbcd4f6a2ea87f6fbe7977ce)
Signed-off-by: You-Sheng Yang <email address hidden>
Remove periodic MPDU TXS request. Get TID and FrameType from SKB
instead of TXWI, which is empty for Data Frame after MPDU TXS request
is removed, hence prohibiting the establishment of TX BA session.
Signed-off-by: Benjamin Lin <email address hidden>
Signed-off-by: Yi-Chia Hsieh <email address hidden>
Signed-off-by: Money Wang <email address hidden>
Signed-off-by: Peter Chiu <email address hidden>
Signed-off-by: Evelyn Tsai <email address hidden>
Signed-off-by: Ryder Lee <email address hidden>
Signed-off-by: Felix Fietkau <email address hidden>
(cherry picked from commit 9585316a2aaf773a67846bdc8bbdd4df1e9622fa)
Signed-off-by: You-Sheng Yang <email address hidden>