Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e4467fd authored by Chaehyun Lim's avatar Chaehyun Lim Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: remove WILC_Uint32



Use u32 instead of WILC_Uint32.

Signed-off-by: default avatarChaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d85f5326
Loading
Loading
Loading
Loading
+37 −37
Original line number Diff line number Diff line
@@ -159,9 +159,9 @@ typedef struct {
/* Extern Function Declarations                                              */
/*****************************************************************************/
extern WILC_Sint32 SendRawPacket(WILC_Sint8 *ps8Packet, WILC_Sint32 s32PacketLen);
extern void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length);
extern void GnrlAsyncInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length);
extern void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length);
extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length);
extern void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length);
extern void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length);
/*****************************************************************************/
/* Global Variables                                                          */
/*****************************************************************************/
@@ -359,8 +359,8 @@ INLINE u16 extract_mac_addr(WILC_Char *str, u8 *buff)
/* integers.                                                                  */
INLINE void create_mac_addr(u8 *str, u8 *buff)
{
	WILC_Uint32 i = 0;
	WILC_Uint32 j = 0;
	u32 i = 0;
	u32 j = 0;

	for (i = 0; i < MAC_ADDR_LEN; i++) {
		str[j++] = get_hex_char((u8)((buff[i] >> 4) & 0x0F));
@@ -376,7 +376,7 @@ INLINE void create_mac_addr(u8 *str, u8 *buff)
/* inet_addr is platform independent.                                       */
/* ips=>IP Address String in dotted decimal format                          */
/* ipn=>Pointer to IP Address in integer format                             */
INLINE u8 conv_ip_to_int(u8 *ips, WILC_Uint32 *ipn)
INLINE u8 conv_ip_to_int(u8 *ips, u32 *ipn)
{
	u8 i   = 0;
	u8 ipb = 0;
@@ -403,7 +403,7 @@ INLINE u8 conv_ip_to_int(u8 *ips, WILC_Uint32 *ipn)
/* decimal string format. Alternative to std library fn inet_ntoa().      */
/* ips=>Buffer to hold IP Address String dotted decimal format (Min 17B)  */
/* ipn=>IP Address in integer format                                      */
INLINE u8 conv_int_to_ip(u8 *ips, WILC_Uint32 ipn)
INLINE u8 conv_int_to_ip(u8 *ips, u32 ipn)
{
	u8 i   = 0;
	u8 ipb = 0;
@@ -442,7 +442,7 @@ INLINE u8 conv_int_to_ip(u8 *ips, WILC_Uint32 ipn)
	return i;
}

INLINE tenuWIDtype get_wid_type(WILC_Uint32 wid_num)
INLINE tenuWIDtype get_wid_type(u32 wid_num)
{
	/* Check for iconfig specific WID types first */
	if ((wid_num == WID_BSSID) ||
@@ -486,10 +486,10 @@ INLINE u16 get_beacon_period(u8 *data)
	return bcn_per;
}

INLINE WILC_Uint32 get_beacon_timestamp_lo(u8 *data)
INLINE u32 get_beacon_timestamp_lo(u8 *data)
{
	WILC_Uint32 time_stamp = 0;
	WILC_Uint32 index    = MAC_HDR_LEN;
	u32 time_stamp = 0;
	u32 index    = MAC_HDR_LEN;

	time_stamp |= data[index++];
	time_stamp |= (data[index++] << 8);
@@ -812,8 +812,8 @@ WILC_Sint32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInf
		u8 *pu8IEs = 0;
		u16 u16IEsLen = 0;
		u8 u8index = 0;
		WILC_Uint32 u32Tsf_Lo;
		WILC_Uint32 u32Tsf_Hi;
		u32 u32Tsf_Lo;
		u32 u32Tsf_Hi;

		pstrNetworkInfo = (tstrNetworkInfo *)WILC_MALLOC(sizeof(tstrNetworkInfo));
		WILC_memset((void *)(pstrNetworkInfo), 0, sizeof(tstrNetworkInfo));
@@ -924,7 +924,7 @@ WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo)
 *  @date			2 Apr 2012
 *  @version		1.0
 */
WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, WILC_Uint32 u32BufferLen,
WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen,
			       tstrConnectRespInfo **ppstrConnectRespInfo)
{
	WILC_Sint32 s32Error = WILC_SUCCESS;
@@ -1001,17 +1001,17 @@ WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo)
#ifndef CONNECT_DIRECT
WILC_Sint32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE],
			       wid_site_survey_reslts_s **ppstrSurveyResults,
			       WILC_Uint32 *pu32SurveyResultsCount)
			       u32 *pu32SurveyResultsCount)
{
	WILC_Sint32 s32Error = WILC_SUCCESS;
	wid_site_survey_reslts_s *pstrSurveyResults = NULL;
	WILC_Uint32 u32SurveyResultsCount = 0;
	WILC_Uint32 u32SurveyBytesLength = 0;
	u32 u32SurveyResultsCount = 0;
	u32 u32SurveyBytesLength = 0;
	u8 *pu8BufferPtr;
	WILC_Uint32 u32RcvdSurveyResultsNum = 2;
	u32 u32RcvdSurveyResultsNum = 2;
	u8 u8ReadSurveyResFragNum;
	WILC_Uint32 i;
	WILC_Uint32 j;
	u32 i;
	u32 j;

	for (i = 0; i < u32RcvdSurveyResultsNum; i++) {
		u32SurveyBytesLength = ppu8RcvdSiteSurveyResults[i][0];
@@ -1208,8 +1208,8 @@ void ProcessShortWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen,
void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen,
		   tstrWID *pstrWID, WILC_Sint8 *ps8WidVal)
{
	WILC_Uint32 *pu32val = (WILC_Uint32 *)ps8WidVal;
	WILC_Uint32 u32val = 0;
	u32 *pu32val = (u32 *)ps8WidVal;
	u32 u32val = 0;
	WILC_Sint32 s32PktLen = *ps32PktLen;
	if (pstrWID == NULL) {
		PRINT_WRN(CORECONFIG_DBG, "Can't set INT val 0x%x , NULL structure\n", u32val);
@@ -1224,7 +1224,7 @@ void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen,
		u32val = *pu32val;

		/* Length */
		pcPacket[s32PktLen++] = sizeof(WILC_Uint32);
		pcPacket[s32PktLen++] = sizeof(u32);

		/* Value */
		pcPacket[s32PktLen++] = (u8)(u32val & 0xFF);
@@ -1266,7 +1266,7 @@ void ProcessIntWid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen,
void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen,
		  tstrWID *pstrWID, u8 *pu8ip)
{
	WILC_Uint32 u32val = 0;
	u32 u32val = 0;
	WILC_Sint32 s32PktLen = *ps32PktLen;

	if (pstrWID == NULL) {
@@ -1280,7 +1280,7 @@ void ProcessIPwid(WILC_Char *pcPacket, WILC_Sint32 *ps32PktLen,

	if (g_oper_mode == SET_CFG) {
		/* Length */
		pcPacket[s32PktLen++] = sizeof(WILC_Uint32);
		pcPacket[s32PktLen++] = sizeof(u32);

		/* Convert the IP Address String to Integer */
		conv_ip_to_int(pu8ip, &u32val);
@@ -1521,14 +1521,14 @@ WILC_Sint32 further_process_response(u8 *resp,
				     u16 u16WIDid,
				     u16 cfg_len,
				     WILC_Bool process_wid_num,
				     WILC_Uint32 cnt,
				     u32 cnt,
				     tstrWID *pstrWIDresult)
{
	WILC_Uint32 retval = 0;
	WILC_Uint32 idx = 0;
	u32 retval = 0;
	u32 idx = 0;
	u8 cfg_chr  = 0;
	u16 cfg_sht  = 0;
	WILC_Uint32 cfg_int  = 0;
	u32 cfg_int  = 0;
	u8 cfg_str[256] = {0};
	tenuWIDtype enuWIDtype = WID_UNDEF;

@@ -1558,7 +1558,7 @@ WILC_Sint32 further_process_response(u8 *resp,

	case WID_INT:
	{
		WILC_Uint32 *pu32val = (WILC_Uint32 *)(pstrWIDresult->ps8WidVal);
		u32 *pu32val = (u32 *)(pstrWIDresult->ps8WidVal);
		cfg_int = MAKE_WORD32(
				MAKE_WORD16(resp[idx], resp[idx + 1]),
				MAKE_WORD16(resp[idx + 2], resp[idx + 3])
@@ -1694,9 +1694,9 @@ WILC_Sint32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult)
	u16 cfg_len  = 0;
	tenuWIDtype enuWIDtype = WID_UNDEF;
	WILC_Bool num_wid_processed = WILC_FALSE;
	WILC_Uint32 cnt = 0;
	WILC_Uint32 idx = 0;
	WILC_Uint32 ResCnt = 0;
	u32 cnt = 0;
	u32 idx = 0;
	u32 ResCnt = 0;
	/* Check whether the received frame is a valid response */
	if (RESP_MSG_TYPE != resp[0]) {
		PRINT_INFO(CORECONFIG_DBG, "Received Message format incorrect.\n");
@@ -1858,10 +1858,10 @@ WILC_Sint32 CreatePacketHeader(WILC_Char *pcpacket, WILC_Sint32 *ps32PacketLengt
 */

WILC_Sint32 CreateConfigPacket(WILC_Sint8 *ps8packet, WILC_Sint32 *ps32PacketLength,
			       tstrWID *pstrWIDs, WILC_Uint32 u32WIDsCount)
			       tstrWID *pstrWIDs, u32 u32WIDsCount)
{
	WILC_Sint32 s32Error = WILC_SUCCESS;
	WILC_Uint32 u32idx = 0;
	u32 u32idx = 0;
	*ps32PacketLength = MSG_HEADER_LEN;
	for (u32idx = 0; u32idx < u32WIDsCount; u32idx++) {
		switch (pstrWIDs[u32idx].enuWIDtype) {
@@ -1950,7 +1950,7 @@ WILC_Sint32 ConfigWaitResponse(WILC_Char *pcRespBuffer, WILC_Sint32 s32MaxRespBu
 */
#ifdef SIMULATION
WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
			  WILC_Uint32 u32WIDsCount, WILC_Bool bRespRequired, WILC_Uint32 drvHandler)
			  u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler)
{
	WILC_Sint32 s32Error = WILC_SUCCESS;
	WILC_Sint32 err = WILC_SUCCESS;
@@ -2129,7 +2129,7 @@ extern wilc_wlan_oup_t *gpstrWlanOps;
 *  @version	1.0
 */
WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
			  WILC_Uint32 u32WIDsCount, WILC_Bool bRespRequired, WILC_Uint32 drvHandler)
			  u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler)
{
	WILC_Sint32 counter = 0, ret = 0;
	if (gpstrWlanOps == NULL) {
+8 −8
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ extern u16 g_num_total_switches;
/* Function Macros                                                           */
/*****************************************************************************/
#define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb))
#define MAKE_WORD32(lsw, msw) ((((WILC_Uint32)(msw) << 16) & 0xFFFF0000) | (lsw))
#define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw))


/*****************************************************************************/
@@ -423,7 +423,7 @@ typedef struct {
	u8 u8Found;
#endif
#ifdef WILC_P2P
	WILC_Uint32 u32Tsf; /* time-stamp [Low only 32 bit] */
	u32 u32Tsf; /* time-stamp [Low only 32 bit] */
#endif
	u8 *pu8IEs;
	u16 u16IEsLen;
@@ -476,23 +476,23 @@ extern WILC_Sint32 CoreConfiguratorInit(void);
extern WILC_Sint32 CoreConfiguratorDeInit(void);

extern WILC_Sint32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
				 WILC_Uint32 u32WIDsCount, WILC_Bool bRespRequired, WILC_Uint32 drvHandler);
				 u32 u32WIDsCount, WILC_Bool bRespRequired, u32 drvHandler);
extern WILC_Sint32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo);
extern WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo);

extern WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, WILC_Uint32 u32BufferLen,
extern WILC_Sint32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen,
				      tstrConnectRespInfo **ppstrConnectRespInfo);
extern WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo);

#ifndef CONNECT_DIRECT
extern WILC_Sint32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE],
				      wid_site_survey_reslts_s **ppstrSurveyResults, WILC_Uint32 *pu32SurveyResultsCount);
				      wid_site_survey_reslts_s **ppstrSurveyResults, u32 *pu32SurveyResultsCount);
extern WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults);
#endif

extern WILC_Sint32 SendRawPacket(WILC_Sint8 *pspacket, WILC_Sint32 s32PacketLen);
extern void NetworkInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length);
void GnrlAsyncInfoReceived(u8 *pu8Buffer, WILC_Uint32 u32Length);
void host_int_ScanCompleteReceived(u8 *pu8Buffer, WILC_Uint32 u32Length);
extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length);
void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length);
void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length);

#endif
+10 −10
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@



WILC_Uint32 FIFO_InitBuffer(tHANDLE *hBuffer, WILC_Uint32 u32BufferLength)
u32 FIFO_InitBuffer(tHANDLE *hBuffer, u32 u32BufferLength)
{
	WILC_Uint32 u32Error = 0;
	u32 u32Error = 0;
	tstrFifoHandler *pstrFifoHandler = WILC_MALLOC (sizeof (tstrFifoHandler));
	if (pstrFifoHandler) {
		WILC_memset (pstrFifoHandler, 0, sizeof (tstrFifoHandler));
@@ -27,9 +27,9 @@ WILC_Uint32 FIFO_InitBuffer(tHANDLE *hBuffer, WILC_Uint32 u32BufferLength)
	}
	return u32Error;
}
WILC_Uint32 FIFO_DeInit(tHANDLE hFifo)
u32 FIFO_DeInit(tHANDLE hFifo)
{
	WILC_Uint32 u32Error = 0;
	u32 u32Error = 0;
	tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo;
	if (pstrFifoHandler) {
		if (pstrFifoHandler->pu8Buffer)	{
@@ -45,9 +45,9 @@ WILC_Uint32 FIFO_DeInit(tHANDLE hFifo)
	return u32Error;
}

WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToRead, WILC_Uint32 *pu32BytesRead)
u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32BytesRead)
{
	WILC_Uint32 u32Error = 0;
	u32 u32Error = 0;
	tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo;
	if (pstrFifoHandler && pu32BytesRead) {
		if (pstrFifoHandler->u32TotalBytes) {
@@ -66,7 +66,7 @@ WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToR
				pstrFifoHandler->u32TotalBytes -= u32BytesToRead;

			} else {
				WILC_Uint32 u32FirstPart =
				u32 u32FirstPart =
					pstrFifoHandler->u32BufferLength - pstrFifoHandler->u32ReadOffset;
				WILC_memcpy(pu8Buffer, pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32ReadOffset,
					    u32FirstPart);
@@ -86,9 +86,9 @@ WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToR
	return u32Error;
}

WILC_Uint32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesToWrite, WILC_Bool bForceOverWrite)
u32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToWrite, WILC_Bool bForceOverWrite)
{
	WILC_Uint32 u32Error = 0;
	u32 u32Error = 0;
	tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo;
	if (pstrFifoHandler) {
		if (u32BytesToWrite < pstrFifoHandler->u32BufferLength)	{
@@ -103,7 +103,7 @@ WILC_Uint32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, WILC_Uint32 u32BytesTo
					pstrFifoHandler->u32TotalBytes  += u32BytesToWrite;

				} else {
					WILC_Uint32 u32FirstPart =
					u32 u32FirstPart =
						pstrFifoHandler->u32BufferLength - pstrFifoHandler->u32WriteOffset;
					WILC_memcpy(pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32WriteOffset, pu8Buffer,
						    u32FirstPart);
+11 −11
Original line number Diff line number Diff line
@@ -6,18 +6,18 @@

typedef struct {
	u8		*pu8Buffer;
	WILC_Uint32 u32BufferLength;
	WILC_Uint32 u32WriteOffset;
	WILC_Uint32 u32ReadOffset;
	WILC_Uint32 u32TotalBytes;
	u32 u32BufferLength;
	u32 u32WriteOffset;
	u32 u32ReadOffset;
	u32 u32TotalBytes;
	struct semaphore SemBuffer;
} tstrFifoHandler;


extern WILC_Uint32 FIFO_InitBuffer(tHANDLE *hBuffer,
								   WILC_Uint32 u32BufferLength);
extern WILC_Uint32 FIFO_DeInit(tHANDLE hFifo);
extern WILC_Uint32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer,
				WILC_Uint32 u32BytesToRead, WILC_Uint32 *pu32BytesRead);
extern WILC_Uint32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer,
				WILC_Uint32 u32BytesToWrite, WILC_Bool bForceOverWrite);
extern u32 FIFO_InitBuffer(tHANDLE *hBuffer,
								   u32 u32BufferLength);
extern u32 FIFO_DeInit(tHANDLE hFifo);
extern u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer,
				u32 u32BytesToRead, u32 *pu32BytesRead);
extern u32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer,
				u32 u32BytesToWrite, WILC_Bool bForceOverWrite);
+133 −133

File changed.

Preview size limit exceeded, changes collapsed.

Loading