qcacld-3.0: Send peer delete wmi cmd before peer detach

This is a qcacld-2.0 to qcacld-3.0 propagation.

In wma_remove_peer, sometimes when peer detach is in progress,
and it has set the peer as invalid, but WMI_PEER_DELETE_CMDID
is still not sent to FW, so msdu for the peer still can be
received. In htt_rx_amsdu_rx_in_order_pop_ll, it will print
a lot of error log, which will cause watch dog.

Send peer delete cmd to FW firstly, then detach peer in host.

In qcacld-3.0, it doesn't have watch dog issue, as the print has
been removed from htt_rx_amsdu_rx_in_order_pop_ll, but it is still
worth to adjust to the right sequence.

Change-Id: Ia26aa5e673a48ca1d9ccf4f184d0bfab0d6e98ef
CRs-Fixed: 1070216
This commit is contained in:
jge 2017-01-09 11:35:45 +08:00 • committed by qcabuildsw
commit 6435f4fc2c

View file

@ -1092,12 +1092,6 @@ void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
return;
}
if (peer) {
if (roam_synch_in_progress)
cdp_peer_detach_force_delete(soc, peer);
else
cdp_peer_delete(soc, peer);
}
peer_mac_addr = cdp_peer_get_peer_mac_addr(soc, 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",
@ -1106,12 +1100,8 @@ void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
return;
}
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);
if (roam_synch_in_progress)
return;
goto peer_detach;
/* Flush all TIDs except MGMT TID for this peer in Target */
peer_tid_bitmap &= ~(0x1 << WMI_MGMT_TID);
param.peer_tid_bitmap = peer_tid_bitmap;
@ -1127,6 +1117,19 @@ void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
wmi_unified_peer_delete_send(wma->wmi_handle, peer_addr,
vdev_id);
peer_detach:
if (peer) {
if (roam_synch_in_progress)
cdp_peer_detach_force_delete(soc, peer);
else
cdp_peer_delete(soc, peer);
}
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
}