mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 07:46:48 +00:00
Allow setting mac80211 interface into ad-hoc mode (#3247)
SVN-Revision: 10677
This commit is contained in:
parent
6776a34d73
commit
d0556cda49
@ -67,6 +67,11 @@ enable_mac80211() {
|
||||
[ "$first" = 1 ] && {
|
||||
# only need to change freq band and channel on the first vif
|
||||
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
|
||||
sleep 1
|
||||
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user