Skip to content

Commit

Permalink
phonet: Use netif_rx().
Browse files Browse the repository at this point in the history
Since commit
   baebdf4 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Remi Denis-Courmont <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Sebastian Andrzej Siewior authored and davem330 committed Mar 7, 2022
1 parent d33d0dc commit 63d57cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/phonet/af_phonet.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ EXPORT_SYMBOL(phonet_header_ops);
* Prepends an ISI header and sends a datagram.
*/
static int pn_send(struct sk_buff *skb, struct net_device *dev,
u16 dst, u16 src, u8 res, u8 irq)
u16 dst, u16 src, u8 res)
{
struct phonethdr *ph;
int err;
Expand Down Expand Up @@ -182,7 +182,7 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev,
if (skb->pkt_type == PACKET_LOOPBACK) {
skb_reset_mac_header(skb);
skb_orphan(skb);
err = (irq ? netif_rx(skb) : netif_rx_ni(skb)) ? -ENOBUFS : 0;
err = netif_rx(skb) ? -ENOBUFS : 0;
} else {
err = dev_hard_header(skb, dev, ntohs(skb->protocol),
NULL, NULL, skb->len);
Expand Down Expand Up @@ -214,7 +214,7 @@ static int pn_raw_send(const void *data, int len, struct net_device *dev,
skb_reserve(skb, MAX_PHONET_HEADER);
__skb_put(skb, len);
skb_copy_to_linear_data(skb, data, len);
return pn_send(skb, dev, dst, src, res, 1);
return pn_send(skb, dev, dst, src, res);
}

/*
Expand Down Expand Up @@ -269,7 +269,7 @@ int pn_skb_send(struct sock *sk, struct sk_buff *skb,
if (!pn_addr(src))
src = pn_object(saddr, pn_obj(src));

err = pn_send(skb, dev, dst, src, res, 0);
err = pn_send(skb, dev, dst, src, res);
dev_put(dev);
return err;

Expand Down

0 comments on commit 63d57cd

Please sign in to comment.