mac80211: add uci support for configuring antenna gain
authorFelix Fietkau <nbd@openwrt.org>
Fri, 28 Sep 2012 18:29:22 +0000 (18:29 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 28 Sep 2012 18:29:22 +0000 (18:29 +0000)
SVN-Revision: 33587

package/mac80211/Makefile
package/mac80211/files/lib/wifi/mac80211.sh

index 8945fb0ae626bdd1177c3de57c861e715d06b624..e490fbb6f04b6dcf7121d784675e82fb1eff71ea 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=mac80211
 
 PKG_VERSION:=2012-09-07
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
 PKG_MD5SUM:=59e0a114ee4b755a6e47cb6cd0f32ebc
 
index 6dfe2a2caf1be51210a0ce01c1d46cbd8d8c1ad4..1b0bea70ed78109f38bfc0c6e0e9f0980e61984b 100644 (file)
@@ -295,6 +295,7 @@ enable_mac80211() {
        config_get distance "$device" distance
        config_get txantenna "$device" txantenna all
        config_get rxantenna "$device" rxantenna all
+       config_get antenna_gain "$device" antenna_gain 0
        config_get frag "$device" frag
        config_get rts "$device" rts
        find_mac80211_phy "$device" || return 0
@@ -321,6 +322,7 @@ enable_mac80211() {
        }
 
        iw phy "$phy" set antenna $txantenna $rxantenna >/dev/null 2>&1
+       iw phy "$phy" set antenna_gain $antenna_gain
 
        [ -n "$distance" ] && iw phy "$phy" set distance "$distance"
        [ -n "$frag" ] && iw phy "$phy" set frag "${frag%%.*}"