ieee802154: drivers: use dev_alloc_skb
authorAlexander Aring <alex.aring@gmail.com>
Mon, 27 Oct 2014 16:13:29 +0000 (17:13 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 27 Oct 2014 17:07:37 +0000 (18:07 +0100)
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: Alexander Aring <alex.aring@gmail.com>
Cc: Alan Ott <alan@signal11.us>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/net/ieee802154/at86rf230.c
drivers/net/ieee802154/cc2520.c
drivers/net/ieee802154/mrf24j40.c

index 0669783aa3b9fe666871cbffbc84dd67c5070f3f..e4fbcaa602b6bce4fc8369c3b26dc5a8fbb5d2e7 100644 (file)
@@ -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;
index f6f07f4eb0ec4e76d88fab89bac64bcc9fe51bac..a31b5b62a353a4bbcefe1f310f880b19d75a499e 100644 (file)
@@ -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;
 
index 3d775afa217fe2c21373f547c251b12dbfe85c55..7abb237cb98954e93542454122101c7277d225d2 100644 (file)
@@ -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;