Changeset c162c11 in freewrt
- Timestamp:
- Jun 25, 2007, 5:11:25 PM (18 years ago)
- Children:
- 3c116e7
- Parents:
- 349f6a3
- Location:
- package
- Files:
-
- 4 deleted
- 2 edited
-
broadcom-wl/files/wifi-broadcom.down (deleted)
-
broadcom-wl/files/wifi-broadcom.up (deleted)
-
broadcom-wl/files/wl-broadcom (modified) (15 diffs)
-
madwifi/files/wireless-atheros.post-down (deleted)
-
madwifi/files/wireless-atheros.pre-up (deleted)
-
madwifi/files/wl-atheros (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
package/broadcom-wl/files/wl-broadcom
r349f6a3 rc162c11 10 10 11 11 iface_type() { 12 [ "${IF_WIRELESS_TYPE:-""}" ="broadcom" ] && echo $IFACE | grep -q ^wl[0-9]12 [ x"$IF_WIRELESS_TYPE" = x"broadcom" ] && echo $IFACE | grep -q ^wl[0-9] 13 13 } 14 14 … … 24 24 # init_debug wlc ifname $IFACE wsec 1 25 25 26 case $ {IF_WIRELESS_AUTHORIZATION:=""}in26 case $IF_WIRELESS_AUTHORIZATION in 27 27 open) 28 28 merr "Wireless authorisation $IF_WIRELESS_AUTHORIZATION is not supported" … … 33 33 return 1 34 34 ;; 35 "open+shared")35 open+shared) 36 36 merr "Wireless authorisation $IF_WIRELESS_AUTHORIZATION is not supported" 37 37 return 1 … … 43 43 esac 44 44 45 [ "${IF_WIRELESS_KEY1:-""}" ] && init_debug wl addwep 0 $IF_WIRELESS_KEY146 [ "${IF_WIRELESS_KEY2:-""}" ] && init_debug wl addwep 1 $IF_WIRELESS_KEY247 [ "${IF_WIRELESS_KEY3:-""}" ] && init_debug wl addwep 2 $IF_WIRELESS_KEY348 [ "${IF_WIRELESS_KEY4:-""}" ] && init_debug wl addwep 3 $IF_WIRELESS_KEY449 [ "${IF_WIRELESS_KEY:-""}" ] && init_debug wl primary_key $(($IF_WIRELESS_KEY-1))45 [ -n "$IF_WIRELESS_KEY1" ] && init_debug wl addwep 0 $IF_WIRELESS_KEY1 46 [ -n "$IF_WIRELESS_KEY2" ] && init_debug wl addwep 1 $IF_WIRELESS_KEY2 47 [ -n "$IF_WIRELESS_KEY3" ] && init_debug wl addwep 2 $IF_WIRELESS_KEY3 48 [ -n "$IF_WIRELESS_KEY4" ] && init_debug wl addwep 3 $IF_WIRELESS_KEY4 49 [ -n "$IF_WIRELESS_KEY" ] && init_debug wl primary_key $(($IF_WIRELESS_KEY-1)) 50 50 } 51 51 … … 55 55 init_debug wl eap off 56 56 57 case $ {IF_WIRELESS_AUTHORIZATION:=""}in57 case $IF_WIRELESS_AUTHORIZATION in 58 58 psk) 59 59 auth=4 … … 74 74 init_debug wl wpa_auth $auth 75 75 76 if [ "$IF_WIRELESS_MODE" ="wds" ]76 if [ x"$IF_WIRELESS_MODE" = x"wds" ] 77 77 then 78 78 # nas needs some time before it can accept wds connections … … 101 101 local postup 102 102 103 case $ {IF_WIRELESS_AUTHORIZATION:=""}in104 "wep")103 case $IF_WIRELESS_AUTHORIZATION in 104 wep) 105 105 init_debug wl wpa_auth 0 106 106 mprint -n "Starting nas daemon" … … 109 109 return 110 110 ;; 111 "wpa")111 wpa) 112 112 auth=2 113 113 ;; 114 "wpa2")114 wpa2) 115 115 auth=64 116 116 ;; … … 170 170 171 171 bridged_mode() { 172 if [ "$METHOD" = "static" -a "${IF_ADDRESS:-""}" ="0.0.0.0" ]173 then 174 if [ "${PARENT_IFACE_TYPE:=""}" ="bridge" ]172 if [ x"$METHOD" = x"static" -a x"$IF_ADDRESS" = x"0.0.0.0" ] 173 then 174 if [ x"$PARENT_IFACE_TYPE" = x"bridge" ] 175 175 then 176 176 BRIDGE_IFACE=$PARENT_IFACE … … 207 207 208 208 # check SSID 209 if [ "${IF_WIRELESS_SSID:-""}" = "" ]209 if [ -z "$IF_WIRELESS_SSID" ] 210 210 then 211 211 mstate 1 … … 214 214 fi 215 215 216 case $ {IF_WIRELESS_MODE:-""}in216 case $IF_WIRELESS_MODE in 217 217 sta) 218 218 nas_auth="-S " … … 234 234 *) 235 235 mstate 1 236 if [ "$IF_WIRELESS_MODE" = "" ]236 if [ -z "$IF_WIRELESS_MODE" ] 237 237 then 238 238 merr "Operation mode not set" … … 244 244 esac 245 245 246 if [ "$IF_WIRELESS_SECURITY" ="wpa-psk" ] || \247 [ "$IF_WIRELESS_SECURITY" ="8021x" ]248 then 249 case $ {IF_WIRELESS_ENCRYPTION:-""}in246 if [ x"$IF_WIRELESS_SECURITY" = x"wpa-psk" ] || \ 247 [ x"$IF_WIRELESS_SECURITY" = x"8021x" ] 248 then 249 case $IF_WIRELESS_ENCRYPTION in 250 250 wep) 251 251 wsec=1 … … 286 286 287 287 # set country 288 [ "${IF_WIRELESS_COUNTRY:-""}" != "" ] && init_debug wlc ifname $IFACE country $IF_WIRELESS_COUNTRY288 [ -n "$IF_WIRELESS_COUNTRY" ] && init_debug wlc ifname $IFACE country $IF_WIRELESS_COUNTRY 289 289 290 290 # set hidden mode 291 [ "${IF_WIRELESS_HIDDEN:-""}" != "" ] && init_debug wlc ifname $IFACE ap_isolate $IF_WIRELESS_HIDDEN291 [ -n "$IF_WIRELESS_HIDDEN}" ] && init_debug wlc ifname $IFACE ap_isolate $IF_WIRELESS_HIDDEN 292 292 293 293 # set macmode mode 294 [ "${IF_WIRELESS_MACMODE:-""}" != "" ] && init_debug wlc ifname $IFACE macfilter $IF_WIRELESS_MACMODE294 [ -n "$IF_WIRELESS_MACMODE" ] && init_debug wlc ifname $IFACE macfilter $IF_WIRELESS_MACMODE 295 295 296 296 # set MAC addresses 297 [ "${IF_WIRELESS_MAC:-}" != "" ] && init_debug wlc ifname $IFACE maclist $IF_WIRELESS_MAC297 [ -n "$IF_WIRELESS_MAC" ] && init_debug wlc ifname $IFACE maclist $IF_WIRELESS_MAC 298 298 299 299 # set WLAN channel 300 [ "${IF_WIRELESS_CHANNEL:-""}" != "" ] && init_debug wlc ifname $IFACE channel $IF_WIRELESS_CHANNEL300 [ -n "$IF_WIRELESS_CHANNEL" ] && init_debug wlc ifname $IFACE channel $IF_WIRELESS_CHANNEL 301 301 302 302 # set frameburst 303 [ "${IF_WIRELESS_FRAMEBURST:-""}" != "" ] && init_debug wlc ifname $IFACE frameburst $IF_WIRELESS_FRAMEBURST303 [ -n "$IF_WIRELESS_FRAMEBURST" ] && init_debug wlc ifname $IFACE frameburst $IF_WIRELESS_FRAMEBURST 304 304 305 305 # set afterburner 306 [ "${IF_WIRELESS_AFTERBURNER:-""}" != "" ] && init_debug wlc ifname $IFACE afterburner $IF_WIRELESS_AFTERBURNER306 [ -n "$IF_WIRELESS_AFTERBURNER" ] && init_debug wlc ifname $IFACE afterburner $IF_WIRELESS_AFTERBURNER 307 307 308 308 gtk_rekey=${IF_WIRELESS_WPA_GTK_REKEY:-3600} 309 309 gtk_rekey=${gtk_rekey#0} 310 310 311 case $ {IF_WIRELESS_SECURITY:=""}in311 case $IF_WIRELESS_SECURITY in 312 312 none) 313 313 security_none … … 334 334 mstate 0 335 335 336 if [ "${PARENT_IFACE_TYPE:-""}" = "" ]336 if [ -z "$PARENT_IFACE_TYPE" ] 337 337 then 338 338 if is_up ${BRIDGE_IFACE:="FOO"} -
package/madwifi/files/wl-atheros
r349f6a3 rc162c11 10 10 11 11 iface_type() { 12 [ "${IF_WIRELESS_TYPE:-""}" ="atheros" ] && echo $IFACE | grep -q ^ath[0-9]12 [ x"$IF_WIRELESS_TYPE" = x"atheros" ] && echo $IFACE | grep -q ^ath[0-9] 13 13 } 14 14 … … 26 26 27 27 # check SSID 28 if [ "${IF_WIRELESS_SSID:-""}" = "" ] 29 then 28 [ -z "$IF_WIRELESS_SSID" ] && { 30 29 mstate 1 31 30 merr "ESSID not set" 32 31 return 1 33 fi32 } 34 33 35 34 # set operation mode 36 case "${IF_WIRELESS_MODE:=""}"in35 case $IF_WIRELESS_MODE in 37 36 ap) 38 37 init_debug wlanconfig $IFACE create wlandev wifi0 wlanmode ap … … 62 61 63 62 # set WLAN channel 64 [ "${IF_WIRELESS_CHANNEL:-""}" ] && init_debug iwconfig $IFACE channel $IF_WIRELESS_CHANNEL63 [ -n "$IF_WIRELESS_CHANNEL" ] && init_debug iwconfig $IFACE channel $IF_WIRELESS_CHANNEL 65 64 66 65 # set afterburner 67 [ "${IF_WIRELESS_AFTERBURNER:-""}" ] && {66 [ -n "$IF_WIRELESS_AFTERBURNER" ] && { 68 67 init_debug iwpriv $IFACE mode 3 69 68 init_debug iwpriv $IFACE turbo 3 … … 71 70 72 71 # encryption 73 case "${IF_WIRELESS_ENCRYPTION:-""}"in72 case $IF_WIRELESS_ENCRYPTION in 74 73 wep) 75 74 ;; … … 83 82 84 83 # security 85 case "${IF_WIRELESS_SECURITY:-""}"in84 case $IF_WIRELESS_SECURITY in 86 85 none) 87 86 ;; … … 99 98 100 99 # set country 101 [ "$IF_WIRELESS_COUNTRY" ] && {100 [ -n "$IF_WIRELESS_COUNTRY" ] && { 102 101 minfo "wireless-country is a module option." 103 102 minfo " See http://madwifi.org/wiki/UserDocs/CountryCode" … … 152 151 esac 153 152 154 [ "${IF_WIRELESS_KEY1:-""}" ] && init_debug iwconfig $IFACE key [1] $IF_WIRELESS_KEY1155 [ "${IF_WIRELESS_KEY2:-""}" ] && init_debug iwconfig $IFACE key [2] $IF_WIRELESS_KEY2156 [ "${IF_WIRELESS_KEY3:-""}" ] && init_debug iwconfig $IFACE key [3] $IF_WIRELESS_KEY3157 [ "${IF_WIRELESS_KEY4:-""}" ] && init_debug iwconfig $IFACE key [4] $IF_WIRELESS_KEY4158 [ "${IF_WIRELESS_KEY:-""}" ] && init_debug iwconfig $IFACE key [$IF_WIRELESS_KEY]153 [ -n "$IF_WIRELESS_KEY1" ] && init_debug iwconfig $IFACE key [1] $IF_WIRELESS_KEY1 154 [ -n "$IF_WIRELESS_KEY2" ] && init_debug iwconfig $IFACE key [2] $IF_WIRELESS_KEY2 155 [ -n "$IF_WIRELESS_KEY3" ] && init_debug iwconfig $IFACE key [3] $IF_WIRELESS_KEY3 156 [ -n "$IF_WIRELESS_KEY4" ] && init_debug iwconfig $IFACE key [4] $IF_WIRELESS_KEY4 157 [ -n "$IF_WIRELESS_KEY" ] && init_debug iwconfig $IFACE key [$IF_WIRELESS_KEY] 159 158 160 159 return 0
Note:
See TracChangeset
for help on using the changeset viewer.
