summaryrefslogtreecommitdiff
path: root/net/mac802154/ieee802154_i.h
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-10-25 17:16:39 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-10-25 21:55:38 +0200
commit60741361c3ca229a1dbb18e05d11e97b7ea75d69 (patch)
tree71194fea29b7c5a5f21344fc5046c9464df55f46 /net/mac802154/ieee802154_i.h
parentd98be45b3657fc233f5a098279a4e42ab6f0fa4f (diff)
mac802154: introduce hw_to_local function
This patch replace the mac802154_to_priv macro with a static inline function named hw_to_local. This brings a similar naming convention like mac80211 stack. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154/ieee802154_i.h')
-rw-r--r--net/mac802154/ieee802154_i.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h
index b7cf41c989ec..41e29b00e7a0 100644
--- a/net/mac802154/ieee802154_i.h
+++ b/net/mac802154/ieee802154_i.h
@@ -99,10 +99,14 @@ struct ieee802154_sub_if_data {
struct mac802154_llsec sec;
};
-#define mac802154_to_priv(_hw) container_of(_hw, struct ieee802154_local, hw)
-
#define MAC802154_CHAN_NONE 0xff /* No channel is assigned */
+static inline struct ieee802154_local *
+hw_to_local(struct ieee802154_hw *hw)
+{
+ return container_of(hw, struct ieee802154_local, hw);
+}
+
extern struct ieee802154_reduced_mlme_ops mac802154_mlme_reduced;
extern struct ieee802154_mlme_ops mac802154_mlme_wpan;