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;
 
 
 
 void ieee802154_free_hw(struct ieee802154_hw *hw)
 {
-       struct ieee802154_local *local = mac802154_to_priv(hw);
+       struct ieee802154_local *local = hw_to_local(hw);
 
        BUG_ON(!list_empty(&local->interfaces));
 
 
 int ieee802154_register_hw(struct ieee802154_hw *hw)
 {
-       struct ieee802154_local *local = mac802154_to_priv(hw);
+       struct ieee802154_local *local = hw_to_local(hw);
        int rc = -ENOSYS;
 
        if (hw->flags & IEEE802154_HW_TXPOWER) {
 
 void ieee802154_unregister_hw(struct ieee802154_hw *hw)
 {
-       struct ieee802154_local *local = mac802154_to_priv(hw);
+       struct ieee802154_local *local = hw_to_local(hw);
        struct ieee802154_sub_if_data *sdata, *next;
 
        flush_workqueue(local->dev_workqueue);
 
 static void
 mac802154_subif_rx(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi)
 {
-       struct ieee802154_local *local = mac802154_to_priv(hw);
+       struct ieee802154_local *local = hw_to_local(hw);
 
        mac_cb(skb)->lqi = lqi;
        skb->protocol = htons(ETH_P_IEEE802154);
 void
 ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi)
 {
-       struct ieee802154_local *local = mac802154_to_priv(hw);
+       struct ieee802154_local *local = hw_to_local(hw);
        struct rx_work *work;
 
        if (!skb)
 
                goto err_tx;
        }
 
-       mac802154_monitors_rx(mac802154_to_priv(&local->hw), skb);
+       mac802154_monitors_rx(local, skb);
 
        if (!(local->hw.flags & IEEE802154_HW_OMIT_CKSUM)) {
                u16 crc = crc_ccitt(0, skb->data, skb->len);