Thanks! I have mediatek/mt7663pr2h_rebb.bin
in /lib/firmware/
indeed. Latest OpenWrt master. By default hostapd just exits though if you specify a DFS channel:
Sun Feb 7 00:40:07 2021 daemon.notice hostapd: wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Sun Feb 7 00:40:07 2021 daemon.notice hostapd: wlan1: interface state COUNTRY_UPDATE->HT_SCAN
Sun Feb 7 00:40:07 2021 daemon.notice hostapd: wlan1: interface state HT_SCAN->DFS
Sun Feb 7 00:40:07 2021 daemon.notice hostapd: wlan1: DFS-CAC-START freq=5260 chan=52 sec_chan=1, width=1, seg0=58, seg1=0, cac_time=60s
Sun Feb 7 00:40:07 2021 daemon.err hostapd: DFS start_dfs_cac() failed, -1
Sun Feb 7 00:40:07 2021 daemon.err hostapd: Interface initialization failed
Sun Feb 7 00:40:07 2021 daemon.notice hostapd: wlan1: interface state DFS->DISABLED
Sun Feb 7 00:40:07 2021 daemon.notice hostapd: wlan1: AP-DISABLED
If I understood it right, Felix told me earlier to replace the following:
$ git diff
diff --git a/mt7615/init.c b/mt7615/init.c
index e85568b..4ab5daf 100644
--- a/mt7615/init.c
+++ b/mt7615/init.c
@@ -344,7 +344,7 @@ mt7615_init_wiphy(struct ieee80211_hw *hw)
hw->sta_data_size = sizeof(struct mt7615_sta);
hw->vif_data_size = sizeof(struct mt7615_vif);
- if (is_mt7663(&phy->dev->mt76)) {
+ if (mt7615_firmware_offload(phy->dev)) {
wiphy->iface_combinations = if_comb;
wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
} else {
diff --git a/mt7615/mac.c b/mt7615/mac.c
index 9bae2f6..04dcd0d 100644
--- a/mt7615/mac.c
+++ b/mt7615/mac.c
@@ -2199,7 +2199,7 @@ int mt7615_dfs_init_radar_detector(struct mt7615_phy *phy)
bool ext_phy = phy != &dev->phy;
int err;
- if (is_mt7663(&dev->mt76))
+ if (mt7615_firmware_offload(dev))
return 0;
if (dev->mt76.region == NL80211_DFS_UNSET) {
However, that seems to make the radio see radar events on channels where other APs are active. E.g. on channel 100, where other APs are listening on (so I presume there's no radar activity there):
Wed Feb 17 12:16:34 2021 daemon.notice hostapd: wlan1: interface state COUNTRY_UPDATE->HT_SCAN
Wed Feb 17 12:16:34 2021 daemon.err hostapd: could not get valid channel
Wed Feb 17 12:16:34 2021 daemon.notice hostapd: wlan1: interface state HT_SCAN->DFS
Wed Feb 17 12:17:20 2021 daemon.notice hostapd: wlan1: DFS-RADAR-DETECTED freq=5500 ht_enabled=0 chan_offset=0 chan_width=0 cf1=5500 cf2=0
Wed Feb 17 12:17:20 2021 daemon.notice hostapd: dfs_downgrade_bandwidth: no DFS channels left, waiting for NOP to finish
Wed Feb 17 12:17:20 2021 daemon.notice hostapd: wlan1: AP-DISABLED
Wed Feb 17 12:17:20 2021 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan1 wasn't started
Wed Feb 17 12:17:20 2021 daemon.notice hostapd: nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Wed Feb 17 12:17:20 2021 daemon.notice hostapd: wlan1: interface state DFS->DISABLED
Wed Feb 17 12:17:20 2021 daemon.notice hostapd: wlan1: interface state DISABLED->COUNTRY_UPDATE
This loops for a while, over and over again. Felix said even if DFS worked it still needed to be verified/certified (with an SDR simulating radar pulses etc).