diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-05-23 12:02:13 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-05-29 10:38:53 +0200 |
commit | 8526f8c877baf3f9e678b31fd7d1066b776775cc (patch) | |
tree | 54031e2504091b1070bc0f2125a7d025706ebf53 /include/net | |
parent | wifi: mac80211: handle HW restart during ROC (diff) | |
download | linux-8526f8c877baf3f9e678b31fd7d1066b776775cc.tar.xz linux-8526f8c877baf3f9e678b31fd7d1066b776775cc.zip |
wifi: nl80211: clean up coalescing rule handling
There's no need to allocate a tiny struct and then
an array again, just allocate the two together and
use __counted_by(). Also unify the freeing.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240523120213.48a40cfb96f9.Ia02bf8f8fefbf533c64c5fa26175848d4a3a7899@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/cfg80211.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index d79180bec7a1..5da9bb0ac6a4 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -3566,8 +3566,8 @@ struct cfg80211_coalesce_rules { * @n_rules: number of rules */ struct cfg80211_coalesce { - struct cfg80211_coalesce_rules *rules; int n_rules; + struct cfg80211_coalesce_rules rules[] __counted_by(n_rules); }; /** |