diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-09-27 21:12:06 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-11-20 13:42:24 +0300 |
commit | 05db59a0619969a47ab87050985344177c662cab (patch) | |
tree | af94ff11d4bc54ef983702bd43a59ad86808524c /net/ieee802154/rdev-ops.h | |
parent | 2e7ed75e92fc493ff5484f61aed6489262c78f3e (diff) | |
download | linux-05db59a0619969a47ab87050985344177c662cab.tar.xz |
ieee802154: Add support for user association requests
Users may decide to associate with a peer, which becomes our parent
coordinator. Let's add the necessary netlink support for this.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-4-miquel.raynal@bootlin.com
Diffstat (limited to 'net/ieee802154/rdev-ops.h')
-rw-r--r-- | net/ieee802154/rdev-ops.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/ieee802154/rdev-ops.h b/net/ieee802154/rdev-ops.h index 5eaae15c610e..4843d52f1ee0 100644 --- a/net/ieee802154/rdev-ops.h +++ b/net/ieee802154/rdev-ops.h @@ -265,6 +265,21 @@ static inline int rdev_stop_beacons(struct cfg802154_registered_device *rdev, return ret; } +static inline int rdev_associate(struct cfg802154_registered_device *rdev, + struct wpan_dev *wpan_dev, + struct ieee802154_addr *coord) +{ + int ret; + + if (!rdev->ops->associate) + return -EOPNOTSUPP; + + trace_802154_rdev_associate(&rdev->wpan_phy, wpan_dev, coord); + ret = rdev->ops->associate(&rdev->wpan_phy, wpan_dev, coord); + trace_802154_rdev_return_int(&rdev->wpan_phy, ret); + return ret; +} + #ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL /* TODO this is already a nl802154, so move into ieee802154 */ static inline void |