summaryrefslogtreecommitdiff
path: root/package/mac80211/files/lib
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-10-02 19:16:16 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-10-02 19:16:16 +0000
commite1a9d004cc69536d02425e646ef3f184bab1d3ac (patch)
tree6adf4800852635282550bc01f3ad724c00e4c233 /package/mac80211/files/lib
parent107bc81f4b4735a9d57cb9ac9e4e9d9b47e03c84 (diff)
mac80211: fix typo in ifname setup, suppress error messages of interface enumeration commands
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17824 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/files/lib')
-rw-r--r--package/mac80211/files/lib/wifi/mac80211.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh
index 703131cc4f..3acb3dc1cc 100644
--- a/package/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/mac80211/files/lib/wifi/mac80211.sh
@@ -7,7 +7,7 @@ find_mac80211_phy() {
local macaddr="$(config_get "$device" macaddr | tr 'A-Z' 'a-z')"
config_get phy "$device" phy
[ -z "$phy" -a -n "$macaddr" ] && {
- for phy in $(ls /sys/class/ieee80211); do
+ for phy in $(ls /sys/class/ieee80211 2>/dev/null); do
[ "$macaddr" = "$(cat /sys/class/ieee80211/${phy}/macaddress)" ] || continue
config_set "$device" phy "$phy"
break
@@ -58,7 +58,7 @@ disable_mac80211() (
done
include /lib/network
- for wdev in $(ls /sys/class/ieee80211/${phy}/device/net); do
+ for wdev in $(ls /sys/class/ieee80211/${phy}/device/net 2>/dev/null); do
ifconfig "$wdev" down 2>/dev/null
unbridge "$dev"
iw dev "$wdev" del
@@ -86,7 +86,7 @@ enable_mac80211() {
[ -n "$ifname" ] || {
ifname="wlan$i"
}
- config_set ifname "$vif" ifname
+ config_set "$vif" ifname "$ifname"
config_get enc "$vif" encryption
config_get mode "$vif" mode