wifi: cfg80211: allocate memory for link_station info structure
authorSarika Sharma <quic_sarishar@quicinc.com>
Wed, 28 May 2025 05:44:15 +0000 (11:14 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 24 Jun 2025 13:19:26 +0000 (15:19 +0200)
commit49e47223ecc4af0bd15b5267184d46b3654d520b
treef92c662f7c024021d601bef853d98e1dd9ed56c0
parent2d226d41db4bf6f1c244bae70ecd5554a504b2d1
wifi: cfg80211: allocate memory for link_station info structure

Currently, station_info structure is passed to fill station statistics
from mac80211/drivers. After NL message send to user space for requested
station statistics, memory for station statistics is freed in cfg80211.
Therefore, memory allocation/free for link station statistics should
also happen in cfg80211 only.

Hence, allocate the memory for link_station structure for all
possible links and free in cfg80211_sinfo_release_content().

Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com>
Link: https://patch.msgid.link/20250528054420.3050133-6-quic_sarishar@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/nl80211.c