summaryrefslogtreecommitdiff
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2022-06-12 16:49:45 +0300
committerJohannes Berg <johannes.berg@intel.com>2022-07-15 11:43:20 +0200
commit69c3f2d30c357613f9059809bc95170301056aee (patch)
tree9485ab1ba650a7db033768b536766852d596232c /net/wireless/nl80211.c
parent0d5891e347a4924a6e6fd8e2799e3d3c762983eb (diff)
wifi: nl80211: allow link ID in set_wiphy with frequency
This simplifies hostapd implementation, since it didn't switch to NL80211_CMD_SET_CHANNEL. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 53d63effbca9..0bf1f7267b89 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3475,16 +3475,19 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
}
if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) {
+ int link_id = nl80211_link_id_or_invalid(info->attrs);
+
if (wdev) {
wdev_lock(wdev);
result = __nl80211_set_channel(
rdev,
nl80211_can_set_dev_channel(wdev) ? netdev : NULL,
- info, -1);
+ info, link_id);
wdev_unlock(wdev);
} else {
- result = __nl80211_set_channel(rdev, netdev, info, -1);
+ result = __nl80211_set_channel(rdev, netdev, info, link_id);
}
+
if (result)
goto out;
}