Re: [PATCH wireless-next 1/2] wifi: cfg80211/mac80211: change memory allocation for link_sinfo structure

Sarika Sharma
2026-04-29T07:24:24Z

On 29-04-2026 11:46, Johannes Berg wrote:
> On Wed, 2026-04-29 at 11:38 +0530, Sarika Sharma wrote:
>>
>> On 28-04-2026 15:01, Johannes Berg wrote:
>>> On Tue, 2026-04-28 at 14:39 +0530, Sarika Sharma wrote:
>>>>
>>>> +int cfg80211_alloc_link_sinfo_stats(struct link_station_info **link_sinfo,
>>>
>>> really?
>>>
>>> johannes
>>
>> So, this helper API I introduced in cfg80211 since struct
>> link_station_info is defined and primarily used
>> there. Keeping allocation and lifetime management in cfg80211 ensures
>> consistent ownership and cleanup once the link_station_info is consumed.
>>
>> Please let me know if I understood your concern correctly, or if you
>> were referring to something else in this patch.
>
> Hah, right. I was merely thinking of returning an error and using a
> double-pointer for assignment. There are better ways of doing that.
>
> johannes

Thanks for the clarification. I can rework this to use a simpler pattern.