summaryrefslogtreecommitdiff
path: root/package/mac80211/files/lib/wifi/mac80211.sh
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-07-22 16:01:17 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-07-22 16:01:17 +0000
commitca8826ce873186dcf392f9492d4deecab28ace13 (patch)
treec98a7d4a036dcf46cc9f68c499b7a5941cd5e887 /package/mac80211/files/lib/wifi/mac80211.sh
parent858ebac7b86424db4730e23049b9f10d6496f42f (diff)
[package] mac80211: fix handling of frag and rts options, thanks stintel!
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22355 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/files/lib/wifi/mac80211.sh')
-rw-r--r--package/mac80211/files/lib/wifi/mac80211.sh14
1 files changed, 4 insertions, 10 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh
index a963db81ba..f022e262d9 100644
--- a/package/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/mac80211/files/lib/wifi/mac80211.sh
@@ -214,6 +214,8 @@ enable_mac80211() {
config_get txpower "$device" txpower
config_get country "$device" country
config_get distance "$device" distance
+ config_get frag "$device" frag
+ config_get rts "$device" rts
find_mac80211_phy "$device" || return 0
config_get phy "$device" phy
local i=0
@@ -227,6 +229,8 @@ enable_mac80211() {
}
[ -n "$distance" ] && iw phy "$phy" set distance "$distance"
+ [ -n "$frag" ] && iw phy "$phy" set frag "${frag%%.*}"
+ [ -n "$rts" ] && iw phy "$phy" set rts "${rts%%.*}"
export channel fixed
# convert channel to frequency
@@ -318,16 +322,6 @@ enable_mac80211() {
# wifi-device) if the latter doesn't exist
txpower="${txpower:-$vif_txpower}"
[ -z "$txpower" ] || iwconfig "$ifname" txpower "${txpower%%.*}"
-
- config_get frag "$vif" frag
- if [ -n "$frag" ]; then
- iw phy "$phy" set frag "${frag%%.*}"
- fi
-
- config_get rts "$vif" rts
- if [ -n "$rts" ]; then
- iw phy "$phy" set rts "${rts%%.*}"
- fi
done
local start_hostapd=