소스 검색

qcacmn: Protect TxLookupqueue while flushing

The htc TxLookupQueue needs to be protected with
relevant lock while flushing.

Change-Id: Ib6c8878c024ef623dfb63ca0745d41b140f2b1c3
Debasis Das 6 년 전
부모
커밋
5e2539c087
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      htc/htc_send.c

+ 2 - 0
htc/htc_send.c

@@ -2080,6 +2080,7 @@ void htc_flush_endpoint_txlookupQ(HTC_TARGET *target,
 	if (!endpoint && endpoint->service_id == 0)
 	if (!endpoint && endpoint->service_id == 0)
 		return;
 		return;
 
 
+	LOCK_HTC_TX(target);
 	while (HTC_PACKET_QUEUE_DEPTH(&endpoint->TxLookupQueue)) {
 	while (HTC_PACKET_QUEUE_DEPTH(&endpoint->TxLookupQueue)) {
 		packet = htc_packet_dequeue(&endpoint->TxLookupQueue);
 		packet = htc_packet_dequeue(&endpoint->TxLookupQueue);
 
 
@@ -2092,6 +2093,7 @@ void htc_flush_endpoint_txlookupQ(HTC_TARGET *target,
 			}
 			}
 		}
 		}
 	}
 	}
+	UNLOCK_HTC_TX(target);
 }
 }
 
 
 /* HTC API to flush an endpoint's TX queue*/
 /* HTC API to flush an endpoint's TX queue*/