openwrt / mt76

mac80211 driver for MediaTek MT76x0e, MT76x2e, MT7603, MT7615, MT7628 and MT7688
737 stars 343 forks source link

MT7615 iw scan doesn't work when on DFS channel #684

Open geekman opened 2 years ago

geekman commented 2 years ago

Using the OpenWrt 22.03.0-rc5 snapshot.

Doing a scan when on DFS channels, such as 100, doesn't work:

# iw dev wlan1 scan
command failed: Resource busy (-16)

The relevant config for the 5GHz radio:

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
        option band '5g'
        option htmode 'VHT80'
        option channel '100'
        option country 'KR'
        option cell_density '0'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option dtim_period '3'
        option encryption 'sae-mixed'
        option key '<password>'

If I change the channel to 149 (non-DFS), and issue a wifi reload, the iw scan will succeed.

patrakov commented 2 years ago

Not a bug, unfortunately. DFS requires that the station is constantly listening on the channel for radar pulses. Scanning would require going away from that channel, thus violating the regulatory requirement.