From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from emh01.mail.saunalahti.fi ([62.142.5.107]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VW9ee-0001Lf-MN for ath10k@lists.infradead.org; Tue, 15 Oct 2013 18:47:41 +0000 Subject: [PATCH 7/7] ath10k: add might_sleep() to ath10k_wmi_cmd_send() From: Kalle Valo Date: Tue, 15 Oct 2013 21:47:20 +0300 Message-ID: <20131015184719.14123.31321.stgit@localhost6.localdomain6> In-Reply-To: <20131015184548.14123.56949.stgit@localhost6.localdomain6> References: <20131015184548.14123.56949.stgit@localhost6.localdomain6> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org 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); _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k