OSDN Git Service

cfg80211: dynamically allocate per-tid stats for station info
authorArend van Spriel <aspriel@gmail.com>
Thu, 10 May 2018 11:50:12 +0000 (13:50 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 18 May 2018 09:14:34 +0000 (11:14 +0200)
commit8689c051a20195b228e19acb155c7d6e48a86753
tree15878e8e0e09da70f2e468dc5f9274c90e3bccf5
parent57c6cb81717f957fb741f2e4c79bd0e2f4f55910
cfg80211: dynamically allocate per-tid stats for station info

With the addition of TXQ stats in the per-tid statistics the struct
station_info grew significantly. This resulted in stack size warnings
due to the structure itself being above the limit for the warnings.

Add an allocation function that those who want to provide per-tid
stats should use to allocate the tid array, i.e.
struct station_info::pertid.

Cc: Toke Høiland-Jørgensen <toke@toke.dk>
Fixes: 52539ca89f36 ("cfg80211: Expose TXQ stats and parameters to userspace")
Signed-off-by: Arend van Spriel <aspriel@gmail.com>
[johannes: fix missing BIT() and logic by removing]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/mac80211/sta_info.c
net/wireless/nl80211.c
net/wireless/util.c