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>
This commit is contained in:

committed by
Marcel Holtmann

parent
c4227c8a62
commit
a6cb869b3b
@@ -23,6 +23,26 @@ rdev_del_virtual_intf_deprecated(struct cfg802154_registered_device *rdev,
|
||||
rdev->ops->del_virtual_intf_deprecated(&rdev->wpan_phy, dev);
|
||||
}
|
||||
|
||||
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,
|
||||
|
Reference in New Issue
Block a user