#ifndef __CFG80211_RDEV_OPS
#define __CFG80211_RDEV_OPS
#include <linux/rtnetlink.h>
#include <net/cfg80211.h>
#include "core.h"
#include "trace.h"
static inline int rdev_suspend(struct cfg80211_registered_device *rdev,
struct cfg80211_wowlan *wowlan)
{
int ret;
trace_rdev_suspend(&rdev->wiphy, wowlan);
ret = rdev->ops->suspend(&rdev->wiphy, wowlan);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
static inline int rdev_resume(struct cfg80211_registered_device *rdev)
{
int ret;
trace_rdev_resume(&rdev->wiphy);
ret = rdev->ops->resume(&rdev->wiphy);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
static inline void rdev_set_wakeup(struct cfg80211_registered_device *rdev,
bool enabled)
{
trace_rdev_set_wakeup(&rdev->wiphy, enabled);
rdev->ops->set_wakeup(&rdev->wiphy, enabled);
trace_rdev_return_void(&rdev->wiphy);
}
static inline struct wireless_dev
*rdev_add_virtual_intf(struct cfg80211_registered_device *rdev, char *name,
unsigned char name_assign_type,
enum nl80211_iftype type, u32 *flags,
struct vif_params *params)
{
struct wireless_dev *ret;
trace_rdev_add_virtual_intf(&rdev->wiphy, name, type);
ret = rdev->ops->add_virtual_intf(&rdev->wiphy, name, name_assign_type,
type, flags, params);
trace_rdev_return_wdev(&rdev->wiphy, ret);
return ret;
}
static inline int
rdev_del_virtual_intf(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev)
{
int ret;
trace_rdev_del_virtual_intf(&rdev->wiphy, wdev);
ret = rdev->ops->del_virtual_intf(&rdev->wiphy, wdev);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
static inline int
rdev_change_virtual_intf(struct cfg80211_registered_device *rdev,
struct net_device *dev, enum nl80211_iftype type,
u32 *flags, struct vif_params *params)
{
int ret;
trace_rdev_change_virtual_intf(&rdev->wiphy, dev, type);
ret = rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, flags,
params);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
static inline int rdev_add_key(struct cfg80211_registered_device *rdev,
struct net_device *netdev, u8 key_index,
bool pairwise, const u8 *mac_addr,
struct key_params *params)
{
int ret;
trace_rdev_add_key(&rdev->wiphy, netdev, key_index, pairwise, mac_addr);
ret = rdev->ops->add_key(&rdev->wiphy, netdev, key_index, pairwise,
mac_addr, params);
trace_rdev_return_int(&rdev->wiphy, ret);
return