On 5/15/2025 1:23 AM, Johannes Berg wrote:
On Wed, 2025-05-14 at 22:18 +0530, Sarika Sharma wrote:
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().
I'll probably take a look myself tomorrow in the interest of getting all
things lined up for 6.16 quickly, but chances are you'll be at work a
couple of hours before me (and I'm not really all that awake now), so
pointer to this bug report from the bot:
http://wifibot.sipsolutions.net/results/962902/14088291/build_allmodconfig_warn/summary
Says some locking issue.
Also, is there any specific reason to want to allocate each link
individually? Why not allocate them all together in one bigger
allocation? Doesn't matter much though I guess.
Also, while implementing I think this way looks clean and easy to parse
the links using link_id, also while allocating/de-allocating pertid for
link level, at least to me.
So I would keep this like this only?
johannes