Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / ath / ath6kl / txrx.c
index 78b369286579dd954f98243a24e948db2a4f3c2b..ebb24045a8ae6cbcac844a239d11a05ee6f86e14 100644 (file)
@@ -20,6 +20,7 @@
 #include "core.h"
 #include "debug.h"
 #include "htc-ops.h"
+#include "trace.h"
 
 /*
  * tid - tid_mux0..tid_mux3
@@ -288,6 +289,8 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb,
        int status = 0;
        struct ath6kl_cookie *cookie = NULL;
 
+       trace_ath6kl_wmi_cmd(skb->data, skb->len);
+
        if (WARN_ON_ONCE(ar->state == ATH6KL_STATE_WOW)) {
                dev_kfree_skb(skb);
                return -EACCES;
@@ -1324,7 +1327,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
                   __func__, ar, ept, skb, packet->buf,
                   packet->act_len, status);
 
-       if (status || !(skb->data + HTC_HDR_LENGTH)) {
+       if (status || packet->act_len < HTC_HDR_LENGTH) {
                dev_kfree_skb(skb);
                return;
        }