Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93c78c5d authored by Karl Beldan's avatar Karl Beldan Committed by Johannes Berg
Browse files

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: default avatarKarl Beldan <karl.beldan@rivierawaves.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 586e01ed
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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));