Search Linux Wireless

Re: [PATCH wireless-next v6 04/11] wifi: cfg80211: reorg sinfo structure elements for MLO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/23/2025 10:22 PM, Johannes Berg wrote:
On Tue, 2025-04-15 at 09:50 +0530, Sarika Sharma wrote:
Current implementation of NL80211_GET_STATION does not work for
multi-link operation(MLO) since in case of MLO only deflink (or one
of the links) is considered and not all links.

Therefore to support for MLO, start reorganizing sinfo structure
related data elements and add link_sinfo structure for link-level
statistics and keep station related data at sinfo structure.
Currently, changes are done at the deflink(or one of the links) level.
Actual link-level changes will be added in subsequent changes.

Also currently, mac80211 ops .sta_statistics() is mapped to fill sinfo
structure. But to add support for station statistics at link level,
change the ops to .link_sta_statistics() to fill link_sinfo structure.

Additionally, move connected_time before assoc_at in station_info
structure to get minimal holes.
pahole summary before this change:
  - size: 232, cachelines: 4, members: 23
  - sum members: 223, holes: 3, sum holes: 9
  - forced alignments: 1
  - last cacheline: 40 bytes

pahole summary after this change:
  - size: 224, cachelines: 4, members: 23
  - sum members: 223, holes: 1, sum holes: 1
  - forced alignments: 1
  - last cacheline: 32 bytes

Signed-off-by: Sarika Sharma <quic_sarishar@xxxxxxxxxxx>
---
NOTE:
  - Included driver changes for fixing compilation issue.

Does this really need to do all the changes in mac80211 and the drivers?

OTOH maybe if not then it would cause much more back and forth?

+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1810,47 +1810,51 @@ static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev,
  	else if (left < 0)
  		return left;
+ sinfo->links[0] = kzalloc(sizeof(*sinfo->links[0]), GFP_KERNEL);
+	if (!sinfo->links[0])
+		return -ENOMEM;


This seems rather error-prone to me.

We already have sinfo->pertid today, allocated and freed by cfg80211,
and here you've added something that's allocated by the driver and freed
by mac80211. That seems odd in comparison?

I'm not sure what the choices are, but I can't say I like this one ;-)
Maybe it's still the least bad option.


Will allocate memory during get_station() call only, in
cfg80211 for all possible links(sinfo->links[]).

Going to implement that approach and send V7 for review.





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux