From patchwork Sat Mar 5 22:12:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770488 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EF70C4332F for ; Sat, 5 Mar 2022 22:13:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232714AbiCEWOL (ORCPT ); Sat, 5 Mar 2022 17:14:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbiCEWOJ (ORCPT ); Sat, 5 Mar 2022 17:14:09 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4B70517FD for ; Sat, 5 Mar 2022 14:13:18 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646518396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t+y+wsLXJ2N2picgDAR53A5GkB2/WvIC1ArRsV+KuXo=; b=WBZa1G/rUHxgpOT62AIxnLvkoiFbHCv9FC3N40FBdlbU2Az1P8IxbcpvhmeXmkn1VPDjLp q73G94pjm+t1dbEQmFMX4fRHEt0qhoqY4CTEOIx+xnL3lAIBnE0gvygd1RNF1r99zgCv1y ZagA4NdEsIKSr3w9Q56gsjNwHFBUJ+UVCGKrIlLZKlwbKJGi+YD7os0/X/DH7z4TubXAta yy162jm6zcmz5f86lK798AJ89FEMYZLL95974qbk+LIdM5ane//qUcNj66cfrTuQL2YFWv GVMXXt+9OuuhpAyW3zpHo8LSwdU7eeVv9eokmEBmYP5K6v2lowS8XDUfaOhSew== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646518396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t+y+wsLXJ2N2picgDAR53A5GkB2/WvIC1ArRsV+KuXo=; b=itreT8Va2bpW7yN+0RunbZ5lwuPQRp68c253fNYvYSBtXwEQTWaZwooyPEuiGhgvYAXpIT A5c318RfYMqthjBw== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Andrew Lunn , Heiner Kallweit , Radu Pirea , Richard Cochran , Russell King Subject: [PATCH net-next 1/8] net: phy: Use netif_rx(). Date: Sat, 5 Mar 2022 23:12:45 +0100 Message-Id: <20220305221252.3063812-2-bigeasy@linutronix.de> In-Reply-To: <20220305221252.3063812-1-bigeasy@linutronix.de> References: <20220305221252.3063812-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("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: Andrew Lunn Cc: Heiner Kallweit Cc: Radu Pirea Cc: Richard Cochran Cc: Russell King Signed-off-by: Sebastian Andrzej Siewior --- drivers/net/phy/dp83640.c | 6 +++--- drivers/net/phy/mscc/mscc_ptp.c | 2 +- drivers/net/phy/nxp-c45-tja11xx.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index c2d1a85ec5591..c0a617311e2d4 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -886,7 +886,7 @@ static void decode_rxts(struct dp83640_private *dp83640, spin_unlock_irqrestore(&dp83640->rx_lock, flags); if (shhwtstamps) - netif_rx_ni(skb); + netif_rx(skb); } static void decode_txts(struct dp83640_private *dp83640, @@ -1329,7 +1329,7 @@ static void rx_timestamp_work(struct work_struct *work) break; } - netif_rx_ni(skb); + netif_rx(skb); } if (!skb_queue_empty(&dp83640->rx_queue)) @@ -1380,7 +1380,7 @@ static bool dp83640_rxtstamp(struct mii_timestamper *mii_ts, skb_queue_tail(&dp83640->rx_queue, skb); schedule_delayed_work(&dp83640->ts_work, SKB_TIMESTAMP_TIMEOUT); } else { - netif_rx_ni(skb); + netif_rx(skb); } return true; diff --git a/drivers/net/phy/mscc/mscc_ptp.c b/drivers/net/phy/mscc/mscc_ptp.c index 34f829845d067..cf728bfd83e22 100644 --- a/drivers/net/phy/mscc/mscc_ptp.c +++ b/drivers/net/phy/mscc/mscc_ptp.c @@ -1212,7 +1212,7 @@ static bool vsc85xx_rxtstamp(struct mii_timestamper *mii_ts, ts.tv_sec--; shhwtstamps->hwtstamp = ktime_set(ts.tv_sec, ns); - netif_rx_ni(skb); + netif_rx(skb); return true; } diff --git a/drivers/net/phy/nxp-c45-tja11xx.c b/drivers/net/phy/nxp-c45-tja11xx.c index 06fdbae509a79..047c581457e34 100644 --- a/drivers/net/phy/nxp-c45-tja11xx.c +++ b/drivers/net/phy/nxp-c45-tja11xx.c @@ -478,7 +478,7 @@ static long nxp_c45_do_aux_work(struct ptp_clock_info *ptp) shhwtstamps_rx = skb_hwtstamps(skb); shhwtstamps_rx->hwtstamp = ns_to_ktime(timespec64_to_ns(&ts)); NXP_C45_SKB_CB(skb)->header->reserved2 = 0; - netif_rx_ni(skb); + netif_rx(skb); } if (priv->extts) { From patchwork Sat Mar 5 22:12:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770486 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40997C43217 for ; Sat, 5 Mar 2022 22:13:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232719AbiCEWOL (ORCPT ); Sat, 5 Mar 2022 17:14:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232709AbiCEWOJ (ORCPT ); Sat, 5 Mar 2022 17:14:09 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B53A517FB; Sat, 5 Mar 2022 14:13:18 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646518396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7uGNP9Djz1TwgueFOo46UUQ187Tk4tNDpxEJOSudrzs=; b=qaqgVU36NS1iGqgj6SBekZsPSycB/xGOV9gwhRL6eIAGO8hDshPhdLLU7V2CMxOVI8fSjs YAsqdk34Lr9WwKQF+VBc6QcAjO5bkYjMBkYYmWyFm2V+YLX004SZdBJMU51HkD68VtMaxy ARIXg4Xg3eN29SnPpo6DzXeO1C8fKAMCVb2vht9H+vq0+s4DcVUem0O35DmCUa8IqR0Ax7 RHY4KcRBewCnJ7yI0CH7g4/Oof+v88WPVGCBluk9O/z3zrsYWGCwKQO/RS9Fqb8eNwWlTd e6Chtp2IXkIaJZcs05bhbJo+He4lX06D9z8Rqws9WT8sJryTxiA2LNL0GgN19g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646518396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7uGNP9Djz1TwgueFOo46UUQ187Tk4tNDpxEJOSudrzs=; b=pws7mI33hXL1DuQuAxslfc/xTZQOEqJ0rocE3Ni5uHecn3u2hK/C1uD74heb1vrt8POzAG DDT8jgA8d3M2yJDA== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Marc Kleine-Budde , Oliver Hartkopp , Wolfgang Grandegger , linux-can@vger.kernel.org Subject: [PATCH net-next 2/8] can: Use netif_rx(). Date: Sat, 5 Mar 2022 23:12:46 +0100 Message-Id: <20220305221252.3063812-3-bigeasy@linutronix.de> In-Reply-To: <20220305221252.3063812-1-bigeasy@linutronix.de> References: <20220305221252.3063812-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("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: Marc Kleine-Budde Cc: Oliver Hartkopp Cc: Wolfgang Grandegger Cc: linux-can@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Acked-by: Oliver Hartkopp Acked-by: Marc Kleine-Budde --- drivers/net/can/dev/dev.c | 2 +- drivers/net/can/slcan.c | 2 +- drivers/net/can/spi/hi311x.c | 6 +++--- drivers/net/can/spi/mcp251x.c | 4 ++-- drivers/net/can/vcan.c | 2 +- drivers/net/can/vxcan.c | 2 +- net/can/af_can.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/can/dev/dev.c b/drivers/net/can/dev/dev.c index c192f25f96956..e7ab45f1c43b2 100644 --- a/drivers/net/can/dev/dev.c +++ b/drivers/net/can/dev/dev.c @@ -154,7 +154,7 @@ static void can_restart(struct net_device *dev) cf->can_id |= CAN_ERR_RESTARTED; - netif_rx_ni(skb); + netif_rx(skb); restart: netdev_dbg(dev, "restarted\n"); diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index 27783fbf011fc..ec294d0c5722c 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c @@ -221,7 +221,7 @@ static void slc_bump(struct slcan *sl) if (!(cf.can_id & CAN_RTR_FLAG)) sl->dev->stats.rx_bytes += cf.len; - netif_rx_ni(skb); + netif_rx(skb); } /* parse tty input stream */ diff --git a/drivers/net/can/spi/hi311x.c b/drivers/net/can/spi/hi311x.c index 664b8f14d7b05..a5b2952b8d0ff 100644 --- a/drivers/net/can/spi/hi311x.c +++ b/drivers/net/can/spi/hi311x.c @@ -356,7 +356,7 @@ static void hi3110_hw_rx(struct spi_device *spi) can_led_event(priv->net, CAN_LED_EVENT_RX); - netif_rx_ni(skb); + netif_rx(skb); } static void hi3110_hw_sleep(struct spi_device *spi) @@ -677,7 +677,7 @@ static irqreturn_t hi3110_can_ist(int irq, void *dev_id) tx_state = txerr >= rxerr ? new_state : 0; rx_state = txerr <= rxerr ? new_state : 0; can_change_state(net, cf, tx_state, rx_state); - netif_rx_ni(skb); + netif_rx(skb); if (new_state == CAN_STATE_BUS_OFF) { can_bus_off(net); @@ -718,7 +718,7 @@ static irqreturn_t hi3110_can_ist(int irq, void *dev_id) cf->data[6] = hi3110_read(spi, HI3110_READ_TEC); cf->data[7] = hi3110_read(spi, HI3110_READ_REC); netdev_dbg(priv->net, "Bus Error\n"); - netif_rx_ni(skb); + netif_rx(skb); } } diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c index d23edaf224204..fc747bff5eeb2 100644 --- a/drivers/net/can/spi/mcp251x.c +++ b/drivers/net/can/spi/mcp251x.c @@ -740,7 +740,7 @@ static void mcp251x_hw_rx(struct spi_device *spi, int buf_idx) can_led_event(priv->net, CAN_LED_EVENT_RX); - netif_rx_ni(skb); + netif_rx(skb); } static void mcp251x_hw_sleep(struct spi_device *spi) @@ -987,7 +987,7 @@ static void mcp251x_error_skb(struct net_device *net, int can_id, int data1) if (skb) { frame->can_id |= can_id; frame->data[1] = data1; - netif_rx_ni(skb); + netif_rx(skb); } else { netdev_err(net, "cannot allocate error skb\n"); } diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c index c42f18845b02a..a15619d883ec2 100644 --- a/drivers/net/can/vcan.c +++ b/drivers/net/can/vcan.c @@ -80,7 +80,7 @@ static void vcan_rx(struct sk_buff *skb, struct net_device *dev) skb->dev = dev; skb->ip_summed = CHECKSUM_UNNECESSARY; - netif_rx_ni(skb); + netif_rx(skb); } static netdev_tx_t vcan_tx(struct sk_buff *skb, struct net_device *dev) diff --git a/drivers/net/can/vxcan.c b/drivers/net/can/vxcan.c index 47ccc15a3486b..556f1a12ec9a0 100644 --- a/drivers/net/can/vxcan.c +++ b/drivers/net/can/vxcan.c @@ -63,7 +63,7 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev) skb->ip_summed = CHECKSUM_UNNECESSARY; len = cfd->can_id & CAN_RTR_FLAG ? 0 : cfd->len; - if (netif_rx_ni(skb) == NET_RX_SUCCESS) { + if (netif_rx(skb) == NET_RX_SUCCESS) { srcstats->tx_packets++; srcstats->tx_bytes += len; peerstats = &peer->stats; diff --git a/net/can/af_can.c b/net/can/af_can.c index cce2af10eb3ea..1fb49d51b25d6 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c @@ -284,7 +284,7 @@ int can_send(struct sk_buff *skb, int loop) } if (newskb) - netif_rx_ni(newskb); + netif_rx(newskb); /* update statistics */ pkg_stats->tx_frames++; From patchwork Sat Mar 5 22:12:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770487 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FAAAC433EF for ; Sat, 5 Mar 2022 22:13:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232711AbiCEWOK (ORCPT ); Sat, 5 Mar 2022 17:14:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbiCEWOJ (ORCPT ); Sat, 5 Mar 2022 17:14:09 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFE7951E78 for ; Sat, 5 Mar 2022 14:13:18 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646518396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rtQim/nei+2kqf2tAqTQ+q11Bv6YQqqqJWVJe39idxw=; b=GfKa6w7cjhs2+nYmWz5sTNB2uUaKWL/si8E8sj7CFtKS4PXoZu37mysYYVHBxfl6hbdPEG cT451GgfieeHbGGSk5lFRM8UUt7hus64oYuw3FtH7LRBhb8wpf318FXOWePEwlI5b48gOi 1ZpPn+BNFG/DVkT+t5Kap6hxeT7uZCG+LDJIoHyve5CZk5ifZXuEM8mkpsflzYW2MsJcB+ Y0IfABdogHAEo2ZblO04KdXhANt8t7TOWx7dAui12gsG9v3cvFbUhAonMqI4liD6fYN8bh 6Asy8I2ZZ00vdKwqUAYGTgK/r08/FFnAwMoCd1wKvP8S6BYWP9abLClInotHSA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646518396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rtQim/nei+2kqf2tAqTQ+q11Bv6YQqqqJWVJe39idxw=; b=Pc0hwWWr1IrRFBi6p3MJcdWctJyMzfEUbwa4kdmPqJlX71Pams+ZFW8gyr1t7c8/K3qc6i HDfGj9CU1bbVyMDA== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Jeremy Kerr , Matt Johnston Subject: [PATCH net-next 3/8] mctp: serial: Use netif_rx(). Date: Sat, 5 Mar 2022 23:12:47 +0100 Message-Id: <20220305221252.3063812-4-bigeasy@linutronix.de> In-Reply-To: <20220305221252.3063812-1-bigeasy@linutronix.de> References: <20220305221252.3063812-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("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: Jeremy Kerr Cc: Matt Johnston Signed-off-by: Sebastian Andrzej Siewior --- drivers/net/mctp/mctp-serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mctp/mctp-serial.c b/drivers/net/mctp/mctp-serial.c index 62723a7faa2d1..7cd103fd34ef7 100644 --- a/drivers/net/mctp/mctp-serial.c +++ b/drivers/net/mctp/mctp-serial.c @@ -286,7 +286,7 @@ static void mctp_serial_rx(struct mctp_serial *dev) cb = __mctp_cb(skb); cb->halen = 0; - netif_rx_ni(skb); + netif_rx(skb); dev->netdev->stats.rx_packets++; dev->netdev->stats.rx_bytes += dev->rxlen; } From patchwork Sat Mar 5 22:12:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770489 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBB17C433EF for ; Sat, 5 Mar 2022 22:13:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232707AbiCEWON (ORCPT ); Sat, 5 Mar 2022 17:14:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232710AbiCEWOK (ORCPT ); Sat, 5 Mar 2022 17:14:10 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6C25522C6 for ; Sat, 5 Mar 2022 14:13:18 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646518397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z9PNgvP8TGwygrt5YPHFKcckZNRFvMHdr0LA7AKXEoA=; b=4i6hN2WRdEVgBdElFrebDTDo35xNm8KfCYU7LEaVzub+5YSOhC1Au9+dIiRf4LT69yrEIy TabJuYXhm0LVosdjLWCG8IgkgUx+IKZoRhMErA1904ps4TQLzFky4b4f81OCz5MrcDQCh7 kilY4qfQ6w57XqYlcRij1XajfUg67+6CaCNttddT6GWiwwAmbWUySjicQ9UvpykqelXf2A gD3I9mZMkdumu32sB0/pi0RQX3pPTAQtkXcJWxhfe6mY45bFuQSchPA04y/lYfKNpcE04n RCtId/cyDfyEytIraFgVwAPIsC+RsTGTHGfVvDtcWzFYHKpiYydfXajZWlNEMA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646518397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z9PNgvP8TGwygrt5YPHFKcckZNRFvMHdr0LA7AKXEoA=; b=MkxmGiOm7DqJoxdtTEdDc8Uj/Sf9McYrlLOROEAp3pz5vVHWFsmP/iOnzDgWRVV848t1eq kWi0RZ7T29sjUHDw== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior Subject: [PATCH net-next 4/8] slip/plip: Use netif_rx(). Date: Sat, 5 Mar 2022 23:12:48 +0100 Message-Id: <20220305221252.3063812-5-bigeasy@linutronix.de> In-Reply-To: <20220305221252.3063812-1-bigeasy@linutronix.de> References: <20220305221252.3063812-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("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(). Signed-off-by: Sebastian Andrzej Siewior Acked-by: Oliver Hartkopp --- drivers/net/plip/plip.c | 2 +- drivers/net/slip/slip.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c index 0d491b4d66675..dafd3e9ebbf87 100644 --- a/drivers/net/plip/plip.c +++ b/drivers/net/plip/plip.c @@ -676,7 +676,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, case PLIP_PK_DONE: /* Inform the upper layer for the arrival of a packet. */ rcv->skb->protocol=plip_type_trans(rcv->skb, dev); - netif_rx_ni(rcv->skb); + netif_rx(rcv->skb); dev->stats.rx_bytes += rcv->length.h; dev->stats.rx_packets++; rcv->skb = NULL; diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c index 98f586f910fb1..88396ff99f03f 100644 --- a/drivers/net/slip/slip.c +++ b/drivers/net/slip/slip.c @@ -368,7 +368,7 @@ static void sl_bump(struct slip *sl) skb_put_data(skb, sl->rbuff, count); skb_reset_mac_header(skb); skb->protocol = htons(ETH_P_IP); - netif_rx_ni(skb); + netif_rx(skb); dev->stats.rx_packets++; } From patchwork Sat Mar 5 22:12:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770491 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FACEC43217 for ; Sat, 5 Mar 2022 22:13:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232733AbiCEWOQ (ORCPT ); Sat, 5 Mar 2022 17:14:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbiCEWOL (ORCPT ); Sat, 5 Mar 2022 17:14:11 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED73B546B3; Sat, 5 Mar 2022 14:13:20 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646518397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fWJ4eL0KoZxJYMwAyKWO1nG6ZN9tjd/6bd/n5PNPxCY=; b=HoBZTDICpvaPF0tfqo+4orcMSAM+lfs8ANaemljwkjEoLlpvJ7uiDGNmkcOnVuRipVj0LK pVkBKzlCwXkSm1l8nt50jeixKyrrJZBTe2NT4D4ZIu8HUuf6+5F2QRxBR+NjEOgmVhKSF/ Lq4WgCkLO5s3c2pmTpzu3nzEOUs477vcR3/E6NS/MkMlT3PqSYhnPyfgTyOQBupykFiBGq vUhP6P9hGMWsFvpisaqhWos5bHQ+N+R2GoXm5LhUAVWsdPUR8jS1eWtzIOt75HtVz1IYis oI8O7fxDeVcvPU+AnkmZKvhygcxKI6bwoxh8tFpyyZPM+rCpFUpW6lwiCou1hA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646518397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fWJ4eL0KoZxJYMwAyKWO1nG6ZN9tjd/6bd/n5PNPxCY=; b=Sh8e8MO/7R2jHY088bl8kw2CFaByJjfY6Z8AwgYn9wEoBVnY0QechawADDT4wSNAVPWtmD wF/0l0MC1qfGa2CA== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Kalle Valo , Maya Erez , linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com Subject: [PATCH net-next 5/8] wireless: Atheros: Use netif_rx(). Date: Sat, 5 Mar 2022 23:12:49 +0100 Message-Id: <20220305221252.3063812-6-bigeasy@linutronix.de> In-Reply-To: <20220305221252.3063812-1-bigeasy@linutronix.de> References: <20220305221252.3063812-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("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: Kalle Valo Cc: Maya Erez Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Signed-off-by: Sebastian Andrzej Siewior --- drivers/net/wireless/ath/ath6kl/txrx.c | 2 +- drivers/net/wireless/ath/wil6210/txrx.c | 2 +- drivers/net/wireless/ath/wil6210/wmi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index b22ed499f7ba7..a56fab6232a9b 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -839,7 +839,7 @@ static void ath6kl_deliver_frames_to_nw_stack(struct net_device *dev, skb->protocol = eth_type_trans(skb, skb->dev); - netif_rx_ni(skb); + netif_rx(skb); } static void ath6kl_alloc_netbufs(struct sk_buff_head *q, u16 num) diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index cc830c795b33c..5704defd7be1b 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -958,7 +958,7 @@ void wil_netif_rx(struct sk_buff *skb, struct net_device *ndev, int cid, if (gro) napi_gro_receive(&wil->napi_rx, skb); else - netif_rx_ni(skb); + netif_rx(skb); } ndev->stats.rx_packets++; stats->rx_packets++; diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index dd8abbb288497..98b4c189eeccb 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c @@ -1199,7 +1199,7 @@ static void wmi_evt_eapol_rx(struct wil6210_vif *vif, int id, void *d, int len) eth->h_proto = cpu_to_be16(ETH_P_PAE); skb_put_data(skb, evt->eapol, eapol_len); skb->protocol = eth_type_trans(skb, ndev); - if (likely(netif_rx_ni(skb) == NET_RX_SUCCESS)) { + if (likely(netif_rx(skb) == NET_RX_SUCCESS)) { ndev->stats.rx_packets++; ndev->stats.rx_bytes += sz; if (stats) { From patchwork Sat Mar 5 22:12:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770494 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D309C433FE for ; Sat, 5 Mar 2022 22:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232731AbiCEWO2 (ORCPT ); Sat, 5 Mar 2022 17:14:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232723AbiCEWOM (ORCPT ); Sat, 5 Mar 2022 17:14:12 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED957546B9; Sat, 5 Mar 2022 14:13:20 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646518397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TkzgyQfLm9kgDQ+XkWUyxZ9Qb4QCMdrdNbG7RC3fSuo=; b=XPK0RYIkEUhncesPY4LaN2z9zIftmH0UNFoO38lMyeIrVP0wZeYIb12Tf4fboKLegtoX+L HJ9k64vkXo+dDTW8rTt4/3CibMsZCtY69ts9eL/w2qzGPBd0Gk0jvd0mp0uc/4wUtI51oZ 8gS4VCOnSjaEcQ6Hy72xQqQTFrBptOxLKQVNrq+h/yBvUst8DQ8k3sbvwyEhai1n7gQNQu 8MJjANtRPCMlQj6LXZFkYrG9IxeZOYVYMVebNCd64sAaNYFr3AuinOWfSRTpLm+++YvToO j0oG5yWutXYc0rB8IBEw7qCsAtG832IHhleV9K7nqD1wjwEagRtqHJR3BEnSrw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646518397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TkzgyQfLm9kgDQ+XkWUyxZ9Qb4QCMdrdNbG7RC3fSuo=; b=qaFLfpKKnhAPRk+X569zRjNP1y/QctQQMS7icYLGKif1PaDoMTk9DeJc/drpxKb4deIqLD 32wPHcoCsxeiySCA== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Arend van Spriel , Chi-hsien Lin , Chung-hsien Hsu , Franky Lin , Hante Meuleman , Kalle Valo , SHA-cyfmac-dev-list@infineon.com, Wright Feng , brcm80211-dev-list.pdl@broadcom.com, linux-wireless@vger.kernel.org Subject: [PATCH net-next 6/8] wireless: brcmfmac: Use netif_rx(). Date: Sat, 5 Mar 2022 23:12:50 +0100 Message-Id: <20220305221252.3063812-7-bigeasy@linutronix.de> In-Reply-To: <20220305221252.3063812-1-bigeasy@linutronix.de> References: <20220305221252.3063812-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("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: Arend van Spriel Cc: Chi-hsien Lin Cc: Chung-hsien Hsu Cc: Franky Lin Cc: Hante Meuleman Cc: Kalle Valo Cc: SHA-cyfmac-dev-list@infineon.com Cc: Wright Feng Cc: brcm80211-dev-list.pdl@broadcom.com Cc: linux-wireless@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- .../broadcom/brcm80211/brcmfmac/bcdc.c | 4 ++-- .../broadcom/brcm80211/brcmfmac/core.c | 18 +++++------------- .../broadcom/brcm80211/brcmfmac/core.h | 2 +- .../broadcom/brcm80211/brcmfmac/fwsignal.c | 10 +++++----- .../broadcom/brcm80211/brcmfmac/fwsignal.h | 2 +- .../broadcom/brcm80211/brcmfmac/msgbuf.c | 5 ++--- .../broadcom/brcm80211/brcmfmac/proto.h | 6 +++--- 7 files changed, 19 insertions(+), 28 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c index 3984fd7d918e1..2c95a08a58711 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c @@ -397,9 +397,9 @@ brcmf_proto_bcdc_add_tdls_peer(struct brcmf_pub *drvr, int ifidx, } static void brcmf_proto_bcdc_rxreorder(struct brcmf_if *ifp, - struct sk_buff *skb, bool inirq) + struct sk_buff *skb) { - brcmf_fws_rxreorder(ifp, skb, inirq); + brcmf_fws_rxreorder(ifp, skb); } static void diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index fed9cd5f29a26..26fab4bee22cf 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -400,7 +400,7 @@ void brcmf_txflowblock_if(struct brcmf_if *ifp, spin_unlock_irqrestore(&ifp->netif_stop_lock, flags); } -void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq) +void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb) { /* Most of Broadcom's firmwares send 802.11f ADD frame every time a new * STA connects to the AP interface. This is an obsoleted standard most @@ -423,15 +423,7 @@ void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq) ifp->ndev->stats.rx_packets++; brcmf_dbg(DATA, "rx proto=0x%X\n", ntohs(skb->protocol)); - if (inirq) { - 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(skb); } void brcmf_netif_mon_rx(struct brcmf_if *ifp, struct sk_buff *skb) @@ -480,7 +472,7 @@ void brcmf_netif_mon_rx(struct brcmf_if *ifp, struct sk_buff *skb) skb->pkt_type = PACKET_OTHERHOST; skb->protocol = htons(ETH_P_802_2); - brcmf_netif_rx(ifp, skb, false); + brcmf_netif_rx(ifp, skb); } static int brcmf_rx_hdrpull(struct brcmf_pub *drvr, struct sk_buff *skb, @@ -515,7 +507,7 @@ void brcmf_rx_frame(struct device *dev, struct sk_buff *skb, bool handle_event, return; if (brcmf_proto_is_reorder_skb(skb)) { - brcmf_proto_rxreorder(ifp, skb, inirq); + brcmf_proto_rxreorder(ifp, skb); } else { /* Process special event packets */ if (handle_event) { @@ -524,7 +516,7 @@ void brcmf_rx_frame(struct device *dev, struct sk_buff *skb, bool handle_event, brcmf_fweh_process_skb(ifp->drvr, skb, BCMILCP_SUBTYPE_VENDOR_LONG, gfp); } - brcmf_netif_rx(ifp, skb, inirq); + brcmf_netif_rx(ifp, skb); } } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h index 8212c9de14f1f..340346c122d32 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h @@ -208,7 +208,7 @@ void brcmf_remove_interface(struct brcmf_if *ifp, bool locked); void brcmf_txflowblock_if(struct brcmf_if *ifp, enum brcmf_netif_stop_reason reason, bool state); void brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success); -void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq); +void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb); void brcmf_netif_mon_rx(struct brcmf_if *ifp, struct sk_buff *skb); void brcmf_net_detach(struct net_device *ndev, bool locked); int brcmf_net_mon_attach(struct brcmf_if *ifp); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c index 19b0f318f93ed..d58525ebe618e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c @@ -1664,7 +1664,7 @@ static void brcmf_rxreorder_get_skb_list(struct brcmf_ampdu_rx_reorder *rfi, rfi->pend_pkts -= skb_queue_len(skb_list); } -void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt, bool inirq) +void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt) { struct brcmf_pub *drvr = ifp->drvr; u8 *reorder_data; @@ -1682,7 +1682,7 @@ void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt, bool inirq) /* validate flags and flow id */ if (flags == 0xFF) { bphy_err(drvr, "invalid flags...so ignore this packet\n"); - brcmf_netif_rx(ifp, pkt, inirq); + brcmf_netif_rx(ifp, pkt); return; } @@ -1694,7 +1694,7 @@ void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt, bool inirq) if (rfi == NULL) { brcmf_dbg(INFO, "received flags to cleanup, but no flow (%d) yet\n", flow_id); - brcmf_netif_rx(ifp, pkt, inirq); + brcmf_netif_rx(ifp, pkt); return; } @@ -1719,7 +1719,7 @@ void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt, bool inirq) rfi = kzalloc(buf_size, GFP_ATOMIC); if (rfi == NULL) { bphy_err(drvr, "failed to alloc buffer\n"); - brcmf_netif_rx(ifp, pkt, inirq); + brcmf_netif_rx(ifp, pkt); return; } @@ -1833,7 +1833,7 @@ void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt, bool inirq) netif_rx: skb_queue_walk_safe(&reorder_list, pkt, pnext) { __skb_unlink(pkt, &reorder_list); - brcmf_netif_rx(ifp, pkt, inirq); + brcmf_netif_rx(ifp, pkt); } } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.h index 50e424b5880de..b16a9d1c0508e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.h @@ -42,6 +42,6 @@ void brcmf_fws_add_interface(struct brcmf_if *ifp); void brcmf_fws_del_interface(struct brcmf_if *ifp); void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, struct sk_buff *skb); void brcmf_fws_bus_blocked(struct brcmf_pub *drvr, bool flow_blocked); -void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq); +void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb); #endif /* FWSIGNAL_H_ */ diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c index 7c8e08ee8f0ff..b2d0f7570aa97 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c @@ -536,8 +536,7 @@ static int brcmf_msgbuf_hdrpull(struct brcmf_pub *drvr, bool do_fws, return -ENODEV; } -static void brcmf_msgbuf_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb, - bool inirq) +static void brcmf_msgbuf_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb) { } @@ -1191,7 +1190,7 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf) } skb->protocol = eth_type_trans(skb, ifp->ndev); - brcmf_netif_rx(ifp, skb, false); + brcmf_netif_rx(ifp, skb); } static void brcmf_msgbuf_process_gen_status(struct brcmf_msgbuf *msgbuf, diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h index f4a79e217da5b..bd08d3aaa8f4a 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h @@ -32,7 +32,7 @@ struct brcmf_proto { u8 peer[ETH_ALEN]); void (*add_tdls_peer)(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN]); - void (*rxreorder)(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq); + void (*rxreorder)(struct brcmf_if *ifp, struct sk_buff *skb); void (*add_if)(struct brcmf_if *ifp); void (*del_if)(struct brcmf_if *ifp); void (*reset_if)(struct brcmf_if *ifp); @@ -109,9 +109,9 @@ static inline bool brcmf_proto_is_reorder_skb(struct sk_buff *skb) } static inline void -brcmf_proto_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb, bool inirq) +brcmf_proto_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb) { - ifp->drvr->proto->rxreorder(ifp, skb, inirq); + ifp->drvr->proto->rxreorder(ifp, skb); } static inline void From patchwork Sat Mar 5 22:12:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770493 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2ACB3C433EF for ; Sat, 5 Mar 2022 22:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232747AbiCEWO1 (ORCPT ); Sat, 5 Mar 2022 17:14:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232720AbiCEWOM (ORCPT ); Sat, 5 Mar 2022 17:14:12 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 085CA54BDB; Sat, 5 Mar 2022 14:13:21 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646518398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L4XzxBTWfxgqMCSYhgP5LMH1pYJhDeR5dXrU0AuykAk=; b=3QBryap7XfWXyWZkXLFO+OVfYIG5/e/6nxu/u9ZWFQiiq2WxnrcS/IMsygSqX+PcwYxTp3 MoAQOc+D8jjPosSwcWh9vkHprjRDw87MPkDfxOpZLSiOg6GW9t3q4PC2PogjDVa3cx3zdF 5FgdRwreChSuIeve7XGnN/CQhk4L4YL20qB3cwxQ0ewCchh8wPKkQ58bXz38B7Koq1MauP qVbOd6t47V6hoStZZbTKmDKrfxfLEsOMdb9vXcrQTTwiTSNP0ArLhpHZKTQlrkHaY7wYP+ PFKDqI6pFc9B9U3T7sdBdcuM58uO2WHA9wQQou6vrLQJlKZxY5O+hU2cZywfjg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646518398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L4XzxBTWfxgqMCSYhgP5LMH1pYJhDeR5dXrU0AuykAk=; b=cfuaTMFIm0ua/pZt76t/8KA9b+V9MD3D/8KEHwYFjdlpTTSKYzzMKp3ScFpvHfn/tCm0tH arLhyEpK9ZDJmmDA== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Amitkumar Karwar , Ganapathi Bhat , Kalle Valo , Sharvari Harisangam , Xinming Hu , libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH net-next 7/8] wireless: Marvell: Use netif_rx(). Date: Sat, 5 Mar 2022 23:12:51 +0100 Message-Id: <20220305221252.3063812-8-bigeasy@linutronix.de> In-Reply-To: <20220305221252.3063812-1-bigeasy@linutronix.de> References: <20220305221252.3063812-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("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: Amitkumar Karwar Cc: Ganapathi Bhat Cc: Kalle Valo Cc: Sharvari Harisangam Cc: Xinming Hu Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- drivers/net/wireless/marvell/libertas/rx.c | 4 ++-- drivers/net/wireless/marvell/mwifiex/uap_txrx.c | 2 +- drivers/net/wireless/marvell/mwifiex/util.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/marvell/libertas/rx.c b/drivers/net/wireless/marvell/libertas/rx.c index 9f24b0760e1f7..c34d30f7cbe03 100644 --- a/drivers/net/wireless/marvell/libertas/rx.c +++ b/drivers/net/wireless/marvell/libertas/rx.c @@ -147,7 +147,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb) dev->stats.rx_packets++; skb->protocol = eth_type_trans(skb, dev); - netif_rx_any_context(skb); + netif_rx(skb); ret = 0; done: @@ -262,7 +262,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv, dev->stats.rx_packets++; skb->protocol = eth_type_trans(skb, priv->dev); - netif_rx_any_context(skb); + netif_rx(skb); ret = 0; diff --git a/drivers/net/wireless/marvell/mwifiex/uap_txrx.c b/drivers/net/wireless/marvell/mwifiex/uap_txrx.c index 245ff644f81e3..4e49ed21c5ced 100644 --- a/drivers/net/wireless/marvell/mwifiex/uap_txrx.c +++ b/drivers/net/wireless/marvell/mwifiex/uap_txrx.c @@ -350,7 +350,7 @@ int mwifiex_uap_recv_packet(struct mwifiex_private *priv, skb->truesize += (skb->len - MWIFIEX_RX_DATA_BUF_SIZE); /* Forward multicast/broadcast packet to upper layer*/ - netif_rx_any_context(skb); + netif_rx(skb); return 0; } diff --git a/drivers/net/wireless/marvell/mwifiex/util.c b/drivers/net/wireless/marvell/mwifiex/util.c index d583fa600a296..d5edb1e89f5bd 100644 --- a/drivers/net/wireless/marvell/mwifiex/util.c +++ b/drivers/net/wireless/marvell/mwifiex/util.c @@ -488,7 +488,7 @@ int mwifiex_recv_packet(struct mwifiex_private *priv, struct sk_buff *skb) (skb->truesize > MWIFIEX_RX_DATA_BUF_SIZE)) skb->truesize += (skb->len - MWIFIEX_RX_DATA_BUF_SIZE); - netif_rx_any_context(skb); + netif_rx(skb); return 0; } From patchwork Sat Mar 5 22:12:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12770492 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34E8BC4321E for ; Sat, 5 Mar 2022 22:13:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232730AbiCEWOO (ORCPT ); Sat, 5 Mar 2022 17:14:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232716AbiCEWOL (ORCPT ); Sat, 5 Mar 2022 17:14:11 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00C1C54BCF; Sat, 5 Mar 2022 14:13:20 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646518398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WhLge7rCtt5N/Hwi3zdBO4SqNA5FgQcg+0ubxgkiGDU=; b=O2qPXnm65kgWE1A9Q/3NTjmwxDPJoFHTYRVqpIT/G+4H4Ixk236WTu4EKOa3KXWnGWHQ3S HEVLzR4qNkKccNDXXBr69gW5SPvkBTsZgpjGKEA51y0Zvj47cmgYOgPmklMDIAJuVpSbg/ h3NzIBh1ZtmC++b8v25Iw06fUlAVYAclhVIgGWHz1pMqdOP3UR8xYEnP+tRgti2CadHSLA og0gXb0z2Xg6Ww5sj6rk/HcplW24L0Gpe5IUGuSgMMTxfiRRlBx0luHsEHRP4K8S7LloSu 3dpMnOKhOcH9K1iQdYnJ6mwWM4rwTsLO2+EFYHTp3mBJ5U30/6AB2WnGqL26/w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646518398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WhLge7rCtt5N/Hwi3zdBO4SqNA5FgQcg+0ubxgkiGDU=; b=tOlQYWZBEzcga002l3ORouw4Ql0NoLacDwumeFXhmZLQEAtfjOcGkinsoNfx960Cb6iWzq v/rHCkLqqRG0w8AA== To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Thomas Gleixner , Sebastian Andrzej Siewior , Johannes Berg , linux-wireless@vger.kernel.org Subject: [PATCH net-next 8/8] wireless: Use netif_rx(). Date: Sat, 5 Mar 2022 23:12:52 +0100 Message-Id: <20220305221252.3063812-9-bigeasy@linutronix.de> In-Reply-To: <20220305221252.3063812-1-bigeasy@linutronix.de> References: <20220305221252.3063812-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Since commit baebdf48c3600 ("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: Johannes Berg Cc: linux-wireless@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- net/wireless/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/util.c b/net/wireless/util.c index e02f1702806e4..63b37f421e102 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -2153,7 +2153,7 @@ void cfg80211_send_layer2_update(struct net_device *dev, const u8 *addr) skb->dev = dev; skb->protocol = eth_type_trans(skb, dev); memset(skb->cb, 0, sizeof(skb->cb)); - netif_rx_ni(skb); + netif_rx(skb); } EXPORT_SYMBOL(cfg80211_send_layer2_update);