Skip to content

Commit

Permalink
mac80211_hwsim: ask mac80211 to reserve space for chanctx.drv_priv
Browse files Browse the repository at this point in the history
Otherwise memory corruption occurs when using channel contexts (ATM when
param 'channel' > 1).

Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Karl Beldan authored and Johannes Berg committed Feb 15, 2013
1 parent 586e01e commit 93c78c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 93c78c5

Please sign in to comment.