projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ar71xx] create firmware image for the RouterStation Pro, and add a profile for it...
[openwrt.git]
/
package
/
mac80211
/
files
/
lib
/
wifi
/
mac80211.sh
diff --git
a/package/mac80211/files/lib/wifi/mac80211.sh
b/package/mac80211/files/lib/wifi/mac80211.sh
index
8f3ed4a
..
2721e4d
100644
(file)
--- a/
package/mac80211/files/lib/wifi/mac80211.sh
+++ b/
package/mac80211/files/lib/wifi/mac80211.sh
@@
-13,14
+13,14
@@
scan_mac80211() {
config_get mode "$vif" mode
case "$mode" in
config_get mode "$vif" mode
case "$mode" in
- adhoc|sta|ap|monitor)
+ adhoc|sta|ap|monitor
|mesh
)
append $mode "$vif"
;;
*) echo "$device($vif): Invalid mode, ignored."; continue;;
esac
done
append $mode "$vif"
;;
*) echo "$device($vif): Invalid mode, ignored."; continue;;
esac
done
- config_set "$device" vifs "${ap:+$ap }${adhoc:+$adhoc }${ahdemo:+$ahdemo }${sta:+$sta }${wds:+$wds }${monitor:+$monitor}"
+ config_set "$device" vifs "${ap:+$ap }${adhoc:+$adhoc }${ahdemo:+$ahdemo }${sta:+$sta }${wds:+$wds }${monitor:+$monitor
}${mesh:+$mesh
}"
}
}
@@
-53,6
+53,8
@@
enable_mac80211() {
config_get txpower "$device" txpower
local first=1
config_get txpower "$device" txpower
local first=1
+ local mesh_idx=0
+ wifi_fixup_hwmode "$device" "g"
for vif in $vifs; do
ifconfig "$ifname" down 2>/dev/null
config_get ifname "$vif" ifname
for vif in $vifs; do
ifconfig "$ifname" down 2>/dev/null
config_get ifname "$vif" ifname
@@
-75,6
+77,13
@@
enable_mac80211() {
sleep 1
iwconfig "$ifname" mode ad-hoc >/dev/null 2>/dev/null
fi
sleep 1
iwconfig "$ifname" mode ad-hoc >/dev/null 2>/dev/null
fi
+ # mesh interface should be created only for the first interface
+ if [ "$mode" = mesh ]; then
+ config_get mesh_id "$vif" mesh_id
+ if [ -n "$mesh_id" ]; then
+ iw dev "$ifname" interface add msh$mesh_idx type mp mesh_id $mesh_id
+ fi
+ fi
sleep 1
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
}
sleep 1
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
}
@@
-162,8
+171,15
@@
enable_mac80211() {
}
fi
;;
}
fi
;;
+ mesh)
+ # special case where physical interface should be down for mesh to work
+ ifconfig "$ifname" down
+ ifconfig "msh$mesh_idx" up
+ iwlist msh$mesh_idx scan 2>/dev/null >/dev/null
+ ;;
esac
first=0
esac
first=0
+ mesh_idx=$(expr $mesh_idx + 1)
done
}
done
}
This page took
0.02198 seconds
and
4
git commands to generate.