Skip to content
Snippets Groups Projects
Commit d0556cda authored by Florian Fainelli's avatar Florian Fainelli
Browse files

Allow setting mac80211 interface into ad-hoc mode (#3247)

SVN-Revision: 10677
parent 6776a34d
No related branches found
No related tags found
No related merge requests found
...@@ -66,10 +66,15 @@ enable_mac80211() { ...@@ -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=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment