Browse Source

qcacld-3.0: Assert if remove peer fails

If wma_remove_peer() fails to remove peer and send PEER_DELETE command
to fw, it will cause issues afterwards and asserts at random places
that would be misleading.

Assert in wma_remove_peer() if peer remove fails.

Change-Id: I97a4b72c359a4e2322c9c499d01f21a4d287e8fd
CRs-Fixed: 2252886
Himanshu Agarwal 6 years ago
parent
commit
074340dce7
1 changed files with 4 additions and 0 deletions
  1. 4 0
      core/wma/src/wma_dev_if.c

+ 4 - 0
core/wma/src/wma_dev_if.c

@@ -1413,16 +1413,19 @@ void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
 		WMA_LOGE("%s: Can't remove peer with peer_addr %pM vdevid %d peer_count %d",
 			__func__, bssid, vdev_id,
 			wma->interfaces[vdev_id].peer_count);
+		QDF_BUG(0);
 		return;
 	}
 
 	if (!soc) {
 		WMA_LOGE("%s:SOC context is NULL", __func__);
+		QDF_BUG(0);
 		return;
 	}
 
 	if (!peer) {
 		WMA_LOGE("%s: PEER is NULL for vdev_id: %d", __func__, vdev_id);
+		QDF_BUG(0);
 		return;
 	}
 
@@ -1431,6 +1434,7 @@ void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
 		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);
+		QDF_BUG(0);
 		return;
 	}