<div dir="ltr"><div dir="ltr">Hi John,<div><br></div><div>Are you able to describe what exactly does not work - how to reproduce it? Maybe it is simple and obvious to you, but please describe what does not work.</div><div><br></div><div>I just removed setting interface up and setting txpower on it - when the interface is fully managed by hostapd. That looks reasonable to me, but might be wrong as well. At least it made reporting of the interface status working, see <a href="https://github.com/openwrt/openwrt/pull/2848">https://github.com/openwrt/openwrt/pull/2848</a> for screen-shots.</div><div><br></div><div>Regards,</div><div>Oldrich.</div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">út 24. 3. 2020 v 12:10 odesílatel John Crispin <<a href="mailto:john@phrozen.org">john@phrozen.org</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi<br>
below commit breaks wifi reconf feature and to be honest it looks like <br>
the wrong fix to me.<br>
John<br>
<br>
<br>
> dangole pushed a commit to openwrt/openwrt.git, branch master:<br>
> <a href="https://git.openwrt.org/23a885bf89a204f91e4f17ed96f1a9fc7f50ea34" rel="noreferrer" target="_blank">https://git.openwrt.org/23a885bf89a204f91e4f17ed96f1a9fc7f50ea34</a><br>
> <br>
> commit 23a885bf89a204f91e4f17ed96f1a9fc7f50ea34<br>
> Author: Oldřich Jedlička <<a href="mailto:oldium.pro@gmail.com" target="_blank">oldium.pro@gmail.com</a>><br>
> AuthorDate: Mon Mar 16 21:00:51 2020 +0100<br>
> <br>
> mac80211: do not try to setup hostapd-managed interfaces.<br>
> <br>
> For virtual access points (when multiple SSIDs are used for one<br>
> physical AP), there exist one physical network interface and<br>
> multiple virtual interfaces, which are fully under control of<br>
> hostapd. When networking is setup, the script<br>
> `/lib/netifd/wireless/mac80211.sh` is called, which tries to bring<br>
> the interface up by a call to `ip link set dev <iface> up`. This<br>
> call might fail for virtual APs, because the virtual interface<br>
> might not have been created by hostapd yet. There are some artifical<br>
> delays in the script most probably to handle this, but when DFS<br>
> channel availability check on 5GHz band is issued, hostapd can<br>
> delay creating virtual interfaces by a minute.<br>
> <br>
> In order to fix this (or work around it), do not try to bring the<br>
> interface up (this is responsibility of hostapd anyway) and<br>
> do not try to set txpower on the virtual interface.<br>
> <br>
> Fixes FS#2698.<br>
> <br>
> Signed-off-by: Oldřich Jedlička <<a href="mailto:oldium.pro@gmail.com" target="_blank">oldium.pro@gmail.com</a>><br>
> ---<br>
> .../mac80211/files/lib/netifd/wireless/mac80211.sh | 18 +++++++++++-------<br>
> 1 file changed, 11 insertions(+), 7 deletions(-)<br>
> <br>
> diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh<br>
> index f22730c9fc..f59c498215 100644<br>
> --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh<br>
> +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh<br>
> @@ -533,6 +533,7 @@ mac80211_prepare_vif() {<br>
> <br>
> NEWAPLIST="${NEWAPLIST}$ifname "<br>
> [ -n "$hostapd_ctrl" ] || {<br>
> + ap_ifname="${ifname}"<br>
> hostapd_ctrl="${hostapd_ctrl:-/var/run/hostapd/$ifname}"<br>
> }<br>
> ;;<br>
> @@ -753,13 +754,15 @@ mac80211_setup_vif() {<br>
> json_get_var vif_enable enable 1<br>
> <br>
> [ "$vif_enable" = 1 ] || action=down<br>
> - logger ip link set dev "$ifname" $action<br>
> - ip link set dev "$ifname" "$action" || {<br>
> - wireless_setup_vif_failed IFUP_ERROR<br>
> - json_select ..<br>
> - return<br>
> - }<br>
> - [ -z "$vif_txpower" ] || iw dev "$ifname" set txpower fixed "${vif_txpower%%.*}00"<br>
> + if [ "$mode" != "ap" ] || [ "$ifname" = "$ap_ifname" ]; then<br>
> + logger ip link set dev "$ifname" $action<br>
> + ip link set dev "$ifname" "$action" || {<br>
> + wireless_setup_vif_failed IFUP_ERROR<br>
> + json_select ..<br>
> + return<br>
> + }<br>
> + [ -z "$vif_txpower" ] || iw dev "$ifname" set txpower fixed "${vif_txpower%%.*}00"<br>
> + fi<br>
> <br>
> case "$mode" in<br>
> mesh)<br>
> @@ -924,6 +927,7 @@ drv_mac80211_setup() {<br>
> <br>
> has_ap=<br>
> hostapd_ctrl=<br>
> + ap_ifname=<br>
> hostapd_noscan=<br>
> for_each_interface "ap" mac80211_check_ap<br>
> <br>
> <br>
> _______________________________________________<br>
> lede-commits mailing list<br>
> <a href="mailto:lede-commits@lists.infradead.org" target="_blank">lede-commits@lists.infradead.org</a><br>
> <a href="http://lists.infradead.org/mailman/listinfo/lede-commits" rel="noreferrer" target="_blank">http://lists.infradead.org/mailman/listinfo/lede-commits</a><br>
> <br>
<br>
</blockquote></div>