Message ID | 20191109173545.GA103328@makrotopia.org |
---|---|
State | Accepted |
Delegated to: | Daniel Golle |
Headers | show |
Series | [OpenWrt-Devel,v2,netifd,1/5] wireless: add ubus method for reloading configuration | expand |
On Sat, Nov 09, 2019 at 06:35:45PM +0100, Daniel Golle wrote: > From: John Crispin <john@phrozen.org> > > Now that netifd and hostapd allow dynamic reconfiguration, add a > command to trigger it. > > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > --- > v2: unchanged I forgot to add the Makefiles of base-files, mac80211 and hostapd which contained PKG_RELEASE bumps... I pushed that to my staging tree now instead of re-posting the whole series once again here...
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi index f7a10de215..261d2fb500 100755 --- a/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi @@ -130,6 +130,10 @@ wifi_updown() { scan_wifi cmd=up } + [ reconf = "$1" ] && { + scan_wifi + cmd=reconf + } ubus_wifi_cmd "$cmd" "$2" _wifi_updown "$@" } @@ -241,6 +245,7 @@ case "$1" in reload) wifi_reload "$2";; reload_legacy) wifi_reload_legacy "$2";; --help|help) usage;; + reconf) ubus call network reload; wifi_updown "reconf" "$2";; ''|up) ubus call network reload; wifi_updown "enable" "$2";; *) usage; exit 1;; esac