summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-11-17 05:13:24 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-11-17 05:13:24 +0000
commit1e428b677bc28fcd0cb83e96af11d5bae3176212 (patch)
tree119735ed81b90b6830d1c347ff4ef7abf0f5d445 /package
parentbb9db87637766151c0173a9c2c862031d19db20b (diff)
downloadmtk-20170518-1e428b677bc28fcd0cb83e96af11d5bae3176212.zip
mtk-20170518-1e428b677bc28fcd0cb83e96af11d5bae3176212.tar.gz
mtk-20170518-1e428b677bc28fcd0cb83e96af11d5bae3176212.tar.bz2
add wep support for broadcom-wl
SVN-Revision: 5551
Diffstat (limited to 'package')
-rw-r--r--package/broadcom-wl/files/lib/wifi/broadcom.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/package/broadcom-wl/files/lib/wifi/broadcom.sh b/package/broadcom-wl/files/lib/wifi/broadcom.sh
index 9fed98f..4dad011 100644
--- a/package/broadcom-wl/files/lib/wifi/broadcom.sh
+++ b/package/broadcom-wl/files/lib/wifi/broadcom.sh
@@ -117,7 +117,23 @@ enable_broadcom() {
config_get enc "$vif" encryption
case "$enc" in
WEP|wep)
- wsec_r=1
+ wsec_r=0
+ wsec=1
+ defkey=1
+ config_get key "$vif" key
+ case "$key" in
+ [1234])
+ defkey="$key"
+ for knr in 1 2 3 4; do
+ config_get k "$vif" key$knr
+ [ -n "$k" ] || continue
+ [ "$defkey" = "$knr" ] && def="=" || def=""
+ append vif_pre_up "wepkey $def$knr,$k" "$N"
+ done
+ ;;
+ "");;
+ *) append vif_pre_up "wepkey 1,$key" "$N";;
+ esac
;;
*psk*|*PSK*)
wsec_r=1