Signed-off-by: Michal Kazior <michal.kaz...@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c  |    8 +++++---
 drivers/net/wireless/ath/ath10k/txrx.c |   16 +++++++++-------
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index 94b5334..c6802b1 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1235,10 +1235,12 @@ static void ath10k_tx_h_update_wep_key(struct sk_buff 
*skb)
        ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
                                        WMI_VDEV_PARAM_DEF_KEYID,
                                        key->keyidx);
-       if (!ret)
-               arvif->def_wep_key_index = key->keyidx;
-       else
+       if (ret) {
                ath10k_warn("could not update wep keyidx (%d)\n", ret);
+               return;
+       }
+
+       arvif->def_wep_key_index = key->keyidx;
 }
 
 static void ath10k_tx_h_add_p2p_noa_ie(struct ath10k *ar, struct sk_buff *skb)
diff --git a/drivers/net/wireless/ath/ath10k/txrx.c 
b/drivers/net/wireless/ath/ath10k/txrx.c
index 205a9b8..6392f11 100644
--- a/drivers/net/wireless/ath/ath10k/txrx.c
+++ b/drivers/net/wireless/ath/ath10k/txrx.c
@@ -31,14 +31,16 @@ static void ath10k_report_offchan_tx(struct ath10k *ar, 
struct sk_buff *skb)
         * offchan_tx_completed for a different skb. Prevent this by using
         * offchan_tx_skb. */
        spin_lock_bh(&ar->data_lock);
-       if (ar->offchan_tx_skb == skb) {
-               complete(&ar->offchan_tx_completed);
-               ar->offchan_tx_skb = NULL; /* just for sanity */
-
-               ath10k_dbg(ATH10K_DBG_HTT, "completed offchannel skb %p\n", 
skb);
+       if (ar->offchan_tx_skb != skb) {
+               ath10k_warn("completed old offchannel frame\n");
+               goto out;
        }
-       else
-               ath10k_warn("completed late offchannel skb %p\n", skb);
+
+       complete(&ar->offchan_tx_completed);
+       ar->offchan_tx_skb = NULL; /* just for sanity */
+
+       ath10k_dbg(ATH10K_DBG_HTT, "completed offchannel skb %p\n", skb);
+out:
        spin_unlock_bh(&ar->data_lock);
 }
 
-- 
1.7.9.5

_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to