Skip to content

Commit

Permalink
ath10k: Clean up peer when sta goes away.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
greearb authored and kvalo committed Jul 8, 2016
1 parent c5ace87 commit d0eeafa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/net/wireless/ath/ath10k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -5997,9 +5997,17 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
continue;

if (peer->sta == sta) {
ath10k_warn(ar, "found sta peer %pM entry on vdev %i after it was supposedly removed\n",
sta->addr, arvif->vdev_id);
ath10k_warn(ar, "found sta peer %pM (ptr %p id %d) entry on vdev %i after it was supposedly removed\n",
sta->addr, peer, i, arvif->vdev_id);
peer->sta = NULL;

/* Clean up the peer object as well since we
* must have failed to do this above.
*/
list_del(&peer->list);
ar->peer_map[i] = NULL;
kfree(peer);
ar->num_peers--;
}
}
spin_unlock_bh(&ar->data_lock);
Expand Down

0 comments on commit d0eeafa

Please sign in to comment.