Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx> writes: > From: Arend van Spriel <aspriel@xxxxxxxxx> > > With the addition of TXQ stats in the per-tid statistics the struct > station_info grew significantly. This resulted in stack limit warnings > like below: > > CC [M] drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.o > drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c: > In function ‘brcmf_notify_connect_status_ap’: > drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:5530:1: > error: the frame size of 1592 bytes is larger than 1024 bytes > > This patch adds an allocation function that those who want to provide > per-tid stats should use to allocate the tid array, ie. > struct station_info::pertid. > > Cc: Toke Høiland-Jørgensen <toke@xxxxxxx> > Fixes: 52539ca89f36 ("cfg80211: Expose TXQ stats and parameters to > userspace") > Signed-off-by: Arend van Spriel <aspriel@xxxxxxxxx> > --- > + linux-wireless list > > Johannes, Toke, > > Here an alternative approach. Currently the only cfg80211-based driver > providing per-tid stats is mac80211. This patch only changes mac80211 > and the other driver can keep using stack allocation. Even mac80211 could > if wanted, but I left that part as is. Hmm, yeah, that would work too. Though I worry that mixing dynamically and statically allocated fields is going to result in errors further down the road? I guess it also depends on whether struct station_info is likely to grow more for other reasons, in which case on-stack allocation needs to be changed anyway. I'm fine with either approach; I'm happy to let it be up to our friendly maintainers to decide which approach they prefer :) -Toke