Commit 0d8c4a3c authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: implement add/del interface link callbacks

When a link is added or removed via nl80211, these are
called. Implement them so we don't have to check in all
the different per-link commands whether we've already
created the necessary datastructures.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent f2a0290b
......@@ -4549,6 +4549,24 @@ ieee80211_set_radar_background(struct wiphy *wiphy,
return local->ops->set_radar_background(&local->hw, chandef);
}
static int ieee80211_add_intf_link(struct wiphy *wiphy,
struct wireless_dev *wdev,
unsigned int link_id)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
return ieee80211_vif_set_links(sdata, wdev->valid_links);
}
static void ieee80211_del_intf_link(struct wiphy *wiphy,
struct wireless_dev *wdev,
unsigned int link_id)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
ieee80211_vif_set_links(sdata, wdev->valid_links);
}
const struct cfg80211_ops mac80211_config_ops = {
.add_virtual_intf = ieee80211_add_iface,
.del_virtual_intf = ieee80211_del_iface,
......@@ -4654,4 +4672,6 @@ const struct cfg80211_ops mac80211_config_ops = {
.set_sar_specs = ieee80211_set_sar_specs,
.color_change = ieee80211_color_change,
.set_radar_background = ieee80211_set_radar_background,
.add_intf_link = ieee80211_add_intf_link,
.del_intf_link = ieee80211_del_intf_link,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment