+
+ [ "$mode" = "sta" ] && {
+ config_get_bool bgscan "$vif" bgscan 1
+ iwpriv "$ifname" bgscan "$bgscan"
+ }
+
+ config_get_bool antdiv "$device" diversity 1
+ sysctl -w dev."$device".diversity="$antdiv" >&-
+
+ config_get antrx "$device" rxantenna
+ if [ -n "$antrx" ]; then
+ sysctl -w dev."$device".rxantenna="$antrx" >&-
+ fi
+
+ config_get anttx "$device" txantenna
+ if [ -n "$anttx" ]; then
+ sysctl -w dev."$device".txantenna="$anttx" >&-
+ fi
+
+ config_get distance "$device" distance
+ if [ -n "$distance" ]; then
+ athctrl -i "$device" -d "$distance" >&-
+ fi
+
+ config_get txpwr "$vif" txpower
+ if [ -n "$txpwr" ]; then
+ iwconfig "$ifname" txpower "${txpwr%%.*}"
+ fi
+