mbox series

[wireless-next,v5,00/11] wifi: cfg80211/mac80211: add support to handle per link statistics of multi-link station

Message ID 20250312065132.3397726-1-quic_sarishar@quicinc.com (mailing list archive)
Headers show
Series wifi: cfg80211/mac80211: add support to handle per link statistics of multi-link station | expand

Message

Sarika Sharma March 12, 2025, 6:51 a.m. UTC
Current implementation of NL80211_CMD_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.

Hence, add the link_sinfo structure to provide infrastructure
for link-level station statistics for multi-link operation(MLO).

Additionally, accumulated stats for MLO are included in a concise
manner to provide a comprehensive overview of the ML stations.

V5:
 - Rebased the patches.

V4:
 - Update helper function for link_sta derefrence.                    
 - Instead of using unnecessary rssi variable directly use return.
 - Correct commit tittle and message for some patches.
 - Corrected cfg80211_sinfo_release_content() unnecessary logic.
 - Split the patches for cfg80211/mac80211.
 - Add additional fields at MLO level.
 - Remove Ath12k patche from this series.
 - Remove unnecessary if condition check from "add additional MLO
   statistics".

V3:
 - Convert RFC patch to actual PATCH with each patch bisectable.
 - Add logic for MLO level signal and rates.

V2:
 - Update cover letter to give more details on structural changes.
 - Split the patch(1/7) in two patches.
 - Do the required changes for MLO bringup before as seperate patches.
 - Remove link_sinfo naming to sinfo for better clarity on changes.
 - Add accumulated stats logic in cfg80211.
 - Add flag to indicate driver supports per-link station statistics or not.

Current flow:
  cfg80211:
  - Structure station_info is used to fill all station information (station
    level as well link level).
  - Nl80211_get_station() - locally define sinfo, call -.get_station() ops

  mac80211:
  - Sta_set_sinfo() - fill station information and call mac80211
    ops - .sta_statistics()(to fill the station_info structure).

Purposed flow:
 cfg80211:
  - Structure changes for station_info
    structure station_info {
      filled
      packets
      sta_flags
      ... etc // station specific fields
      link_station_info *links[IEEE80211_MLD_MAX_NUM_LINKS]
    }
    structure link_station_info {
      filled
      rates
      ...etc // all link specific fields
    }

  - Split station_info structure into station specific and link specific
    fields- (station_info and link_station_info).
  - Add array pointers in station_info structure for link_station_info.
    for non-ML use links[0], for ML use *links for each valid links.
  - Nl80211_get_station() - locally define sinfo, call -.get_station() ops.
  - Once link station information filled, fill mld level information in
    cfg80211_sta_set_mld_sinfo() for MLO.
  - Introduce a flag to indicate if driver provides per-link station
    statistics or not and embed NL attributes accordingly.

 mac80211:
  - Sta_set_sinfo() - fill station specific information and call
    sta_set_link_sinfo()
     a. If MLO and driver provides per-link statistics
         - For each link fill link specific data in *links[link_id]
         - Call mac80211 ops for each link- .link_sta_statistics() to
           fill link statistics.
     b. If non-ML or driver does not provides per-link statistics
         - Fill link level data for links[0]
         - Call mac80211 ops- .link_sta_statistics() to fill link statistics
  - Maintain accumulated data for removed links in sta_info structure
    and fill in to station_info structure for consistency.

Sarika Sharma (11):
  wifi: mac80211: add support towards MLO handling of station statistics
  wifi: mac80211: refactoring sta_set_sinfo() to add support towards MLO
    statistics
  wifi: cfg80211: refactoring nl80211_set_station() for link attributes
    towards MLO
  wifi: cfg80211: reorg sinfo structure elements for MLO
  wifi: cfg80211: extend statistics for link level in sinfo
  wifi: cfg80211: add flag to indicate driver supports ML station
    statistics
  wifi: cfg80211: add accumulated statistics for MLO links
  wifi: cfg80211: add additional MLO statistics
  wifi: mac80211: extend support to fill link level sinfo structure
  wifi: mac80211: add support to accumulate removed link statistics
  wifi: mac80211: correct RX stats packet increment for multi-link

 drivers/net/wireless/ath/ath10k/mac.c         |   6 +-
 drivers/net/wireless/ath/ath11k/mac.c         |   6 +-
 drivers/net/wireless/ath/ath12k/mac.c         |  10 +-
 drivers/net/wireless/ath/ath6kl/cfg80211.c    |  56 +--
 drivers/net/wireless/ath/wcn36xx/main.c       |   5 +-
 drivers/net/wireless/ath/wcn36xx/smd.c        |   2 +-
 drivers/net/wireless/ath/wcn36xx/smd.h        |   2 +-
 drivers/net/wireless/ath/wil6210/cfg80211.c   |  32 +-
 drivers/net/wireless/ath/wil6210/debugfs.c    |  11 +-
 .../broadcom/brcm80211/brcmfmac/cfg80211.c    |  75 ++--
 drivers/net/wireless/intel/iwlwifi/dvm/lib.c  |   2 +-
 .../net/wireless/intel/iwlwifi/mvm/mac80211.c |   4 +-
 .../wireless/intel/iwlwifi/mvm/mld-mac80211.c |   2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h  |   2 +-
 drivers/net/wireless/marvell/libertas/cfg.c   |  19 +-
 .../net/wireless/marvell/mwifiex/cfg80211.c   |  61 ++--
 .../net/wireless/mediatek/mt76/mt7915/main.c  |   4 +-
 .../net/wireless/mediatek/mt76/mt7921/main.c  |   2 +-
 .../net/wireless/mediatek/mt76/mt7925/main.c  |   2 +-
 drivers/net/wireless/mediatek/mt76/mt792x.h   |   2 +-
 .../net/wireless/mediatek/mt76/mt792x_core.c  |   2 +-
 .../net/wireless/mediatek/mt76/mt7996/main.c  |   4 +-
 .../net/wireless/quantenna/qtnfmac/commands.c |  60 ++--
 drivers/net/wireless/realtek/rtl8xxxu/core.c  |   4 +-
 drivers/net/wireless/realtek/rtw88/mac80211.c |   4 +-
 drivers/net/wireless/realtek/rtw89/mac80211.c |   4 +-
 drivers/net/wireless/ti/wlcore/main.c         |   4 +-
 drivers/net/wireless/virtual/virt_wifi.c      |  10 +-
 include/net/cfg80211.h                        | 212 +++++++----
 include/net/mac80211.h                        |  21 +-
 net/mac80211/driver-ops.h                     |  14 +-
 net/mac80211/ethtool.c                        |  31 +-
 net/mac80211/ibss.c                           |   4 +-
 net/mac80211/rx.c                             |  15 +-
 net/mac80211/sta_info.c                       | 275 +++++++++-----
 net/mac80211/sta_info.h                       |  30 +-
 net/mac80211/trace.h                          |   2 +-
 net/mac80211/util.c                           |  14 +-
 net/wireless/nl80211.c                        | 334 +++++++++++++++---
 net/wireless/trace.h                          |  33 +-
 net/wireless/util.c                           |   6 +-
 net/wireless/wext-compat.c                    |  22 +-
 42 files changed, 944 insertions(+), 466 deletions(-)


base-commit: 9324731b9985478faf7f77713cc5e5fee811716e

Comments

Johannes Berg March 12, 2025, 8:44 a.m. UTC | #1
> 
> V5:
>  - Rebased the patches.
> 

It's getting _really_ annoying that you keep sending patches that either
don't apply or don't build cleanly ... Please be more careful in the
future.

johannes
Jeff Johnson March 12, 2025, 5:23 p.m. UTC | #2
On 3/12/2025 1:44 AM, Johannes Berg wrote:
> It's getting _really_ annoying that you keep sending patches that either
> don't apply or don't build cleanly ... Please be more careful in the
> future.

Let me apologize for that. As we discussed when you were in Santa Clara, we
are still trying to get good automation in place. But for now most of our
processes are still manual, and I let this through our internal gate. I run a
lot of builds on the patches I'm taking through ath.git, but haven't been
running the full suite on those going through wireless. That was a mistake on
my part. Hopefully we'll improve on the patch quality going forward.

/jeff