summaryrefslogtreecommitdiff
path: root/mac.c
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2026-04-13 22:25:41 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2026-04-13 22:25:41 +0000
commitbbc9d102496a6ee93c55d32a9ce40d2f737fc9e7 (patch)
treee7dc0bb81dec3af67dc8337addd7987fbb224df5 /mac.c
parent91a3131f2f8e4db6b8b7999fed893ff2bedb0d2d (diff)
Diffstat (limited to 'mac.c')
-rw-r--r--mac.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mac.c b/mac.c
index da6f7957a0ae..8e604697d6c2 100644
--- a/mac.c
+++ b/mac.c
@@ -6431,7 +6431,7 @@ static int ath10k_hw_scan(struct ieee80211_hw *hw,
if (ret)
goto exit;
- arg = kzalloc(sizeof(*arg), GFP_KERNEL);
+ arg = kzalloc_obj(*arg);
if (!arg) {
ret = -ENOMEM;
goto exit;
@@ -7559,8 +7559,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
}
if (ath10k_debug_is_extd_tx_stats_enabled(ar)) {
- arsta->tx_stats = kzalloc(sizeof(*arsta->tx_stats),
- GFP_KERNEL);
+ arsta->tx_stats = kzalloc_obj(*arsta->tx_stats);
if (!arsta->tx_stats) {
ath10k_mac_dec_num_stations(arvif, sta);
ret = -ENOMEM;
@@ -7972,7 +7971,7 @@ static int ath10k_remain_on_channel(struct ieee80211_hw *hw,
scan_time_msec = ar->hw->wiphy->max_remain_on_channel_duration * 2;
- arg = kzalloc(sizeof(*arg), GFP_KERNEL);
+ arg = kzalloc_obj(*arg);
if (!arg) {
ret = -ENOMEM;
goto exit;
@@ -8954,8 +8953,7 @@ ath10k_mac_op_change_chanctx(struct ieee80211_hw *hw,
if (arg.n_vifs == 0)
goto radar;
- arg.vifs = kcalloc(arg.n_vifs, sizeof(arg.vifs[0]),
- GFP_KERNEL);
+ arg.vifs = kzalloc_objs(arg.vifs[0], arg.n_vifs);
if (!arg.vifs)
goto radar;