2023-06-11 09:20:16

by Greenman, Gregory

[permalink] [raw]
Subject: [PATCH 0/4] cfg80211/mac80211 patches from our internal tree 2023-06-08

From: Gregory Greenman <[email protected]>

Hi

A bunch of patches from our internal tree with mac80211 and
cfg80211 changes. It's the continuation of the previous patch set,
sent on 2023-06-08.

Thanks,
Gregory

Benjamin Berg (1):
wifi: mac80211: fragment per STA profile correctly

Ilan Peer (3):
wifi: mac80211: Add debugfs entry to report dormant links
wifi: mac80211: Do not use "non-MLD AP" syntax
wifi: mac80211: Fix permissions for valid_links debugfs entry

include/net/mac80211.h | 9 ++++++---
net/mac80211/debugfs_netdev.c | 23 +++++++++++++++--------
net/mac80211/ieee80211_i.h | 2 +-
net/mac80211/mlme.c | 5 +++--
net/mac80211/util.c | 4 ++--
5 files changed, 27 insertions(+), 16 deletions(-)

--
2.38.1



2023-06-11 09:20:40

by Greenman, Gregory

[permalink] [raw]
Subject: [PATCH 1/4] wifi: mac80211: Add debugfs entry to report dormant links

From: Ilan Peer <[email protected]>

Add debugfs entry to report dormant (valid but disabled) links.

Signed-off-by: Ilan Peer <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
---
net/mac80211/debugfs_netdev.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 3fea86c9a276..6253d0127207 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -693,6 +693,19 @@ IEEE80211_IF_FILE(dot11MeshConnectedToAuthServer,
debugfs_create_file(#name, mode, sdata->vif.debugfs_dir, \
sdata, &name##_ops)

+#define DEBUGFS_ADD_X(_bits, _name, _mode) \
+ debugfs_create_x##_bits(#_name, _mode, sdata->vif.debugfs_dir, \
+ &sdata->vif._name)
+
+#define DEBUGFS_ADD_X8(_name, _mode) \
+ DEBUGFS_ADD_X(8, _name, _mode)
+
+#define DEBUGFS_ADD_X16(_name, _mode) \
+ DEBUGFS_ADD_X(16, _name, _mode)
+
+#define DEBUGFS_ADD_X32(_name, _mode) \
+ DEBUGFS_ADD_X(32, _name, _mode)
+
#define DEBUGFS_ADD(name) DEBUGFS_ADD_MODE(name, 0400)

static void add_common_files(struct ieee80211_sub_if_data *sdata)
@@ -722,6 +735,7 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD_MODE(tdls_wider_bw, 0600);
DEBUGFS_ADD_MODE(valid_links, 0200);
DEBUGFS_ADD_MODE(active_links, 0600);
+ DEBUGFS_ADD_X16(dormant_links, 0400);
}

static void add_ap_files(struct ieee80211_sub_if_data *sdata)
--
2.38.1


2023-06-11 09:21:17

by Greenman, Gregory

[permalink] [raw]
Subject: [PATCH 2/4] wifi: mac80211: Do not use "non-MLD AP" syntax

From: Ilan Peer <[email protected]>

Instead clarify the cases where link ID == 0 is intended
for an AP STA that is not part of an AP MLD.

Signed-off-by: Ilan Peer <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
---
include/net/mac80211.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index b5704ef4308f..914448cb0ecf 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -5282,7 +5282,8 @@ struct ieee80211_mutable_offsets {
* @vif: &struct ieee80211_vif pointer from the add_interface callback.
* @offs: &struct ieee80211_mutable_offsets pointer to struct that will
* receive the offsets that may be updated by the driver.
- * @link_id: the link id to which the beacon belongs (or 0 for a non-MLD AP)
+ * @link_id: the link id to which the beacon belongs (or 0 for an AP STA
+ * that is not associated with AP MLD).
*
* If the driver implements beaconing modes, it must use this function to
* obtain the beacon template.
@@ -5379,7 +5380,8 @@ void ieee80211_beacon_free_ema_list(struct ieee80211_ema_beacons *ema_beacons);
* @tim_length: pointer to variable that will receive the TIM IE length,
* (including the ID and length bytes!).
* Set to 0 if invalid (in non-AP modes).
- * @link_id: the link id to which the beacon belongs (or 0 for a non-MLD AP)
+ * @link_id: the link id to which the beacon belongs (or 0 for an AP STA
+ * that is not associated with AP MLD).
*
* If the driver implements beaconing modes, it must use this function to
* obtain the beacon frame.
@@ -5402,7 +5404,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
* ieee80211_beacon_get - beacon generation function
* @hw: pointer obtained from ieee80211_alloc_hw().
* @vif: &struct ieee80211_vif pointer from the add_interface callback.
- * @link_id: the link id to which the beacon belongs (or 0 for a non-MLD AP)
+ * @link_id: the link id to which the beacon belongs (or 0 for an AP STA
+ * that is not associated with AP MLD).
*
* See ieee80211_beacon_get_tim().
*
--
2.38.1


2023-06-11 09:23:17

by Greenman, Gregory

[permalink] [raw]
Subject: [PATCH 3/4] wifi: mac80211: Fix permissions for valid_links debugfs entry

From: Ilan Peer <[email protected]>

The entry should be a read only one and not a write only one. Fix it.
While at it, change the code to use debugs_create_x16().

Fixes: 3d9011029227 ("wifi: mac80211: implement link switching")
Signed-off-by: Ilan Peer <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
---
net/mac80211/debugfs_netdev.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 6253d0127207..b45a45df062b 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -598,13 +598,6 @@ static ssize_t ieee80211_if_parse_tsf(
}
IEEE80211_IF_FILE_RW(tsf);

-static ssize_t ieee80211_if_fmt_valid_links(const struct ieee80211_sub_if_data *sdata,
- char *buf, int buflen)
-{
- return snprintf(buf, buflen, "0x%x\n", sdata->vif.valid_links);
-}
-IEEE80211_IF_FILE_R(valid_links);
-
static ssize_t ieee80211_if_fmt_active_links(const struct ieee80211_sub_if_data *sdata,
char *buf, int buflen)
{
@@ -733,7 +726,7 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD_MODE(uapsd_queues, 0600);
DEBUGFS_ADD_MODE(uapsd_max_sp_len, 0600);
DEBUGFS_ADD_MODE(tdls_wider_bw, 0600);
- DEBUGFS_ADD_MODE(valid_links, 0200);
+ DEBUGFS_ADD_X16(valid_links, 0400);
DEBUGFS_ADD_MODE(active_links, 0600);
DEBUGFS_ADD_X16(dormant_links, 0400);
}
--
2.38.1