mirror of https://gitee.com/openkylin/linux.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 <karl.beldan@rivierawaves.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
586e01eded
commit
93c78c5deb
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue