X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fmac802154%2Fmain.c;h=91f120845a4558fd49e939993473373dfa1a14c7;hb=d10270ce941ee89afd74076ea3ed8dbef8a0ff25;hp=356b346e1ee86fdeadebf7be5d318c70dbc0d969;hpb=6ac15baacb6ecd87c66209627753b96ded3b4515;p=karo-tx-linux.git diff --git a/net/mac802154/main.c b/net/mac802154/main.c index 356b346e1ee8..91f120845a45 100644 --- a/net/mac802154/main.c +++ b/net/mac802154/main.c @@ -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