964a504180366a5e6df1e8a9ab18747533dc6953
2 append DRIVERS
"prism2"
7 config_get mode
"$device" mode
11 *) echo "$device: Invalid mode, ignored."; continue;;
19 set_wifi_down
"$device"
22 ifconfig
"$device" down
30 config_get prifw
"$device" prifw
31 config_get stafw
"$device" stafw
32 config_get mode
"$device" mode
33 config_get rate
"$device" rate
34 config_get channel
"$device" channel
35 config_get txpower
"$device" txpower
36 config_get ssid
"$device" ssid
37 config_get maclist
"$device" maclist
38 config_get macpolicy
"$device" macpolicy
39 [ -x /usr
/sbin
/prism2_srec
] && {
40 irqdevs
=$
(cat /proc
/interrupts |
grep wifi
${device##wlan} | cut
-b 37- |
tr -d ",")
41 for dev
in "$irqdevs"; do
42 [ "$(config_get "$dev" type)" = "atheros" ] && wifi down
"$dev"
44 [ -f "$prifw" ] && prism2_srec
-g $device $prifw
45 [ -f "$stafw" ] && prism2_srec
-r $device $stafw
46 for dev
in "$irqdevs"; do
47 [ "$(config_get "$dev" type)" = "atheros" ] && wifi up
"$dev"
50 [ -n "$mode" ] && iwconfig
$device mode
$mode
51 [ -n "$rate" ] && iwconfig
$device rate
$rate
52 [ -n "$channel" ] && iwconfig
$device channel
$channel
53 [ -n "$ssid" ] && iwconfig
$device essid
$ssid
54 [ -n "$txpower" ] && iwconfig
$device txpower
$txpower
55 [ -n "$maclist" ] && {
57 iwpriv
$device maccmd
3
58 for mac
in $maclist; do
59 iwpriv
$device addmac
$mac
64 iwpriv
$device maccmd
0
67 iwpriv
$device maccmd
1
70 iwpriv
$device maccmd
2
73 # default deny policy if mac list exists
74 [ -n "$maclist" ] && iwpriv
$device maccmd
2
77 # kick all stations if we have policy explicitly set
78 [ -n "$macpolicy" ] && iwpriv
$device maccmd
4
80 net_cfg
="$(find_net_config "$device")"
81 [ -z "$net_cfg" ] ||
{
82 bridge
="$(bridge_interface "$net_cfg")"
83 config_set
"$device" bridge
"$bridge"
84 start_net
"$device" "$net_cfg"
86 set_wifi_up
"$vif" "$ifname"
92 [ -d wlan0
] ||
return
94 config_get
type "$dev" type
95 [ "$type" = prism2
] && continue
98 config wifi-device $dev
105 # option macpolicy deny
106 # option maclist '12:34:56:78:90:12
This page took 0.045247 seconds and 3 git commands to generate.