On Thu, 2025-05-22 at 15:27 +0530, Sarika Sharma wrote: > > > > Probably not, though maybe we do want the link addresses in the station > > delete message to userspace? > > Then may be reporting station data will work here?( already happening) > As overall station is getting removed, not just any of links. > > If really a use case then can allocate memory for link_sinfo as well > during the station delete? I don't know if it's needed, we can always add it later if so? And maybe we'll rework the allocation anyway so it's on-demand. > > > But the warning was just an inconsistency issue - why should users set > > the valid bits for a link but then not have any link data? That seems > > wrong? > > It's not exactly incorrect, since there's a scenario where memory isn't > allocated for link_station (such as during station deletion). > Perhaps we could add a comment to clarify this behavior? > > Then either way, if really link_sinfo required to be reported(for link > address), then need to allocate memory during station delete for links. > > or if need to add WARN_ON_ONCE(), can reset valid_links during station > delete? I guess I disagree and still think it is incorrect, it means something (mac80211?) set up the valid links bitmap but wasn't able to fill in the data. Why would that make sense? OK, maybe there's a conceptual difference here. I'm reading the "valid_links" as "for this specific statistics structure, these are the valid links". If you read it as "for this station, these are the valid links" then it makes some sense to have the valid links filled, but no statistics. But I'd argue that latter interpretation doesn't make much sense since to userspace they look exactly the same. If we had say the link address outside and then the link address would be there even in the absence of statistics, it'd make more sense, but that's not how it works? johannes