OSDN Git Service

ath10k: wmi: disable softirq's while calling ieee80211_rx
authorErik Stromdahl <erik.stromdahl@gmail.com>
Tue, 4 Sep 2018 12:07:07 +0000 (15:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Nov 2019 13:43:24 +0000 (14:43 +0100)
commit0f0ba64b8c40a46e0108779166ccdc9a4c0963c4
treefaadb57c2b5c053746ab7b2a147eadf41ee65ec8
parent65cd813e457d338fc40070cf617b38a93aeaba99
ath10k: wmi: disable softirq's while calling ieee80211_rx

[ Upstream commit 37f62c0d5822f631b786b29a1b1069ab714d1a28 ]

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 <erik.stromdahl@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath10k/wmi.c