From 030f9c1bee27e6d29cb0b9e6011481ed2f66685d Mon Sep 17 00:00:00 2001 From: jow Date: Sun, 22 May 2011 12:02:35 +0000 Subject: [PATCH 1/1] [package] iw: fix calculation of fractional multicast rates like 5.5Mbps due to wrong operator precedence git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26968 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/iw/Makefile | 4 ++-- package/iw/patches/110-fix_rate_calculation.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 package/iw/patches/110-fix_rate_calculation.patch diff --git a/package/iw/Makefile b/package/iw/Makefile index 625e17921..2b714f8f9 100644 --- a/package/iw/Makefile +++ b/package/iw/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2009 OpenWrt.org +# Copyright (C) 2007-2011 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iw PKG_VERSION:=0.9.22 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://wireless.kernel.org/download/iw/ diff --git a/package/iw/patches/110-fix_rate_calculation.patch b/package/iw/patches/110-fix_rate_calculation.patch new file mode 100644 index 000000000..e7328e39b --- /dev/null +++ b/package/iw/patches/110-fix_rate_calculation.patch @@ -0,0 +1,11 @@ +--- a/ibss.c ++++ b/ibss.c +@@ -104,7 +104,7 @@ static int join_ibss(struct nl80211_stat + if (*end != '\0') + return 1; + +- NLA_PUT_U32(msg, NL80211_ATTR_MCAST_RATE, (int) rate * 10); ++ NLA_PUT_U32(msg, NL80211_ATTR_MCAST_RATE, (int)(rate * 10)); + argv++; + argc--; + } -- 2.20.1