mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7921: add auto regdomain switch support
Implement 802.11d-based automatic regulatory domain switching to dynamically determine the regulatory domain at runtime. The scan-done event structure by reusing reserved padding and appending new fields; the layout and values remains backward-compatible with existing users. Co-developed-by: Sean Wang <[email protected]> Signed-off-by: Sean Wang <[email protected]> Signed-off-by: JB Tsai <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+10
-2
@@ -1031,8 +1031,16 @@ void mt7921_scan_work(struct work_struct *work)
|
||||
rxd = (struct mt76_connac2_mcu_rxd *)skb->data;
|
||||
if (rxd->eid == MCU_EVENT_SCHED_SCAN_DONE) {
|
||||
ieee80211_sched_scan_results(phy->mt76->hw);
|
||||
} else if (test_and_clear_bit(MT76_HW_SCANNING,
|
||||
&phy->mt76->state)) {
|
||||
} else if (rxd->eid == MCU_EVENT_SCAN_DONE) {
|
||||
struct mt76_connac_hw_scan_done *event = NULL;
|
||||
|
||||
skb_pull(skb, sizeof(*rxd));
|
||||
event = (struct mt76_connac_hw_scan_done *)skb->data;
|
||||
mt7921_regd_change(phy, event->alpha2);
|
||||
}
|
||||
|
||||
if (test_and_clear_bit(MT76_HW_SCANNING,
|
||||
&phy->mt76->state)) {
|
||||
struct cfg80211_scan_info info = {
|
||||
.aborted = false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user