 +				encryption="none"
 +			fi
 +			export channel
-+			iw dev "$ifname" set channel "$channel"
 +			config_set "$device" channel "$channel"
 +			uci_set wireless "$device" channel "$channel"
 +			config_set "$vif" mode "$mode"

 
 		# It is far easier to delete and create the desired interface
 		case "$mode" in
@@ -460,12 +505,37 @@
 
 		case "$mode" in
 			adhoc)

 mac80211_hostapd_setup_base() {
 	local phy="$1"
 	local ifname="$2"
@@ -353,10 +355,52 @@
 		[ -n "$ifname" ] || {
 			[ $i -gt 0 ] && ifname="wlan${phy#phy}-$i" || ifname="wlan${phy#phy}"
 		}
