diff mbox

[v2,03/13] ath10k: warn if give WMI command is not supported

Message ID 1380187792-25626-4-git-send-email-bartosz.markowski@tieto.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Bartosz Markowski Sept. 26, 2013, 9:29 a.m. UTC
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>
---
 drivers/net/wireless/ath/ath10k/wmi.c |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Kalle Valo Sept. 26, 2013, 12:35 p.m. UTC | #1
Bartosz Markowski <bartosz.markowski@tieto.com> writes:

> 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>
> ---

[...]

> +	if (cmd_id == WMI_CMD_UNDEFINED) {
> +		ath10k_warn("command not supported by given firmware\n");
> +		return ret;
> +	}

You should print the cmd id in the warning message.
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index cfb2082..fe55360 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -390,6 +390,11 @@  static int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb,
 {
 	int ret = -EINVAL;
 
+	if (cmd_id == WMI_CMD_UNDEFINED) {
+		ath10k_warn("command not supported by given firmware\n");
+		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);