summaryrefslogtreecommitdiffstats
path: root/include/net/ieee802154_netdev.h
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2009-11-04 17:53:23 +0300
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2009-11-06 14:32:18 +0300
commit42723448b8bacf60c96812196d7725d8d605d0c4 (patch)
treebd1e1ac9900869139003cfdbae4e88e4b3f22457 /include/net/ieee802154_netdev.h
parent478e87c23340e88e909aa749f4772838bc96a20b (diff)
downloadop-kernel-dev-42723448b8bacf60c96812196d7725d8d605d0c4.zip
op-kernel-dev-42723448b8bacf60c96812196d7725d8d605d0c4.tar.gz
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/ieee802154_netdev.h')
-rw-r--r--include/net/ieee802154_netdev.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h
index d23fb5a..5743055 100644
--- a/include/net/ieee802154_netdev.h
+++ b/include/net/ieee802154_netdev.h
@@ -74,8 +74,12 @@ static inline int mac_cb_type(struct sk_buff *skb)
#define IEEE802154_MAC_SCAN_PASSIVE 2
#define IEEE802154_MAC_SCAN_ORPHAN 3
+struct wpan_phy;
/*
* This should be located at net_device->ml_priv
+ *
+ * get_phy should increment the reference counting on returned phy.
+ * Use wpan_wpy_put to put that reference.
*/
struct ieee802154_mlme_ops {
int (*assoc_req)(struct net_device *dev,
@@ -94,6 +98,8 @@ struct ieee802154_mlme_ops {
int (*scan_req)(struct net_device *dev,
u8 type, u32 channels, u8 page, u8 duration);
+ struct wpan_phy *(*get_phy)(const struct net_device *dev);
+
/*
* FIXME: these should become the part of PIB/MIB interface.
* However we still don't have IB interface of any kind
OpenPOWER on IntegriCloud