linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaewan Kim <jaewan@google.com>
To: gregkh@linuxfoundation.org, johannes@sipsolutions.net,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Cc: kernel-team@android.com, adelva@google.com,
	Jaewan Kim <jaewan@google.com>
Subject: [PATCH v8 2/5] wifi: nl80211: make nl80211_send_chandef non-static
Date: Thu,  2 Mar 2023 16:03:07 +0000	[thread overview]
Message-ID: <20230302160310.923349-3-jaewan@google.com> (raw)
In-Reply-To: <20230302160310.923349-1-jaewan@google.com>

Expose nl80211_send_chandef functionality for mac80211_hwsim or vendor
netlink can use it where needed.

Signed-off-by: Jaewan Kim <jaewan@google.com>
---
V8: Initial commit (split from other change)
---
 include/net/cfg80211.h | 9 +++++++++
 net/wireless/nl80211.c | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f115b2550309..bcce8e9e2aba 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -938,6 +938,15 @@ int cfg80211_chandef_dfs_required(struct wiphy *wiphy,
 				  const struct cfg80211_chan_def *chandef,
 				  enum nl80211_iftype iftype);
 
+/**
+ * nl80211_send_chandef - sends the channel definition.
+ * @msg: the msg to send channel definition
+ * @chandef: the channel definition to check
+ *
+ * Returns: 0 if sent the channel definition to msg, < 0 on error
+ **/
+int nl80211_send_chandef(struct sk_buff *msg, const struct cfg80211_chan_def *chandef);
+
 /**
  * ieee80211_chanwidth_rate_flags - return rate flags for channel width
  * @width: the channel width of the channel
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 112b4bb009c8..1fd9e6545225 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3756,8 +3756,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
 	return result;
 }
 
-static int nl80211_send_chandef(struct sk_buff *msg,
-				const struct cfg80211_chan_def *chandef)
+int nl80211_send_chandef(struct sk_buff *msg, const struct cfg80211_chan_def *chandef)
 {
 	if (WARN_ON(!cfg80211_chandef_valid(chandef)))
 		return -EINVAL;
@@ -3788,6 +3787,7 @@ static int nl80211_send_chandef(struct sk_buff *msg,
 		return -ENOBUFS;
 	return 0;
 }
+EXPORT_SYMBOL(nl80211_send_chandef);
 
 static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flags,
 			      struct cfg80211_registered_device *rdev,
-- 
2.39.2.722.g9855ee24e9-goog


  parent reply	other threads:[~2023-03-02 16:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 16:03 [PATCH v8 0/5] mac80211_hwsim: Add PMSR support Jaewan Kim
2023-03-02 16:03 ` [PATCH v8 1/5] mac80211_hwsim: add PMSR capability support Jaewan Kim
2023-03-06 16:54   ` Simon Horman
2023-03-06 16:58     ` Johannes Berg
2023-03-06 17:38       ` Simon Horman
2023-03-08  8:00     ` Jaewan Kim
2023-03-08  8:06       ` Johannes Berg
2023-03-13  7:54         ` Jaewan Kim
2023-03-02 16:03 ` Jaewan Kim [this message]
2023-03-02 16:03 ` [PATCH v8 3/5] mac80211_hwsim: add PMSR request support via virtio Jaewan Kim
2023-03-06 17:12   ` Simon Horman
2023-03-06 17:43     ` Simon Horman
2023-03-06 20:45     ` Johannes Berg
2023-03-06 21:11       ` Simon Horman
2023-03-02 16:03 ` [PATCH v8 4/5] mac80211_hwsim: add PMSR abort " Jaewan Kim
2023-03-06 17:37   ` Simon Horman
2023-03-07  6:56     ` Simon Horman
2023-03-02 16:03 ` [PATCH v8 5/5] mac80211_hwsim: add PMSR report " Jaewan Kim
2023-03-02 17:42 ` [PATCH v8 0/5] mac80211_hwsim: Add PMSR support Greg KH
2023-03-06  9:42   ` Kalle Valo
     [not found]     ` <CABZjns4xYjcn4CQzEoiozz9j7mKF0py0WE+AZ2Koi9Vz3khVLQ@mail.gmail.com>
2023-03-08 10:05       ` Kalle Valo
2023-03-13  7:56         ` Jaewan Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230302160310.923349-3-jaewan@google.com \
    --to=jaewan@google.com \
    --cc=adelva@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes@sipsolutions.net \
    --cc=kernel-team@android.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).