mac802154: fix ieee802154_rx handling
authorVarka Bhadram <varkabhadram@gmail.com>
Tue, 7 Jul 2015 05:20:43 +0000 (10:50 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 23 Jul 2015 15:10:50 +0000 (17:10 +0200)
Instead of passing ieee802154_hw pointer to ieee802154_rx,
we can directly pass the ieee802154_local pointer.

Signed-off-by: Varka Bhadram <varkabhadram@gmail.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/mac802154/ieee802154_i.h
net/mac802154/main.c
net/mac802154/rx.c

index eb8502a6e7198125d1e0a3ea3682937f49400da1..6810d7a25aca01fa105da6bea5c423f29942ad5c 100644 (file)
@@ -124,7 +124,7 @@ ieee802154_sdata_running(struct ieee802154_sub_if_data *sdata)
 
 extern struct ieee802154_mlme_ops mac802154_mlme_wpan;
 
-void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb);
+void ieee802154_rx(struct ieee802154_local *local, struct sk_buff *skb);
 netdev_tx_t
 ieee802154_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev);
 netdev_tx_t
index 4caf04b676d7234fc6f996421da24123dd000622..91f120845a4558fd49e939993473373dfa1a14c7 100644 (file)
@@ -40,7 +40,7 @@ static void ieee802154_tasklet_handler(unsigned long data)
                         * netstack.
                         */
                        skb->pkt_type = 0;
-                       ieee802154_rx(&local->hw, skb);
+                       ieee802154_rx(local, skb);
                        break;
                default:
                        WARN(1, "mac802154: Packet is of unknown type %d\n",
index 7791c9b8cb571fc52a680a4dbfcec848cbbdb0a0..d1c33c1d6b9b3dcd74dc077b5de5b5556a18901e 100644 (file)
@@ -246,9 +246,8 @@ ieee802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb)
        }
 }
 
-void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb)
+void ieee802154_rx(struct ieee802154_local *local, struct sk_buff *skb)
 {
-       struct ieee802154_local *local = hw_to_local(hw);
        u16 crc;
 
        WARN_ON_ONCE(softirq_count() == 0);