[backfire] merge r21998 and r22000
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 30 Jun 2010 21:26:37 +0000 (21:26 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 30 Jun 2010 21:26:37 +0000 (21:26 +0000)
SVN-Revision: 22001

package/hostapd/files/hostapd.sh

index a41c7678a7044261ef7394e1489081d215b4b09d..fdb047be6a76518f058fc014a8d4d6ce4e229585 100644 (file)
@@ -7,6 +7,9 @@ hostapd_set_bss_options() {
        config_get wpa_group_rekey "$vif" wpa_group_rekey
        config_get_bool ap_isolate "$vif" isolate 0
 
+       config_get device "$vif" device
+       config_get hwmode "$device" hwmode
+
        if [ "$ap_isolate" -gt 0 ]; then
                append "$var" "ap_isolate=$ap_isolate" "$N"
        fi
@@ -38,11 +41,16 @@ hostapd_set_bss_options() {
 
        # explicit override for crypto setting
        case "$enc" in
-               *tkip+aes|*tkip+ccmp) crypto="CCMP TKIP";;
+               *tkip+aes|*tkip+ccmp|*aes+tkip|*ccmp+tkip) crypto="CCMP TKIP";;
                *aes|*ccmp) crypto="CCMP";;
                *tkip) crypto="TKIP";;
        esac
 
+       # enforce CCMP for 11ng and 11na
+       case "$hwmode" in
+               *ng|*na) crypto="CCMP";;
+       esac
+
        # use crypto/auth settings for building the hostapd config
        case "$enc" in
                *psk*)