Explorar o código

ath10k: add might_sleep() to ath10k_wmi_cmd_send()

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 <kvalo@qca.qualcomm.com>
Kalle Valo %!s(int64=12) %!d(string=hai) anos
pai
achega
56b84287d1
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      drivers/net/wireless/ath/ath10k/wmi.c

+ 2 - 0
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);