[PATCH 1/6] staging: wilc1000: modify build error

2015-06-30 Thread Dean Lee
this function needs more arguments.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 92064db..a8974c2 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -675,7 +675,7 @@ static void CfgConnectResult(tenuConnDisconnEvent 
enuConnDisconnEvent,
pstrDisconnectNotifInfo-u16reason = 1;
}
cfg80211_disconnected(dev, pstrDisconnectNotifInfo-u16reason, 
pstrDisconnectNotifInfo-ie,
- pstrDisconnectNotifInfo-ie_len, 
GFP_KERNEL);
+ pstrDisconnectNotifInfo-ie_len, true, 
GFP_KERNEL);
 
}
 
-- 
2.4.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/6] staging: wilc1000: modify build error

2015-06-30 Thread Dean . lee



On 2015년 06월 30일 17:50, Dan Carpenter wrote:

On Tue, Jun 30, 2015 at 05:34:33PM +0900, Dean Lee wrote:

this function needs more arguments.


Sudip sent a patch for this but he passed false instead of true.

We are disconnecting because we got CONN_DISCONN_EVENT_DISCONN_NOTIF as
a response which seems like not locally generated.  I think false is
correct here.

regards,
dan carpenter


i simply sync linux-next repository.
i'll check it.
but patch is make line about sent from sudip.
if another patch is correct.
i'll fix next time this issue.

because another patch has many value.

thanks for your comment.

B.R
dean
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/6] staging: wilc1000: delete 'WILC_WFIDrvHandle' structure

2015-06-30 Thread Dean Lee
delete odd structure and rework it.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/host_interface.c | 149 +++---
 drivers/staging/wilc1000/host_interface.h | 123 +-
 drivers/staging/wilc1000/linux_wlan.c |  14 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  18 +--
 drivers/staging/wilc1000/wilc_wfi_netdevice.h |   3 +-
 5 files changed, 150 insertions(+), 157 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 6b10bbb..55572bd 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -725,7 +725,7 @@ static s32 Handle_SetOperationMode(void *drvHandler, 
tstrHostIfSetOperationMode
 /**
  *  @brief host_int_set_IPAddress
  *  @details   Setting IP address params in message queue
- *  @param[in]WILC_WFIDrvHandle hWFIDrv, u8* pu8IPAddr
+ *  @param[in]void* hWFIDrv, u8* pu8IPAddr
  *  @return Error code.
  *  @author
  *  @date
@@ -756,7 +756,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, 
u8 idx)
 
 
 
-   host_int_get_ipaddress((WILC_WFIDrvHandle)drvHandler, 
firmwareIPAddress, idx);
+   host_int_get_ipaddress(drvHandler, firmwareIPAddress, idx);
 
if (s32Error) {
PRINT_D(HOSTINF_DBG, Failed to set IP address\n);
@@ -777,7 +777,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, 
u8 idx)
 /**
  *  @brief Handle_get_IPAddress
  *  @details   Setting IP address params in message queue
- *  @param[in]WILC_WFIDrvHandle hWFIDrv, u8* pu8IPAddr
+ *  @param[in]void* hWFIDrv, u8* pu8IPAddr
  *  @return Error code.
  *  @author
  *  @date
@@ -806,7 +806,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, 
u8 idx)
WILC_FREE(strWID.ps8WidVal);
 
if (WILC_memcmp(gs8GetIP[idx], gs8SetIP[idx], IP_ALEN) != 0)
-   host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, 
gs8SetIP[idx], idx);
+   host_int_setup_ipaddress(pstrWFIDrv, gs8SetIP[idx], idx);
 
if (s32Error != WILC_SUCCESS) {
PRINT_ER(Failed to get IP address\n);
@@ -1505,7 +1505,7 @@ static s32 Handle_Connect(void *drvHandler, 
tstrHostIFconnectAttr *pstrHostIFcon
 
 
PRINT_D(HOSTINF_DBG, Getting site survey results\n);
-   s32Err = host_int_get_site_survey_results((WILC_WFIDrvHandle)pstrWFIDrv,
+   s32Err = host_int_get_site_survey_results(drvHandler,
  gapu8RcvdSurveyResults,
  MAX_SURVEY_RESULT_FRAG_SIZE);
if (s32Err) {
@@ -2422,7 +2422,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, 
tstrRcvdGnrlAsyncInfo *pst
if (u8MacStatus == MAC_CONNECTED) {
WILC_memset(gapu8RcvdAssocResp, 0, 
MAX_ASSOC_RESP_FRAME_SIZE);
 
-   
host_int_get_assoc_res_info((WILC_WFIDrvHandle)pstrWFIDrv,
+   host_int_get_assoc_res_info(drvHandler,
gapu8RcvdAssocResp,

MAX_ASSOC_RESP_FRAME_SIZE,

u32RcvdAssocRespInfoLen);
@@ -2512,7 +2512,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, 
tstrRcvdGnrlAsyncInfo *pst
(strConnectInfo.u16ConnectStatus == 
SUCCESSFUL_STATUSCODE)) {
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
 
-   
host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 0, 0);
+   host_int_set_power_mgmt(drvHandler, 0, 0);
#endif
 
PRINT_D(HOSTINF_DBG, MAC status : CONNECTED 
and Connect Status : Successful\n);
@@ -2588,7 +2588,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, 
tstrRcvdGnrlAsyncInfo *pst
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
 
g_obtainingIP = false;
-   
host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 0, 0);
+   host_int_set_power_mgmt(drvHandler, 0, 0);
#endif
 

pstrWFIDrv-strWILC_UsrConnReq.pfUserConnectResult(CONN_DISCONN_EVENT_DISCONN_NOTIF,
@@ -3069,7 +3069,7 @@ static void Handle_Disconnect(void *drvHandler)
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
 
g_obtainingIP = false;
-   host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 0, 0);
+   host_int_set_power_mgmt(drvHandler, 0, 0);
#endif
 
WILC_memset(u8ConnectedSSID, 0, ETH_ALEN);
@@ -3170,7 +3170,7 @@ void resolve_disconnect_aberration(void *drvHandler)
return

[PATCH 3/6] staging: wilc1000: rework driver handler

2015-06-30 Thread Dean Lee
argument type change for support 64 bit system.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/coreconfigurator.c   |   2 +-
 drivers/staging/wilc1000/coreconfigurator.h   |   2 +-
 drivers/staging/wilc1000/host_interface.c | 218 +++---
 drivers/staging/wilc1000/linux_wlan.c |  96 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |   4 +-
 drivers/staging/wilc1000/wilc_wfi_netdevice.h |   2 +-
 drivers/staging/wilc1000/wilc_wlan.c  |   8 +-
 drivers/staging/wilc1000/wilc_wlan_if.h   |   4 +-
 8 files changed, 170 insertions(+), 166 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index ed6ac45..35c3c56 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -2098,7 +2098,7 @@ extern wilc_wlan_oup_t *gpstrWlanOps;
  *  @version   1.0
  */
 s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
- u32 u32WIDsCount, bool bRespRequired, u32 drvHandler)
+ u32 u32WIDsCount, bool bRespRequired, void 
*drvHandler)
 {
s32 counter = 0, ret = 0;
if (gpstrWlanOps == NULL) {
diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000/coreconfigurator.h
index 9059c8d..c39802f 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -175,7 +175,7 @@ extern s32 CoreConfiguratorInit(void);
 extern s32 CoreConfiguratorDeInit(void);
 
 extern s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
-u32 u32WIDsCount, bool bRespRequired, u32 
drvHandler);
+u32 u32WIDsCount, bool bRespRequired, void 
*drvHandler);
 extern s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo 
**ppstrNetworkInfo);
 extern s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo);
 
diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 55572bd..1d59f41 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -581,7 +581,7 @@ u8 gu8Flushed11iMode;
 u8 gu8FlushedAuthType;
 u32 gu32FlushedJoinReqSize;
 u32 gu32FlushedInfoElemAsocSize;
-u32 gu8FlushedJoinReqDrvHandler;
+void *gpFlushedJoinReqDrvHandler;
 #define REAL_JOIN_REQ 0
 #define FLUSHED_JOIN_REQ 1
 #define FLUSHED_BYTE_POS 79 /* Position the byte indicating flushing in 
the flushed request */
@@ -619,7 +619,7 @@ static s32 Handle_SetChannel(void *drvHandler, 
tstrHostIFSetChan *pstrHostIFSetC
 
PRINT_D(HOSTINF_DBG, Setting channel\n);
/*Sending Cfg*/
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, drvHandler);
if (s32Error) {
PRINT_ER(Failed to set channel\n);
WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -702,10 +702,10 @@ static s32 Handle_SetOperationMode(void *drvHandler, 
tstrHostIfSetOperationMode
/*Sending Cfg*/
PRINT_INFO(HOSTINF_DBG, pstrWFIDrv= %p \n, pstrWFIDrv);
 
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, drvHandler);
 
 
-   if ((pstrHostIfSetOperationMode-u32Mode) == (u32)NULL) {
+   if (pstrHostIfSetOperationMode == NULL) {
up(hSemDeinitDrvHandle);
}
 
@@ -752,7 +752,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, 
u8 idx)
strWID.ps8WidVal = (u8 *)pu8IPAddr;
strWID.s32ValueSize = IP_ALEN;
 
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, drvHandler);
 
 
 
@@ -796,7 +796,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, 
u8 idx)
strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN);
strWID.s32ValueSize = IP_ALEN;
 
-   s32Error = SendConfigPkt(GET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(GET_CFG, strWID, 1, true, drvHandler);
 
PRINT_INFO(HOSTINF_DBG, %d.%d.%d.%d\n, (u8)(strWID.ps8WidVal[0]), 
(u8)(strWID.ps8WidVal[1]), (u8)(strWID.ps8WidVal[2]), 
(u8)(strWID.ps8WidVal[3]));
 
@@ -856,7 +856,7 @@ static s32 Handle_SetMacAddress(void *drvHandler, 
tstrHostIfSetMacAddress *pstrH
strWID.s32ValueSize = ETH_ALEN;
PRINT_D(GENERIC_DBG, mac addr = :%x:%x:%x:%x:%x:%x\n, 
strWID.ps8WidVal[0], strWID.ps8WidVal[1], strWID.ps8WidVal[2], 
strWID.ps8WidVal[3], strWID.ps8WidVal[4], strWID.ps8WidVal[5]);
/*Sending Cfg*/
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, drvHandler);
if (s32Error) {
PRINT_ER(Failed to set mac address\n);
WILC_ERRORREPORT(s32Error

[PATCH 5/6] staging: wilc1000: fix initialize warning issue.

2015-06-30 Thread Dean Lee
modify it

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/host_interface.c | 3 ++-
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 1e40dca..a2e9b6d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -7162,7 +7162,7 @@ s32 host_int_add_beacon(void *hWFIDrv, u32 u32Interval,
s32 s32Error = WILC_SUCCESS;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
-   tstrHostIFSetBeacon *pstrSetBeaconParam = 
strHostIFmsg.uniHostIFmsgBody.strHostIFSetBeacon;
+   tstrHostIFSetBeacon *pstrSetBeaconParam = NULL;
 
if (hWFIDrv == NULL) {
WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT);
@@ -7172,6 +7172,7 @@ s32 host_int_add_beacon(void *hWFIDrv, u32 u32Interval,
 
PRINT_D(HOSTINF_DBG, Setting adding beacon message queue params\n);
 
+   pstrSetBeaconParam = strHostIFmsg.uniHostIFmsgBody.strHostIFSetBeacon;
 
/* prepare the WiphyParams Message */
strHostIFmsg.u16MsgId = HOST_IF_MSG_ADD_BEACON;
diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 659b70a..1b8991a 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -2463,7 +2463,7 @@ void frmw_to_linux(uint8_t *buff, uint32_t size, uint32_t 
pkt_offset)
return;
}
 
-   skb_reserve(skb, (unsigned int)skb-data  0x3);
+   skb_reserve(skb, (uintptr_t)skb-data  0x3);
 
if (g_linux_wlan == NULL || wilc_netdev == NULL) {
PRINT_ER(wilc_netdev in g_linux_wlan is NULL);
-- 
2.4.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/6] staging: wilc1000: rework address value.

2015-06-30 Thread Dean Lee
change type to pointer.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/host_interface.c | 22 +-
 drivers/staging/wilc1000/host_interface.h |  4 ++--
 2 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 1d59f41..1e40dca 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -640,26 +640,24 @@ static s32 Handle_SetChannel(void *drvHandler, 
tstrHostIFSetChan *pstrHostIFSetC
  *  @date
  *  @version   1.0
  */
-static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler 
*pstrHostIfSetDrvHandler)
+static s32 Handle_SetWfiDrvHandler(void *drvHandler, tstrHostIfSetDrvHandler 
*pstrHostIfSetDrvHandler)
 {
 
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv 
*)((pstrHostIfSetDrvHandler-u32Address));
-
 
/*prepare configuration packet*/
strWID.u16WIDid = (u16)WID_SET_DRV_HANDLER;
-   strWID.enuWIDtype = WID_INT;
-   strWID.ps8WidVal = (s8 *)(pstrHostIfSetDrvHandler-u32Address);
-   strWID.s32ValueSize = sizeof(u32);
+   strWID.enuWIDtype = WID_STR;
+   strWID.ps8WidVal = (s8 *)(pstrHostIfSetDrvHandler);
+   strWID.s32ValueSize = sizeof(tstrHostIfSetDrvHandler);
 
/*Sending Cfg*/
 
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, drvHandler);
 
 
-   if ((pstrHostIfSetDrvHandler-u32Address) == (u32)NULL) {
+   if (pstrHostIfSetDrvHandler-pAddress == NULL) {
up(hSemDeinitDrvHandle);
}
 
@@ -4501,7 +4499,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_SET_WFIDRV_HANDLER:
-   
Handle_SetWfiDrvHandler(strHostIFmsg.uniHostIFmsgBody.strHostIfSetDrvHandler);
+   Handle_SetWfiDrvHandler(strHostIFmsg.drvHandler, 
strHostIFmsg.uniHostIFmsgBody.strHostIfSetDrvHandler);
break;
 
case HOST_IF_MSG_SET_OPERATION_MODE:
@@ -5848,7 +5846,7 @@ s32 host_int_wait_msg_queue_idle(void)
 
 }
 
-s32 host_int_set_wfi_drv_handler(u32 u32address)
+s32 host_int_set_wfi_drv_handler(void *pAddress)
 {
s32 s32Error = WILC_SUCCESS;
 
@@ -5859,7 +5857,7 @@ s32 host_int_set_wfi_drv_handler(u32 u32address)
 
WILC_memset(strHostIFmsg, 0, sizeof(tstrHostIFmsg));
strHostIFmsg.u16MsgId = HOST_IF_MSG_SET_WFIDRV_HANDLER;
-   strHostIFmsg.uniHostIFmsgBody.strHostIfSetDrvHandler.u32Address = 
u32address;
+   strHostIFmsg.uniHostIFmsgBody.strHostIfSetDrvHandler.pAddress = 
pAddress;
/* strHostIFmsg.drvHandler=hWFIDrv; */
 
s32Error = WILC_MsgQueueSend(gMsgQHostIF, strHostIFmsg, 
sizeof(tstrHostIFmsg), NULL);
@@ -6953,8 +6951,6 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 
u32Length)
uintptr_t drvData;
void *drvHandler = NULL;
tstrWILC_WFIDrv *pstrWFIDrv = NULL;
-   drvHandler = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3]  
8) | (pu8Buffer[u32Length - 2]  16) | (pu8Buffer[u32Length - 1]  24));
-   pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
drvData = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3]  8) 
| (pu8Buffer[u32Length - 2]  16) | (pu8Buffer[u32Length - 1]  24));
drvHandler = (void *)drvData;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index fc07fd2..37aaf95 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -268,7 +268,7 @@ typedef struct {
 } tstrWILC_UsrConnReq;
 
 typedef struct {
-   u32 u32Address;
+   void *pAddress;
 } tstrHostIfSetDrvHandler;
 
 typedef struct {
@@ -1255,7 +1255,7 @@ s32 host_int_frame_register(void *hWFIDrv, u16 
u16FrameType, bool bReg);
  *  @date
  *  @version   1.0
  */
-s32 host_int_set_wfi_drv_handler(u32 u32address);
+s32 host_int_set_wfi_drv_handler(void *pAddress);
 s32 host_int_set_operation_mode(void *hWFIDrv, u32 u32mode);
 
 static s32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent);
-- 
2.4.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 6/6] staging: wilc1000: delete unused value.

2015-06-30 Thread Dean Lee
Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/host_interface.c | 52 ---
 drivers/staging/wilc1000/linux_wlan.c |  2 +-
 2 files changed, 1 insertion(+), 53 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a2e9b6d..1a4e037 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -609,7 +609,6 @@ static s32 Handle_SetChannel(void *drvHandler, 
tstrHostIFSetChan *pstrHostIFSetC
 
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
/*prepare configuration packet*/
strWID.u16WIDid = (u16)WID_CURRENT_CHANNEL;
@@ -735,7 +734,6 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, 
u8 idx)
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
char firmwareIPAddress[4] = {0};
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
if (pu8IPAddr[0]  192)
pu8IPAddr[0] = 0;
@@ -839,7 +837,6 @@ static s32 Handle_SetMacAddress(void *drvHandler, 
tstrHostIfSetMacAddress *pstrH
 
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
u8 *mac_buf = (u8 *)WILC_MALLOC(ETH_ALEN);
if (mac_buf == NULL) {
PRINT_ER(No buffer to send mac address\n);
@@ -3178,7 +3175,6 @@ static s32 Switch_Log_Terminal(void *drvHandler)
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
static char dummy = 9;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
strWID.u16WIDid = (u16)WID_LOGTerminal_Switch;
strWID.enuWIDtype = WID_CHAR;
@@ -3220,7 +3216,6 @@ static s32 Handle_GetChnl(void *drvHandler)
 
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
-   /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
strWID.u16WIDid = (u16)WID_CURRENT_CHANNEL;
strWID.enuWIDtype = WID_CHAR;
@@ -3454,7 +3449,6 @@ static void Handle_AddBeacon(void *drvHandler, 
tstrHostIFSetBeacon *pstrSetBeaco
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
u8 *pu8CurrByte;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
PRINT_D(HOSTINF_DBG, Adding BEACON\n);
 
strWID.u16WIDid = (u16)WID_ADD_BEACON;
@@ -3526,7 +3520,6 @@ static void Handle_DelBeacon(void *drvHandler, 
tstrHostIFDelBeacon *pstrDelBeaco
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
u8 *pu8CurrByte;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
strWID.u16WIDid = (u16)WID_DEL_BEACON;
strWID.enuWIDtype = WID_CHAR;
strWID.s32ValueSize = sizeof(char);
@@ -3624,7 +3617,6 @@ static void Handle_AddStation(void *drvHandler, 
tstrWILC_AddStaParam *pstrStatio
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
u8 *pu8CurrByte;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
PRINT_D(HOSTINF_DBG, Handling add station\n);
strWID.u16WIDid = (u16)WID_ADD_STA;
strWID.enuWIDtype = WID_BIN;
@@ -3667,7 +3659,6 @@ static void Handle_DelAllSta(void *drvHandler, 
tstrHostIFDelAllSta *pstrDelAllSt
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
u8 *pu8CurrByte;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
u8 i;
u8 au8Zero_Buff[6] = {0};
strWID.u16WIDid = (u16)WID_DEL_ALL_STA;
@@ -3725,7 +3716,6 @@ static void Handle_DelStation(void *drvHandler, 
tstrHostIFDelSta *pstrDelStaPara
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
u8 *pu8CurrByte;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
strWID.u16WIDid = (u16)WID_REMOVE_STA;
strWID.enuWIDtype = WID_BIN;
@@ -3771,7 +3761,6 @@ static void Handle_EditStation(void *drvHandler, 
tstrWILC_AddStaParam *pstrStati
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
u8 *pu8CurrByte;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
strWID.u16WIDid = (u16)WID_EDIT_STA;
strWID.enuWIDtype = WID_BIN;
@@ -3899,7 +3888,6 @@ static int Handle_RegisterFrame(void *drvHandler, 
tstrHostIfRegisterFrame *pstrH
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
u8 *pu8CurrByte;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
PRINT_D(HOSTINF_DBG, Handling frame register Flag : %d FrameType: 
%d\n, pstrHostIfRegisterFrame-bReg, pstrHostIfRegisterFrame-u16FrameType);
 
@@ -4045,7 +4033,6 @@ static void Handle_PowerManagement(void *drvHandler, 
tstrHostIfPowerMgmtParam *s
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
s8 s8PowerMode;
-   tstrWILC_WFIDrv *pstrWFIDrv

[PATCH] staging: wilc1000: rework include wilc_oswrapper.h

2015-06-16 Thread Dean Lee
rework line '#include wilc_oswrapper.h'
it does not used anywhere after change own data type to common data type.

Signed-off-by: Dean Lee dean@atmel.com

---
Change Log:
 add rework file 'host_interface.c'
---
 drivers/staging/wilc1000/coreconfigurator.h | 1 -
 drivers/staging/wilc1000/fifo_buffer.c  | 1 -
 drivers/staging/wilc1000/fifo_buffer.h  | 5 -
 drivers/staging/wilc1000/host_interface.c   | 1 -
 drivers/staging/wilc1000/wilc_memory.c  | 2 +-
 drivers/staging/wilc1000/wilc_memory.h  | 4 +++-
 drivers/staging/wilc1000/wilc_msgqueue.c| 2 +-
 drivers/staging/wilc1000/wilc_msgqueue.h| 5 +
 drivers/staging/wilc1000/wilc_sleep.c   | 2 +-
 drivers/staging/wilc1000/wilc_sleep.h   | 3 +++
 drivers/staging/wilc1000/wilc_strutils.c| 2 +-
 drivers/staging/wilc1000/wilc_strutils.h| 4 
 drivers/staging/wilc1000/wilc_timer.c   | 2 +-
 drivers/staging/wilc1000/wilc_timer.h   | 3 +++
 14 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000/coreconfigurator.h
index 6c1dad1..3ca067e 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -12,7 +12,6 @@
 #ifndef CORECONFIGURATOR_H
 #define CORECONFIGURATOR_H
 
-#include wilc_oswrapper.h
 #include wilc_wlan_if.h
 /*/
 /* Constants */
diff --git a/drivers/staging/wilc1000/fifo_buffer.c 
b/drivers/staging/wilc1000/fifo_buffer.c
index c801406..b6c07cf 100644
--- a/drivers/staging/wilc1000/fifo_buffer.c
+++ b/drivers/staging/wilc1000/fifo_buffer.c
@@ -1,6 +1,5 @@
 
 
-#include wilc_oswrapper.h
 #include fifo_buffer.h
 
 
diff --git a/drivers/staging/wilc1000/fifo_buffer.h 
b/drivers/staging/wilc1000/fifo_buffer.h
index 57f7732..7b76998 100644
--- a/drivers/staging/wilc1000/fifo_buffer.h
+++ b/drivers/staging/wilc1000/fifo_buffer.h
@@ -1,5 +1,8 @@
 
-#include wilc_oswrapper.h
+#include linux/types.h
+#include linux/semaphore.h
+#include wilc_memory.h
+#include wilc_strutils.h
 
 
 #define tHANDLEvoid *
diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index e091bbc..3f139ae 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1,5 +1,4 @@
 #include host_interface.h
-#include wilc_oswrapper.h
 #include coreconfigurator.h
 
 extern s32 TransportInit(void);
diff --git a/drivers/staging/wilc1000/wilc_memory.c 
b/drivers/staging/wilc1000/wilc_memory.c
index 5670b5a..c70707f 100644
--- a/drivers/staging/wilc1000/wilc_memory.c
+++ b/drivers/staging/wilc1000/wilc_memory.c
@@ -1,5 +1,5 @@
 
-#include wilc_oswrapper.h
+#include wilc_memory.h
 
 /*!
  *  @authorsyounan
diff --git a/drivers/staging/wilc1000/wilc_memory.h 
b/drivers/staging/wilc1000/wilc_memory.h
index 1bc4b53..372d705 100644
--- a/drivers/staging/wilc1000/wilc_memory.h
+++ b/drivers/staging/wilc1000/wilc_memory.h
@@ -10,6 +10,9 @@
  *  @version   1.0
  */
 
+#include linux/types.h
+#include linux/slab.h
+
 /*!
  *  @struct tstrWILC_MemoryAttrs
  *  @brief Memory API options
@@ -234,4 +237,3 @@ void WILC_MemoryFree(const void *pvBlock, 
tstrWILC_MemoryAttrs *strAttrs,
 
 
 #endif
-
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c 
b/drivers/staging/wilc1000/wilc_msgqueue.c
index 04fe5a5..16bcef4 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -1,5 +1,5 @@
 
-#include wilc_oswrapper.h
+#include wilc_msgqueue.h
 #include linux/spinlock.h
 
 /*!
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h 
b/drivers/staging/wilc1000/wilc_msgqueue.h
index 2ca02db..35b1001 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -10,6 +10,11 @@
  *  @version   1.0
  */
 
+#include wilc_platform.h
+#include wilc_errorsupport.h
+#include wilc_memory.h
+#include wilc_strutils.h
+
 /*!
  *  @struct tstrWILC_MsgQueueAttrs
  *  @brief Message Queue API options
diff --git a/drivers/staging/wilc1000/wilc_sleep.c 
b/drivers/staging/wilc1000/wilc_sleep.c
index 569b833..adab3ca 100644
--- a/drivers/staging/wilc1000/wilc_sleep.c
+++ b/drivers/staging/wilc1000/wilc_sleep.c
@@ -1,5 +1,5 @@
 
-#include wilc_oswrapper.h
+#include wilc_sleep.h
 
 /*
  *  @authormdaftedar
diff --git a/drivers/staging/wilc1000/wilc_sleep.h 
b/drivers/staging/wilc1000/wilc_sleep.h
index 261f4ed..cf9047f 100644
--- a/drivers/staging/wilc1000/wilc_sleep.h
+++ b/drivers/staging/wilc1000/wilc_sleep.h
@@ -1,6 +1,9 @@
 #ifndef __WILC_SLEEP_H__
 #define __WILC_SLEEP_H__
 
+#include linux/types.h
+#include linux/delay.h
+
 /*!
  *  @brief forces the current thread to sleep until the given time has 
elapsed
  *  @param[in] u32TimeMilliSec Time to sleep in Milli seconds

Re: [PATCH 1/3] staging: wilc1000: rework include wilc_oswrapper.h

2015-06-16 Thread Dean . lee



On 2015년 06월 16일 15:03, Greg KH wrote:

On Tue, Jun 16, 2015 at 02:38:20PM +0900, Dean Lee wrote:

rework line '#include wilc_oswrapper.h'
it does not require after change own data type to common data type.

Signed-off-by: Dean Lee dean@atmel.com

These are nice, but why isn't anyone sending me patches to fix the build
warnings in the driver right now?  That's preventing it from being
enabled in linux-next right now, please someone fix that...


Sorry about that. i'll send to fix warring patch. (immediately)

thanks

B.R
dean

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: wilc1000: modify type casting warning

2015-06-16 Thread Dean . lee



On 2015년 06월 16일 15:46, Dean Lee wrote:

modify message warning: cast from pointer to integer of different size.
add type cast 'uintptr_t'.
---
  drivers/staging/wilc1000/host_interface.c | 129 +++---
  drivers/staging/wilc1000/linux_wlan.c |   8 +-
  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  22 ++--
  3 files changed, 80 insertions(+), 79 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 3f139ae..358283f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1,5 +1,6 @@
  #include host_interface.h
  #include coreconfigurator.h
+#include linux/types.h
  
  extern s32 TransportInit(void);

  extern s32 TransportDeInit(void);
@@ -620,7 +621,7 @@ static s32 Handle_SetChannel(void *drvHandler, 
tstrHostIFSetChan *pstrHostIFSetC
  
  	PRINT_D(HOSTINF_DBG, Setting channel\n);

/*Sending Cfg*/
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
if (s32Error) {
PRINT_ER(Failed to set channel\n);
WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -646,7 +647,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler 
*pstrHostIfSetDrvHand
  
  	s32 s32Error = WILC_SUCCESS;

tstrWID strWID;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv 
*)((pstrHostIfSetDrvHandler-u32Address));
+   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv 
*)(uintptr_t)(pstrHostIfSetDrvHandler-u32Address);
  
  
  	/*prepare configuration packet*/

@@ -657,10 +658,10 @@ static s32 
Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand
  
  	/*Sending Cfg*/
  
-	s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);

+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
  
  
-	if ((pstrHostIfSetDrvHandler-u32Address) == (u32)NULL) {

+   if (pstrHostIfSetDrvHandler == NULL) {
up(hSemDeinitDrvHandle);
}
  
@@ -703,10 +704,10 @@ static s32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperationMode

/*Sending Cfg*/
PRINT_INFO(HOSTINF_DBG, pstrWFIDrv= %p \n, pstrWFIDrv);
  
-	s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);

+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
  
  
-	if ((pstrHostIfSetOperationMode-u32Mode) == (u32)NULL) {

+   if (pstrHostIfSetOperationMode == NULL) {
up(hSemDeinitDrvHandle);
}
  
@@ -753,7 +754,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx)

strWID.ps8WidVal = (u8 *)pu8IPAddr;
strWID.s32ValueSize = IP_ALEN;
  
-	s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);

+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
  
  
  
@@ -797,7 +798,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx)

strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN);
strWID.s32ValueSize = IP_ALEN;
  
-	s32Error = SendConfigPkt(GET_CFG, strWID, 1, true, (u32)pstrWFIDrv);

+   s32Error = SendConfigPkt(GET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
  
  	PRINT_INFO(HOSTINF_DBG, %d.%d.%d.%d\n, (u8)(strWID.ps8WidVal[0]), (u8)(strWID.ps8WidVal[1]), (u8)(strWID.ps8WidVal[2]), (u8)(strWID.ps8WidVal[3]));
  
@@ -857,7 +858,7 @@ static s32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddress *pstrH

strWID.s32ValueSize = ETH_ALEN;
PRINT_D(GENERIC_DBG, mac addr = :%x:%x:%x:%x:%x:%x\n, 
strWID.ps8WidVal[0], strWID.ps8WidVal[1], strWID.ps8WidVal[2], strWID.ps8WidVal[3], 
strWID.ps8WidVal[4], strWID.ps8WidVal[5]);
/*Sending Cfg*/
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
if (s32Error) {
PRINT_ER(Failed to set mac address\n);
WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -895,7 +896,7 @@ static s32 Handle_GetMacAddress(void *drvHandler, 
tstrHostIfGetMacAddress *pstrH
strWID.s32ValueSize = ETH_ALEN;
  
  	/*Sending Cfg*/

-   s32Error = SendConfigPkt(GET_CFG, strWID, 1, false, (u32)drvHandler);
+   s32Error = SendConfigPkt(GET_CFG, strWID, 1, false, 
(u32)(uintptr_t)drvHandler);
if (s32Error) {
PRINT_ER(Failed to get mac address\n);
WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -1203,7 +1204,7 @@ static s32 Handle_CfgParam(void *drvHandler, 
tstrHostIFCfgParamAttr *strHostIFCf
}
u8WidCnt++;
}
-   s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, 
(u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, 
(u32)(uintptr_t)pstrWFIDrv

[PATCH 2/2] staging: wilc1000: modify uninitialized warning

2015-06-16 Thread Dean Lee
initialize it.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/host_interface.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 358283f..03e6bc5 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -7241,7 +7241,7 @@ s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, u32 
u32Interval,
s32 s32Error = WILC_SUCCESS;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
tstrHostIFmsg strHostIFmsg;
-   tstrHostIFSetBeacon *pstrSetBeaconParam = 
strHostIFmsg.uniHostIFmsgBody.strHostIFSetBeacon;
+   tstrHostIFSetBeacon *pstrSetBeaconParam = NULL;
 
if (pstrWFIDrv == NULL) {
WILC_ERRORREPORT(s32Error, WILC_INVALID_ARGUMENT);
@@ -7251,6 +7251,7 @@ s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, u32 
u32Interval,
 
PRINT_D(HOSTINF_DBG, Setting adding beacon message queue params\n);
 
+   pstrSetBeaconParam = strHostIFmsg.uniHostIFmsgBody.strHostIFSetBeacon;
 
/* prepare the WiphyParams Message */
strHostIFmsg.u16MsgId = HOST_IF_MSG_ADD_BEACON;
-- 
2.4.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: wilc1000: modify type casting warning

2015-06-16 Thread Dean Lee
modify message warning: cast from pointer to integer of different size.
add type cast 'uintptr_t'.
---
 drivers/staging/wilc1000/host_interface.c | 129 +++---
 drivers/staging/wilc1000/linux_wlan.c |   8 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  22 ++--
 3 files changed, 80 insertions(+), 79 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 3f139ae..358283f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1,5 +1,6 @@
 #include host_interface.h
 #include coreconfigurator.h
+#include linux/types.h
 
 extern s32 TransportInit(void);
 extern s32 TransportDeInit(void);
@@ -620,7 +621,7 @@ static s32 Handle_SetChannel(void *drvHandler, 
tstrHostIFSetChan *pstrHostIFSetC
 
PRINT_D(HOSTINF_DBG, Setting channel\n);
/*Sending Cfg*/
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
if (s32Error) {
PRINT_ER(Failed to set channel\n);
WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -646,7 +647,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler 
*pstrHostIfSetDrvHand
 
s32 s32Error = WILC_SUCCESS;
tstrWID strWID;
-   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv 
*)((pstrHostIfSetDrvHandler-u32Address));
+   tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv 
*)(uintptr_t)(pstrHostIfSetDrvHandler-u32Address);
 
 
/*prepare configuration packet*/
@@ -657,10 +658,10 @@ static s32 
Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand
 
/*Sending Cfg*/
 
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
 
 
-   if ((pstrHostIfSetDrvHandler-u32Address) == (u32)NULL) {
+   if (pstrHostIfSetDrvHandler == NULL) {
up(hSemDeinitDrvHandle);
}
 
@@ -703,10 +704,10 @@ static s32 Handle_SetOperationMode(void *drvHandler, 
tstrHostIfSetOperationMode
/*Sending Cfg*/
PRINT_INFO(HOSTINF_DBG, pstrWFIDrv= %p \n, pstrWFIDrv);
 
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
 
 
-   if ((pstrHostIfSetOperationMode-u32Mode) == (u32)NULL) {
+   if (pstrHostIfSetOperationMode == NULL) {
up(hSemDeinitDrvHandle);
}
 
@@ -753,7 +754,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, 
u8 idx)
strWID.ps8WidVal = (u8 *)pu8IPAddr;
strWID.s32ValueSize = IP_ALEN;
 
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
 
 
 
@@ -797,7 +798,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, 
u8 idx)
strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN);
strWID.s32ValueSize = IP_ALEN;
 
-   s32Error = SendConfigPkt(GET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(GET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
 
PRINT_INFO(HOSTINF_DBG, %d.%d.%d.%d\n, (u8)(strWID.ps8WidVal[0]), 
(u8)(strWID.ps8WidVal[1]), (u8)(strWID.ps8WidVal[2]), 
(u8)(strWID.ps8WidVal[3]));
 
@@ -857,7 +858,7 @@ static s32 Handle_SetMacAddress(void *drvHandler, 
tstrHostIfSetMacAddress *pstrH
strWID.s32ValueSize = ETH_ALEN;
PRINT_D(GENERIC_DBG, mac addr = :%x:%x:%x:%x:%x:%x\n, 
strWID.ps8WidVal[0], strWID.ps8WidVal[1], strWID.ps8WidVal[2], 
strWID.ps8WidVal[3], strWID.ps8WidVal[4], strWID.ps8WidVal[5]);
/*Sending Cfg*/
-   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, 
(u32)(uintptr_t)pstrWFIDrv);
if (s32Error) {
PRINT_ER(Failed to set mac address\n);
WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -895,7 +896,7 @@ static s32 Handle_GetMacAddress(void *drvHandler, 
tstrHostIfGetMacAddress *pstrH
strWID.s32ValueSize = ETH_ALEN;
 
/*Sending Cfg*/
-   s32Error = SendConfigPkt(GET_CFG, strWID, 1, false, (u32)drvHandler);
+   s32Error = SendConfigPkt(GET_CFG, strWID, 1, false, 
(u32)(uintptr_t)drvHandler);
if (s32Error) {
PRINT_ER(Failed to get mac address\n);
WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -1203,7 +1204,7 @@ static s32 Handle_CfgParam(void *drvHandler, 
tstrHostIFCfgParamAttr *strHostIFCf
}
u8WidCnt++;
}
-   s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, 
(u32)pstrWFIDrv);
+   s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, 
(u32)(uintptr_t)pstrWFIDrv);
 
if 

Re: [PATCH 1/3] staging: wilc1000: rework include wilc_oswrapper.h

2015-06-16 Thread Dean . lee



On 2015년 06월 16일 15:06, Dean.lee wrote:



On 2015년 06월 16일 15:03, Greg KH wrote:

On Tue, Jun 16, 2015 at 02:38:20PM +0900, Dean Lee wrote:

rework line '#include wilc_oswrapper.h'
it does not require after change own data type to common data type.

Signed-off-by: Dean Lee dean@atmel.com

These are nice, but why isn't anyone sending me patches to fix the build
warnings in the driver right now?  That's preventing it from being
enabled in linux-next right now, please someone fix that...


Sorry about that. i'll send to fix warring patch. (immediately)

thanks

B.R
dean


Sorry greg. please this patch discard.
it has mistake.

i'll send v2.

Thanks

B.R
dean
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/3] staging: wilc1000: rework include wilc_type.h

2015-06-15 Thread Dean Lee
rework line '#include wilc_type.h'
it does not require after rework include wilc_oswrapper.h

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/wilc_wlan.h|  2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h | 10 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.h 
b/drivers/staging/wilc1000/wilc_wlan.h
index 0ba7ec6..5c9c4bb 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -1,7 +1,7 @@
 #ifndef WILC_WLAN_H
 #define WILC_WLAN_H
 
-#include wilc_type.h
+#include linux/types.h
 
 
 #define ISWILC1000(id)   (((id  0xf000) == 0x10) ? 1 : 0)
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h 
b/drivers/staging/wilc1000/wilc_wlan_if.h
index ea0ec41..d7271b9 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -20,7 +20,15 @@
 /* #define USE_OLD_SPI_SW */
 
 
-#include wilc_type.h
+#include wilc_osconfig.h
+#include wilc_platform.h
+#include wilc_log.h
+#include wilc_errorsupport.h
+#include wilc_sleep.h
+#include wilc_timer.h
+#include wilc_memory.h
+#include wilc_strutils.h
+#include wilc_msgqueue.h
 #include linux_wlan_common.h
 
 
-- 
2.4.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] staging: wilc1000: delete unused files (wilc_oswrapper.h wilc_type.h)

2015-06-15 Thread Dean Lee
delete unsued files

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/wilc_oswrapper.h | 41 ---
 drivers/staging/wilc1000/wilc_type.h  | 34 -
 2 files changed, 75 deletions(-)
 delete mode 100644 drivers/staging/wilc1000/wilc_oswrapper.h
 delete mode 100644 drivers/staging/wilc1000/wilc_type.h

diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h 
b/drivers/staging/wilc1000/wilc_oswrapper.h
deleted file mode 100644
index e97aa96..000
--- a/drivers/staging/wilc1000/wilc_oswrapper.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef __WILC_OSWRAPPER_H__
-#define __WILC_OSWRAPPER_H__
-
-/*!
- *  @file  wilc_oswrapper.h
- *  @brief Top level OS Wrapper, include this file and it will include all
- *  other files as necessary
- *  @authorsyounan
- *  @date  10 Aug 2010
- *  @version   1.0
- */
-
-/* OS Wrapper interface version */
-#define WILC_OSW_INTERFACE_VER 2
-
-/* Os Configuration File */
-#include wilc_osconfig.h
-#include wilc_platform.h
-
-/* Logging Functions */
-#include wilc_log.h
-
-/* Error reporting and handling support */
-#include wilc_errorsupport.h
-
-/* Sleep support */
-#include wilc_sleep.h
-
-/* Timer support */
-#include wilc_timer.h
-
-/* Memory support */
-#include wilc_memory.h
-
-/* String Utilities */
-#include wilc_strutils.h
-
-/* Message Queue */
-#include wilc_msgqueue.h
-
-#endif
diff --git a/drivers/staging/wilc1000/wilc_type.h 
b/drivers/staging/wilc1000/wilc_type.h
deleted file mode 100644
index 5f36e7f..000
--- a/drivers/staging/wilc1000/wilc_type.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* // 
*/
-/*  */
-/* Copyright (c) Atmel Corporation.  All rights reserved. */
-/*  */
-/* Module Name:  wilc_type.h */
-/*  */
-/*  */
-/* 
 */
-#ifndef WILC_TYPE_H
-#define WILC_TYPE_H
-
-/
- *
- *  Type Defines
- *
- /
-#ifdef WIN32
-typedef char int8_t;
-typedef short int16_t;
-typedef long int32_t;
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned long uint32_t;
-#else
-#ifdef _linux_
-/*typedef unsigned char uint8_t;
- * typedef unsigned short   uint16_t;
- * typedef unsigned longuint32_t;*/
-#include stdint.h
-#else
-#include wilc_oswrapper.h
-#endif
-#endif
-#endif
-- 
2.4.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/3] staging: wilc1000: rework include wilc_oswrapper.h

2015-06-15 Thread Dean Lee
rework line '#include wilc_oswrapper.h'
it does not require after change own data type to common data type.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/coreconfigurator.h | 1 -
 drivers/staging/wilc1000/fifo_buffer.c  | 1 -
 drivers/staging/wilc1000/fifo_buffer.h  | 5 -
 drivers/staging/wilc1000/wilc_memory.c  | 2 +-
 drivers/staging/wilc1000/wilc_memory.h  | 4 +++-
 drivers/staging/wilc1000/wilc_msgqueue.c| 2 +-
 drivers/staging/wilc1000/wilc_msgqueue.h| 5 +
 drivers/staging/wilc1000/wilc_sleep.c   | 2 +-
 drivers/staging/wilc1000/wilc_sleep.h   | 3 +++
 drivers/staging/wilc1000/wilc_strutils.c| 2 +-
 drivers/staging/wilc1000/wilc_strutils.h| 4 
 drivers/staging/wilc1000/wilc_timer.c   | 2 +-
 drivers/staging/wilc1000/wilc_timer.h   | 3 +++
 13 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000/coreconfigurator.h
index 6c1dad1..3ca067e 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -12,7 +12,6 @@
 #ifndef CORECONFIGURATOR_H
 #define CORECONFIGURATOR_H
 
-#include wilc_oswrapper.h
 #include wilc_wlan_if.h
 /*/
 /* Constants */
diff --git a/drivers/staging/wilc1000/fifo_buffer.c 
b/drivers/staging/wilc1000/fifo_buffer.c
index c801406..b6c07cf 100644
--- a/drivers/staging/wilc1000/fifo_buffer.c
+++ b/drivers/staging/wilc1000/fifo_buffer.c
@@ -1,6 +1,5 @@
 
 
-#include wilc_oswrapper.h
 #include fifo_buffer.h
 
 
diff --git a/drivers/staging/wilc1000/fifo_buffer.h 
b/drivers/staging/wilc1000/fifo_buffer.h
index 57f7732..7b76998 100644
--- a/drivers/staging/wilc1000/fifo_buffer.h
+++ b/drivers/staging/wilc1000/fifo_buffer.h
@@ -1,5 +1,8 @@
 
-#include wilc_oswrapper.h
+#include linux/types.h
+#include linux/semaphore.h
+#include wilc_memory.h
+#include wilc_strutils.h
 
 
 #define tHANDLEvoid *
diff --git a/drivers/staging/wilc1000/wilc_memory.c 
b/drivers/staging/wilc1000/wilc_memory.c
index 5670b5a..c70707f 100644
--- a/drivers/staging/wilc1000/wilc_memory.c
+++ b/drivers/staging/wilc1000/wilc_memory.c
@@ -1,5 +1,5 @@
 
-#include wilc_oswrapper.h
+#include wilc_memory.h
 
 /*!
  *  @authorsyounan
diff --git a/drivers/staging/wilc1000/wilc_memory.h 
b/drivers/staging/wilc1000/wilc_memory.h
index 1bc4b53..372d705 100644
--- a/drivers/staging/wilc1000/wilc_memory.h
+++ b/drivers/staging/wilc1000/wilc_memory.h
@@ -10,6 +10,9 @@
  *  @version   1.0
  */
 
+#include linux/types.h
+#include linux/slab.h
+
 /*!
  *  @struct tstrWILC_MemoryAttrs
  *  @brief Memory API options
@@ -234,4 +237,3 @@ void WILC_MemoryFree(const void *pvBlock, 
tstrWILC_MemoryAttrs *strAttrs,
 
 
 #endif
-
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c 
b/drivers/staging/wilc1000/wilc_msgqueue.c
index 04fe5a5..16bcef4 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -1,5 +1,5 @@
 
-#include wilc_oswrapper.h
+#include wilc_msgqueue.h
 #include linux/spinlock.h
 
 /*!
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h 
b/drivers/staging/wilc1000/wilc_msgqueue.h
index 2ca02db..35b1001 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -10,6 +10,11 @@
  *  @version   1.0
  */
 
+#include wilc_platform.h
+#include wilc_errorsupport.h
+#include wilc_memory.h
+#include wilc_strutils.h
+
 /*!
  *  @struct tstrWILC_MsgQueueAttrs
  *  @brief Message Queue API options
diff --git a/drivers/staging/wilc1000/wilc_sleep.c 
b/drivers/staging/wilc1000/wilc_sleep.c
index 569b833..adab3ca 100644
--- a/drivers/staging/wilc1000/wilc_sleep.c
+++ b/drivers/staging/wilc1000/wilc_sleep.c
@@ -1,5 +1,5 @@
 
-#include wilc_oswrapper.h
+#include wilc_sleep.h
 
 /*
  *  @authormdaftedar
diff --git a/drivers/staging/wilc1000/wilc_sleep.h 
b/drivers/staging/wilc1000/wilc_sleep.h
index 261f4ed..cf9047f 100644
--- a/drivers/staging/wilc1000/wilc_sleep.h
+++ b/drivers/staging/wilc1000/wilc_sleep.h
@@ -1,6 +1,9 @@
 #ifndef __WILC_SLEEP_H__
 #define __WILC_SLEEP_H__
 
+#include linux/types.h
+#include linux/delay.h
+
 /*!
  *  @brief forces the current thread to sleep until the given time has 
elapsed
  *  @param[in] u32TimeMilliSec Time to sleep in Milli seconds
diff --git a/drivers/staging/wilc1000/wilc_strutils.c 
b/drivers/staging/wilc1000/wilc_strutils.c
index ac9bb06..e014595 100644
--- a/drivers/staging/wilc1000/wilc_strutils.c
+++ b/drivers/staging/wilc1000/wilc_strutils.c
@@ -1,7 +1,7 @@
 
 #define _CRT_SECURE_NO_DEPRECATE
 
-#include wilc_oswrapper.h
+#include wilc_strutils.h
 
 
 /*!
diff --git a/drivers/staging/wilc1000/wilc_strutils.h 
b/drivers/staging/wilc1000/wilc_strutils.h
index bb31bea..d144557 100644

Re: [PATCH] staging: wilc1000: remove warnings reported by checkpatch.pl.

2015-06-14 Thread Dean . lee



On 2015년 06월 12일 23:34, Greg KH wrote:

On Fri, Jun 12, 2015 at 06:51:56PM +0900, Dean Lee wrote:

Remove the following warnings in the wilc_log.h:
- unnecessary whitespace before a quoted newline
- line over 80 characters
- single statement macros should not use a do {} while (0) loop.

Those are different things, so this should be broken up into different
patches.  Please make this a series of patches, each one only doing one
type of thing.

thanks,

greg k-h

thanks for your comment.
i'll make seperate patch.

B.R
dean
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: wilc1000: change WILC_Char to s8

2015-06-14 Thread Dean . lee



On 2015년 06월 13일 00:28, Greg KH wrote:

On Fri, Jun 12, 2015 at 02:39:08PM +0900, Dean Lee wrote:

change own data type(WILC_Char) to common data type(s8)

Why not just 'char'?

And you are using these in strings, so why not u8?

thanks,

greg k-h

i research some documents for change to common data type.
that's saying 's8' is 'signed char'.

'WILC_Char' is redefine 'char'. so i changed 'WILC_Char' to 's8'

and i try find when using this type in our source code after received 
your comment.

i'll fix and resend v2 version.

thanks.
B.R

dean
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: wilc1000: update TODO list

2015-06-14 Thread Dean . lee



On 2015년 06월 12일 20:07, Sudip Mukherjee wrote:

On Fri, Jun 12, 2015 at 07:23:11PM +0900, Dean Lee wrote:

remove complete OS wrapper functions.

just a minor thing. It will be easy if you send your patches in series
instead of separate patches. your patch remove oswrapper  type file
is dependent on one of the previous patch that you have sent today. If
for some reason that previous patch is not applied then
remove oswrapper  type file will not apply and then this patch will
have no meaning.

regards
sudip


Thanks for your comment.
i'll fix them.

B.R

dean
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: wilc1000: remove oswrapper type file

2015-06-14 Thread Dean . lee



On 2015년 06월 13일 00:26, Greg KH wrote:

On Fri, Jun 12, 2015 at 07:21:11PM +0900, Dean Lee wrote:

remove OS Wrapper function(wilc_oswrapper.h) is in our plan.
i removed OS Wrapper function and it's done.
and i found wilc_type.h file is does not used it.
so i deleted them and modify #include line in another file.

You are also doing other things here that you don't describe:


  /* Errors will always get printed */
-#define WILC_ERROR(...) do {  WILC_PRINTF((ERR)(%s:%d) , __WILC_FUNCTION__, 
__WILC_LINE__); \
- WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_ERROR(...)
\
+do {   \
+   WILC_PRINTF((ERR)(%s:%d), __WILC_FUNCTION__, __WILC_LINE__);\
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)

You reformatted this.


  #if (WILC_LOG_VERBOSITY_LEVEL  3)
-#define WILC_FN_IN do { WILC_PRINTF((FIN) (%s:%d) \n, __WILC_FUNCTION__, 
__WILC_LINE__);  } while (0)
-#define WILC_FN_OUT(ret) do { WILC_PRINTF((FOUT) (%s:%d) %d.\n, 
__WILC_FUNCTION__, __WILC_LINE__, (ret));  } while (0)
+#define WILC_FN_IN \
+   WILC_PRINTF((FIN)(%s:%d)\n, __WILC_FUNCTION__, __WILC_LINE__)
+#define WILC_FN_OUT(ret)   \
+   WILC_PRINTF((FOUT)(%s:%d)%d\n, __WILC_FUNCTION__, __WILC_LINE__, ret)

And changed this for no obvious reason.

Please, only do one thing per patch.  Break this up into logical steps
and resend it as a series of patches, with the last one being the TODO
file item removal.

thanks,

greg k-h

so sorry...i missed it. :'-(

i'll make v2 patch about fix them.

B.R

dean
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: wilc1000: change WILC_Char to char

2015-06-14 Thread Dean Lee
change own data type(WILC_Char) to common data type(char)

Signed-off-by: Dean Lee dean@atmel.com
---
Change v2:
 replace data type s8 - char
---
 drivers/staging/wilc1000/coreconfigurator.c   | 24 +++
 drivers/staging/wilc1000/coreconfigurator.h   |  4 +-
 drivers/staging/wilc1000/host_interface.c | 88 +++
 drivers/staging/wilc1000/wilc_memory.c|  8 +--
 drivers/staging/wilc1000/wilc_memory.h|  8 +--
 drivers/staging/wilc1000/wilc_oswrapper.h |  3 -
 drivers/staging/wilc1000/wilc_strutils.c  |  6 +-
 drivers/staging/wilc1000/wilc_strutils.h  |  6 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  6 +-
 9 files changed, 75 insertions(+), 78 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index 792ba6d..bbb3231 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -141,7 +141,7 @@ typedef enum {
 
 
 typedef struct {
-   WILC_Char *pcRespBuffer;
+   char *pcRespBuffer;
s32 s32MaxRespBuffLen;
s32 s32BytesRead;
bool bRespRequired;
@@ -339,7 +339,7 @@ INLINE u8 get_hex_char(u8 inp)
 
 /* This function extracts the MAC address held in a string in standard format 
*/
 /* into another buffer as integers.   
*/
-INLINE u16 extract_mac_addr(WILC_Char *str, u8 *buff)
+INLINE u16 extract_mac_addr(char *str, u8 *buff)
 {
*buff = 0;
while (*str != '\0') {
@@ -1095,7 +1095,7 @@ s32 DeallocateSurveyResults(wid_site_survey_reslts_s 
*pstrSurveyResults)
 /*   */
 /*/
 
-void ProcessCharWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessCharWid(char *pcPacket, s32 *ps32PktLen,
tstrWID *pstrWID, s8 *ps8WidVal)
 {
u8 *pu8val = (u8 *)ps8WidVal;
@@ -1149,7 +1149,7 @@ void ProcessCharWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessShortWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessShortWid(char *pcPacket, s32 *ps32PktLen,
 tstrWID *pstrWID, s8 *ps8WidVal)
 {
u16 *pu16val = (u16 *)ps8WidVal;
@@ -1204,7 +1204,7 @@ void ProcessShortWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessIntWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessIntWid(char *pcPacket, s32 *ps32PktLen,
   tstrWID *pstrWID, s8 *ps8WidVal)
 {
u32 *pu32val = (u32 *)ps8WidVal;
@@ -1262,7 +1262,7 @@ void ProcessIntWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessIPwid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessIPwid(char *pcPacket, s32 *ps32PktLen,
  tstrWID *pstrWID, u8 *pu8ip)
 {
u32 u32val = 0;
@@ -1320,7 +1320,7 @@ void ProcessIPwid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessStrWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessStrWid(char *pcPacket, s32 *ps32PktLen,
   tstrWID *pstrWID, u8 *pu8val, s32 s32ValueSize)
 {
u16 u16MsgLen = 0;
@@ -1377,7 +1377,7 @@ void ProcessStrWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessAdrWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessAdrWid(char *pcPacket, s32 *ps32PktLen,
   tstrWID *pstrWID, u8 *pu8val)
 {
u16 u16MsgLen = 0;
@@ -1441,7 +1441,7 @@ void ProcessAdrWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessBinWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessBinWid(char *pcPacket, s32 *ps32PktLen,
   tstrWID *pstrWID, u8 *pu8val, s32 s32ValueSize)
 {
/* WILC_ERROR(processing Binary WIDs is not supported\n); */
@@ -1802,7 +1802,7 @@ s32 ParseWriteResponse(u8 *pu8RespBuffer)
  *  @version   1.0
  */
 
-s32 CreatePacketHeader(WILC_Char *pcpacket, s32 *ps32PacketLength)
+s32 CreatePacketHeader(char *pcpacket, s32 *ps32PacketLength)
 {
s32

[PATCH] staging: wilc1000: remove oswrapper type file

2015-06-12 Thread Dean Lee
remove OS Wrapper  Type files.
now does not used os wrapper file.
type file is included os wrapper file.
so delete files and rework include method.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/coreconfigurator.h |  1 -
 drivers/staging/wilc1000/fifo_buffer.c  |  1 -
 drivers/staging/wilc1000/fifo_buffer.h  |  5 +++-
 drivers/staging/wilc1000/host_interface.c   |  1 -
 drivers/staging/wilc1000/wilc_memory.c  |  2 +-
 drivers/staging/wilc1000/wilc_memory.h  |  4 ++-
 drivers/staging/wilc1000/wilc_msgqueue.c|  2 +-
 drivers/staging/wilc1000/wilc_msgqueue.h|  5 
 drivers/staging/wilc1000/wilc_oswrapper.h   | 41 -
 drivers/staging/wilc1000/wilc_sleep.c   |  2 +-
 drivers/staging/wilc1000/wilc_sleep.h   |  3 +++
 drivers/staging/wilc1000/wilc_strutils.c|  2 +-
 drivers/staging/wilc1000/wilc_strutils.h|  4 +++
 drivers/staging/wilc1000/wilc_timer.c   |  2 +-
 drivers/staging/wilc1000/wilc_timer.h   |  3 +++
 drivers/staging/wilc1000/wilc_type.h| 34 
 drivers/staging/wilc1000/wilc_wlan.h|  2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h | 10 ++-
 18 files changed, 37 insertions(+), 87 deletions(-)
 delete mode 100644 drivers/staging/wilc1000/wilc_oswrapper.h
 delete mode 100644 drivers/staging/wilc1000/wilc_type.h

diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000/coreconfigurator.h
index 697ceb1..f2f6e64 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -12,7 +12,6 @@
 #ifndef CORECONFIGURATOR_H
 #define CORECONFIGURATOR_H
 
-#include wilc_oswrapper.h
 #include wilc_wlan_if.h
 /*/
 /* Constants */
diff --git a/drivers/staging/wilc1000/fifo_buffer.c 
b/drivers/staging/wilc1000/fifo_buffer.c
index c801406..b6c07cf 100644
--- a/drivers/staging/wilc1000/fifo_buffer.c
+++ b/drivers/staging/wilc1000/fifo_buffer.c
@@ -1,6 +1,5 @@
 
 
-#include wilc_oswrapper.h
 #include fifo_buffer.h
 
 
diff --git a/drivers/staging/wilc1000/fifo_buffer.h 
b/drivers/staging/wilc1000/fifo_buffer.h
index 57f7732..7b76998 100644
--- a/drivers/staging/wilc1000/fifo_buffer.h
+++ b/drivers/staging/wilc1000/fifo_buffer.h
@@ -1,5 +1,8 @@
 
-#include wilc_oswrapper.h
+#include linux/types.h
+#include linux/semaphore.h
+#include wilc_memory.h
+#include wilc_strutils.h
 
 
 #define tHANDLEvoid *
diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a1e90a5..60245b1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1,5 +1,4 @@
 #include host_interface.h
-#include wilc_oswrapper.h
 #include itypes.h
 #include coreconfigurator.h
 
diff --git a/drivers/staging/wilc1000/wilc_memory.c 
b/drivers/staging/wilc1000/wilc_memory.c
index 080fa61..ca6850c7 100644
--- a/drivers/staging/wilc1000/wilc_memory.c
+++ b/drivers/staging/wilc1000/wilc_memory.c
@@ -1,5 +1,5 @@
 
-#include wilc_oswrapper.h
+#include wilc_memory.h
 
 /*!
  *  @authorsyounan
diff --git a/drivers/staging/wilc1000/wilc_memory.h 
b/drivers/staging/wilc1000/wilc_memory.h
index 93642d0..a7a80e5 100644
--- a/drivers/staging/wilc1000/wilc_memory.h
+++ b/drivers/staging/wilc1000/wilc_memory.h
@@ -10,6 +10,9 @@
  *  @version   1.0
  */
 
+#include linux/types.h
+#include linux/slab.h
+
 /*!
  *  @struct tstrWILC_MemoryAttrs
  *  @brief Memory API options
@@ -234,4 +237,3 @@ void WILC_MemoryFree(const void *pvBlock, 
tstrWILC_MemoryAttrs *strAttrs,
 
 
 #endif
-
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c 
b/drivers/staging/wilc1000/wilc_msgqueue.c
index 04fe5a5..16bcef4 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -1,5 +1,5 @@
 
-#include wilc_oswrapper.h
+#include wilc_msgqueue.h
 #include linux/spinlock.h
 
 /*!
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h 
b/drivers/staging/wilc1000/wilc_msgqueue.h
index 2ca02db..35b1001 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -10,6 +10,11 @@
  *  @version   1.0
  */
 
+#include wilc_platform.h
+#include wilc_errorsupport.h
+#include wilc_memory.h
+#include wilc_strutils.h
+
 /*!
  *  @struct tstrWILC_MsgQueueAttrs
  *  @brief Message Queue API options
diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h 
b/drivers/staging/wilc1000/wilc_oswrapper.h
deleted file mode 100644
index e97aa96..000
--- a/drivers/staging/wilc1000/wilc_oswrapper.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef __WILC_OSWRAPPER_H__
-#define __WILC_OSWRAPPER_H__
-
-/*!
- *  @file  wilc_oswrapper.h
- *  @brief Top level OS Wrapper, include this file and it will include all
- *  other

[PATCH v2] staging: wilc1000: remove oswrapper type file

2015-06-12 Thread Dean Lee
remove OS Wrapper function(wilc_oswrapper.h) is in our plan.
i try removed OS Wrapper function and it's done.
and i found wilc_type.h file is does not used it.
so i deleted them and modify #include line in another file.

Signed-off-by: Dean Lee dean@atmel.com
---
Change
 modify commit message.
---
 drivers/staging/wilc1000/coreconfigurator.h |  1 -
 drivers/staging/wilc1000/fifo_buffer.c  |  1 -
 drivers/staging/wilc1000/fifo_buffer.h  |  5 ++-
 drivers/staging/wilc1000/host_interface.c   |  1 -
 drivers/staging/wilc1000/wilc_log.h | 53 -
 drivers/staging/wilc1000/wilc_memory.c  |  2 +-
 drivers/staging/wilc1000/wilc_memory.h  |  4 ++-
 drivers/staging/wilc1000/wilc_msgqueue.c|  2 +-
 drivers/staging/wilc1000/wilc_msgqueue.h|  5 +++
 drivers/staging/wilc1000/wilc_oswrapper.h   | 41 --
 drivers/staging/wilc1000/wilc_sleep.c   |  2 +-
 drivers/staging/wilc1000/wilc_sleep.h   |  3 ++
 drivers/staging/wilc1000/wilc_strutils.c|  2 +-
 drivers/staging/wilc1000/wilc_strutils.h|  4 +++
 drivers/staging/wilc1000/wilc_timer.c   |  2 +-
 drivers/staging/wilc1000/wilc_timer.h   |  3 ++
 drivers/staging/wilc1000/wilc_type.h| 34 --
 drivers/staging/wilc1000/wilc_wlan.h|  2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h | 10 +-
 19 files changed, 67 insertions(+), 110 deletions(-)
 delete mode 100644 drivers/staging/wilc1000/wilc_oswrapper.h
 delete mode 100644 drivers/staging/wilc1000/wilc_type.h

diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000/coreconfigurator.h
index 697ceb1..f2f6e64 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -12,7 +12,6 @@
 #ifndef CORECONFIGURATOR_H
 #define CORECONFIGURATOR_H
 
-#include wilc_oswrapper.h
 #include wilc_wlan_if.h
 /*/
 /* Constants */
diff --git a/drivers/staging/wilc1000/fifo_buffer.c 
b/drivers/staging/wilc1000/fifo_buffer.c
index c801406..b6c07cf 100644
--- a/drivers/staging/wilc1000/fifo_buffer.c
+++ b/drivers/staging/wilc1000/fifo_buffer.c
@@ -1,6 +1,5 @@
 
 
-#include wilc_oswrapper.h
 #include fifo_buffer.h
 
 
diff --git a/drivers/staging/wilc1000/fifo_buffer.h 
b/drivers/staging/wilc1000/fifo_buffer.h
index 57f7732..7b76998 100644
--- a/drivers/staging/wilc1000/fifo_buffer.h
+++ b/drivers/staging/wilc1000/fifo_buffer.h
@@ -1,5 +1,8 @@
 
-#include wilc_oswrapper.h
+#include linux/types.h
+#include linux/semaphore.h
+#include wilc_memory.h
+#include wilc_strutils.h
 
 
 #define tHANDLEvoid *
diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a1e90a5..60245b1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1,5 +1,4 @@
 #include host_interface.h
-#include wilc_oswrapper.h
 #include itypes.h
 #include coreconfigurator.h
 
diff --git a/drivers/staging/wilc1000/wilc_log.h 
b/drivers/staging/wilc1000/wilc_log.h
index 2269ebd..93f467a 100644
--- a/drivers/staging/wilc1000/wilc_log.h
+++ b/drivers/staging/wilc1000/wilc_log.h
@@ -2,46 +2,53 @@
 #define __WILC_LOG_H__
 
 /* Errors will always get printed */
-#define WILC_ERROR(...) do {  WILC_PRINTF((ERR)(%s:%d) , __WILC_FUNCTION__, 
__WILC_LINE__); \
- WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_ERROR(...)
\
+do {   \
+   WILC_PRINTF((ERR)(%s:%d), __WILC_FUNCTION__, __WILC_LINE__);  \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
 
 /* Wraning only printed if verbosity is 1 or more */
 #if (WILC_LOG_VERBOSITY_LEVEL  0)
-#define WILC_WARN(...) do { WILC_PRINTF((WRN)); \
-   WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_WARN(...) \
+do {   \
+   WILC_PRINTF((WRN));   \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
 #else
-#define WILC_WARN(...) (0)
+#define WILC_WARN(...) (0)
 #endif
 
 /* Info only printed if verbosity is 2 or more */
 #if (WILC_LOG_VERBOSITY_LEVEL  1)
-#define WILC_INFO(...) do {  WILC_PRINTF((INF)); \
-WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_INFO(...) \
+do {   \
+   WILC_PRINTF((INF));   \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
 #else
-#define WILC_INFO(...) (0)
+#define WILC_INFO(...) (0)
 #endif
 
 /* Debug is only printed if verbosity is 3

[PATCH] staging: wilc1000: update TODO list

2015-06-12 Thread Dean Lee
remove complete OS wrapper functions.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/TODO | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wilc1000/TODO b/drivers/staging/wilc1000/TODO
index 95199d8..e876008 100644
--- a/drivers/staging/wilc1000/TODO
+++ b/drivers/staging/wilc1000/TODO
@@ -1,6 +1,5 @@
 TODO:
 - remove the defined feature as kernel versions
-- remove OS wrapper functions
 - remove custom debug and tracing functions
 - rework comments and function headers(also coding style)
 - replace all semaphores with mutexes or completions
-- 
2.4.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: wilc1000: remove warnings reported by checkpatch.pl.

2015-06-12 Thread Dean Lee
Remove the following warnings in the wilc_log.h:
- unnecessary whitespace before a quoted newline
- line over 80 characters
- single statement macros should not use a do {} while (0) loop.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/wilc_log.h | 53 +
 1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_log.h 
b/drivers/staging/wilc1000/wilc_log.h
index 2269ebd..93f467a 100644
--- a/drivers/staging/wilc1000/wilc_log.h
+++ b/drivers/staging/wilc1000/wilc_log.h
@@ -2,46 +2,53 @@
 #define __WILC_LOG_H__
 
 /* Errors will always get printed */
-#define WILC_ERROR(...) do {  WILC_PRINTF((ERR)(%s:%d) , __WILC_FUNCTION__, 
__WILC_LINE__); \
- WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_ERROR(...)
\
+do {   \
+   WILC_PRINTF((ERR)(%s:%d), __WILC_FUNCTION__, __WILC_LINE__);  \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
 
 /* Wraning only printed if verbosity is 1 or more */
 #if (WILC_LOG_VERBOSITY_LEVEL  0)
-#define WILC_WARN(...) do { WILC_PRINTF((WRN)); \
-   WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_WARN(...) \
+do {   \
+   WILC_PRINTF((WRN));   \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
 #else
-#define WILC_WARN(...) (0)
+#define WILC_WARN(...) (0)
 #endif
 
 /* Info only printed if verbosity is 2 or more */
 #if (WILC_LOG_VERBOSITY_LEVEL  1)
-#define WILC_INFO(...) do {  WILC_PRINTF((INF)); \
-WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_INFO(...) \
+do {   \
+   WILC_PRINTF((INF));   \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
 #else
-#define WILC_INFO(...) (0)
+#define WILC_INFO(...) (0)
 #endif
 
 /* Debug is only printed if verbosity is 3 or more */
 #if (WILC_LOG_VERBOSITY_LEVEL  2)
-#define WILC_DBG(...) do { WILC_PRINTF((DBG)(%s:%d) , __WILC_FUNCTION__, 
__WILC_LINE__); \
-  WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
-
+#define WILC_DBG(...)  \
+do {   \
+   WILC_PRINTF((DBG)(%s:%d), __WILC_FUNCTION__, __WILC_LINE__);  \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
 #else
-#define WILC_DBG(...) (0)
+#define WILC_DBG(...)  (0)
 #endif
 
 /* Function In/Out is only printed if verbosity is 4 or more */
 #if (WILC_LOG_VERBOSITY_LEVEL  3)
-#define WILC_FN_IN do { WILC_PRINTF((FIN) (%s:%d) \n, __WILC_FUNCTION__, 
__WILC_LINE__);  } while (0)
-#define WILC_FN_OUT(ret) do { WILC_PRINTF((FOUT) (%s:%d) %d.\n, 
__WILC_FUNCTION__, __WILC_LINE__, (ret));  } while (0)
+#define WILC_FN_IN \
+   WILC_PRINTF((FIN)(%s:%d)\n, __WILC_FUNCTION__, __WILC_LINE__)
+#define WILC_FN_OUT(ret)   \
+   WILC_PRINTF((FOUT)(%s:%d)%d\n, __WILC_FUNCTION__, __WILC_LINE__, ret)
 #else
-#define WILC_FN_IN (0)
-#define WILC_FN_OUT(ret) (0)
+#define WILC_FN_IN (0)
+#define WILC_FN_OUT(ret)   (0)
+#endif
 #endif
-
-
-#endif
\ No newline at end of file
-- 
2.4.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: wilc1000: remove oswrapper type file

2015-06-12 Thread Dean . lee



On 2015년 06월 12일 18:17, Konrad Zapalowicz wrote:

On 06/12, Dean Lee wrote:

remove OS Wrapper  Type files.
now does not used os wrapper file.
type file is included os wrapper file.
so delete files and rework include method.

I do not understand the commit message and it does not parse well.

  - konrad

Sorry. my english language skill is very poor...:'-(

remove OS Wrapper function(wilc_oswrapper.h) is in our plan.
i try removed OS Wrapper function and it's done.
and i found wilc_type.h file is does not used it.
so i deleted them and modify #include line in another file.

thanks for your comment.

B.R

dean


Signed-off-by: Dean Lee dean@atmel.com
---
  drivers/staging/wilc1000/coreconfigurator.h |  1 -
  drivers/staging/wilc1000/fifo_buffer.c  |  1 -
  drivers/staging/wilc1000/fifo_buffer.h  |  5 +++-
  drivers/staging/wilc1000/host_interface.c   |  1 -
  drivers/staging/wilc1000/wilc_memory.c  |  2 +-
  drivers/staging/wilc1000/wilc_memory.h  |  4 ++-
  drivers/staging/wilc1000/wilc_msgqueue.c|  2 +-
  drivers/staging/wilc1000/wilc_msgqueue.h|  5 
  drivers/staging/wilc1000/wilc_oswrapper.h   | 41 -
  drivers/staging/wilc1000/wilc_sleep.c   |  2 +-
  drivers/staging/wilc1000/wilc_sleep.h   |  3 +++
  drivers/staging/wilc1000/wilc_strutils.c|  2 +-
  drivers/staging/wilc1000/wilc_strutils.h|  4 +++
  drivers/staging/wilc1000/wilc_timer.c   |  2 +-
  drivers/staging/wilc1000/wilc_timer.h   |  3 +++
  drivers/staging/wilc1000/wilc_type.h| 34 
  drivers/staging/wilc1000/wilc_wlan.h|  2 +-
  drivers/staging/wilc1000/wilc_wlan_if.h | 10 ++-
  18 files changed, 37 insertions(+), 87 deletions(-)
  delete mode 100644 drivers/staging/wilc1000/wilc_oswrapper.h
  delete mode 100644 drivers/staging/wilc1000/wilc_type.h

diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000/coreconfigurator.h
index 697ceb1..f2f6e64 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -12,7 +12,6 @@
  #ifndef CORECONFIGURATOR_H
  #define CORECONFIGURATOR_H
  
-#include wilc_oswrapper.h

  #include wilc_wlan_if.h
  
/*/
  /* Constants 
*/
diff --git a/drivers/staging/wilc1000/fifo_buffer.c 
b/drivers/staging/wilc1000/fifo_buffer.c
index c801406..b6c07cf 100644
--- a/drivers/staging/wilc1000/fifo_buffer.c
+++ b/drivers/staging/wilc1000/fifo_buffer.c
@@ -1,6 +1,5 @@
  
  
-#include wilc_oswrapper.h

  #include fifo_buffer.h
  
  
diff --git a/drivers/staging/wilc1000/fifo_buffer.h b/drivers/staging/wilc1000/fifo_buffer.h

index 57f7732..7b76998 100644
--- a/drivers/staging/wilc1000/fifo_buffer.h
+++ b/drivers/staging/wilc1000/fifo_buffer.h
@@ -1,5 +1,8 @@
  
-#include wilc_oswrapper.h

+#include linux/types.h
+#include linux/semaphore.h
+#include wilc_memory.h
+#include wilc_strutils.h
  
  
  #define tHANDLE	void *

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a1e90a5..60245b1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1,5 +1,4 @@
  #include host_interface.h
-#include wilc_oswrapper.h
  #include itypes.h
  #include coreconfigurator.h
  
diff --git a/drivers/staging/wilc1000/wilc_memory.c b/drivers/staging/wilc1000/wilc_memory.c

index 080fa61..ca6850c7 100644
--- a/drivers/staging/wilc1000/wilc_memory.c
+++ b/drivers/staging/wilc1000/wilc_memory.c
@@ -1,5 +1,5 @@
  
-#include wilc_oswrapper.h

+#include wilc_memory.h
  
  /*!

   *  @author   syounan
diff --git a/drivers/staging/wilc1000/wilc_memory.h 
b/drivers/staging/wilc1000/wilc_memory.h
index 93642d0..a7a80e5 100644
--- a/drivers/staging/wilc1000/wilc_memory.h
+++ b/drivers/staging/wilc1000/wilc_memory.h
@@ -10,6 +10,9 @@
   *  @version  1.0
   */
  
+#include linux/types.h

+#include linux/slab.h
+
  /*!
   *  @struct tstrWILC_MemoryAttrs
   *  @briefMemory API options
@@ -234,4 +237,3 @@ void WILC_MemoryFree(const void *pvBlock, 
tstrWILC_MemoryAttrs *strAttrs,
  
  
  #endif

-
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c 
b/drivers/staging/wilc1000/wilc_msgqueue.c
index 04fe5a5..16bcef4 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -1,5 +1,5 @@
  
-#include wilc_oswrapper.h

+#include wilc_msgqueue.h
  #include linux/spinlock.h
  
  /*!

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h 
b/drivers/staging/wilc1000/wilc_msgqueue.h
index 2ca02db..35b1001 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -10,6 +10,11 @@
   *  @version  1.0
   */
  
+#include wilc_platform.h

+#include wilc_errorsupport.h
+#include wilc_memory.h
+#include wilc_strutils.h

[PATCH v3] staging: wilc1000: remove oswrapper type file

2015-06-12 Thread Dean Lee
remove OS Wrapper function(wilc_oswrapper.h) is in our plan.
i removed OS Wrapper function and it's done.
and i found wilc_type.h file is does not used it.
so i deleted them and modify #include line in another file.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/coreconfigurator.h |  1 -
 drivers/staging/wilc1000/fifo_buffer.c  |  1 -
 drivers/staging/wilc1000/fifo_buffer.h  |  5 ++-
 drivers/staging/wilc1000/host_interface.c   |  1 -
 drivers/staging/wilc1000/wilc_log.h | 53 -
 drivers/staging/wilc1000/wilc_memory.c  |  2 +-
 drivers/staging/wilc1000/wilc_memory.h  |  4 ++-
 drivers/staging/wilc1000/wilc_msgqueue.c|  2 +-
 drivers/staging/wilc1000/wilc_msgqueue.h|  5 +++
 drivers/staging/wilc1000/wilc_oswrapper.h   | 41 --
 drivers/staging/wilc1000/wilc_sleep.c   |  2 +-
 drivers/staging/wilc1000/wilc_sleep.h   |  3 ++
 drivers/staging/wilc1000/wilc_strutils.c|  2 +-
 drivers/staging/wilc1000/wilc_strutils.h|  4 +++
 drivers/staging/wilc1000/wilc_timer.c   |  2 +-
 drivers/staging/wilc1000/wilc_timer.h   |  3 ++
 drivers/staging/wilc1000/wilc_type.h| 34 --
 drivers/staging/wilc1000/wilc_wlan.h|  2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h | 10 +-
 19 files changed, 67 insertions(+), 110 deletions(-)
 delete mode 100644 drivers/staging/wilc1000/wilc_oswrapper.h
 delete mode 100644 drivers/staging/wilc1000/wilc_type.h

diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000/coreconfigurator.h
index 697ceb1..f2f6e64 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -12,7 +12,6 @@
 #ifndef CORECONFIGURATOR_H
 #define CORECONFIGURATOR_H
 
-#include wilc_oswrapper.h
 #include wilc_wlan_if.h
 /*/
 /* Constants */
diff --git a/drivers/staging/wilc1000/fifo_buffer.c 
b/drivers/staging/wilc1000/fifo_buffer.c
index c801406..b6c07cf 100644
--- a/drivers/staging/wilc1000/fifo_buffer.c
+++ b/drivers/staging/wilc1000/fifo_buffer.c
@@ -1,6 +1,5 @@
 
 
-#include wilc_oswrapper.h
 #include fifo_buffer.h
 
 
diff --git a/drivers/staging/wilc1000/fifo_buffer.h 
b/drivers/staging/wilc1000/fifo_buffer.h
index 57f7732..7b76998 100644
--- a/drivers/staging/wilc1000/fifo_buffer.h
+++ b/drivers/staging/wilc1000/fifo_buffer.h
@@ -1,5 +1,8 @@
 
-#include wilc_oswrapper.h
+#include linux/types.h
+#include linux/semaphore.h
+#include wilc_memory.h
+#include wilc_strutils.h
 
 
 #define tHANDLEvoid *
diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a1e90a5..60245b1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1,5 +1,4 @@
 #include host_interface.h
-#include wilc_oswrapper.h
 #include itypes.h
 #include coreconfigurator.h
 
diff --git a/drivers/staging/wilc1000/wilc_log.h 
b/drivers/staging/wilc1000/wilc_log.h
index 2269ebd..93f467a 100644
--- a/drivers/staging/wilc1000/wilc_log.h
+++ b/drivers/staging/wilc1000/wilc_log.h
@@ -2,46 +2,53 @@
 #define __WILC_LOG_H__
 
 /* Errors will always get printed */
-#define WILC_ERROR(...) do {  WILC_PRINTF((ERR)(%s:%d) , __WILC_FUNCTION__, 
__WILC_LINE__); \
- WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_ERROR(...)
\
+do {   \
+   WILC_PRINTF((ERR)(%s:%d), __WILC_FUNCTION__, __WILC_LINE__);  \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
 
 /* Wraning only printed if verbosity is 1 or more */
 #if (WILC_LOG_VERBOSITY_LEVEL  0)
-#define WILC_WARN(...) do { WILC_PRINTF((WRN)); \
-   WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_WARN(...) \
+do {   \
+   WILC_PRINTF((WRN));   \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
 #else
-#define WILC_WARN(...) (0)
+#define WILC_WARN(...) (0)
 #endif
 
 /* Info only printed if verbosity is 2 or more */
 #if (WILC_LOG_VERBOSITY_LEVEL  1)
-#define WILC_INFO(...) do {  WILC_PRINTF((INF)); \
-WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_INFO(...) \
+do {   \
+   WILC_PRINTF((INF));   \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
 #else
-#define WILC_INFO(...) (0)
+#define WILC_INFO(...) (0)
 #endif
 
 /* Debug is only printed if verbosity is 3 or more

Re: [PATCH v2] staging: wilc1000: remove oswrapper type file

2015-06-12 Thread Dean . lee



On 2015년 06월 12일 19:03, Dean Lee wrote:

remove OS Wrapper function(wilc_oswrapper.h) is in our plan.
i try removed OS Wrapper function and it's done.
and i found wilc_type.h file is does not used it.
so i deleted them and modify #include line in another file.

Signed-off-by: Dean Lee dean@atmel.com
---
Change
  modify commit message.
---
  drivers/staging/wilc1000/coreconfigurator.h |  1 -
  drivers/staging/wilc1000/fifo_buffer.c  |  1 -
  drivers/staging/wilc1000/fifo_buffer.h  |  5 ++-
  drivers/staging/wilc1000/host_interface.c   |  1 -
  drivers/staging/wilc1000/wilc_log.h | 53 -
  drivers/staging/wilc1000/wilc_memory.c  |  2 +-
  drivers/staging/wilc1000/wilc_memory.h  |  4 ++-
  drivers/staging/wilc1000/wilc_msgqueue.c|  2 +-
  drivers/staging/wilc1000/wilc_msgqueue.h|  5 +++
  drivers/staging/wilc1000/wilc_oswrapper.h   | 41 --
  drivers/staging/wilc1000/wilc_sleep.c   |  2 +-
  drivers/staging/wilc1000/wilc_sleep.h   |  3 ++
  drivers/staging/wilc1000/wilc_strutils.c|  2 +-
  drivers/staging/wilc1000/wilc_strutils.h|  4 +++
  drivers/staging/wilc1000/wilc_timer.c   |  2 +-
  drivers/staging/wilc1000/wilc_timer.h   |  3 ++
  drivers/staging/wilc1000/wilc_type.h| 34 --
  drivers/staging/wilc1000/wilc_wlan.h|  2 +-
  drivers/staging/wilc1000/wilc_wlan_if.h | 10 +-
  19 files changed, 67 insertions(+), 110 deletions(-)
  delete mode 100644 drivers/staging/wilc1000/wilc_oswrapper.h
  delete mode 100644 drivers/staging/wilc1000/wilc_type.h

diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000/coreconfigurator.h
index 697ceb1..f2f6e64 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -12,7 +12,6 @@
  #ifndef CORECONFIGURATOR_H
  #define CORECONFIGURATOR_H
  
-#include wilc_oswrapper.h

  #include wilc_wlan_if.h
  
/*/
  /* Constants 
*/
diff --git a/drivers/staging/wilc1000/fifo_buffer.c 
b/drivers/staging/wilc1000/fifo_buffer.c
index c801406..b6c07cf 100644
--- a/drivers/staging/wilc1000/fifo_buffer.c
+++ b/drivers/staging/wilc1000/fifo_buffer.c
@@ -1,6 +1,5 @@
  
  
-#include wilc_oswrapper.h

  #include fifo_buffer.h
  
  
diff --git a/drivers/staging/wilc1000/fifo_buffer.h b/drivers/staging/wilc1000/fifo_buffer.h

index 57f7732..7b76998 100644
--- a/drivers/staging/wilc1000/fifo_buffer.h
+++ b/drivers/staging/wilc1000/fifo_buffer.h
@@ -1,5 +1,8 @@
  
-#include wilc_oswrapper.h

+#include linux/types.h
+#include linux/semaphore.h
+#include wilc_memory.h
+#include wilc_strutils.h
  
  
  #define tHANDLE	void *

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a1e90a5..60245b1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1,5 +1,4 @@
  #include host_interface.h
-#include wilc_oswrapper.h
  #include itypes.h
  #include coreconfigurator.h
  
diff --git a/drivers/staging/wilc1000/wilc_log.h b/drivers/staging/wilc1000/wilc_log.h

index 2269ebd..93f467a 100644
--- a/drivers/staging/wilc1000/wilc_log.h
+++ b/drivers/staging/wilc1000/wilc_log.h
@@ -2,46 +2,53 @@
  #define __WILC_LOG_H__
  
  /* Errors will always get printed */

-#define WILC_ERROR(...) do {  WILC_PRINTF((ERR)(%s:%d) , __WILC_FUNCTION__, 
__WILC_LINE__); \
- WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_ERROR(...)
\
+do {   \
+   WILC_PRINTF((ERR)(%s:%d), __WILC_FUNCTION__, __WILC_LINE__);\
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
  
  /* Wraning only printed if verbosity is 1 or more */

  #if (WILC_LOG_VERBOSITY_LEVEL  0)
-#define WILC_WARN(...) do { WILC_PRINTF((WRN)); \
-   WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_WARN(...) \
+do {   \
+   WILC_PRINTF((WRN)); \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
  #else
-#define WILC_WARN(...) (0)
+#define WILC_WARN(...) (0)
  #endif
  
  /* Info only printed if verbosity is 2 or more */

  #if (WILC_LOG_VERBOSITY_LEVEL  1)
-#define WILC_INFO(...) do {  WILC_PRINTF((INF)); \
-WILC_PRINTF(__VA_ARGS__); \
-   } while (0)
+#define WILC_INFO(...) \
+do {   \
+   WILC_PRINTF((INF)); \
+   WILC_PRINTF(__VA_ARGS__);   \
+} while (0)
  #else
-#define

[PATCH] staging: wilc1000: change WILC_Char to s8

2015-06-11 Thread Dean Lee
change own data type(WILC_Char) to common data type(s8)

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/coreconfigurator.c   | 24 +++
 drivers/staging/wilc1000/coreconfigurator.h   |  4 +-
 drivers/staging/wilc1000/host_interface.c | 88 +++
 drivers/staging/wilc1000/wilc_memory.c|  8 +--
 drivers/staging/wilc1000/wilc_memory.h|  8 +--
 drivers/staging/wilc1000/wilc_oswrapper.h |  3 -
 drivers/staging/wilc1000/wilc_strutils.c  |  6 +-
 drivers/staging/wilc1000/wilc_strutils.h  |  6 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  6 +-
 9 files changed, 75 insertions(+), 78 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index 9abc73d..a048b44 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -142,7 +142,7 @@ typedef enum {
 
 
 typedef struct {
-   WILC_Char *pcRespBuffer;
+   s8 *pcRespBuffer;
s32 s32MaxRespBuffLen;
s32 s32BytesRead;
bool bRespRequired;
@@ -340,7 +340,7 @@ INLINE u8 get_hex_char(u8 inp)
 
 /* This function extracts the MAC address held in a string in standard format 
*/
 /* into another buffer as integers.   
*/
-INLINE u16 extract_mac_addr(WILC_Char *str, u8 *buff)
+INLINE u16 extract_mac_addr(s8 *str, u8 *buff)
 {
*buff = 0;
while (*str != '\0') {
@@ -1096,7 +1096,7 @@ s32 DeallocateSurveyResults(wid_site_survey_reslts_s 
*pstrSurveyResults)
 /*   */
 /*/
 
-void ProcessCharWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessCharWid(s8 *pcPacket, s32 *ps32PktLen,
tstrWID *pstrWID, s8 *ps8WidVal)
 {
u8 *pu8val = (u8 *)ps8WidVal;
@@ -1150,7 +1150,7 @@ void ProcessCharWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessShortWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessShortWid(s8 *pcPacket, s32 *ps32PktLen,
 tstrWID *pstrWID, s8 *ps8WidVal)
 {
u16 *pu16val = (u16 *)ps8WidVal;
@@ -1205,7 +1205,7 @@ void ProcessShortWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessIntWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessIntWid(s8 *pcPacket, s32 *ps32PktLen,
   tstrWID *pstrWID, s8 *ps8WidVal)
 {
u32 *pu32val = (u32 *)ps8WidVal;
@@ -1263,7 +1263,7 @@ void ProcessIntWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessIPwid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessIPwid(s8 *pcPacket, s32 *ps32PktLen,
  tstrWID *pstrWID, u8 *pu8ip)
 {
u32 u32val = 0;
@@ -1321,7 +1321,7 @@ void ProcessIPwid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessStrWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessStrWid(s8 *pcPacket, s32 *ps32PktLen,
   tstrWID *pstrWID, u8 *pu8val, s32 s32ValueSize)
 {
u16 u16MsgLen = 0;
@@ -1378,7 +1378,7 @@ void ProcessStrWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessAdrWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessAdrWid(s8 *pcPacket, s32 *ps32PktLen,
   tstrWID *pstrWID, u8 *pu8val)
 {
u16 u16MsgLen = 0;
@@ -1442,7 +1442,7 @@ void ProcessAdrWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 /*   */
 /*/
 
-void ProcessBinWid(WILC_Char *pcPacket, s32 *ps32PktLen,
+void ProcessBinWid(s8 *pcPacket, s32 *ps32PktLen,
   tstrWID *pstrWID, u8 *pu8val, s32 s32ValueSize)
 {
/* WILC_ERROR(processing Binary WIDs is not supported\n); */
@@ -1803,7 +1803,7 @@ s32 ParseWriteResponse(u8 *pu8RespBuffer)
  *  @version   1.0
  */
 
-s32 CreatePacketHeader(WILC_Char *pcpacket, s32 *ps32PacketLength)
+s32 CreatePacketHeader(s8 *pcpacket, s32 *ps32PacketLength)
 {
s32 s32Error = WILC_SUCCESS;
u16 u16MsgLen = (u16

[PATCH] staging: wilc1000: change WILC_BOOL to bool

2015-06-11 Thread Dean Lee
change own data type(WILC_BOOL) to common data type(bool)
but that's contain true/false value. so change with them.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/coreconfigurator.c   |  16 +--
 drivers/staging/wilc1000/coreconfigurator.h   |   4 +-
 drivers/staging/wilc1000/fifo_buffer.c|   2 +-
 drivers/staging/wilc1000/fifo_buffer.h|   2 +-
 drivers/staging/wilc1000/host_interface.c | 166 +++---
 drivers/staging/wilc1000/host_interface.h |  20 +--
 drivers/staging/wilc1000/linux_mon.c  |   2 +-
 drivers/staging/wilc1000/linux_wlan.c |  14 +-
 drivers/staging/wilc1000/wilc_msgqueue.c  |   2 +-
 drivers/staging/wilc1000/wilc_oswrapper.h |   6 +-
 drivers/staging/wilc1000/wilc_platform.h  |   2 +-
 drivers/staging/wilc1000/wilc_timer.h |   2 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 136 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.h |   2 +-
 drivers/staging/wilc1000/wilc_wfi_netdevice.c |   2 +-
 drivers/staging/wilc1000/wilc_wfi_netdevice.h |   8 +-
 drivers/staging/wilc1000/wilc_wlan.c  |  14 +-
 drivers/staging/wilc1000/wilc_wlan_cfg.c  |   4 +-
 18 files changed, 202 insertions(+), 202 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index c9cc817..d8dbb1c 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -145,7 +145,7 @@ typedef struct {
WILC_Char *pcRespBuffer;
s32 s32MaxRespBuffLen;
s32 s32BytesRead;
-   WILC_Bool bRespRequired;
+   bool bRespRequired;
 } tstrConfigPktInfo;
 
 
@@ -1520,7 +1520,7 @@ void ProcessBinWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 s32 further_process_response(u8 *resp,
 u16 u16WIDid,
 u16 cfg_len,
-WILC_Bool process_wid_num,
+bool process_wid_num,
 u32 cnt,
 tstrWID *pstrWIDresult)
 {
@@ -1693,7 +1693,7 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult)
u16 u16WIDid  = 0;
u16 cfg_len  = 0;
tenuWIDtype enuWIDtype = WID_UNDEF;
-   WILC_Bool num_wid_processed = WILC_FALSE;
+   bool num_wid_processed = false;
u32 cnt = 0;
u32 idx = 0;
u32 ResCnt = 0;
@@ -1717,7 +1717,7 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult)
idx++;
}
idx += 3;
-   if ((u16WIDid == g_wid_num)  (num_wid_processed == 
WILC_FALSE)) {
+   if ((u16WIDid == g_wid_num)  (num_wid_processed == false)) {
num_wid_processed = WILC_TRUE;
 
if (-2 == further_process_response(resp[idx], 
u16WIDid, cfg_len, WILC_TRUE, 0, pstrWIDcfgResult[ResCnt])) {
@@ -1727,7 +1727,7 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult)
} else {
for (cnt = 0; cnt  g_num_total_switches; cnt++) {
if (gastrWIDs[cnt].u16WIDid == u16WIDid) {
-   if (-2 == 
further_process_response(resp[idx], u16WIDid, cfg_len, WILC_FALSE, cnt,
+   if (-2 == 
further_process_response(resp[idx], u16WIDid, cfg_len, false, cnt,
   
pstrWIDcfgResult[ResCnt])) {
return -2;
}
@@ -1913,7 +1913,7 @@ s32 CreateConfigPacket(s8 *ps8packet, s32 
*ps32PacketLength,
 }
 
 s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 
*ps32BytesRead,
-  WILC_Bool bRespRequired)
+  bool bRespRequired)
 {
s32 s32Error = WILC_SUCCESS;
/*bug 3878*/
@@ -1950,7 +1950,7 @@ s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 
s32MaxRespBuffLen, s32 *ps32
  */
 #ifdef SIMULATION
 s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
- u32 u32WIDsCount, WILC_Bool bRespRequired, u32 
drvHandler)
+ u32 u32WIDsCount, bool bRespRequired, u32 drvHandler)
 {
s32 s32Error = WILC_SUCCESS;
s32 err = WILC_SUCCESS;
@@ -2129,7 +2129,7 @@ extern wilc_wlan_oup_t *gpstrWlanOps;
  *  @version   1.0
  */
 s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
- u32 u32WIDsCount, WILC_Bool bRespRequired, u32 
drvHandler)
+ u32 u32WIDsCount, bool bRespRequired, u32 drvHandler)
 {
s32 counter = 0, ret = 0;
if (gpstrWlanOps == NULL) {
diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000

Re: [PATCH] staging: wilc1000: change WILC_BOOL to bool

2015-06-11 Thread Dean . lee



On 2015년 06월 12일 13:56, Dean Lee wrote:

change own data type(WILC_BOOL) to common data type(bool)
but that's contain true/false value. so change with them.

Signed-off-by: Dean Lee dean@atmel.com
---
  drivers/staging/wilc1000/coreconfigurator.c   |  16 +--
  drivers/staging/wilc1000/coreconfigurator.h   |   4 +-
  drivers/staging/wilc1000/fifo_buffer.c|   2 +-
  drivers/staging/wilc1000/fifo_buffer.h|   2 +-
  drivers/staging/wilc1000/host_interface.c | 166 +++---
  drivers/staging/wilc1000/host_interface.h |  20 +--
  drivers/staging/wilc1000/linux_mon.c  |   2 +-
  drivers/staging/wilc1000/linux_wlan.c |  14 +-
  drivers/staging/wilc1000/wilc_msgqueue.c  |   2 +-
  drivers/staging/wilc1000/wilc_oswrapper.h |   6 +-
  drivers/staging/wilc1000/wilc_platform.h  |   2 +-
  drivers/staging/wilc1000/wilc_timer.h |   2 +-
  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 136 +-
  drivers/staging/wilc1000/wilc_wfi_cfgoperations.h |   2 +-
  drivers/staging/wilc1000/wilc_wfi_netdevice.c |   2 +-
  drivers/staging/wilc1000/wilc_wfi_netdevice.h |   8 +-
  drivers/staging/wilc1000/wilc_wlan.c  |  14 +-
  drivers/staging/wilc1000/wilc_wlan_cfg.c  |   4 +-
  18 files changed, 202 insertions(+), 202 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index c9cc817..d8dbb1c 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -145,7 +145,7 @@ typedef struct {
WILC_Char *pcRespBuffer;
s32 s32MaxRespBuffLen;
s32 s32BytesRead;
-   WILC_Bool bRespRequired;
+   bool bRespRequired;
  } tstrConfigPktInfo;
  
  
@@ -1520,7 +1520,7 @@ void ProcessBinWid(WILC_Char *pcPacket, s32 *ps32PktLen,

  s32 further_process_response(u8 *resp,
 u16 u16WIDid,
 u16 cfg_len,
-WILC_Bool process_wid_num,
+bool process_wid_num,
 u32 cnt,
 tstrWID *pstrWIDresult)
  {
@@ -1693,7 +1693,7 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult)
u16 u16WIDid  = 0;
u16 cfg_len  = 0;
tenuWIDtype enuWIDtype = WID_UNDEF;
-   WILC_Bool num_wid_processed = WILC_FALSE;
+   bool num_wid_processed = false;
u32 cnt = 0;
u32 idx = 0;
u32 ResCnt = 0;
@@ -1717,7 +1717,7 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult)
idx++;
}
idx += 3;
-   if ((u16WIDid == g_wid_num)  (num_wid_processed == 
WILC_FALSE)) {
+   if ((u16WIDid == g_wid_num)  (num_wid_processed == false)) {
num_wid_processed = WILC_TRUE;
  
  			if (-2 == further_process_response(resp[idx], u16WIDid, cfg_len, WILC_TRUE, 0, pstrWIDcfgResult[ResCnt])) {

@@ -1727,7 +1727,7 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult)
} else {
for (cnt = 0; cnt  g_num_total_switches; cnt++) {
if (gastrWIDs[cnt].u16WIDid == u16WIDid) {
-   if (-2 == 
further_process_response(resp[idx], u16WIDid, cfg_len, WILC_FALSE, cnt,
+   if (-2 == 
further_process_response(resp[idx], u16WIDid, cfg_len, false, cnt,
   
pstrWIDcfgResult[ResCnt])) {
return -2;
}
@@ -1913,7 +1913,7 @@ s32 CreateConfigPacket(s8 *ps8packet, s32 
*ps32PacketLength,
  }
  
  s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 *ps32BytesRead,

-  WILC_Bool bRespRequired)
+  bool bRespRequired)
  {
s32 s32Error = WILC_SUCCESS;
/*bug 3878*/
@@ -1950,7 +1950,7 @@ s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 
s32MaxRespBuffLen, s32 *ps32
   */
  #ifdef SIMULATION
  s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
- u32 u32WIDsCount, WILC_Bool bRespRequired, u32 
drvHandler)
+ u32 u32WIDsCount, bool bRespRequired, u32 drvHandler)
  {
s32 s32Error = WILC_SUCCESS;
s32 err = WILC_SUCCESS;
@@ -2129,7 +2129,7 @@ extern wilc_wlan_oup_t *gpstrWlanOps;
   *  @version  1.0
   */
  s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
- u32 u32WIDsCount, WILC_Bool bRespRequired, u32 
drvHandler)
+ u32 u32WIDsCount, bool bRespRequired, u32 drvHandler)
  {
s32 counter = 0, ret = 0;
if (gpstrWlanOps == NULL) {
diff --git a/drivers/staging

[PATCH v2] staging: wilc1000: change WILC_BOOL to bool

2015-06-11 Thread Dean Lee
change own data type(WILC_BOOL) to common data type(bool)
but that's contain true/false value. so change with them.

Signed-off-by: Dean Lee dean@atmel.com
---
Change
 remove WILC_BOOL structure.
---
 drivers/staging/wilc1000/coreconfigurator.c   |  26 ++--
 drivers/staging/wilc1000/coreconfigurator.h   |   4 +-
 drivers/staging/wilc1000/fifo_buffer.c|   2 +-
 drivers/staging/wilc1000/fifo_buffer.h|   2 +-
 drivers/staging/wilc1000/host_interface.c | 166 +++---
 drivers/staging/wilc1000/host_interface.h |  20 +--
 drivers/staging/wilc1000/linux_mon.c  |   6 +-
 drivers/staging/wilc1000/linux_wlan.c |  20 +--
 drivers/staging/wilc1000/wilc_msgqueue.c  |   8 +-
 drivers/staging/wilc1000/wilc_oswrapper.h |   6 -
 drivers/staging/wilc1000/wilc_platform.h  |   2 +-
 drivers/staging/wilc1000/wilc_spi.c   |   1 -
 drivers/staging/wilc1000/wilc_timer.h |   4 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 136 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.h |   2 +-
 drivers/staging/wilc1000/wilc_wfi_netdevice.c |   2 +-
 drivers/staging/wilc1000/wilc_wfi_netdevice.h |   8 +-
 drivers/staging/wilc1000/wilc_wlan.c  |  34 ++---
 drivers/staging/wilc1000/wilc_wlan_cfg.c  |   4 +-
 19 files changed, 223 insertions(+), 230 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index c9cc817..9abc73d 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -145,7 +145,7 @@ typedef struct {
WILC_Char *pcRespBuffer;
s32 s32MaxRespBuffLen;
s32 s32BytesRead;
-   WILC_Bool bRespRequired;
+   bool bRespRequired;
 } tstrConfigPktInfo;
 
 
@@ -1520,7 +1520,7 @@ void ProcessBinWid(WILC_Char *pcPacket, s32 *ps32PktLen,
 s32 further_process_response(u8 *resp,
 u16 u16WIDid,
 u16 cfg_len,
-WILC_Bool process_wid_num,
+bool process_wid_num,
 u32 cnt,
 tstrWID *pstrWIDresult)
 {
@@ -1693,7 +1693,7 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult)
u16 u16WIDid  = 0;
u16 cfg_len  = 0;
tenuWIDtype enuWIDtype = WID_UNDEF;
-   WILC_Bool num_wid_processed = WILC_FALSE;
+   bool num_wid_processed = false;
u32 cnt = 0;
u32 idx = 0;
u32 ResCnt = 0;
@@ -1717,17 +1717,17 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult)
idx++;
}
idx += 3;
-   if ((u16WIDid == g_wid_num)  (num_wid_processed == 
WILC_FALSE)) {
-   num_wid_processed = WILC_TRUE;
+   if ((u16WIDid == g_wid_num)  (num_wid_processed == false)) {
+   num_wid_processed = true;
 
-   if (-2 == further_process_response(resp[idx], 
u16WIDid, cfg_len, WILC_TRUE, 0, pstrWIDcfgResult[ResCnt])) {
+   if (-2 == further_process_response(resp[idx], 
u16WIDid, cfg_len, true, 0, pstrWIDcfgResult[ResCnt])) {
return -2;
}
ResCnt++;
} else {
for (cnt = 0; cnt  g_num_total_switches; cnt++) {
if (gastrWIDs[cnt].u16WIDid == u16WIDid) {
-   if (-2 == 
further_process_response(resp[idx], u16WIDid, cfg_len, WILC_FALSE, cnt,
+   if (-2 == 
further_process_response(resp[idx], u16WIDid, cfg_len, false, cnt,
   
pstrWIDcfgResult[ResCnt])) {
return -2;
}
@@ -1913,7 +1913,7 @@ s32 CreateConfigPacket(s8 *ps8packet, s32 
*ps32PacketLength,
 }
 
 s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 
*ps32BytesRead,
-  WILC_Bool bRespRequired)
+  bool bRespRequired)
 {
s32 s32Error = WILC_SUCCESS;
/*bug 3878*/
@@ -1923,7 +1923,7 @@ s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 
s32MaxRespBuffLen, s32 *ps32
 * gstrConfigPktInfo.bRespRequired = bRespRequired;*/
 
 
-   if (gstrConfigPktInfo.bRespRequired == WILC_TRUE) {
+   if (gstrConfigPktInfo.bRespRequired == true) {
down(SemHandlePktResp);
 
*ps32BytesRead = gstrConfigPktInfo.s32BytesRead;
@@ -1950,7 +1950,7 @@ s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 
s32MaxRespBuffLen, s32 *ps32
  */
 #ifdef SIMULATION
 s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs

Re: [PATCH] staging: wilc1000: modify odd print message

2015-06-10 Thread Dean . lee



On 2015년 06월 11일 12:50, Greg KH wrote:

On Thu, Jun 11, 2015 at 12:44:24PM +0900, Dean Lee wrote:

This driver has odd message in print string.
So this patch removes the data type.

Signed-off-by: Dean Lee dean@atmel.com
---
  drivers/staging/wilc1000/host_interface.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 1ecb373..9e055c4 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -703,7 +703,7 @@ static WILC_Sint32 Handle_SetOperationMode(void 
*drvHandler, tstrHostIfSetOperat
strWID.s32ValueSize = sizeof(WILC_Uint32);
  
  	/*Sending Cfg*/

-   PRINT_INFO(HOSTINF_DBG, (size_t)pstrWFIDrv= %p \n, pstrWFIDrv);
+   PRINT_INFO(HOSTINF_DBG, pstrWFIDrv= %p \n, pstrWFIDrv);

Why are you printing a kernel pointer to userspace always?  That's not a
good idea, why not just delete this line, how useful is it?

thanks,

greg k-h

we need this line for deep level debugging.
sometime we need check and compare pointer value.

but we have plan for rework print message.
delete unused  not required print message.

so please keep this line.

always thanks for your comment.

B.R

dean.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/4] staging: wilc1000: modify printk format

2015-06-10 Thread Dean . lee



On 2015년 06월 11일 09:42, Greg KH wrote:

On Wed, Jun 10, 2015 at 05:06:46PM +0900, Johnny Kim wrote:

This remove compile warnings about printk format.

Signed-off-by: Johnny Kim johnny@atmel.com
---
  drivers/staging/wilc1000/host_interface.c | 8 
  drivers/staging/wilc1000/linux_wlan.c | 2 +-
  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 
  3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 4b005fa..e4ad07a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -703,7 +703,7 @@ static WILC_Sint32 Handle_SetOperationMode(void 
*drvHandler, tstrHostIfSetOperat
strWID.s32ValueSize = sizeof(WILC_Uint32);
  
  	/*Sending Cfg*/

-   PRINT_INFO(HOSTINF_DBG, (WILC_Uint32)pstrWFIDrv= %x \n, 
(WILC_Uint32)pstrWFIDrv);
+   PRINT_INFO(HOSTINF_DBG, (size_t)pstrWFIDrv= %p \n, pstrWFIDrv);

why is size_t in the printk message, can't that just be dropped?

I'll take this, but it looks odd...


Thanks Greg.
I'll drop from my patch.
B.R
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: wilc1000: modify odd print message

2015-06-10 Thread Dean Lee
This driver has odd message in print string.
So this patch removes the data type.

Signed-off-by: Dean Lee dean@atmel.com
---
 drivers/staging/wilc1000/host_interface.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 1ecb373..9e055c4 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -703,7 +703,7 @@ static WILC_Sint32 Handle_SetOperationMode(void 
*drvHandler, tstrHostIfSetOperat
strWID.s32ValueSize = sizeof(WILC_Uint32);
 
/*Sending Cfg*/
-   PRINT_INFO(HOSTINF_DBG, (size_t)pstrWFIDrv= %p \n, pstrWFIDrv);
+   PRINT_INFO(HOSTINF_DBG, pstrWFIDrv= %p \n, pstrWFIDrv);
 
s32Error = SendConfigPkt(SET_CFG, strWID, 1, WILC_TRUE, 
(WILC_Uint32)pstrWFIDrv);
 
@@ -8040,4 +8040,3 @@ WILC_Sint32 host_int_get_ipaddress(WILC_WFIDrvHandle 
hWFIDrv, u8 *u16ipadd, u8 i
 
 
 }
-
-- 
2.4.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel