Skip to content

Commit

Permalink
wifi: nl80211: make nl80211_send_chandef non-static
Browse files Browse the repository at this point in the history
Expose nl80211_send_chandef functionality for mac80211_hwsim or vendor
netlink can use it where needed.

Signed-off-by: Jaewan Kim <jaewan@google.com>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Link: https://lore.kernel.org/r/20230322131637.2633968-3-jaewan@google.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Jaewan Kim authored and Johannes Berg committed Mar 24, 2023
1 parent 92d1338 commit 5097f84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,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
Expand Down
4 changes: 2 additions & 2 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -3765,8 +3765,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;
Expand Down Expand Up @@ -3797,6 +3796,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,
Expand Down

0 comments on commit 5097f84

Please sign in to comment.