summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorCong Ding <dinggnu@gmail.com>2013-02-06 17:23:45 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-02-06 17:31:55 +0100
commit9887dbf5b2163bcf69cd4456c21352e9a81c6003 (patch)
treeef7024d3905bacfdcbb0501bf5c64962cd577a43 /net/mac80211
parentc49dc9008b1c641a86837297df7c90cef070571b (diff)
downloadlinux-9887dbf5b2163bcf69cd4456c21352e9a81c6003.tar.gz
linux-9887dbf5b2163bcf69cd4456c21352e9a81c6003.tar.bz2
linux-9887dbf5b2163bcf69cd4456c21352e9a81c6003.zip
mac80211: fix error in sizeof() usage
Using 'sizeof' on array given as function argument returns size of a pointer rather than the size of array. Cc: stable@vger.kernel.org Signed-off-by: Cong Ding <dinggnu@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 516fbc96feff..0479c64aa83c 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2004,7 +2004,8 @@ static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev,
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- memcpy(sdata->vif.bss_conf.mcast_rate, rate, sizeof(rate));
+ memcpy(sdata->vif.bss_conf.mcast_rate, rate,
+ sizeof(int) * IEEE80211_NUM_BANDS);
return 0;
}