Add diversity option
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>
Mon, 1 Jun 2009 14:32:34 +0000 (14:32 +0000)
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>
Mon, 1 Jun 2009 14:32:34 +0000 (14:32 +0000)
SVN-Revision: 16255

package/hostap-driver/files/lib/wifi/hostap.sh

index cacc3baa8b75eade31ccee212d5cca51019412c2..0c7a9d37b46595fee3a4dd08e98ea7a55ac9c8ba 100755 (executable)
@@ -54,9 +54,13 @@ enable_prism2() {
        local device="$1"
 
        config_get rxantenna "$device" rxantenna
-       [ -n "$rxantenna" ] && iwpriv $device antsel_rx "$rxantenna"
-
        config_get txantenna "$device" txantenna
+       config_get_bool diversity "$device" diversity
+       [ -n "$diversity" ] && {
+               rxantenna="1"
+               txantenna="1"
+       }
+       [ -n "$rxantenna" ] && iwpriv $device antsel_rx "$rxantenna"
        [ -n "$txantenna" ] && iwpriv $device antsel_tx "$txantenna"
 
        config_get channel "$device" channel