Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2698 - netifd DFS-delayed wireless interfaces not correctly handled #7692

Open
openwrt-bot opened this issue Dec 27, 2019 · 4 comments
Open
Labels

Comments

@openwrt-bot
Copy link

openwrt-bot commented Dec 27, 2019

oldium:

Found on TP-Link Archer C7 v4 on master (commit db992e7 - 5 days ago).

When having 3 interfaces on channel requiring radar scan (DFS), only the main interface is shown - see logs, where radio0 wifi should have 3 interfaces wlan0-lan, wlan0-guest and wlan0-admin, but only wlan0-lan is shown. Due to DFS scan it comes up after a minute after /etc/init.d/network start is executed.

Configuration:

  • 2 wifis: 2,4GHz (radio1) + 5GHz (radio0)
  • each band has 3 SSIDs (domaci-soukroma, domaci, domaci-admin), each one's interface assigned to one bridge - lan, guest and admin, respectively.

Called ubus call network.wireless status, received result:

  • wlan0-lan exists
  • wlan0-guest and wlan0-admin not recognised
  • wlan1-lan, wlan1-guest, wlan1-admin exist

Expected result:

  • wlan0-guest and wlan0-admin recognised

Configuration, logread (produced by /sbin/netifd -d 15 -l 7), ubus network.device status and ubus network.wireless status attached (removed IP and MAC addresses).

@openwrt-bot
Copy link
Author

openwrt-bot commented Jan 1, 2020

oldium:

The problem might be in mac80211.sh, which on line 518 states:

Hostapd will handle recreating the interface and

subsequent virtual APs belonging to the same PHY

This is true for interfaces wlan0-guest and wlan0-admin, which are created after wlan0-lan comes up. But before this happens, the mac80211_setup_vif is called and tries to do (see lines 750-755):

logger ip link set dev "$ifname" $action
ip link set dev "$ifname" "$action" || {
wireless_setup_vif_failed IFUP_ERROR
json_select ..
return
}

This needs to be postponed for wlan0-guest and wlan0-admin until the main interface wlan0-lan comes up. I believe this is worked-around also in function drv_mac80211_setup on line 962, which states:

[ "${add_ap}" = 1 ] && sleep 1
for_each_interface "ap" mac80211_setup_vif

So it gives hostapd 1 second to come up. But problem with wlan0-guest and wlan0-admin is that they come up after 60 seconds as soon as DFS scan finishes and wlan0-lan comes up.

@openwrt-bot
Copy link
Author

openwrt-bot commented Jan 1, 2020

oldium:

Added generated hostapd configs. Main interface on phy0 in the attached config is interface=wlan0-lan, others are bss=wlan0-guest and bss=wlan0-admin. phy0 does not work (uses channel requiring DFS scan on 5GHz band), phy1 works (2.4GHz band, no DFS required).

@openwrt-bot
Copy link
Author

openwrt-bot commented Mar 20, 2020

oldium:

Fixed by [[https://github.com//pull/2848|pull request 2848]].

@openwrt-bot
Copy link
Author

openwrt-bot commented Mar 20, 2020

dangowrt:

Fixed in master since commit [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=23a885bf89a204f91e4f17ed96f1a9fc7f50ea34|23a885bf89a204f91e4f17ed96f1a9fc7f50ea34]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant