/* Called in case unsolicited event from type HCI_EVNT_DATA_UNSOL_FREE_BUFF has received. Keep track on the number of packets transmitted and update the number of free buffer in the SL device. 
hci_event_unsol_flowcontrol_handler */
INT32 hci_event_unsol_flowcontrol_handler(CHAR *pEvent)
/* Called in case unsolicited event from type HCI_EVNT_DATA_UNSOL_FREE_BUFF has received. Keep track on the number of packets transmitted and update the number of free buffer in the SL device. 
hci_event_unsol_flowcontrol_handler */
INT32 hci_event_unsol_flowcontrol_handler(CHAR *pEvent)
{
	INT32 temp, value;
	UINT16 i;
	UINT16  pusNumberOfHandles=0;
	CHAR *pReadPayload;
	STREAM_TO_UINT16((CHAR *)pEvent,HCI_EVENT_HEADER_SIZE,pusNumberOfHandles);
	pReadPayload = ((CHAR *)pEvent +
		HCI_EVENT_HEADER_SIZE + sizeof(pusNumberOfHandles));	temp = 0;
	for(i = 0; i < pusNumberOfHandles ; i++)
	{
		STREAM_TO_UINT16(pReadPayload, FLOW_CONTROL_EVENT_FREE_BUFFS_OFFSET, value);
		temp += value;
		pReadPayload += FLOW_CONTROL_EVENT_SIZE;  
	}
	tSLInformation.usNumberOfFreeBuffers += temp;
	tSLInformation.NumberOfReleasedPackets += temp;
	return(ESUCCESS);
}