mac80211: add uci support for the ad-hoc multicast rate setting
authorFelix Fietkau <nbd@openwrt.org>
Mon, 25 Oct 2010 23:51:12 +0000 (23:51 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 25 Oct 2010 23:51:12 +0000 (23:51 +0000)
SVN-Revision: 23637

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

index 67884238fd9013db9b54096f5bfbfeb5a49c71ab..2f8fedf24cf844571122c8933661a509d2eb2695 100644 (file)
@@ -362,7 +362,14 @@ enable_mac80211() {
                                adhoc)
                                        config_get bssid "$vif" bssid
                                        config_get ssid "$vif" ssid
-                                       iw dev "$ifname" ibss join "$ssid" $freq ${fixed:+fixed-freq} $bssid
+                                       config_get mcast_rate "$vif" mcast_rate
+                                       local mcval=""
+                                       [ -n "$mcast_rate" ] && {
+                                               mcval="$(($mcast_rate / 1000))"
+                                               mcsub="$(( ($mcast_rate / 100) % 10 ))"
+                                               [ "$mcsub" -gt 0 ] && mcval="$mcval.$mcsub"
+                                       }
+                                       iw dev "$ifname" ibss join "$ssid" $freq ${fixed:+fixed-freq} $bssid ${mcval:+mcast-rate $mcval}
                                ;;
                                sta)
                                        if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then