]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath10k: warn if give WMI command is not supported
authorBartosz Markowski <bartosz.markowski@tieto.com>
Thu, 26 Sep 2013 15:47:07 +0000 (17:47 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 27 Sep 2013 11:58:14 +0000 (14:58 +0300)
This will show and make it easier to track the API
differences in the new AP firmware.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/wmi.c

index cfb20824499978f4a3fc36064328b449c4385203..8386050b101077338ca228d9246942d7e7daa8a4 100644 (file)
@@ -390,6 +390,12 @@ static int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb,
 {
        int ret = -EINVAL;
 
+       if (cmd_id == WMI_CMD_UNDEFINED) {
+               ath10k_warn("wmi command %d is not supported by firmware\n",
+                           cmd_id);
+               return ret;
+       }
+
        wait_event_timeout(ar->wmi.tx_credits_wq, ({
                /* try to send pending beacons first. they take priority */
                ath10k_wmi_tx_beacons_nowait(ar);