aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/files/lib/wifi/mac80211.sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-10-11 01:05:17 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-10-11 01:05:17 +0000
commit4d50dc292ccfda5949b6dc71f8f0fac38c499866 (patch)
treed2154015b508157680a5b292d9353fb3f9b3e94d /package/mac80211/files/lib/wifi/mac80211.sh
parentbc3a78d25b35ad1782e0d5250a4f3398122c1e52 (diff)
downloadupstream-4d50dc292ccfda5949b6dc71f8f0fac38c499866.tar.gz
upstream-4d50dc292ccfda5949b6dc71f8f0fac38c499866.tar.bz2
upstream-4d50dc292ccfda5949b6dc71f8f0fac38c499866.zip
mac80211: fix encryption fallback for sta mode, add frequency/bssid selection support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18025 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/files/lib/wifi/mac80211.sh')
-rw-r--r--package/mac80211/files/lib/wifi/mac80211.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh
index c11da4279b..29c1041bfd 100644
--- a/package/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/mac80211/files/lib/wifi/mac80211.sh
@@ -231,14 +231,12 @@ enable_mac80211() {
iw dev "$ifname" ibss join "$ssid" $freq ${fixed:+fixed-freq} $bssid
;;
sta|mesh)
+ config_get bssid "$vif" bssid
case "$enc" in
- *)
- iw dev "$ifname" connect "$ssid"
- ;;
wep)
if [ -e "$keymgmt" ]; then
[ -n "$keystring" ] &&
- iw dev "$ifname" connect "$ssid" key "$keystring"
+ iw dev "$ifname" connect "$ssid" ${fixed:+$freq} $bssid key "$keystring"
else
if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then
wpa_supplicant_setup_vif "$vif" wext || {
@@ -260,6 +258,9 @@ enable_mac80211() {
}
fi
;;
+ *)
+ iw dev "$ifname" connect "$ssid" ${fixed:+$freq} $bssid
+ ;;
esac
;;