Skip to content

Commit

Permalink
ath10k: Add WARN_ON if we over-write peer-map pointer.
Browse files Browse the repository at this point in the history
Not sure this can happen, but seems like a reasonable sanity
check.

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 9802977 commit c5ace87
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ath10k/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ void ath10k_peer_map_event(struct ath10k_htt *htt,
ath10k_dbg(ar, ATH10K_DBG_HTT, "htt peer map vdev %d peer %pM id %d\n",
ev->vdev_id, ev->addr, ev->peer_id);

WARN_ON(ar->peer_map[ev->peer_id] && (ar->peer_map[ev->peer_id] != peer));
ar->peer_map[ev->peer_id] = peer;
set_bit(ev->peer_id, peer->peer_ids);
exit:
Expand Down

0 comments on commit c5ace87

Please sign in to comment.