[lkml]   [2020]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch 25/35] net: brcmfmac: Use netif_rx_any_context().
From: Sebastian Andrzej Siewior <>

The usage of in_interrupt() in non-core code is phased out. Ideally the
information of the calling context should be passed by the callers or the
functions be split as appropriate.

brcmfmac uses in_interupt() to select the netif_rx*() variant which matches
the calling context. The attempt to consolidate the code by passing an
arguemnt or by distangling it failed due lack of knowledge about this
driver and because the call chains are convoluted and hard to follow.

As a stop gap use netif_rx_any_context() which invokes the correct code
path depending on context which confines the usage of in_interrupt() to
core code.

Signed-off-by: Sebastian Andrzej Siewior <>
Signed-off-by: Thomas Gleixner <>
Cc: Arend van Spriel <>
Cc: Franky Lin <>
Cc: Hante Meuleman <>
Cc: Kalle Valo <>
Cc: "David S. Miller" <>
Cc: Jakub Kicinski <>

drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -418,14 +418,7 @@ void brcmf_netif_rx(struct brcmf_if *ifp

brcmf_dbg(DATA, "rx proto=0x%X\n", ntohs(skb->protocol));
- if (in_interrupt())
- netif_rx(skb);
- else
- /* If the receive is not processed inside an ISR,
- * the softirqd must be woken explicitly to service
- * the NET_RX_SOFTIRQ. This is handled by netif_rx_ni().
- */
- netif_rx_ni(skb);
+ netif_rx_any_context(skb);

void brcmf_netif_mon_rx(struct brcmf_if *ifp, struct sk_buff *skb)
 \ /
  Last update: 2020-09-27 22:00    [W:0.221 / U:6.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site