|
@@ -821,7 +821,7 @@ void htc_stop(HTC_HANDLE HTCHandle)
|
|
|
{
|
|
|
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
|
|
int i;
|
|
|
- HTC_ENDPOINT *pEndpoint;
|
|
|
+ HTC_ENDPOINT *endpoint;
|
|
|
#ifdef RX_SG_SUPPORT
|
|
|
qdf_nbuf_t netbuf;
|
|
|
qdf_nbuf_queue_t *rx_sg_queue = &target->RxSgQueue;
|
|
@@ -832,12 +832,12 @@ void htc_stop(HTC_HANDLE HTCHandle)
|
|
|
HTC_INFO("%s: endpoints cleanup\n", __func__);
|
|
|
/* cleanup endpoints */
|
|
|
for (i = 0; i < ENDPOINT_MAX; i++) {
|
|
|
- pEndpoint = &target->endpoint[i];
|
|
|
- htc_flush_rx_hold_queue(target, pEndpoint);
|
|
|
- htc_flush_endpoint_tx(target, pEndpoint, HTC_TX_PACKET_TAG_ALL);
|
|
|
- if (pEndpoint->ul_is_polled) {
|
|
|
- qdf_timer_stop(&pEndpoint->ul_poll_timer);
|
|
|
- qdf_timer_free(&pEndpoint->ul_poll_timer);
|
|
|
+ endpoint = &target->endpoint[i];
|
|
|
+ htc_flush_rx_hold_queue(target, endpoint);
|
|
|
+ htc_flush_endpoint_tx(target, endpoint, HTC_TX_PACKET_TAG_ALL);
|
|
|
+ if (endpoint->ul_is_polled) {
|
|
|
+ qdf_timer_stop(&endpoint->ul_poll_timer);
|
|
|
+ qdf_timer_free(&endpoint->ul_poll_timer);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -863,12 +863,18 @@ void htc_stop(HTC_HANDLE HTCHandle)
|
|
|
* In SSR case, HTC tx completion callback for wmi will be blocked
|
|
|
* by TARGET_STATUS_RESET and HTC packets will be left unfreed on
|
|
|
* lookup queue.
|
|
|
+ *
|
|
|
+ * In case of target failing to send wmi_ready_event, the htc connect
|
|
|
+ * msg buffer will be left unmapped and not freed. So calling the
|
|
|
+ * completion handler for this buffer will handle this scenario.
|
|
|
*/
|
|
|
HTC_INFO("%s: flush endpoints Tx lookup queue\n", __func__);
|
|
|
for (i = 0; i < ENDPOINT_MAX; i++) {
|
|
|
- pEndpoint = &target->endpoint[i];
|
|
|
- if (pEndpoint->service_id == WMI_CONTROL_SVC)
|
|
|
+ endpoint = &target->endpoint[i];
|
|
|
+ if (endpoint->service_id == WMI_CONTROL_SVC)
|
|
|
htc_flush_endpoint_txlookupQ(target, i, false);
|
|
|
+ else if (endpoint->service_id == HTC_CTRL_RSVD_SVC)
|
|
|
+ htc_flush_endpoint_txlookupQ(target, i, true);
|
|
|
}
|
|
|
HTC_INFO("%s: resetting endpoints state\n", __func__);
|
|
|
|