From: Karl Beldan Date: Thu, 14 Feb 2013 23:03:14 +0000 (+0100) Subject: mac80211_hwsim: ask mac80211 to reserve space for chanctx.drv_priv X-Git-Tag: submit/tizen_common/20140905.094502~3339^2~28^2^2~26^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93c78c5debeb9c7101ecc73347d4730c26a98c05;p=sdk%2Femulator%2Femulator-kernel.git mac80211_hwsim: ask mac80211 to reserve space for chanctx.drv_priv Otherwise memory corruption occurs when using channel contexts (ATM when param 'channel' > 1). Signed-off-by: Karl Beldan Signed-off-by: Johannes Berg --- diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index b73e497..cffdf4f 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -2247,6 +2247,7 @@ static int __init init_mac80211_hwsim(void) /* ask mac80211 to reserve space for magic */ hw->vif_data_size = sizeof(struct hwsim_vif_priv); hw->sta_data_size = sizeof(struct hwsim_sta_priv); + hw->chanctx_data_size = sizeof(struct hwsim_chanctx_priv); memcpy(data->channels_2ghz, hwsim_channels_2ghz, sizeof(hwsim_channels_2ghz));