]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ath10k: update tdls teardown state to target
authorManikanta Pubbisetty <mpubbise@qti.qualcomm.com>
Mon, 6 Nov 2017 08:09:31 +0000 (13:39 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Sat, 2 Dec 2017 14:15:43 +0000 (16:15 +0200)
It is required to update the teardown state of the peer when
a tdls link with that peer is terminated. This information is
useful for the target to perform some cleanups wrt the tdls peer.

Without proper cleanup, target assumes that the peer is connected and
blocks future connection requests, updating the teardown state of the
peer addresses the problem.

Tested this change on QCA9888 with 10.4-3.5.1-00018 fw version.

Signed-off-by: Manikanta Pubbisetty <mpubbise@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c

index ca596ecd2d64dce52358fdcf62975294ab83cfa5..06383e70e009b8e45735ee5bb70b1bb414c529ac 100644 (file)
@@ -6201,6 +6201,16 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
                           "mac vdev %d peer delete %pM sta %pK (sta gone)\n",
                           arvif->vdev_id, sta->addr, sta);
 
+               if (sta->tdls) {
+                       ret = ath10k_mac_tdls_peer_update(ar, arvif->vdev_id,
+                                                         sta,
+                                                         WMI_TDLS_PEER_STATE_TEARDOWN);
+                       if (ret)
+                               ath10k_warn(ar, "failed to update tdls peer state for %pM state %d: %i\n",
+                                           sta->addr,
+                                           WMI_TDLS_PEER_STATE_TEARDOWN, ret);
+               }
+
                ret = ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
                if (ret)
                        ath10k_warn(ar, "failed to delete peer %pM for vdev %d: %i\n",