this patch will kick our any peer each time you call for statistics.so it will not solve anything. it creates a massive bug. usually just kfree is enough here but even this will maybe just kill existing stats

Am 15.08.2019 um 23:04 schrieb Wenwen Wang:
If 'sta->tdls' is false, no cleanup is executed, leading to memory/resource
leaks, e.g., 'arsta->tx_stats'. To fix this issue, perform cleanup before
go to the 'exit' label.

Signed-off-by: Wenwen Wang <wen...@cs.uga.edu>
---
  drivers/net/wireless/ath/ath10k/mac.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index 0606416..f99e6d2 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -6548,8 +6548,12 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
spin_unlock_bh(&ar->data_lock); - if (!sta->tdls)
+               if (!sta->tdls) {
+                       ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
+                       ath10k_mac_dec_num_stations(arvif, sta);
+                       kfree(arsta->tx_stats);
                        goto exit;
+               }
ret = ath10k_wmi_update_fw_tdls_state(ar, arvif->vdev_id,
                                                      WMI_TDLS_ENABLE_ACTIVE);

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

Reply via email to