Skip to content

Commit 23ff5f6

Browse files
Sarika Sharmajmberg-intel
authored andcommitted
wifi: cfg80211: reorg sinfo structure elements for mesh
Currently, as multi-link operation(MLO) is not supported for mesh, reorganize the sinfo structure for mesh-specific fields and embed mesh related NL attributes together in organized view. This will allow for the simplified reorganization of sinfo structure for link level in a subsequent patch to add support for MLO station statistics. No functionality changes added. Pahole summary before the reorg of sinfo structure: - size: 256, cachelines: 4, members: 50 - sum members: 239, holes: 4, sum holes: 17 - paddings: 2, sum paddings: 2 - forced alignments: 1, forced holes: 1, sum forced holes: 1 Pahole summary after the reorg of sinfo structure: - size: 248, cachelines: 4, members: 50 - sum members: 239, holes: 4, sum holes: 9 - paddings: 2, sum paddings: 2 - forced alignments: 1, last cacheline: 56 bytes Signed-off-by: Sarika Sharma <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 7ed3f3c commit 23ff5f6

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

include/net/cfg80211.h

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,9 +2045,6 @@ struct cfg80211_tid_stats {
20452045
* @assoc_at: bootime (ns) of the last association
20462046
* @rx_bytes: bytes (size of MPDUs) received from this station
20472047
* @tx_bytes: bytes (size of MPDUs) transmitted to this station
2048-
* @llid: mesh local link id
2049-
* @plid: mesh peer link id
2050-
* @plink_state: mesh peer link state
20512048
* @signal: The signal strength, type depends on the wiphy's signal_type.
20522049
* For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
20532050
* @signal_avg: Average signal strength, type depends on the wiphy's signal_type.
@@ -2067,14 +2064,20 @@ struct cfg80211_tid_stats {
20672064
* This number should increase every time the list of stations
20682065
* changes, i.e. when a station is added or removed, so that
20692066
* userspace can tell whether it got a consistent snapshot.
2067+
* @beacon_loss_count: Number of times beacon loss event has triggered.
20702068
* @assoc_req_ies: IEs from (Re)Association Request.
20712069
* This is used only when in AP mode with drivers that do not use
20722070
* user space MLME/SME implementation. The information is provided for
20732071
* the cfg80211_new_sta() calls to notify user space of the IEs.
20742072
* @assoc_req_ies_len: Length of assoc_req_ies buffer in octets.
20752073
* @sta_flags: station flags mask & values
2076-
* @beacon_loss_count: Number of times beacon loss event has triggered.
20772074
* @t_offset: Time offset of the station relative to this host.
2075+
* @llid: mesh local link id
2076+
* @plid: mesh peer link id
2077+
* @plink_state: mesh peer link state
2078+
* @connected_to_gate: true if mesh STA has a path to mesh gate
2079+
* @connected_to_as: true if mesh STA has a path to authentication server
2080+
* @airtime_link_metric: mesh airtime link metric.
20782081
* @local_pm: local mesh STA power save mode
20792082
* @peer_pm: peer mesh STA power save mode
20802083
* @nonpeer_pm: non-peer mesh STA power save mode
@@ -2083,7 +2086,6 @@ struct cfg80211_tid_stats {
20832086
* @rx_beacon: number of beacons received from this peer
20842087
* @rx_beacon_signal_avg: signal strength average (in dBm) for beacons received
20852088
* from this peer
2086-
* @connected_to_gate: true if mesh STA has a path to mesh gate
20872089
* @rx_duration: aggregate PPDU duration(usecs) for all the frames from a peer
20882090
* @tx_duration: aggregate PPDU duration(usecs) for all the frames to a peer
20892091
* @airtime_weight: current airtime scheduling weight
@@ -2097,8 +2099,6 @@ struct cfg80211_tid_stats {
20972099
* @fcs_err_count: number of packets (MPDUs) received from this station with
20982100
* an FCS error. This counter should be incremented only when TA of the
20992101
* received packet with an FCS error matches the peer MAC address.
2100-
* @airtime_link_metric: mesh airtime link metric.
2101-
* @connected_to_as: true if mesh STA has a path to authentication server
21022102
* @mlo_params_valid: Indicates @assoc_link_id and @mld_addr fields are filled
21032103
* by driver. Drivers use this only in cfg80211_new_sta() calls when AP
21042104
* MLD's MLME/SME is offload to driver. Drivers won't fill this
@@ -2125,9 +2125,6 @@ struct station_info {
21252125
u64 assoc_at;
21262126
u64 rx_bytes;
21272127
u64 tx_bytes;
2128-
u16 llid;
2129-
u16 plid;
2130-
u8 plink_state;
21312128
s8 signal;
21322129
s8 signal_avg;
21332130

@@ -2147,36 +2144,38 @@ struct station_info {
21472144

21482145
int generation;
21492146

2147+
u32 beacon_loss_count;
2148+
21502149
const u8 *assoc_req_ies;
21512150
size_t assoc_req_ies_len;
21522151

2153-
u32 beacon_loss_count;
21542152
s64 t_offset;
2153+
u16 llid;
2154+
u16 plid;
2155+
u8 plink_state;
2156+
u8 connected_to_gate;
2157+
u8 connected_to_as;
2158+
u32 airtime_link_metric;
21552159
enum nl80211_mesh_power_mode local_pm;
21562160
enum nl80211_mesh_power_mode peer_pm;
21572161
enum nl80211_mesh_power_mode nonpeer_pm;
21582162

21592163
u32 expected_throughput;
21602164

2161-
u64 tx_duration;
2162-
u64 rx_duration;
2163-
u64 rx_beacon;
2164-
u8 rx_beacon_signal_avg;
2165-
u8 connected_to_gate;
2165+
u16 airtime_weight;
21662166

2167-
struct cfg80211_tid_stats *pertid;
21682167
s8 ack_signal;
21692168
s8 avg_ack_signal;
2169+
struct cfg80211_tid_stats *pertid;
21702170

2171-
u16 airtime_weight;
2171+
u64 tx_duration;
2172+
u64 rx_duration;
2173+
u64 rx_beacon;
2174+
u8 rx_beacon_signal_avg;
21722175

21732176
u32 rx_mpdu_count;
21742177
u32 fcs_err_count;
21752178

2176-
u32 airtime_link_metric;
2177-
2178-
u8 connected_to_as;
2179-
21802179
bool mlo_params_valid;
21812180
u8 assoc_link_id;
21822181
u8 mld_addr[ETH_ALEN] __aligned(2);

net/wireless/nl80211.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6750,9 +6750,6 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
67506750

67516751
PUT_SINFO_U64(RX_BYTES64, rx_bytes);
67526752
PUT_SINFO_U64(TX_BYTES64, tx_bytes);
6753-
PUT_SINFO(LLID, llid, u16);
6754-
PUT_SINFO(PLID, plid, u16);
6755-
PUT_SINFO(PLINK_STATE, plink_state, u8);
67566753
PUT_SINFO_U64(RX_DURATION, rx_duration);
67576754
PUT_SINFO_U64(TX_DURATION, tx_duration);
67586755

@@ -6796,13 +6793,18 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
67966793
PUT_SINFO(TX_RETRIES, tx_retries, u32);
67976794
PUT_SINFO(TX_FAILED, tx_failed, u32);
67986795
PUT_SINFO(EXPECTED_THROUGHPUT, expected_throughput, u32);
6799-
PUT_SINFO(AIRTIME_LINK_METRIC, airtime_link_metric, u32);
68006796
PUT_SINFO(BEACON_LOSS, beacon_loss_count, u32);
6797+
6798+
PUT_SINFO(LLID, llid, u16);
6799+
PUT_SINFO(PLID, plid, u16);
6800+
PUT_SINFO(PLINK_STATE, plink_state, u8);
6801+
PUT_SINFO(AIRTIME_LINK_METRIC, airtime_link_metric, u32);
68016802
PUT_SINFO(LOCAL_PM, local_pm, u32);
68026803
PUT_SINFO(PEER_PM, peer_pm, u32);
68036804
PUT_SINFO(NONPEER_PM, nonpeer_pm, u32);
68046805
PUT_SINFO(CONNECTED_TO_GATE, connected_to_gate, u8);
68056806
PUT_SINFO(CONNECTED_TO_AS, connected_to_as, u8);
6807+
PUT_SINFO_U64(T_OFFSET, t_offset);
68066808

68076809
if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_BSS_PARAM)) {
68086810
bss_param = nla_nest_start_noflag(msg,
@@ -6830,7 +6832,6 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
68306832
&sinfo->sta_flags))
68316833
goto nla_put_failure;
68326834

6833-
PUT_SINFO_U64(T_OFFSET, t_offset);
68346835
PUT_SINFO_U64(RX_DROP_MISC, rx_dropped_misc);
68356836
PUT_SINFO_U64(BEACON_RX, rx_beacon);
68366837
PUT_SINFO(BEACON_SIGNAL_AVG, rx_beacon_signal_avg, u8);

0 commit comments

Comments
 (0)