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>
This commit is contained in:
parent
0d5891e347
commit
69c3f2d30c
|
@ -3475,16 +3475,19 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) {
|
if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) {
|
||||||
|
int link_id = nl80211_link_id_or_invalid(info->attrs);
|
||||||
|
|
||||||
if (wdev) {
|
if (wdev) {
|
||||||
wdev_lock(wdev);
|
wdev_lock(wdev);
|
||||||
result = __nl80211_set_channel(
|
result = __nl80211_set_channel(
|
||||||
rdev,
|
rdev,
|
||||||
nl80211_can_set_dev_channel(wdev) ? netdev : NULL,
|
nl80211_can_set_dev_channel(wdev) ? netdev : NULL,
|
||||||
info, -1);
|
info, link_id);
|
||||||
wdev_unlock(wdev);
|
wdev_unlock(wdev);
|
||||||
} else {
|
} else {
|
||||||
result = __nl80211_set_channel(rdev, netdev, info, -1);
|
result = __nl80211_set_channel(rdev, netdev, info, link_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue