mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-20 20:16:16 +02:00
Allow setting mac80211 interface into ad-hoc mode (#3247)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10677 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
01a53d521a
commit
f576d07287
@ -66,10 +66,15 @@ enable_mac80211() {
|
|||||||
|
|
||||||
[ "$first" = 1 ] && {
|
[ "$first" = 1 ] && {
|
||||||
# only need to change freq band and channel on the first vif
|
# only need to change freq band and channel on the first vif
|
||||||
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
|
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
|
||||||
|
if [ "$mode" = adhoc ]; then
|
||||||
|
iwlist "$ifname" scan >/dev/null 2>/dev/null
|
||||||
|
sleep 1
|
||||||
|
iwconfig "$ifname" mode ad-hoc >/dev/null 2>/dev/null
|
||||||
|
fi
|
||||||
ifconfig "$ifname" up
|
ifconfig "$ifname" up
|
||||||
sleep 1
|
sleep 1
|
||||||
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
|
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
wpa=
|
wpa=
|
||||||
|
Loading…
Reference in New Issue
Block a user