summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-05-30 22:45:13 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-05-30 22:45:13 +0000
commit96beb4ddd8327e3b7e7857441b371e64e9638d1f (patch)
tree54e70cb9c666809ec8222e06330831ea2365886b
parentab58323cdacdb1c17cca070ba37cd4fb0ecb1545 (diff)
[PATCH] [hostap-driver] Add bssid, frag and rts options and fix mac access control
Signed-off-by: Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16221 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xpackage/hostap-driver/files/lib/wifi/hostap.sh18
-rw-r--r--package/wpa_supplicant/files/config.brcm-2.42
2 files changed, 17 insertions, 3 deletions
diff --git a/package/hostap-driver/files/lib/wifi/hostap.sh b/package/hostap-driver/files/lib/wifi/hostap.sh
index 430b69f84..1f43b2ab1 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
diff --git a/package/wpa_supplicant/files/config.brcm-2.4 b/package/wpa_supplicant/files/config.brcm-2.4
index 7123fa1cd..0e58fa08c 100644
--- a/package/wpa_supplicant/files/config.brcm-2.4
+++ b/package/wpa_supplicant/files/config.brcm-2.4
@@ -41,7 +41,7 @@
# Driver interface for Host AP driver
-#CONFIG_DRIVER_HOSTAP=y
+CONFIG_DRIVER_HOSTAP=y
# Driver interface for Agere driver
#CONFIG_DRIVER_HERMES=y