Linux-Wireless Archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] nl80211: send MLO links channel info in NL80211_CMD_GET_INTERFACE
@ 2022-07-22 13:10 Veerendranath Jakkam
  0 siblings, 0 replies; only message in thread
From: Veerendranath Jakkam @ 2022-07-22 13:10 UTC (permalink / raw
  To: johannes; +Cc: linux-wireless

Currently, MLO link level channel information not sent to userspace when
NL80211_CMD_GET_INTERFACE requested on MLD.

Add support to send channel information for all valid links for
NL80211_CMD_GET_INTERFACE request.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
---
 net/wireless/nl80211.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b6e640437568..3580fe2f2f31 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3848,12 +3848,19 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
 
 		for_each_valid_link(wdev, link_id) {
 			struct nlattr *link = nla_nest_start(msg, link_id + 1);
+			struct cfg80211_chan_def chandef = {};
+			int ret;
 
 			if (nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID, link_id))
 				goto nla_put_failure;
 			if (nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN,
 				    wdev->links[link_id].addr))
 				goto nla_put_failure;
+
+			ret = rdev_get_channel(rdev, wdev, link_id, &chandef);
+			if (ret == 0 && nl80211_send_chandef(msg, &chandef))
+				goto nla_put_failure;
+
 			nla_nest_end(msg, link);
 		}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-22 13:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-22 13:10 [PATCH 1/3] nl80211: send MLO links channel info in NL80211_CMD_GET_INTERFACE Veerendranath Jakkam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).