Skip to content

Commit d0eeafa

Browse files
greearbkvalo
authored andcommitted
ath10k: Clean up peer when sta goes away.
If WMI and/or firmware has issues removing the peer object, then we still need to clean up the peer object in the driver. Signed-off-by: Ben Greear <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent c5ace87 commit d0eeafa

File tree

1 file changed

+10
-2
lines changed
  • drivers/net/wireless/ath/ath10k

1 file changed

+10
-2
lines changed

drivers/net/wireless/ath/ath10k/mac.c

+10-2
Original file line numberDiff line numberDiff line change
@@ -5997,9 +5997,17 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
59975997
continue;
59985998

59995999
if (peer->sta == sta) {
6000-
ath10k_warn(ar, "found sta peer %pM entry on vdev %i after it was supposedly removed\n",
6001-
sta->addr, arvif->vdev_id);
6000+
ath10k_warn(ar, "found sta peer %pM (ptr %p id %d) entry on vdev %i after it was supposedly removed\n",
6001+
sta->addr, peer, i, arvif->vdev_id);
60026002
peer->sta = NULL;
6003+
6004+
/* Clean up the peer object as well since we
6005+
* must have failed to do this above.
6006+
*/
6007+
list_del(&peer->list);
6008+
ar->peer_map[i] = NULL;
6009+
kfree(peer);
6010+
ar->num_peers--;
60036011
}
60046012
}
60056013
spin_unlock_bh(&ar->data_lock);

0 commit comments

Comments
 (0)