diff options
| -rw-r--r-- | core/wma/src/wma_dev_if.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 605f2660f59f..9047e23f19e9 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -1141,6 +1141,14 @@ void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid, struct peer_flush_params param = {0}; uint8_t *peer_mac_addr; + peer_mac_addr = ol_txrx_peer_get_peer_mac_addr(peer); + if (peer_mac_addr == NULL) { + WMA_LOGE("%s: peer mac addr is NULL, Can't remove peer, vdevid %d peer_count %d", + __func__, vdev_id, + wma->interfaces[vdev_id].peer_count); + return; + } + if (!wma->interfaces[vdev_id].peer_count) { WMA_LOGE("%s: Can't remove peer with peer_addr %pM vdevid %d peer_count %d", __func__, bssid, vdev_id, @@ -1148,14 +1156,6 @@ void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid, return; } - peer_mac_addr = ol_txrx_peer_get_peer_mac_addr(peer); - if (peer_mac_addr == NULL) { - WMA_LOGE("%s: peer mac addr is NULL, Can't remove peer with peer_addr %pM vdevid %d peer_count %d", - __func__, bssid, vdev_id, - wma->interfaces[vdev_id].peer_count); - return; - } - if (roam_synch_in_progress) goto peer_detach; /* Flush all TIDs except MGMT TID for this peer in Target */ @@ -1175,6 +1175,10 @@ void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid, vdev_id); peer_detach: + WMA_LOGE("%s: Remove peer %p with peer_addr %pM vdevid %d peer_count %d", + __func__, peer, bssid, vdev_id, + wma->interfaces[vdev_id].peer_count); + if (peer) { if (roam_synch_in_progress) ol_txrx_peer_detach_force_delete(peer); @@ -1183,9 +1187,6 @@ peer_detach: } wma->interfaces[vdev_id].peer_count--; - WMA_LOGE("%s: Removed peer %p with peer_addr %pM vdevid %d peer_count %d", - __func__, peer, bssid, vdev_id, - wma->interfaces[vdev_id].peer_count); #undef PEER_ALL_TID_BITMASK } |
