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 [ -f "$prifw" ] ||
[ -f "$stafw" ] && [ -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
55 [ -n "$txpower" ] && iwconfig
$device txpower
$txpower
56 [ -n "$maclist" ] && {
58 iwpriv
$device maccmd
3
59 for mac
in $maclist; do
60 iwpriv
$device addmac
$mac
65 iwpriv
$device maccmd
0
68 iwpriv
$device maccmd
1
71 iwpriv
$device maccmd
2
74 # default deny policy if mac list exists
75 [ -n "$maclist" ] && iwpriv
$device maccmd
2
78 # kick all stations if we have policy explicitly set
79 [ -n "$macpolicy" ] && iwpriv
$device maccmd
4
81 net_cfg
="$(find_net_config "$device")"
82 [ -z "$net_cfg" ] ||
{
83 bridge
="$(bridge_interface "$net_cfg")"
84 config_set
"$device" bridge
"$bridge"
85 start_net
"$device" "$net_cfg"
87 set_wifi_up
"$device" "$device"
93 [ -d wlan0
] ||
return
95 config_get
type "$dev" type
96 [ "$type" = prism2
] && continue
99 config wifi-device $dev
106 # option macpolicy deny
107 # option maclist '12:34:56:78:90:12
110 # REMOVE THIS LINE TO ENABLE WIFI:
This page took 0.056372 seconds and 5 git commands to generate.