summaryrefslogtreecommitdiffstats
path: root/include/net/wpan-phy.h
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2009-11-04 15:53:23 +0100
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2009-11-06 12:32:18 +0100
commit42723448b8bacf60c96812196d7725d8d605d0c4 (patch)
treebd1e1ac9900869139003cfdbae4e88e4b3f22457 /include/net/wpan-phy.h
parentfakehard: claim all 2.4 Ghz channels as supported (diff)
downloadlinux-42723448b8bacf60c96812196d7725d8d605d0c4.tar.xz
linux-42723448b8bacf60c96812196d7725d8d605d0c4.zip
ieee802154: add an mlme_ops call to retrieve PHY object
ops->get_phy should increment reference to wpan-phy. As we return the external structure, we should do refcounting correctly. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'include/net/wpan-phy.h')
-rw-r--r--include/net/wpan-phy.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h
index f63537c17363..a65e98509fbc 100644
--- a/include/net/wpan-phy.h
+++ b/include/net/wpan-phy.h
@@ -44,6 +44,8 @@ struct wpan_phy {
char priv[0] __attribute__((__aligned__(NETDEV_ALIGN)));
};
+#define to_phy(_dev) container_of(_dev, struct wpan_phy, dev)
+
struct wpan_phy *wpan_phy_alloc(size_t priv_size);
static inline void wpan_phy_set_dev(struct wpan_phy *phy, struct device *dev)
{