From patchwork Sun Jun 3 18:20:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Stromdahl X-Patchwork-Id: 10445513 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 19611601BC for ; Sun, 3 Jun 2018 18:22:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09A7528A4D for ; Sun, 3 Jun 2018 18:22:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2D8728B1C; Sun, 3 Jun 2018 18:22:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BFE028A4D for ; Sun, 3 Jun 2018 18:22:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751423AbeFCSWW (ORCPT ); Sun, 3 Jun 2018 14:22:22 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:46293 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751297AbeFCSWV (ORCPT ); Sun, 3 Jun 2018 14:22:21 -0400 Received: by mail-lf0-f68.google.com with SMTP id j13-v6so17336654lfb.13 for ; Sun, 03 Jun 2018 11:22:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+hNqRkdCbLifgAf6h3leWhWXt5sGFJ6IF04iRU8porg=; b=dsoqYyT8AddsOXCS9O9DipgWaNUJJ//cL+4gYzBeLCZS4wziTkKVQ7mRrT9a+1v+85 BW3JXMaG1ZCuuAmNa49wJfHsl+tIMsYkgq71Is3PAvvVXPXeb6qfnl8zlVjcqmlD6fZA Jsf1XENshUQWydO18riLmI+OEdDgV0UOsAqzGpZ3HGk0lEKB/jUNGidwmsBRn4xgiq4g Bx44XLUaBwLpLHeFM1yYKrFQhZZkrk4PuSG9xzTk1YJCwzwiWK0RDWxvN9yRTVn1oEA0 Wv11AgkHBgYOzF8z03ncT1pDj/2ixdYrHa0AG0q4jhqT+FP4OGAB5lhjlmo4Y6UoNt+e T5yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+hNqRkdCbLifgAf6h3leWhWXt5sGFJ6IF04iRU8porg=; b=RxMEDz7n5YxItjoqI1rJbiBb6ix1TBAbmqky4l1rzO9a/6N0c/s+CyDO60JGB+YSVq Rda2F0ixZFJxjy+cXiIlBCKsGQgmhR2G8No3yFBNyB5AVxgKDLcdSCd2EGOW1ugDe3uV 3WcjgmVt+5rV2lrd//DaZ7dFBYFZANTVMKUylbElQcMmpvkcVXiN5vQcvstPh7nA2a7I YPKeURQY4AS1fFxPYF7U0con2UYBR73ch8OT3Vlk8ZbLKoB3IfWFn5z/WXGv2OHN7qz8 novwp8C2SKjuVolPbRbMIeXl4fxah1OsxOqtSZXhOG6hEf4Cm7HWgnOILGZgqvOFk9MT 7j5Q== X-Gm-Message-State: ALKqPwfjmZGkqi2WHzCfTZ/2RQKyo1Rjr1O+/00ytYYzEdoubkyHDPIP d5jATLni7W6VO762IQiUvZU= X-Google-Smtp-Source: ADUXVKINQqjUMkD1mLpFzDUHZEVmZGbKkVesz5mAe3knhPKQNWHwNfb/OdDWcPgvnAWHnJ4b28V+Nw== X-Received: by 2002:a19:290b:: with SMTP id p11-v6mr10590236lfp.108.1528050139721; Sun, 03 Jun 2018 11:22:19 -0700 (PDT) Received: from localhost.localdomain (90-227-62-61-no75.tbcn.telia.com. [90.227.62.61]) by smtp.gmail.com with ESMTPSA id l200-v6sm4980562lfe.77.2018.06.03.11.22.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jun 2018 11:22:19 -0700 (PDT) From: Erik Stromdahl To: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Cc: Erik Stromdahl Subject: [RFC v5 12/12] ath10k: wmi: disable softirq's while calling ieee80211_rx Date: Sun, 3 Jun 2018 20:20:29 +0200 Message-Id: <20180603182029.8914-13-erik.stromdahl@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180603182029.8914-1-erik.stromdahl@gmail.com> References: <20180603182029.8914-1-erik.stromdahl@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is done in order not to trig the below warning in ieee80211_rx_napi: WARN_ON_ONCE(softirq_count() == 0); ieee80211_rx_napi requires that softirq's are disabled during execution. The High latency bus drivers (SDIO and USB) sometimes call the wmi ep_rx_complete callback from non softirq context, resulting in a trigger of the above warning. Calling ieee80211_rx_ni with softirq's already disabled (e.g., from softirq context) should be safe as the local_bh_disable and local_bh_enable functions (called from ieee80211_rx_ni) are fully reentrant. Signed-off-by: Erik Stromdahl --- drivers/net/wireless/ath/ath10k/wmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index f97ab795cf2e..c3237a6d77a2 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2423,7 +2423,8 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) status->freq, status->band, status->signal, status->rate_idx); - ieee80211_rx(ar->hw, skb); + ieee80211_rx_ni(ar->hw, skb); + return 0; }