mbox series

[0/3] wifi: cfg80211/mac80211: add support to flush stations based on link ID

Message ID 20240124132814.802018-1-quic_adisi@quicinc.com
Headers show
Series wifi: cfg80211/mac80211: add support to flush stations based on link ID | expand

Message

Aditya Kumar Singh Jan. 24, 2024, 1:28 p.m. UTC
Currently whenever sta_flush() function is called, it flushes all stations
connected to the given interface. However in case of MLO, all the links
would be using the same interface and hence at certain cases flushing all
stations is not desireable.

There is a need to flush the stations based on link ID. This series aims
to add support for the same.

Currently two cases are handled - 
1. During NL80211_CMD_DEL_STATION command handling. If this is called
   without any mac address, all stations present on that interfaces are
   flushed. More details in the patch [1/3]

2. During stopping link AP via ieee80211_stop_ap(). Again here, all
   stations are flushed. More details in the patch [3/3]

Aditya Kumar Singh (3):
  wifi: cfg80211: add support for link id attribute in
    NL80211_CMD_DEL_STATION
  wifi: mac80211: add link id argument for sta_flush() function
  wifi: mac80211: remove only own link stations during stop_ap
---
 include/net/cfg80211.h       |  3 +++
 include/uapi/linux/nl80211.h |  3 ++-
 net/mac80211/cfg.c           |  4 ++--
 net/mac80211/ibss.c          |  4 ++--
 net/mac80211/iface.c         |  2 +-
 net/mac80211/mesh.c          |  2 +-
 net/mac80211/mlme.c          |  2 +-
 net/mac80211/ocb.c           |  2 +-
 net/mac80211/sta_info.c      | 20 +++++++++++++-------
 net/mac80211/sta_info.h      | 14 +++++++++++---
 net/wireless/nl80211.c       | 18 +++++++++++++++++-
 net/wireless/trace.h         |  7 +++++--
 12 files changed, 59 insertions(+), 22 deletions(-)


base-commit: acf868ff60b1cd1f2e597f0b15aee2ff43f9fcd3

Comments

Jeff Johnson Jan. 24, 2024, 11:40 p.m. UTC | #1
On 1/24/2024 5:28 AM, Aditya Kumar Singh wrote:
> Currently whenever NL80211_CMD_DEL_STATION command is called without any
> MAC address, all stations present on that interface are flushed.
> However with MLO there is a need to flush the stations from a particular
> link in the interface, and not from all the links associated with the MLD
> interface.
> 
> For example - 2 GHz and 5 GHz are part of an AP MLD. When 2 GHz BSS is
> brought up, it sends flush command on the interface (MLD). Then eventually

"it sends": can you please clarify what "it" is

> 5 GHZ links comes up and that also sends the command on the same interface.

"that also sends": likewise what is "that"

> Now by the time 5 GHz link comes up, if any station gets connected to 2 GHz
> link, it would be flushed while 5 GHz link is started which is wrong.
> 
> Hence, add an option to pass link ID as well in the command so that if link
> ID is passed, station using that passed link ID alone would be deleted
> and others will not be removed.
> 
> A subsequent patch would add logic to delete only the station using the
> passed link ID.
> 
> Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Actual code change LGTM