]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/mac802154/main.c
mac802154: fix ieee802154_rx handling
[karo-tx-linux.git] / net / mac802154 / main.c
index 356b346e1ee86fdeadebf7be5d318c70dbc0d969..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",
@@ -58,11 +58,9 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
        struct ieee802154_local *local;
        size_t priv_size;
 
-       if (!ops || !(ops->xmit_async || ops->xmit_sync) || !ops->ed ||
-           !ops->start || !ops->stop || !ops->set_channel) {
-               pr_err("undefined IEEE802.15.4 device operations\n");
+       if (WARN_ON(!ops || !(ops->xmit_async || ops->xmit_sync) || !ops->ed ||
+                   !ops->start || !ops->stop || !ops->set_channel))
                return NULL;
-       }
 
        /* Ensure 32-byte alignment of our private data and hw private data.
         * We use the wpan_phy priv data for both our ieee802154_local and for