diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-05-30 22:45:13 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-05-30 22:45:13 +0000 |
commit | 3d8f2020503b3cf77a3fdb98ab2e53755bffb53a (patch) | |
tree | 2c64ae92a3497636e5979aff4370c4c7d04549c7 /package/hostap-driver | |
parent | 73493cbc83459b421b0f54be2a7f8726d4bb28f8 (diff) | |
download | mtk-20170518-3d8f2020503b3cf77a3fdb98ab2e53755bffb53a.zip mtk-20170518-3d8f2020503b3cf77a3fdb98ab2e53755bffb53a.tar.gz mtk-20170518-3d8f2020503b3cf77a3fdb98ab2e53755bffb53a.tar.bz2 |
Add bssid, frag and rts options and fix mac access control Signed-off-by: Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
SVN-Revision: 16221
Diffstat (limited to 'package/hostap-driver')
-rwxr-xr-x | package/hostap-driver/files/lib/wifi/hostap.sh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/package/hostap-driver/files/lib/wifi/hostap.sh b/package/hostap-driver/files/lib/wifi/hostap.sh index 430b69f..1f43b2a 100755 --- a/package/hostap-driver/files/lib/wifi/hostap.sh +++ b/package/hostap-driver/files/lib/wifi/hostap.sh @@ -75,7 +75,13 @@ enable_prism2() { [ "$mode" = "wds" ] || iwconfig "$device" essid "$ssid" case "$mode" in - sta) iwconfig "$device" mode managed;; + sta) + iwconfig "$device" mode managed + config_get addr "$device" bssid + [ -z "$addr" ] || { + iwconfig "$device" ap "$addr" + } + ;; ap) iwconfig "$device" mode master;; wds) iwpriv "$device" wds_add "$ssid";; *) iwconfig "$device" mode "$mode";; @@ -86,8 +92,15 @@ enable_prism2() { [ -n "$rate" ] && iwconfig "$device" rate "${rate%%.*}" config_get_bool hidden "$vif" hidden 0 - iwpriv "$ifname" enh_sec "$hidden" + iwpriv "$device" enh_sec "$hidden" + + config_get frag "$vif" frag + [ -n "$frag" ] && iwconfig "$device" frag "${frag%%.*}" + + config_get rts "$vif" rts + [ -n "$rts" ] && iwconfig "$device" rts "${rts%%.*}" + config_get maclist "$vif" maclist [ -n "$maclist" ] && { # flush MAC list iwpriv "$device" maccmd 3 @@ -95,6 +108,7 @@ enable_prism2() { iwpriv "$device" addmac "$mac" done } + config_get macpolicy "$vif" macpolicy case "$macpolicy" in allow) iwpriv $device maccmd 2 |