Return-path: Received: from emh01.mail.saunalahti.fi ([62.142.5.107]:59160 "EHLO emh01.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932647Ab3JOSrV (ORCPT ); Tue, 15 Oct 2013 14:47:21 -0400 Subject: [PATCH 7/7] ath10k: add might_sleep() to ath10k_wmi_cmd_send() To: ath10k@lists.infradead.org From: Kalle Valo Cc: linux-wireless@vger.kernel.org Date: Tue, 15 Oct 2013 21:47:20 +0300 Message-ID: <20131015184719.14123.31321.stgit@localhost6.localdomain6> (sfid-20131015_204724_405331_D4FE4D7F) In-Reply-To: <20131015184548.14123.56949.stgit@localhost6.localdomain6> References: <20131015184548.14123.56949.stgit@localhost6.localdomain6> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Sender: linux-wireless-owner@vger.kernel.org List-ID: ath10k_wmi_cmd_send() will now sleep if there are no credits available. To make it easier to catch callers in atomic context add might_sleep() to the function. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/wmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index d1e513e..77238af 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -613,6 +613,8 @@ static int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, { int ret = -EOPNOTSUPP; + might_sleep(); + if (cmd_id == WMI_CMD_UNSUPPORTED) { ath10k_warn("wmi command %d is not supported by firmware\n", cmd_id);