diff options
author | Varka Bhadram <varkabhadram@gmail.com> | 2015-06-24 12:36:35 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-07-23 18:10:49 +0300 |
commit | a6cb869b3b7c16fd7c3ee766dd9f9a4fdda7edf9 (patch) | |
tree | a62ccbcbd43f12ffd7025f897134fd37e3d7b0b3 /net/ieee802154/rdev-ops.h | |
parent | c4227c8a6246b30793bd7360113ddc7b66d526dc (diff) | |
download | linux-a6cb869b3b7c16fd7c3ee766dd9f9a4fdda7edf9.tar.xz |
cfg802154: add PM hooks
This patch help to implement suspend/resume in mac802154, these
hooks will be run before the device is suspended and after it
resumes.
Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154/rdev-ops.h')
-rw-r--r-- | net/ieee802154/rdev-ops.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/net/ieee802154/rdev-ops.h b/net/ieee802154/rdev-ops.h index b2155a123f6c..8d5960a37195 100644 --- a/net/ieee802154/rdev-ops.h +++ b/net/ieee802154/rdev-ops.h @@ -24,6 +24,26 @@ rdev_del_virtual_intf_deprecated(struct cfg802154_registered_device *rdev, } static inline int +rdev_suspend(struct cfg802154_registered_device *rdev) +{ + int ret; + trace_802154_rdev_suspend(&rdev->wpan_phy); + ret = rdev->ops->suspend(&rdev->wpan_phy); + trace_802154_rdev_return_int(&rdev->wpan_phy, ret); + return ret; +} + +static inline int +rdev_resume(struct cfg802154_registered_device *rdev) +{ + int ret; + trace_802154_rdev_resume(&rdev->wpan_phy); + ret = rdev->ops->resume(&rdev->wpan_phy); + trace_802154_rdev_return_int(&rdev->wpan_phy, ret); + return ret; +} + +static inline int rdev_add_virtual_intf(struct cfg802154_registered_device *rdev, char *name, unsigned char name_assign_type, enum nl802154_iftype type, __le64 extended_addr) |