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: 12770496 X-Patchwork-Delegate: kvalo@adurom.com 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 D1866C433F5 for ; Sat, 5 Mar 2022 22:13:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232728AbiCEWOO (ORCPT ); Sat, 5 Mar 2022 17:14:14 -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: linux-wireless@vger.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: 12770499 X-Patchwork-Delegate: kvalo@adurom.com 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 5BE9EC433F5 for ; Sat, 5 Mar 2022 22:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229480AbiCEWO3 (ORCPT ); Sat, 5 Mar 2022 17:14:29 -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: linux-wireless@vger.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: 12770498 X-Patchwork-Delegate: kvalo@adurom.com 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 4D1AAC4332F for ; Sat, 5 Mar 2022 22:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232748AbiCEWO1 (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: linux-wireless@vger.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: 12770497 X-Patchwork-Delegate: johannes@sipsolutions.net 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 00FBBC433FE for ; Sat, 5 Mar 2022 22:13:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232724AbiCEWON (ORCPT ); Sat, 5 Mar 2022 17:14:13 -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: linux-wireless@vger.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);