Commit 61a22814 authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann

ieee802154: drivers: use dev_alloc_skb

This patch change the allocation of skb inside the ieee802154 driver
layer to dev_alloc_skb. This changes also the gfp mask to GFP_ATOMIC
which is needed for upcomming change that the receiving is done by a
tasklet and not a workqueue anymore.
Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Cc: Alan Ott <alan@signal11.us>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 061ef8f9
......@@ -811,7 +811,7 @@ at86rf230_rx(struct at86rf230_local *lp,
memcpy(rx_local_buf, data, len);
enable_irq(lp->spi->irq);
skb = alloc_skb(IEEE802154_MTU, GFP_ATOMIC);
skb = dev_alloc_skb(IEEE802154_MTU);
if (!skb) {
dev_vdbg(&lp->spi->dev, "failed to allocate sk_buff\n");
return;
......
......@@ -524,7 +524,7 @@ static int cc2520_rx(struct cc2520_private *priv)
if (len < 2 || len > IEEE802154_MTU)
return -EINVAL;
skb = alloc_skb(len, GFP_KERNEL);
skb = dev_alloc_skb(len);
if (!skb)
return -ENOMEM;
......
......@@ -544,7 +544,7 @@ static int mrf24j40_handle_rx(struct mrf24j40 *devrec)
val |= 4; /* SET RXDECINV */
write_short_reg(devrec, REG_BBREG1, val);
skb = alloc_skb(len, GFP_KERNEL);
skb = dev_alloc_skb(len);
if (!skb) {
ret = -ENOMEM;
goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment