diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-06-10 12:07:55 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-06-20 13:56:11 +0300 |
commit | f2a0290b2df2b0e65ab78b71c4a15e732afd4458 (patch) | |
tree | 8e3f641dfd925f1a349697c37c6596da3c7fe62a /include/net/cfg80211.h | |
parent | c8a11ed5539f6df98d06259b5177975162b88510 (diff) | |
download | linux-f2a0290b2df2b0e65ab78b71c4a15e732afd4458.tar.xz |
wifi: cfg80211: add optional link add/remove callbacks
Add some optional callbacks for link add/remove so that
drivers can react here. Initially, I thought it would be
sufficient to just create the link in start_ap etc., but
it turns out that's not so simple, since there are quite
a few callbacks that can be called: if they're erroneously
without start_ap, things might crash.
Thus it might be easier for drivers to allocate all the
necessary data structures immediately, to not have to
worry about it in each callback, since cfg80211 checks
that the link ID is valid (has been added.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a4f9e6094118..5706f96b819a 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -3858,6 +3858,11 @@ struct mgmt_frame_regs { * keep the struct wireless_dev's iftype updated. * This additionally holds the RTNL to be able to do netdev changes. * + * @add_intf_link: Add a new MLO link to the given interface. Note that + * the wdev->link[] data structure has been updated, so the new link + * address is available. + * @del_intf_link: Remove an MLO link from the given interface. + * * @add_key: add a key with the given parameters. @mac_addr will be %NULL * when adding a group key. * @@ -4212,6 +4217,13 @@ struct cfg80211_ops { enum nl80211_iftype type, struct vif_params *params); + int (*add_intf_link)(struct wiphy *wiphy, + struct wireless_dev *wdev, + unsigned int link_id); + void (*del_intf_link)(struct wiphy *wiphy, + struct wireless_dev *wdev, + unsigned int link_id); + int (*add_key)(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, bool pairwise, const u8 *mac_addr, struct key_params *params); |