* [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv
@ 2015-10-05 10:28 Tony Cho
2015-10-05 10:28 ` [PATCH 2/6] staging: wilc1000: rename the member variable, drvHandler of host_if_msg Tony Cho
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Tony Cho @ 2015-10-05 10:28 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
adham.abozaeid, Nicolas.FERRE
From: Leo Kim <leo.kim@atmel.com>
This patch removes typedef from the struct tstrWILC_WFIDrv and
rename it to host_if_drv.
This patch includes the removal of the comment for tstrWILC_WFIDrv as well.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
drivers/staging/wilc1000/host_interface.c | 362 +++++++++++-----------
drivers/staging/wilc1000/host_interface.h | 108 +++----
drivers/staging/wilc1000/linux_wlan.c | 16 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 24 +-
drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 +-
5 files changed, 253 insertions(+), 261 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index dbaebad..66c37ef 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -402,7 +402,7 @@ union message_body {
struct host_if_msg {
u16 id; /*!< Message ID */
union message_body body; /*!< Message body */
- tstrWILC_WFIDrv *drvHandler;
+ struct host_if_drv *drvHandler;
};
typedef struct _tstrWidJoinReqExt {
@@ -460,9 +460,9 @@ typedef enum {
/* */
/*****************************************************************************/
/* Zero is not used, because a zero ID means termination */
-static tstrWILC_WFIDrv *wfidrv_list[NUM_CONCURRENT_IFC + 1];
-tstrWILC_WFIDrv *terminated_handle;
-tstrWILC_WFIDrv *gWFiDrvHandle;
+static struct host_if_drv *wfidrv_list[NUM_CONCURRENT_IFC + 1];
+struct host_if_drv *terminated_handle;
+struct host_if_drv *gWFiDrvHandle;
bool g_obtainingIP = false;
u8 P2P_LISTEN_STATE;
static struct task_struct *HostIFthreadHandler;
@@ -497,7 +497,7 @@ u8 gu8Flushed11iMode;
u8 gu8FlushedAuthType;
u32 gu32FlushedJoinReqSize;
u32 gu32FlushedInfoElemAsocSize;
-tstrWILC_WFIDrv *gu8FlushedJoinReqDrvHandler;
+struct host_if_drv *gu8FlushedJoinReqDrvHandler;
#define REAL_JOIN_REQ 0
#define FLUSHED_JOIN_REQ 1
#define FLUSHED_BYTE_POS 79 /* Position the byte indicating flushing in the flushed request */
@@ -507,7 +507,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo);
extern void chip_sleep_manually(u32 u32SleepTime);
extern int linux_wlan_get_num_conn_ifcs(void);
-static int add_handler_in_list(tstrWILC_WFIDrv *handler)
+static int add_handler_in_list(struct host_if_drv *handler)
{
int i;
@@ -521,7 +521,7 @@ static int add_handler_in_list(tstrWILC_WFIDrv *handler)
return -ENOBUFS;
}
-static int remove_handler_in_list(tstrWILC_WFIDrv *handler)
+static int remove_handler_in_list(struct host_if_drv *handler)
{
int i;
@@ -535,7 +535,7 @@ static int remove_handler_in_list(tstrWILC_WFIDrv *handler)
return -EINVAL;
}
-static int get_id_from_handler(tstrWILC_WFIDrv *handler)
+static int get_id_from_handler(struct host_if_drv *handler)
{
int i;
@@ -550,7 +550,7 @@ static int get_id_from_handler(tstrWILC_WFIDrv *handler)
return 0;
}
-static tstrWILC_WFIDrv *get_handler_from_id(int id)
+static struct host_if_drv *get_handler_from_id(int id)
{
if (id <= 0 || id >= ARRAY_SIZE(wfidrv_list))
return NULL;
@@ -566,13 +566,13 @@ static tstrWILC_WFIDrv *get_handler_from_id(int id)
* @date
* @version 1.0
*/
-static s32 Handle_SetChannel(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_SetChannel(struct host_if_drv *drvHandler,
struct channel_attr *pstrHostIFSetChan)
{
s32 s32Error = 0;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
/*prepare configuration packet*/
strWID.u16WIDid = (u16)WID_CURRENT_CHANNEL;
@@ -601,13 +601,13 @@ static s32 Handle_SetChannel(tstrWILC_WFIDrv *drvHandler,
* @date
* @version 1.0
*/
-static s32 Handle_SetWfiDrvHandler(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_SetWfiDrvHandler(struct host_if_drv *drvHandler,
struct drv_handler *pstrHostIfSetDrvHandler)
{
s32 s32Error = 0;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = drvHandler;
+ struct host_if_drv *pstrWFIDrv = drvHandler;
/*prepare configuration packet*/
@@ -642,13 +642,13 @@ static s32 Handle_SetWfiDrvHandler(tstrWILC_WFIDrv *drvHandler,
* @date
* @version 1.0
*/
-static s32 Handle_SetOperationMode(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_SetOperationMode(struct host_if_drv *drvHandler,
struct op_mode *pstrHostIfSetOperationMode)
{
s32 s32Error = 0;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
/*prepare configuration packet*/
@@ -685,13 +685,13 @@ static s32 Handle_SetOperationMode(tstrWILC_WFIDrv *drvHandler,
* @date
* @version 1.0
*/
-s32 Handle_set_IPAddress(tstrWILC_WFIDrv *drvHandler, u8 *pu8IPAddr, u8 idx)
+s32 Handle_set_IPAddress(struct host_if_drv *drvHandler, u8 *pu8IPAddr, u8 idx)
{
s32 s32Error = 0;
tstrWID strWID;
char firmwareIPAddress[4] = {0};
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
if (pu8IPAddr[0] < 192)
pu8IPAddr[0] = 0;
@@ -732,12 +732,12 @@ s32 Handle_set_IPAddress(tstrWILC_WFIDrv *drvHandler, u8 *pu8IPAddr, u8 idx)
* @date
* @version 1.0
*/
-s32 Handle_get_IPAddress(tstrWILC_WFIDrv *drvHandler, u8 *pu8IPAddr, u8 idx)
+s32 Handle_get_IPAddress(struct host_if_drv *drvHandler, u8 *pu8IPAddr, u8 idx)
{
s32 s32Error = 0;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
/*prepare configuration packet*/
strWID.u16WIDid = (u16)WID_IP_ADDRESS;
@@ -780,13 +780,13 @@ s32 Handle_get_IPAddress(tstrWILC_WFIDrv *drvHandler, u8 *pu8IPAddr, u8 idx)
* @date November 2013
* @version 7.0
*/
-static s32 Handle_SetMacAddress(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_SetMacAddress(struct host_if_drv *drvHandler,
struct set_mac_addr *pstrHostIfSetMacAddress)
{
s32 s32Error = 0;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL);
if (mac_buf == NULL) {
@@ -823,7 +823,7 @@ static s32 Handle_SetMacAddress(tstrWILC_WFIDrv *drvHandler,
* @date JAN 2013
* @version 8.0
*/
-static s32 Handle_GetMacAddress(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_GetMacAddress(struct host_if_drv *drvHandler,
struct get_mac_addr *pstrHostIfGetMacAddress)
{
@@ -858,13 +858,13 @@ static s32 Handle_GetMacAddress(tstrWILC_WFIDrv *drvHandler,
* @date
* @version 1.0
*/
-static s32 Handle_CfgParam(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_CfgParam(struct host_if_drv *drvHandler,
struct cfg_param_attr *strHostIFCfgParamAttr)
{
s32 s32Error = 0;
tstrWID strWIDList[32];
u8 u8WidCnt = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
down(&(pstrWFIDrv->gtOsCfgValuesSem));
@@ -1218,7 +1218,7 @@ static s32 Handle_wait_msg_q_empty(void)
* @date
* @version 1.0
*/
-static s32 Handle_Scan(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_Scan(struct host_if_drv *drvHandler,
struct scan_attr *pstrHostIFscanAttr)
{
s32 s32Error = 0;
@@ -1228,7 +1228,7 @@ static s32 Handle_Scan(tstrWILC_WFIDrv *drvHandler,
u8 *pu8Buffer;
u8 valuesize = 0;
u8 *pu8HdnNtwrksWidVal = NULL;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *) drvHandler;
PRINT_D(HOSTINF_DBG, "Setting SCAN params\n");
PRINT_D(HOSTINF_DBG, "Scanning: In [%d] state\n", pstrWFIDrv->enuHostIFstate);
@@ -1385,11 +1385,11 @@ ERRORHANDLER:
* @date
* @version 1.0
*/
-static s32 Handle_ScanDone(tstrWILC_WFIDrv *drvHandler, tenuScanEvent enuEvent)
+static s32 Handle_ScanDone(struct host_if_drv *drvHandler, tenuScanEvent enuEvent)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
u8 u8abort_running_scan;
@@ -1442,10 +1442,10 @@ static s32 Handle_ScanDone(tstrWILC_WFIDrv *drvHandler, tenuScanEvent enuEvent)
* @version 1.0
*/
u8 u8ConnectedSSID[6] = {0};
-static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_Connect(struct host_if_drv *drvHandler,
struct connect_attr *pstrHostIFconnectAttr)
{
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *) drvHandler;
s32 s32Error = 0;
tstrWID strWIDList[8];
u32 u32WidsCount = 0, dummyval = 0;
@@ -1805,7 +1805,7 @@ ERRORHANDLER:
* @version 8.0
*/
-static s32 Handle_FlushConnect(tstrWILC_WFIDrv *drvHandler)
+static s32 Handle_FlushConnect(struct host_if_drv *drvHandler)
{
s32 s32Error = 0;
tstrWID strWIDList[5];
@@ -1864,13 +1864,13 @@ static s32 Handle_FlushConnect(tstrWILC_WFIDrv *drvHandler)
* @date
* @version 1.0
*/
-static s32 Handle_ConnectTimeout(tstrWILC_WFIDrv *drvHandler)
+static s32 Handle_ConnectTimeout(struct host_if_drv *drvHandler)
{
s32 s32Error = 0;
tstrConnectInfo strConnectInfo;
tstrWID strWID;
u16 u16DummyReasonCode = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *) drvHandler;
if (pstrWFIDrv == NULL) {
PRINT_ER("Driver handler is NULL\n");
@@ -1972,7 +1972,7 @@ static s32 Handle_ConnectTimeout(tstrWILC_WFIDrv *drvHandler)
* @date
* @version 1.0
*/
-static s32 Handle_RcvdNtwrkInfo(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_RcvdNtwrkInfo(struct host_if_drv *drvHandler,
struct rcvd_net_info *pstrRcvdNetworkInfo)
{
u32 i;
@@ -1984,7 +1984,7 @@ static s32 Handle_RcvdNtwrkInfo(tstrWILC_WFIDrv *drvHandler,
tstrNetworkInfo *pstrNetworkInfo = NULL;
void *pJoinParams = NULL;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
@@ -2088,7 +2088,7 @@ done:
* @date
* @version 1.0
*/
-static s32 Handle_RcvdGnrlAsyncInfo(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *drvHandler,
struct rcvd_async_info *pstrRcvdGnrlAsyncInfo)
{
/* TODO: mostafa: till now, this function just handles only the received mac status msg, */
@@ -2105,7 +2105,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(tstrWILC_WFIDrv *drvHandler,
tstrConnectInfo strConnectInfo;
tstrDisconnectNotifInfo strDisconnectNotifInfo;
s32 s32Err = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *) drvHandler;
if (!pstrWFIDrv) {
PRINT_ER("Driver handler is NULL\n");
@@ -2404,7 +2404,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(tstrWILC_WFIDrv *drvHandler,
* @date
* @version 1.0
*/
-static int Handle_Key(tstrWILC_WFIDrv *drvHandler,
+static int Handle_Key(struct host_if_drv *drvHandler,
struct key_attr *pstrHostIFkeyAttr)
{
s32 s32Error = 0;
@@ -2414,7 +2414,7 @@ static int Handle_Key(tstrWILC_WFIDrv *drvHandler,
u8 *pu8keybuf;
s8 s8idxarray[1];
s8 ret = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
switch (pstrHostIFkeyAttr->enuKeyType) {
@@ -2768,13 +2768,13 @@ _WPAPtk_end_case_:
* @date
* @version 1.0
*/
-static void Handle_Disconnect(tstrWILC_WFIDrv *drvHandler)
+static void Handle_Disconnect(struct host_if_drv *drvHandler)
{
tstrWID strWID;
s32 s32Error = 0;
u16 u16DummyReasonCode = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
strWID.u16WIDid = (u16)WID_DISCONNECT;
@@ -2871,11 +2871,11 @@ static void Handle_Disconnect(tstrWILC_WFIDrv *drvHandler)
}
-void resolve_disconnect_aberration(tstrWILC_WFIDrv *drvHandler)
+void resolve_disconnect_aberration(struct host_if_drv *drvHandler)
{
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
- pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ pstrWFIDrv = (struct host_if_drv *)drvHandler;
if (pstrWFIDrv == NULL)
return;
if ((pstrWFIDrv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) || (pstrWFIDrv->enuHostIFstate == HOST_IF_CONNECTING)) {
@@ -2894,13 +2894,12 @@ void resolve_disconnect_aberration(tstrWILC_WFIDrv *drvHandler)
* @date
* @version 1.0
*/
-static s32 Handle_GetChnl(tstrWILC_WFIDrv *drvHandler)
+static s32 Handle_GetChnl(struct host_if_drv *drvHandler)
{
s32 s32Error = 0;
tstrWID strWID;
- /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
strWID.u16WIDid = (u16)WID_CURRENT_CHANNEL;
strWID.enuWIDtype = WID_CHAR;
@@ -2935,11 +2934,11 @@ static s32 Handle_GetChnl(tstrWILC_WFIDrv *drvHandler)
* @date
* @version 1.0
*/
-static void Handle_GetRssi(tstrWILC_WFIDrv *drvHandler)
+static void Handle_GetRssi(struct host_if_drv *drvHandler)
{
s32 s32Error = 0;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
strWID.u16WIDid = (u16)WID_RSSI;
strWID.enuWIDtype = WID_CHAR;
@@ -2962,11 +2961,11 @@ static void Handle_GetRssi(tstrWILC_WFIDrv *drvHandler)
}
-static void Handle_GetLinkspeed(tstrWILC_WFIDrv *drvHandler)
+static void Handle_GetLinkspeed(struct host_if_drv *drvHandler)
{
s32 s32Error = 0;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
gs8lnkspd = 0;
@@ -2989,7 +2988,7 @@ static void Handle_GetLinkspeed(tstrWILC_WFIDrv *drvHandler)
}
-s32 Handle_GetStatistics(tstrWILC_WFIDrv *drvHandler, tstrStatistics *pstrStatistics)
+s32 Handle_GetStatistics(struct host_if_drv *drvHandler, tstrStatistics *pstrStatistics)
{
tstrWID strWIDList[5];
u32 u32WidsCount = 0, s32Error = 0;
@@ -3046,14 +3045,14 @@ s32 Handle_GetStatistics(tstrWILC_WFIDrv *drvHandler, tstrStatistics *pstrStatis
* @date
* @version 1.0
*/
-static s32 Handle_Get_InActiveTime(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_Get_InActiveTime(struct host_if_drv *drvHandler,
struct sta_inactive_t *strHostIfStaInactiveT)
{
s32 s32Error = 0;
u8 *stamac;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
strWID.u16WIDid = (u16)WID_SET_STA_MAC_INACTIVE_TIME;
@@ -3113,13 +3112,13 @@ static s32 Handle_Get_InActiveTime(tstrWILC_WFIDrv *drvHandler,
* @date
* @version 1.0
*/
-static void Handle_AddBeacon(tstrWILC_WFIDrv *drvHandler,
+static void Handle_AddBeacon(struct host_if_drv *drvHandler,
struct beacon_attr *pstrSetBeaconParam)
{
s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
PRINT_D(HOSTINF_DBG, "Adding BEACON\n");
@@ -3176,18 +3175,18 @@ ERRORHANDLER:
/**
* @brief Handle_AddBeacon
* @details Sending config packet to delete beacon
- * @param[in] tstrWILC_WFIDrv *drvHandler
+ * @param[in] struct host_if_drv *drvHandler
* @return NONE
* @author
* @date
* @version 1.0
*/
-static void Handle_DelBeacon(tstrWILC_WFIDrv *drvHandler)
+static void Handle_DelBeacon(struct host_if_drv *drvHandler)
{
s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
strWID.u16WIDid = (u16)WID_DEL_BEACON;
strWID.enuWIDtype = WID_CHAR;
@@ -3274,13 +3273,13 @@ static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer,
* @date
* @version 1.0
*/
-static void Handle_AddStation(tstrWILC_WFIDrv *drvHandler,
+static void Handle_AddStation(struct host_if_drv *drvHandler,
struct add_sta_param *pstrStationParam)
{
s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
PRINT_D(HOSTINF_DBG, "Handling add station\n");
strWID.u16WIDid = (u16)WID_ADD_STA;
@@ -3314,14 +3313,14 @@ ERRORHANDLER:
* @date
* @version 1.0
*/
-static void Handle_DelAllSta(tstrWILC_WFIDrv *drvHandler,
+static void Handle_DelAllSta(struct host_if_drv *drvHandler,
struct del_all_sta *pstrDelAllStaParam)
{
s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
u8 i;
u8 au8Zero_Buff[6] = {0};
@@ -3370,13 +3369,13 @@ ERRORHANDLER:
* @date
* @version 1.0
*/
-static void Handle_DelStation(tstrWILC_WFIDrv *drvHandler,
+static void Handle_DelStation(struct host_if_drv *drvHandler,
struct del_sta *pstrDelStaParam)
{
s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
strWID.u16WIDid = (u16)WID_REMOVE_STA;
strWID.enuWIDtype = WID_BIN;
@@ -3412,13 +3411,13 @@ ERRORHANDLER:
* @date
* @version 1.0
*/
-static void Handle_EditStation(tstrWILC_WFIDrv *drvHandler,
+static void Handle_EditStation(struct host_if_drv *drvHandler,
struct add_sta_param *pstrStationParam)
{
s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
strWID.u16WIDid = (u16)WID_EDIT_STA;
strWID.enuWIDtype = WID_BIN;
@@ -3452,13 +3451,13 @@ ERRORHANDLER:
* @date
* @version 1.0
*/
-static int Handle_RemainOnChan(tstrWILC_WFIDrv *drvHandler,
+static int Handle_RemainOnChan(struct host_if_drv *drvHandler,
struct remain_ch *pstrHostIfRemainOnChan)
{
s32 s32Error = 0;
u8 u8remain_on_chan_flag;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *) drvHandler;
/*If it's a pendig remain-on-channel, don't overwrite gWFiDrvHandle values (since incoming msg is garbbage)*/
if (!pstrWFIDrv->u8RemainOnChan_pendingreq) {
@@ -3539,13 +3538,13 @@ ERRORHANDLER:
* @date
* @version 1.0
*/
-static int Handle_RegisterFrame(tstrWILC_WFIDrv *drvHandler,
+static int Handle_RegisterFrame(struct host_if_drv *drvHandler,
struct reg_frame *pstrHostIfRegisterFrame)
{
s32 s32Error = 0;
tstrWID strWID;
u8 *pu8CurrByte;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
PRINT_D(HOSTINF_DBG, "Handling frame register Flag : %d FrameType: %d\n", pstrHostIfRegisterFrame->bReg, pstrHostIfRegisterFrame->u16FrameType);
@@ -3588,13 +3587,13 @@ static int Handle_RegisterFrame(tstrWILC_WFIDrv *drvHandler,
* @version 1.0
*/
#define FALSE_FRMWR_CHANNEL 100
-static u32 Handle_ListenStateExpired(tstrWILC_WFIDrv *drvHandler,
+static u32 Handle_ListenStateExpired(struct host_if_drv *drvHandler,
struct remain_ch *pstrHostIfRemainOnChan)
{
u8 u8remain_on_chan_flag;
tstrWID strWID;
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *) drvHandler;
PRINT_D(HOSTINF_DBG, "CANCEL REMAIN ON CHAN\n");
@@ -3649,7 +3648,7 @@ static void ListenTimerCB(unsigned long arg)
{
s32 s32Error = 0;
struct host_if_msg msg;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)arg;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)arg;
/*Stopping remain-on-channel timer*/
del_timer(&pstrWFIDrv->hRemainOnChannel);
@@ -3674,13 +3673,13 @@ static void ListenTimerCB(unsigned long arg)
* @date
* @version 1.0
*/
-static void Handle_PowerManagement(tstrWILC_WFIDrv *drvHandler,
+static void Handle_PowerManagement(struct host_if_drv *drvHandler,
struct power_mgmt_param *strPowerMgmtParam)
{
s32 s32Error = 0;
tstrWID strWID;
s8 s8PowerMode;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
strWID.u16WIDid = (u16)WID_POWER_MANAGEMENT;
@@ -3710,7 +3709,7 @@ static void Handle_PowerManagement(tstrWILC_WFIDrv *drvHandler,
* @date
* @version 1.0
*/
-static void Handle_SetMulticastFilter(tstrWILC_WFIDrv *drvHandler,
+static void Handle_SetMulticastFilter(struct host_if_drv *drvHandler,
struct set_multicast *strHostIfSetMulti)
{
s32 s32Error = 0;
@@ -3761,14 +3760,14 @@ ERRORHANDLER:
* @date Feb. 2014
* @version 9.0
*/
-static s32 Handle_AddBASession(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_AddBASession(struct host_if_drv *drvHandler,
struct ba_session_info *strHostIfBASessionInfo)
{
s32 s32Error = 0;
tstrWID strWID;
int AddbaTimeout = 100;
char *ptr = NULL;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
PRINT_D(HOSTINF_DBG, "Opening Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\nBufferSize == %d\nSessionTimeOut = %d\n",
strHostIfBASessionInfo->au8Bssid[0],
@@ -3850,13 +3849,13 @@ static s32 Handle_AddBASession(tstrWILC_WFIDrv *drvHandler,
* @date Feb. 2013
* @version 9.0
*/
-static s32 Handle_DelAllRxBASessions(tstrWILC_WFIDrv *drvHandler,
+static s32 Handle_DelAllRxBASessions(struct host_if_drv *drvHandler,
struct ba_session_info *strHostIfBASessionInfo)
{
s32 s32Error = 0;
tstrWID strWID;
char *ptr = NULL;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)drvHandler;
PRINT_D(GENERIC_DBG, "Delete Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\n",
strHostIfBASessionInfo->au8Bssid[0],
@@ -3908,13 +3907,13 @@ static int hostIFthread(void *pvArg)
{
u32 u32Ret;
struct host_if_msg msg;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
memset(&msg, 0, sizeof(struct host_if_msg));
while (1) {
wilc_mq_recv(&gMsgQHostIF, &msg, sizeof(struct host_if_msg), &u32Ret);
- pstrWFIDrv = (tstrWILC_WFIDrv *)msg.drvHandler;
+ pstrWFIDrv = (struct host_if_drv *)msg.drvHandler;
if (msg.id == HOST_IF_MSG_EXIT) {
PRINT_D(GENERIC_DBG, "THREAD: Exiting HostIfThread\n");
break;
@@ -4159,11 +4158,10 @@ static void TimerCB_Connect(unsigned long arg)
* @version 1.0
*/
/* Check implementation in core adding 9 bytes to the input! */
-s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress)
+s32 host_int_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress)
{
s32 s32Error = 0;
tstrWID strWID;
- /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
strWID.u16WIDid = (u16)WID_REMOVE_KEY;
strWID.enuWIDtype = WID_STR;
@@ -4188,10 +4186,10 @@ s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress)
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_remove_wep_key(tstrWILC_WFIDrv *hWFIDrv, u8 u8keyIdx)
+s32 host_int_remove_wep_key(struct host_if_drv *hWFIDrv, u8 u8keyIdx)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
@@ -4236,10 +4234,10 @@ s32 host_int_remove_wep_key(tstrWILC_WFIDrv *hWFIDrv, u8 u8keyIdx)
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_set_WEPDefaultKeyID(tstrWILC_WFIDrv *hWFIDrv, u8 u8Index)
+s32 host_int_set_WEPDefaultKeyID(struct host_if_drv *hWFIDrv, u8 u8Index)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
@@ -4290,11 +4288,11 @@ s32 host_int_set_WEPDefaultKeyID(tstrWILC_WFIDrv *hWFIDrv, u8 u8Index)
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_add_wep_key_bss_sta(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx)
+s32 host_int_add_wep_key_bss_sta(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
if (pstrWFIDrv == NULL) {
@@ -4352,11 +4350,11 @@ s32 host_int_add_wep_key_bss_sta(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey,
* @date 28 FEB 2013
* @version 1.0
*/
-s32 host_int_add_wep_key_bss_ap(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type)
+s32 host_int_add_wep_key_bss_ap(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
u8 i;
@@ -4425,11 +4423,11 @@ s32 host_int_add_wep_key_bss_ap(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_add_ptk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
+s32 host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
u8 u8KeyLen = u8PtkKeylen;
u32 i;
@@ -4520,12 +4518,12 @@ s32 host_int_add_ptk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_add_rx_gtk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen,
+s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen,
u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
u8 u8KeyLen = u8GtkKeylen;
@@ -4623,10 +4621,10 @@ s32 host_int_add_rx_gtk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKe
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_set_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, struct host_if_pmkid_attr *pu8PmkidInfoArray)
+s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv, struct host_if_pmkid_attr *pu8PmkidInfoArray)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
u32 i;
@@ -4683,12 +4681,11 @@ s32 host_int_set_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, struct host_if_pmkid_attr
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PmkidInfoArray,
+s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray,
u32 u32PmkidInfoLen)
{
s32 s32Error = 0;
tstrWID strWID;
- /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
strWID.u16WIDid = (u16)WID_PMKID_INFO;
strWID.enuWIDtype = WID_STR;
@@ -4712,7 +4709,7 @@ s32 host_int_get_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PmkidInfoArray,
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_set_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PassPhrase,
+s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv, u8 *pu8PassPhrase,
u8 u8Psklength)
{
s32 s32Error = 0;
@@ -4739,7 +4736,7 @@ s32 host_int_set_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PassPh
* @date 19 April 2012
* @version 1.0
*/
-s32 host_int_get_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress)
+s32 host_int_get_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress)
{
s32 s32Error = 0;
struct host_if_msg msg;
@@ -4773,7 +4770,7 @@ s32 host_int_get_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress)
* @date 16 July 2012
* @version 1.0
*/
-s32 host_int_set_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress)
+s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress)
{
s32 s32Error = 0;
struct host_if_msg msg;
@@ -4808,12 +4805,11 @@ s32 host_int_set_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress)
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv,
+s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
u8 *pu8PassPhrase, u8 u8Psklength)
{
s32 s32Error = 0;
tstrWID strWID;
- /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
strWID.u16WIDid = (u16)WID_11I_PSK;
strWID.enuWIDtype = WID_STR;
@@ -4838,11 +4834,10 @@ s32 host_int_get_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv,
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_set_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 scanSource)
+s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource)
{
s32 s32Error = 0;
tstrWID strWID;
- /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
strWID.u16WIDid = (u16)WID_START_SCAN_REQ;
strWID.enuWIDtype = WID_CHAR;
@@ -4868,11 +4863,10 @@ s32 host_int_set_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 scanSource)
* @version 1.0
*/
-s32 host_int_get_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ScanSource)
+s32 host_int_get_start_scan_req(struct host_if_drv *hWFIDrv, u8 *pu8ScanSource)
{
s32 s32Error = 0;
tstrWID strWID;
- /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
strWID.u16WIDid = (u16)WID_START_SCAN_REQ;
strWID.enuWIDtype = WID_CHAR;
@@ -4893,7 +4887,7 @@ s32 host_int_get_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ScanSource)
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_set_join_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8bssid,
+s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid,
const u8 *pu8ssid, size_t ssidLen,
const u8 *pu8IEs, size_t IEsLen,
wilc_connect_result pfConnectResult, void *pvUserArg,
@@ -4902,7 +4896,7 @@ s32 host_int_set_join_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8bssid,
void *pJoinParams)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
tenuScanConnTimer enuScanConnTimer;
@@ -4987,7 +4981,7 @@ s32 host_int_set_join_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8bssid,
* @version 8.0
*/
-s32 host_int_flush_join_req(tstrWILC_WFIDrv *hWFIDrv)
+s32 host_int_flush_join_req(struct host_if_drv *hWFIDrv)
{
s32 s32Error = 0;
struct host_if_msg msg;
@@ -5028,11 +5022,11 @@ s32 host_int_flush_join_req(tstrWILC_WFIDrv *hWFIDrv)
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_disconnect(tstrWILC_WFIDrv *hWFIDrv, u16 u16ReasonCode)
+s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode)
{
s32 s32Error = 0;
struct host_if_msg msg;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
if (pstrWFIDrv == NULL) {
PRINT_ER("Driver is null\n");
@@ -5067,11 +5061,10 @@ s32 host_int_disconnect(tstrWILC_WFIDrv *hWFIDrv, u16 u16ReasonCode)
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_disconnect_station(tstrWILC_WFIDrv *hWFIDrv, u8 assoc_id)
+s32 host_int_disconnect_station(struct host_if_drv *hWFIDrv, u8 assoc_id)
{
s32 s32Error = 0;
tstrWID strWID;
- /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
strWID.u16WIDid = (u16)WID_DISCONNECT;
strWID.enuWIDtype = WID_CHAR;
@@ -5107,12 +5100,11 @@ s32 host_int_disconnect_station(tstrWILC_WFIDrv *hWFIDrv, u8 assoc_id)
* @version 1.0
*/
-s32 host_int_get_assoc_req_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocReqInfo,
+s32 host_int_get_assoc_req_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocReqInfo,
u32 u32AssocReqInfoLen)
{
s32 s32Error = 0;
tstrWID strWID;
- /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
strWID.u16WIDid = (u16)WID_ASSOC_REQ_INFO;
strWID.enuWIDtype = WID_STR;
@@ -5134,12 +5126,12 @@ s32 host_int_get_assoc_req_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocReqInfo,
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_assoc_res_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocRespInfo,
+s32 host_int_get_assoc_res_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocRespInfo,
u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen)
{
s32 s32Error = 0;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
if (pstrWFIDrv == NULL) {
PRINT_ER("Driver is null\n");
@@ -5181,12 +5173,11 @@ s32 host_int_get_assoc_res_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocRespInfo,
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
+s32 host_int_get_rx_power_level(struct host_if_drv *hWFIDrv, u8 *pu8RxPowerLevel,
u32 u32RxPowerLevelLen)
{
s32 s32Error = 0;
tstrWID strWID;
- /* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */
strWID.u16WIDid = (u16)WID_RX_POWER_LEVEL;
strWID.enuWIDtype = WID_STR;
@@ -5212,10 +5203,10 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
* @date 8 March 2012
* @version 1.0
*/
-int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel)
+int host_int_set_mac_chnl_num(struct host_if_drv *wfi_drv, u8 channel)
{
int result = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)wfi_drv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)wfi_drv;
struct host_if_msg msg;
if (!pstrWFIDrv) {
@@ -5261,7 +5252,7 @@ int host_int_wait_msg_queue_idle(void)
return result;
}
-s32 host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address)
+s32 host_int_set_wfi_drv_handler(struct host_if_drv *u32address)
{
s32 s32Error = 0;
@@ -5286,7 +5277,7 @@ s32 host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address)
-s32 host_int_set_operation_mode(tstrWILC_WFIDrv *hWFIDrv, u32 u32mode)
+s32 host_int_set_operation_mode(struct host_if_drv *hWFIDrv, u32 u32mode)
{
s32 s32Error = 0;
@@ -5324,10 +5315,10 @@ s32 host_int_set_operation_mode(tstrWILC_WFIDrv *hWFIDrv, u32 u32mode)
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_host_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ChNo)
+s32 host_int_get_host_chnl_num(struct host_if_drv *hWFIDrv, u8 *pu8ChNo)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
if (pstrWFIDrv == NULL) {
@@ -5366,11 +5357,11 @@ s32 host_int_get_host_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ChNo)
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_test_set_int_wid(tstrWILC_WFIDrv *hWFIDrv, u32 u32TestMemAddr)
+s32 host_int_test_set_int_wid(struct host_if_drv *hWFIDrv, u32 u32TestMemAddr)
{
s32 s32Error = 0;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
if (pstrWFIDrv == NULL) {
@@ -5409,10 +5400,10 @@ s32 host_int_test_set_int_wid(tstrWILC_WFIDrv *hWFIDrv, u32 u32TestMemAddr)
* @date
* @version 1.0
*/
-s32 host_int_get_inactive_time(tstrWILC_WFIDrv *hWFIDrv, const u8 *mac, u32 *pu32InactiveTime)
+s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac, u32 *pu32InactiveTime)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
if (pstrWFIDrv == NULL) {
@@ -5451,12 +5442,12 @@ s32 host_int_get_inactive_time(tstrWILC_WFIDrv *hWFIDrv, const u8 *mac, u32 *pu3
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_test_get_int_wid(tstrWILC_WFIDrv *hWFIDrv, u32 *pu32TestMemAddr)
+s32 host_int_test_get_int_wid(struct host_if_drv *hWFIDrv, u32 *pu32TestMemAddr)
{
s32 s32Error = 0;
tstrWID strWID;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
if (pstrWFIDrv == NULL) {
@@ -5497,11 +5488,11 @@ s32 host_int_test_get_int_wid(tstrWILC_WFIDrv *hWFIDrv, u32 *pu32TestMemAddr)
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_rssi(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8Rssi)
+s32 host_int_get_rssi(struct host_if_drv *hWFIDrv, s8 *ps8Rssi)
{
s32 s32Error = 0;
struct host_if_msg msg;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
/* prepare the Get RSSI Message */
@@ -5532,12 +5523,12 @@ s32 host_int_get_rssi(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8Rssi)
return s32Error;
}
-s32 host_int_get_link_speed(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8lnkspd)
+s32 host_int_get_link_speed(struct host_if_drv *hWFIDrv, s8 *ps8lnkspd)
{
struct host_if_msg msg;
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
@@ -5569,7 +5560,7 @@ s32 host_int_get_link_speed(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8lnkspd)
return s32Error;
}
-s32 host_int_get_statistics(tstrWILC_WFIDrv *hWFIDrv, tstrStatistics *pstrStatistics)
+s32 host_int_get_statistics(struct host_if_drv *hWFIDrv, tstrStatistics *pstrStatistics)
{
s32 s32Error = 0;
struct host_if_msg msg;
@@ -5609,7 +5600,7 @@ s32 host_int_get_statistics(tstrWILC_WFIDrv *hWFIDrv, tstrStatistics *pstrStatis
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_scan(tstrWILC_WFIDrv *hWFIDrv, u8 u8ScanSource,
+s32 host_int_scan(struct host_if_drv *hWFIDrv, u8 u8ScanSource,
u8 u8ScanType, u8 *pu8ChnlFreqList,
u8 u8ChnlListLen, const u8 *pu8IEs,
size_t IEsLen, wilc_scan_result ScanResult,
@@ -5617,7 +5608,7 @@ s32 host_int_scan(tstrWILC_WFIDrv *hWFIDrv, u8 u8ScanSource,
struct hidden_network *pstrHiddenNetwork)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
tenuScanConnTimer enuScanConnTimer;
@@ -5681,11 +5672,11 @@ s32 host_int_scan(tstrWILC_WFIDrv *hWFIDrv, u8 u8ScanSource,
* @date 8 March 2012
* @version 1.0
*/
-s32 hif_set_cfg(tstrWILC_WFIDrv *hWFIDrv, struct cfg_param_val *pstrCfgParamVal)
+s32 hif_set_cfg(struct host_if_drv *hWFIDrv, struct cfg_param_val *pstrCfgParamVal)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
@@ -5720,10 +5711,10 @@ s32 hif_set_cfg(tstrWILC_WFIDrv *hWFIDrv, struct cfg_param_val *pstrCfgParamVal)
* @date 8 March 2012
* @version 1.0
*/
-s32 hif_get_cfg(tstrWILC_WFIDrv *hWFIDrv, u16 u16WID, u16 *pu16WID_Value)
+s32 hif_get_cfg(struct host_if_drv *hWFIDrv, u16 u16WID, u16 *pu16WID_Value)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
down(&(pstrWFIDrv->gtOsCfgValuesSem));
@@ -5854,7 +5845,7 @@ void host_int_send_join_leave_info_to_host
static void GetPeriodicRSSI(unsigned long arg)
{
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)arg;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)arg;
if (pstrWFIDrv == NULL) {
PRINT_ER("Driver handler is NULL\n");
@@ -5898,10 +5889,10 @@ void host_int_send_network_info_to_host
*/
static u32 clients_count;
-s32 host_int_init(tstrWILC_WFIDrv **phWFIDrv)
+s32 host_int_init(struct host_if_drv **phWFIDrv)
{
s32 result = 0;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
int err;
PRINT_D(HOSTINF_DBG, "Initializing host interface for client %d\n", clients_count + 1);
@@ -5911,7 +5902,7 @@ s32 host_int_init(tstrWILC_WFIDrv **phWFIDrv)
sema_init(&hWaitResponse, 0);
/*Allocate host interface private structure*/
- pstrWFIDrv = kzalloc(sizeof(tstrWILC_WFIDrv), GFP_KERNEL);
+ pstrWFIDrv = kzalloc(sizeof(struct host_if_drv), GFP_KERNEL);
if (!pstrWFIDrv) {
result = -ENOMEM;
goto _fail_timer_2;
@@ -6013,14 +6004,14 @@ _fail_:
* @version 1.0
*/
-s32 host_int_deinit(tstrWILC_WFIDrv *hWFIDrv)
+s32 host_int_deinit(struct host_if_drv *hWFIDrv)
{
s32 s32Error = 0;
struct host_if_msg msg;
int ret;
/*obtain driver handle*/
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
if (pstrWFIDrv == NULL) {
PRINT_ER("pstrWFIDrv = NULL\n");
@@ -6126,7 +6117,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length)
s32 s32Error = 0;
struct host_if_msg msg;
int id;
- tstrWILC_WFIDrv *pstrWFIDrv = NULL;
+ struct host_if_drv *pstrWFIDrv = NULL;
id = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24));
pstrWFIDrv = get_handler_from_id(id);
@@ -6172,7 +6163,7 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)
s32 s32Error = 0;
struct host_if_msg msg;
int id;
- tstrWILC_WFIDrv *pstrWFIDrv = NULL;
+ struct host_if_drv *pstrWFIDrv = NULL;
down(&hSemHostIntDeinit);
@@ -6229,7 +6220,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length)
s32 s32Error = 0;
struct host_if_msg msg;
int id;
- tstrWILC_WFIDrv *pstrWFIDrv = NULL;
+ struct host_if_drv *pstrWFIDrv = NULL;
id = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24));
pstrWFIDrv = get_handler_from_id(id);
@@ -6282,10 +6273,10 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length)
* @date
* @version 1.0
*/
-s32 host_int_remain_on_channel(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, wilc_remain_on_chan_expired RemainOnChanExpired, wilc_remain_on_chan_ready RemainOnChanReady, void *pvUserArg)
+s32 host_int_remain_on_channel(struct host_if_drv *hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, wilc_remain_on_chan_expired RemainOnChanExpired, wilc_remain_on_chan_ready RemainOnChanReady, void *pvUserArg)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
if (pstrWFIDrv == NULL) {
@@ -6327,10 +6318,10 @@ s32 host_int_remain_on_channel(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID, u32 u
* @date
* @version 1.0
*/
-s32 host_int_ListenStateExpired(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID)
+s32 host_int_ListenStateExpired(struct host_if_drv *hWFIDrv, u32 u32SessionID)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
if (pstrWFIDrv == NULL) {
@@ -6362,10 +6353,10 @@ s32 host_int_ListenStateExpired(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID)
* @author
* @date
* @version 1.0*/
-s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bReg)
+s32 host_int_frame_register(struct host_if_drv *hWFIDrv, u16 u16FrameType, bool bReg)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
if (pstrWFIDrv == NULL) {
@@ -6416,13 +6407,13 @@ s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bRe
* @date
* @version 1.0
*/
-s32 host_int_add_beacon(tstrWILC_WFIDrv *hWFIDrv, u32 u32Interval,
+s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,
u32 u32DTIMPeriod,
u32 u32HeadLen, u8 *pu8Head,
u32 u32TailLen, u8 *pu8Tail)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
struct beacon_attr *pstrSetBeaconParam = &msg.body.beacon_info;
@@ -6488,10 +6479,10 @@ ERRORHANDLER:
* @date
* @version 1.0
*/
-s32 host_int_del_beacon(tstrWILC_WFIDrv *hWFIDrv)
+s32 host_int_del_beacon(struct host_if_drv *hWFIDrv)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
if (pstrWFIDrv == NULL) {
@@ -6521,11 +6512,11 @@ s32 host_int_del_beacon(tstrWILC_WFIDrv *hWFIDrv)
* @date
* @version 1.0
*/
-s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv,
+s32 host_int_add_station(struct host_if_drv *hWFIDrv,
struct add_sta_param *pstrStaParams)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
struct add_sta_param *pstrAddStationMsg = &msg.body.add_sta_info;
@@ -6571,10 +6562,10 @@ s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv,
* @date
* @version 1.0
*/
-s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8MacAddr)
+s32 host_int_del_station(struct host_if_drv *hWFIDrv, const u8 *pu8MacAddr)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
struct del_sta *pstrDelStationMsg = &msg.body.del_sta_info;
@@ -6612,10 +6603,11 @@ s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8MacAddr)
* @date
* @version 1.0
*/
-s32 host_int_del_allstation(tstrWILC_WFIDrv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN])
+s32 host_int_del_allstation(struct host_if_drv *hWFIDrv,
+ u8 pu8MacAddr[][ETH_ALEN])
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
struct del_all_sta *pstrDelAllStationMsg = &msg.body.del_all_sta_info;
u8 au8Zero_Buff[ETH_ALEN] = {0};
@@ -6672,11 +6664,11 @@ s32 host_int_del_allstation(tstrWILC_WFIDrv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN])
* @date
* @version 1.0
*/
-s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv,
+s32 host_int_edit_station(struct host_if_drv *hWFIDrv,
struct add_sta_param *pstrStaParams)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
struct add_sta_param *pstrAddStationMsg = &msg.body.add_sta_info;
@@ -6712,10 +6704,10 @@ s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv,
return s32Error;
}
-s32 host_int_set_power_mgmt(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32Timeout)
+s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32Timeout)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
struct power_mgmt_param *pstrPowerMgmtParam = &msg.body.pwr_mgmt_info;
@@ -6745,11 +6737,11 @@ s32 host_int_set_power_mgmt(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32Ti
return s32Error;
}
-s32 host_int_setup_multicast_filter(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32count)
+s32 host_int_setup_multicast_filter(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32count)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
struct set_multicast *pstrMulticastFilterParam = &msg.body.multicast_info;
@@ -6995,10 +6987,10 @@ void host_int_freeJoinParams(void *pJoinParams)
PRINT_ER("Unable to FREE null pointer\n");
}
-s32 host_int_delBASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID)
+s32 host_int_delBASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
struct ba_session_info *pBASessionInfo = &msg.body.session_info;
@@ -7025,10 +7017,10 @@ s32 host_int_delBASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID)
return s32Error;
}
-s32 host_int_del_All_Rx_BASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID)
+s32 host_int_del_All_Rx_BASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
struct ba_session_info *pBASessionInfo = &msg.body.session_info;
@@ -7063,10 +7055,10 @@ s32 host_int_del_All_Rx_BASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char T
* @author Abdelrahman Sobhy
* @date
* @version 1.0*/
-s32 host_int_setup_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *u16ipadd, u8 idx)
+s32 host_int_setup_ipaddress(struct host_if_drv *hWFIDrv, u8 *u16ipadd, u8 idx)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
/* TODO: Enable This feature on softap firmware */
@@ -7103,10 +7095,10 @@ s32 host_int_setup_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *u16ipadd, u8 idx)
* @author Abdelrahman Sobhy
* @date
* @version 1.0*/
-s32 host_int_get_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *u16ipadd, u8 idx)
+s32 host_int_get_ipaddress(struct host_if_drv *hWFIDrv, u8 *u16ipadd, u8 idx)
{
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+ struct host_if_drv *pstrWFIDrv = (struct host_if_drv *)hWFIDrv;
struct host_if_msg msg;
if (pstrWFIDrv == NULL) {
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 7391903..1848f53 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -303,7 +303,7 @@ enum p2p_listen_state {
P2P_GRP_FORMATION
};
-typedef struct {
+struct host_if_drv {
/* Scan user structure */
tstrWILC_UsrScanReq strWILC_UsrScanReq;
@@ -335,7 +335,7 @@ typedef struct {
struct timer_list hRemainOnChannel;
bool IFC_UP;
-} tstrWILC_WFIDrv;
+};
/*!
* @enum tenuWILC_StaFlag
@@ -391,7 +391,7 @@ struct add_sta_param {
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress);
+s32 host_int_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress);
/**
* @brief removes WEP key
* @details valid only in BSS STA mode if External Supplicant support is enabled.
@@ -406,7 +406,7 @@ s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress);
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_remove_wep_key(tstrWILC_WFIDrv *hWFIDrv, u8 u8Index);
+s32 host_int_remove_wep_key(struct host_if_drv *hWFIDrv, u8 u8Index);
/**
* @brief sets WEP deafault key
* @details Sets the index of the WEP encryption key in use,
@@ -419,7 +419,7 @@ s32 host_int_remove_wep_key(tstrWILC_WFIDrv *hWFIDrv, u8 u8Index);
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_set_WEPDefaultKeyID(tstrWILC_WFIDrv *hWFIDrv, u8 u8Index);
+s32 host_int_set_WEPDefaultKeyID(struct host_if_drv *hWFIDrv, u8 u8Index);
/**
* @brief sets WEP deafault key
@@ -440,7 +440,7 @@ s32 host_int_set_WEPDefaultKeyID(tstrWILC_WFIDrv *hWFIDrv, u8 u8Index);
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_add_wep_key_bss_sta(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx);
+s32 host_int_add_wep_key_bss_sta(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx);
/**
* @brief host_int_add_wep_key_bss_ap
* @details valid only in AP mode if External Supplicant support is enabled.
@@ -455,7 +455,7 @@ s32 host_int_add_wep_key_bss_sta(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey,
* @date 28 Feb 2013
* @version 1.0
*/
-s32 host_int_add_wep_key_bss_ap(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
+s32 host_int_add_wep_key_bss_ap(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
/**
* @brief adds ptk Key
@@ -473,7 +473,7 @@ s32 host_int_add_wep_key_bss_ap(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_add_ptk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
+s32 host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx);
/**
@@ -488,7 +488,7 @@ s32 host_int_add_ptk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
* @date 15 April 2013
* @version 1.0
*/
-s32 host_int_get_inactive_time(tstrWILC_WFIDrv *hWFIDrv, const u8 *mac, u32 *pu32InactiveTime);
+s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac, u32 *pu32InactiveTime);
/**
* @brief adds Rx GTk Key
@@ -506,7 +506,7 @@ s32 host_int_get_inactive_time(tstrWILC_WFIDrv *hWFIDrv, const u8 *mac, u32 *pu3
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_add_rx_gtk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen,
+s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen,
u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode);
@@ -527,7 +527,7 @@ s32 host_int_add_rx_gtk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKe
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_add_tx_gtk(tstrWILC_WFIDrv *hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx);
+s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx);
/**
* @brief caches the pmkid
@@ -550,7 +550,7 @@ s32 host_int_add_tx_gtk(tstrWILC_WFIDrv *hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8
* @version 1.0
*/
-s32 host_int_set_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, struct host_if_pmkid_attr *pu8PmkidInfoArray);
+s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv, struct host_if_pmkid_attr *pu8PmkidInfoArray);
/**
* @brief gets the cached the pmkid info
* @details valid only in BSS STA mode if External Supplicant
@@ -574,7 +574,7 @@ s32 host_int_set_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, struct host_if_pmkid_attr
* @version 1.0
*/
-s32 host_int_get_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PmkidInfoArray,
+s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray,
u32 u32PmkidInfoLen);
/**
@@ -591,7 +591,7 @@ s32 host_int_get_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PmkidInfoArray,
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_set_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PassPhrase,
+s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv, u8 *pu8PassPhrase,
u8 u8Psklength);
/**
* @brief gets the pass phrase
@@ -607,7 +607,7 @@ s32 host_int_set_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PassPh
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv,
+s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
u8 *pu8PassPhrase, u8 u8Psklength);
/**
@@ -621,7 +621,7 @@ s32 host_int_get_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv,
* @date 19 April 2012
* @version 1.0
*/
-s32 host_int_get_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress);
+s32 host_int_get_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
/**
* @brief sets mac address
@@ -634,7 +634,7 @@ s32 host_int_get_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress);
* @date 16 July 2012
* @version 1.0
*/
-s32 host_int_set_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress);
+s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
/**
* @brief wait until msg q is empty
@@ -665,7 +665,7 @@ int host_int_wait_msg_queue_idle(void);
* @version 1.0
*/
-s32 host_int_set_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 scanSource);
+s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
/**
* @brief gets scan source of the last scan
* @details
@@ -681,7 +681,7 @@ s32 host_int_set_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 scanSource);
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ScanSource);
+s32 host_int_get_start_scan_req(struct host_if_drv *hWFIDrv, u8 *pu8ScanSource);
/**
* @brief sets a join request
@@ -695,7 +695,7 @@ s32 host_int_get_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ScanSource);
* @version 1.0
*/
-s32 host_int_set_join_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8bssid,
+s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid,
const u8 *pu8ssid, size_t ssidLen,
const u8 *pu8IEs, size_t IEsLen,
wilc_connect_result pfConnectResult, void *pvUserArg,
@@ -715,7 +715,7 @@ s32 host_int_set_join_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8bssid,
* @version 8.0
*/
-s32 host_int_flush_join_req(tstrWILC_WFIDrv *hWFIDrv);
+s32 host_int_flush_join_req(struct host_if_drv *hWFIDrv);
/**
@@ -729,7 +729,7 @@ s32 host_int_flush_join_req(tstrWILC_WFIDrv *hWFIDrv);
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_disconnect(tstrWILC_WFIDrv *hWFIDrv, u16 u16ReasonCode);
+s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode);
/**
* @brief disconnects a sta
@@ -742,7 +742,7 @@ s32 host_int_disconnect(tstrWILC_WFIDrv *hWFIDrv, u16 u16ReasonCode);
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_disconnect_station(tstrWILC_WFIDrv *hWFIDrv, u8 assoc_id);
+s32 host_int_disconnect_station(struct host_if_drv *hWFIDrv, u8 assoc_id);
/**
* @brief gets a Association request info
* @details
@@ -769,7 +769,7 @@ s32 host_int_disconnect_station(tstrWILC_WFIDrv *hWFIDrv, u8 assoc_id);
* @version 1.0
*/
-s32 host_int_get_assoc_req_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocReqInfo,
+s32 host_int_get_assoc_req_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocReqInfo,
u32 u32AssocReqInfoLen);
/**
* @brief gets a Association Response info
@@ -783,7 +783,7 @@ s32 host_int_get_assoc_req_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocReqInfo,
* @version 1.0
*/
-s32 host_int_get_assoc_res_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocRespInfo,
+s32 host_int_get_assoc_res_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocRespInfo,
u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen);
/**
* @brief gets a Association Response info
@@ -800,7 +800,7 @@ s32 host_int_get_assoc_res_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocRespInfo,
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
+s32 host_int_get_rx_power_level(struct host_if_drv *hWFIDrv, u8 *pu8RxPowerLevel,
u32 u32RxPowerLevelLen);
/**
@@ -818,7 +818,7 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
* @date 8 March 2012
* @version 1.0
*/
-int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel);
+int host_int_set_mac_chnl_num(struct host_if_drv *wfi_drv, u8 channel);
/**
* @brief gets the current channel index
@@ -835,7 +835,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel);
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_host_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ChNo);
+s32 host_int_get_host_chnl_num(struct host_if_drv *hWFIDrv, u8 *pu8ChNo);
/**
* @brief gets the sta rssi
* @details gets the currently maintained RSSI value for the station.
@@ -849,8 +849,8 @@ s32 host_int_get_host_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ChNo);
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_get_rssi(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8Rssi);
-s32 host_int_get_link_speed(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8lnkspd);
+s32 host_int_get_rssi(struct host_if_drv *hWFIDrv, s8 *ps8Rssi);
+s32 host_int_get_link_speed(struct host_if_drv *hWFIDrv, s8 *ps8lnkspd);
/**
* @brief scans a set of channels
* @details
@@ -868,7 +868,7 @@ s32 host_int_get_link_speed(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8lnkspd);
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_scan(tstrWILC_WFIDrv *hWFIDrv, u8 u8ScanSource,
+s32 host_int_scan(struct host_if_drv *hWFIDrv, u8 u8ScanSource,
u8 u8ScanType, u8 *pu8ChnlFreqList,
u8 u8ChnlListLen, const u8 *pu8IEs,
size_t IEsLen, wilc_scan_result ScanResult,
@@ -885,7 +885,7 @@ s32 host_int_scan(tstrWILC_WFIDrv *hWFIDrv, u8 u8ScanSource,
* @date 8 March 2012
* @version 1.0
*/
-s32 hif_set_cfg(tstrWILC_WFIDrv *hWFIDrv, struct cfg_param_val *pstrCfgParamVal);
+s32 hif_set_cfg(struct host_if_drv *hWFIDrv, struct cfg_param_val *pstrCfgParamVal);
/**
* @brief gets configuration wids values
@@ -899,7 +899,7 @@ s32 hif_set_cfg(tstrWILC_WFIDrv *hWFIDrv, struct cfg_param_val *pstrCfgParamVal)
* @date 8 March 2012
* @version 1.0
*/
-s32 hif_get_cfg(tstrWILC_WFIDrv *hWFIDrv, u16 u16WID, u16 *pu16WID_Value);
+s32 hif_get_cfg(struct host_if_drv *hWFIDrv, u16 u16WID, u16 *pu16WID_Value);
/*****************************************************************************/
/* Notification Functions */
/*****************************************************************************/
@@ -946,7 +946,7 @@ void host_int_send_network_info_to_host
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_init(tstrWILC_WFIDrv **phWFIDrv);
+s32 host_int_init(struct host_if_drv **phWFIDrv);
/**
* @brief host interface initialization function
@@ -957,7 +957,7 @@ s32 host_int_init(tstrWILC_WFIDrv **phWFIDrv);
* @date 8 March 2012
* @version 1.0
*/
-s32 host_int_deinit(tstrWILC_WFIDrv *hWFIDrv);
+s32 host_int_deinit(struct host_if_drv *hWFIDrv);
/*!
@@ -982,7 +982,7 @@ s32 host_int_deinit(tstrWILC_WFIDrv *hWFIDrv);
* @version 1.0 Description
*
*/
-s32 host_int_add_beacon(tstrWILC_WFIDrv *hWFIDrv, u32 u32Interval,
+s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,
u32 u32DTIMPeriod,
u32 u32HeadLen, u8 *pu8Head,
u32 u32TailLen, u8 *pu8tail);
@@ -1000,7 +1000,7 @@ s32 host_int_add_beacon(tstrWILC_WFIDrv *hWFIDrv, u32 u32Interval,
* @date 10 Julys 2012
* @version 1.0 Description
*/
-s32 host_int_del_beacon(tstrWILC_WFIDrv *hWFIDrv);
+s32 host_int_del_beacon(struct host_if_drv *hWFIDrv);
/*!
* @fn s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv,
@@ -1016,7 +1016,7 @@ s32 host_int_del_beacon(tstrWILC_WFIDrv *hWFIDrv);
* @date 12 July 2012
* @version 1.0 Description
*/
-s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv,
+s32 host_int_add_station(struct host_if_drv *hWFIDrv,
struct add_sta_param *pstrStaParams);
/*!
@@ -1032,7 +1032,7 @@ s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv,
* @date 09 April 2014
* @version 1.0 Description
*/
-s32 host_int_del_allstation(tstrWILC_WFIDrv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]);
+s32 host_int_del_allstation(struct host_if_drv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]);
/*!
* @fn s32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, u8* pu8MacAddr)
@@ -1047,7 +1047,7 @@ s32 host_int_del_allstation(tstrWILC_WFIDrv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN])
* @date 15 July 2012
* @version 1.0 Description
*/
-s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8MacAddr);
+s32 host_int_del_station(struct host_if_drv *hWFIDrv, const u8 *pu8MacAddr);
/*!
* @fn s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv,
@@ -1063,7 +1063,7 @@ s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8MacAddr);
* @date 15 July 2012
* @version 1.0 Description
*/
-s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv,
+s32 host_int_edit_station(struct host_if_drv *hWFIDrv,
struct add_sta_param *pstrStaParams);
/*!
@@ -1081,7 +1081,7 @@ s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv,
* @date 24 November 2012
* @version 1.0 Description
*/
-s32 host_int_set_power_mgmt(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32Timeout);
+s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32Timeout);
/* @param[in,out] hWFIDrv handle to the wifi driver
* @param[in] bIsEnabled TRUE if enabled, FALSE otherwise
* @param[in] u8count count of mac address entries in the filter table
@@ -1093,7 +1093,7 @@ s32 host_int_set_power_mgmt(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32Ti
* @date 24 November 2012
* @version 1.0 Description
*/
-s32 host_int_setup_multicast_filter(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32count);
+s32 host_int_setup_multicast_filter(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32count);
/**
* @brief host_int_setup_ipaddress
* @details set IP address on firmware
@@ -1103,7 +1103,7 @@ s32 host_int_setup_multicast_filter(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u
* @date
* @version 1.0
*/
-s32 host_int_setup_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
+s32 host_int_setup_ipaddress(struct host_if_drv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
/**
@@ -1115,7 +1115,7 @@ s32 host_int_setup_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
* @date
* @version 1.0
*/
-s32 host_int_delBASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID);
+s32 host_int_delBASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID);
/**
* @brief host_int_delBASession
@@ -1126,7 +1126,7 @@ s32 host_int_delBASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID);
* @date
* @version 1.0
*/
-s32 host_int_del_All_Rx_BASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID);
+s32 host_int_del_All_Rx_BASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID);
/**
@@ -1138,7 +1138,7 @@ s32 host_int_del_All_Rx_BASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char T
* @date
* @version 1.0
*/
-s32 host_int_get_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
+s32 host_int_get_ipaddress(struct host_if_drv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
/**
* @brief host_int_remain_on_channel
@@ -1149,7 +1149,7 @@ s32 host_int_get_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
* @date
* @version 1.0
*/
-s32 host_int_remain_on_channel(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, wilc_remain_on_chan_expired RemainOnChanExpired, wilc_remain_on_chan_ready RemainOnChanReady, void *pvUserArg);
+s32 host_int_remain_on_channel(struct host_if_drv *hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, wilc_remain_on_chan_expired RemainOnChanExpired, wilc_remain_on_chan_ready RemainOnChanReady, void *pvUserArg);
/**
* @brief host_int_ListenStateExpired
@@ -1165,7 +1165,7 @@ s32 host_int_remain_on_channel(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID, u32 u
* @date
* @version 1.0
*/
-s32 host_int_ListenStateExpired(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID);
+s32 host_int_ListenStateExpired(struct host_if_drv *hWFIDrv, u32 u32SessionID);
/**
* @brief host_int_frame_register
@@ -1176,7 +1176,7 @@ s32 host_int_ListenStateExpired(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID);
* @date
* @version 1.0
*/
-s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bReg);
+s32 host_int_frame_register(struct host_if_drv *hWFIDrv, u16 u16FrameType, bool bReg);
/**
* @brief host_int_set_wfi_drv_handler
* @details
@@ -1186,13 +1186,13 @@ s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bRe
* @date
* @version 1.0
*/
-s32 host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address);
-s32 host_int_set_operation_mode(tstrWILC_WFIDrv *hWFIDrv, u32 u32mode);
+s32 host_int_set_wfi_drv_handler(struct host_if_drv *u32address);
+s32 host_int_set_operation_mode(struct host_if_drv *hWFIDrv, u32 u32mode);
-static s32 Handle_ScanDone(tstrWILC_WFIDrv *drvHandler, tenuScanEvent enuEvent);
+static s32 Handle_ScanDone(struct host_if_drv *drvHandler, tenuScanEvent enuEvent);
void host_int_freeJoinParams(void *pJoinParams);
-s32 host_int_get_statistics(tstrWILC_WFIDrv *hWFIDrv, tstrStatistics *pstrStatistics);
+s32 host_int_get_statistics(struct host_if_drv *hWFIDrv, tstrStatistics *pstrStatistics);
#endif
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index f6a6287..fe4f305 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -132,7 +132,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
{
struct in_ifaddr *dev_iface = (struct in_ifaddr *)ptr;
struct wilc_priv *priv;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
struct net_device *dev;
u8 *pIP_Add_buff;
perInterface_wlan_t *nic;
@@ -159,7 +159,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
PRINT_D(GENERIC_DBG, "No Wireless Priv\n");
return NOTIFY_DONE;
}
- pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
+ pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
nic = netdev_priv(dev);
if (nic == NULL || pstrWFIDrv == NULL) {
PRINT_D(GENERIC_DBG, "No Wireless Priv\n");
@@ -633,13 +633,13 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_n
unsigned char mac_add[] = {0x00, 0x80, 0xC2, 0x5E, 0xa2, 0xff};
struct wilc_priv *priv;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
PRINT_D(TX_DBG, "Start configuring Firmware\n");
get_random_bytes(&mac_add[5], 1);
get_random_bytes(&mac_add[4], 1);
priv = wiphy_priv(dev->ieee80211_ptr->wiphy);
- pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
+ pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
PRINT_D(INIT_DBG, "Host = %p\n", pstrWFIDrv);
PRINT_D(INIT_DBG, "MAC address is : %02x-%02x-%02x-%02x-%02x-%02x\n", mac_add[0], mac_add[1], mac_add[2], mac_add[3], mac_add[4], mac_add[5]);
@@ -1364,11 +1364,11 @@ static void wilc_set_multicast_list(struct net_device *dev)
struct netdev_hw_addr *ha;
struct wilc_priv *priv;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
int i = 0;
priv = wiphy_priv(dev->ieee80211_ptr->wiphy);
- pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
+ pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
if (!dev)
return;
@@ -1497,7 +1497,7 @@ int mac_close(struct net_device *ndev)
{
struct wilc_priv *priv;
perInterface_wlan_t *nic;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
nic = netdev_priv(ndev);
@@ -1513,7 +1513,7 @@ int mac_close(struct net_device *ndev)
return 0;
}
- pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
+ pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
PRINT_D(GENERIC_DBG, "Mac close\n");
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 2f67546..fb79612 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -539,14 +539,14 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent,
{
struct wilc_priv *priv;
struct net_device *dev;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
u8 NullBssid[ETH_ALEN] = {0};
connecting = 0;
priv = (struct wilc_priv *)pUserVoid;
dev = priv->dev;
- pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
+ pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
if (enuConnDisconnEvent == CONN_DISCONN_EVENT_CONN_RESP) {
/*Initialization*/
@@ -792,13 +792,13 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
char *pcwpa_version = NULL;
struct wilc_priv *priv;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
tstrNetworkInfo *pstrNetworkInfo = NULL;
connecting = 1;
priv = wiphy_priv(wiphy);
- pstrWFIDrv = (tstrWILC_WFIDrv *)(priv->hWILCWFIDrv);
+ pstrWFIDrv = (struct host_if_drv *)(priv->hWILCWFIDrv);
host_int_set_wfi_drv_handler(priv->hWILCWFIDrv);
@@ -1034,14 +1034,14 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_co
{
s32 s32Error = 0;
struct wilc_priv *priv;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
u8 NullBssid[ETH_ALEN] = {0};
connecting = 0;
priv = wiphy_priv(wiphy);
/*Invalidate u8WLANChannel value on wlan0 disconnect*/
- pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
+ pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
if (!pstrWFIDrv->u8P2PConnect)
u8WLANChannel = INVALID_CHANNEL;
linux_wlan_set_bssid(priv->dev, NullBssid);
@@ -1948,12 +1948,12 @@ void WILC_WFI_p2p_rx (struct net_device *dev, u8 *buff, u32 size)
struct wilc_priv *priv;
u32 header, pkt_offset;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
u32 i = 0;
s32 s32Freq;
priv = wiphy_priv(dev->ieee80211_ptr->wiphy);
- pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
+ pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
/* Get WILC header */
memcpy(&header, (buff - HOST_HDR_OFFSET), HOST_HDR_OFFSET);
@@ -2249,14 +2249,14 @@ static int mgmt_tx(struct wiphy *wiphy,
struct p2p_mgmt_data *mgmt_tx;
struct wilc_priv *priv;
s32 s32Error = 0;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
u32 i;
perInterface_wlan_t *nic;
u32 buf_len = len + sizeof(u8P2P_vendorspec) + sizeof(u8P2Plocalrandom);
nic = netdev_priv(wdev->netdev);
priv = wiphy_priv(wiphy);
- pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
+ pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
*cookie = (unsigned long)buf;
priv->u64tx_cookie = *cookie;
@@ -2394,10 +2394,10 @@ static int mgmt_tx_cancel_wait(struct wiphy *wiphy,
u64 cookie)
{
struct wilc_priv *priv;
- tstrWILC_WFIDrv *pstrWFIDrv;
+ struct host_if_drv *pstrWFIDrv;
priv = wiphy_priv(wiphy);
- pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
+ pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
PRINT_D(GENERIC_DBG, "Tx Cancel wait :%lu\n", jiffies);
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index cb21968..8bcfcc2 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -121,7 +121,7 @@ struct wilc_priv {
spinlock_t lock;
struct net_device *dev;
struct napi_struct napi;
- tstrWILC_WFIDrv *hWILCWFIDrv;
+ struct host_if_drv *hWILCWFIDrv;
struct host_if_pmkid_attr pmkid_list;
struct WILC_WFI_stats netstats;
u8 WILC_WFI_wep_default;
@@ -151,7 +151,7 @@ typedef struct {
typedef struct {
u8 aSrcAddress[ETH_ALEN];
u8 aBSSID[ETH_ALEN];
- tstrWILC_WFIDrv *drvHandler;
+ struct host_if_drv *drvHandler;
struct net_device *wilc_netdev;
} tstrInterfaceInfo;
typedef struct {
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/6] staging: wilc1000: rename the member variable, drvHandler of host_if_msg
2015-10-05 10:28 [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv Tony Cho
@ 2015-10-05 10:28 ` Tony Cho
2015-10-05 10:28 ` [PATCH 3/6] staging: wilc1000: host_interface.c : removes unused local variables Tony Cho
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Tony Cho @ 2015-10-05 10:28 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
adham.abozaeid, Nicolas.FERRE
From: Leo Kim <leo.kim@atmel.com>
This patch renames drvHandler of struct host_if_msg to drv.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
drivers/staging/wilc1000/host_interface.c | 168 +++++++++++++++---------------
1 file changed, 84 insertions(+), 84 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 66c37ef..d59fcaa 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -402,7 +402,7 @@ union message_body {
struct host_if_msg {
u16 id; /*!< Message ID */
union message_body body; /*!< Message body */
- struct host_if_drv *drvHandler;
+ struct host_if_drv *drv;
};
typedef struct _tstrWidJoinReqExt {
@@ -3655,7 +3655,7 @@ static void ListenTimerCB(unsigned long arg)
/* prepare the Timer Callback message */
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_LISTEN_TIMER_FIRED;
- msg.drvHandler = pstrWFIDrv;
+ msg.drv = pstrWFIDrv;
msg.body.remain_on_ch.u32ListenSessionID = pstrWFIDrv->strHostIfRemainOnChan.u32ListenSessionID;
/* send the message */
@@ -3913,7 +3913,7 @@ static int hostIFthread(void *pvArg)
while (1) {
wilc_mq_recv(&gMsgQHostIF, &msg, sizeof(struct host_if_msg), &u32Ret);
- pstrWFIDrv = (struct host_if_drv *)msg.drvHandler;
+ pstrWFIDrv = (struct host_if_drv *)msg.drv;
if (msg.id == HOST_IF_MSG_EXIT) {
PRINT_D(GENERIC_DBG, "THREAD: Exiting HostIfThread\n");
break;
@@ -3941,40 +3941,40 @@ static int hostIFthread(void *pvArg)
break;
case HOST_IF_MSG_SCAN:
- Handle_Scan(msg.drvHandler, &msg.body.scan_info);
+ Handle_Scan(msg.drv, &msg.body.scan_info);
break;
case HOST_IF_MSG_CONNECT:
- Handle_Connect(msg.drvHandler, &msg.body.con_info);
+ Handle_Connect(msg.drv, &msg.body.con_info);
break;
case HOST_IF_MSG_FLUSH_CONNECT:
- Handle_FlushConnect(msg.drvHandler);
+ Handle_FlushConnect(msg.drv);
break;
case HOST_IF_MSG_RCVD_NTWRK_INFO:
- Handle_RcvdNtwrkInfo(msg.drvHandler, &msg.body.net_info);
+ Handle_RcvdNtwrkInfo(msg.drv, &msg.body.net_info);
break;
case HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO:
- Handle_RcvdGnrlAsyncInfo(msg.drvHandler, &msg.body.async_info);
+ Handle_RcvdGnrlAsyncInfo(msg.drv, &msg.body.async_info);
break;
case HOST_IF_MSG_KEY:
- Handle_Key(msg.drvHandler, &msg.body.key_info);
+ Handle_Key(msg.drv, &msg.body.key_info);
break;
case HOST_IF_MSG_CFG_PARAMS:
- Handle_CfgParam(msg.drvHandler, &msg.body.cfg_info);
+ Handle_CfgParam(msg.drv, &msg.body.cfg_info);
break;
case HOST_IF_MSG_SET_CHANNEL:
- Handle_SetChannel(msg.drvHandler, &msg.body.channel_info);
+ Handle_SetChannel(msg.drv, &msg.body.channel_info);
break;
case HOST_IF_MSG_DISCONNECT:
- Handle_Disconnect(msg.drvHandler);
+ Handle_Disconnect(msg.drv);
break;
case HOST_IF_MSG_RCVD_SCAN_COMPLETE:
@@ -3985,124 +3985,124 @@ static int hostIFthread(void *pvArg)
if (!linux_wlan_get_num_conn_ifcs())
chip_sleep_manually(INFINITE_SLEEP_TIME);
- Handle_ScanDone(msg.drvHandler, SCAN_EVENT_DONE);
+ Handle_ScanDone(msg.drv, SCAN_EVENT_DONE);
if (pstrWFIDrv->u8RemainOnChan_pendingreq)
- Handle_RemainOnChan(msg.drvHandler, &msg.body.remain_on_ch);
+ Handle_RemainOnChan(msg.drv, &msg.body.remain_on_ch);
break;
case HOST_IF_MSG_GET_RSSI:
- Handle_GetRssi(msg.drvHandler);
+ Handle_GetRssi(msg.drv);
break;
case HOST_IF_MSG_GET_LINKSPEED:
- Handle_GetLinkspeed(msg.drvHandler);
+ Handle_GetLinkspeed(msg.drv);
break;
case HOST_IF_MSG_GET_STATISTICS:
- Handle_GetStatistics(msg.drvHandler, (tstrStatistics *)msg.body.data);
+ Handle_GetStatistics(msg.drv, (tstrStatistics *)msg.body.data);
break;
case HOST_IF_MSG_GET_CHNL:
- Handle_GetChnl(msg.drvHandler);
+ Handle_GetChnl(msg.drv);
break;
case HOST_IF_MSG_ADD_BEACON:
- Handle_AddBeacon(msg.drvHandler, &msg.body.beacon_info);
+ Handle_AddBeacon(msg.drv, &msg.body.beacon_info);
break;
case HOST_IF_MSG_DEL_BEACON:
- Handle_DelBeacon(msg.drvHandler);
+ Handle_DelBeacon(msg.drv);
break;
case HOST_IF_MSG_ADD_STATION:
- Handle_AddStation(msg.drvHandler, &msg.body.add_sta_info);
+ Handle_AddStation(msg.drv, &msg.body.add_sta_info);
break;
case HOST_IF_MSG_DEL_STATION:
- Handle_DelStation(msg.drvHandler, &msg.body.del_sta_info);
+ Handle_DelStation(msg.drv, &msg.body.del_sta_info);
break;
case HOST_IF_MSG_EDIT_STATION:
- Handle_EditStation(msg.drvHandler, &msg.body.edit_sta_info);
+ Handle_EditStation(msg.drv, &msg.body.edit_sta_info);
break;
case HOST_IF_MSG_GET_INACTIVETIME:
- Handle_Get_InActiveTime(msg.drvHandler, &msg.body.mac_info);
+ Handle_Get_InActiveTime(msg.drv, &msg.body.mac_info);
break;
case HOST_IF_MSG_SCAN_TIMER_FIRED:
PRINT_D(HOSTINF_DBG, "Scan Timeout\n");
- Handle_ScanDone(msg.drvHandler, SCAN_EVENT_ABORTED);
+ Handle_ScanDone(msg.drv, SCAN_EVENT_ABORTED);
break;
case HOST_IF_MSG_CONNECT_TIMER_FIRED:
PRINT_D(HOSTINF_DBG, "Connect Timeout\n");
- Handle_ConnectTimeout(msg.drvHandler);
+ Handle_ConnectTimeout(msg.drv);
break;
case HOST_IF_MSG_POWER_MGMT:
- Handle_PowerManagement(msg.drvHandler, &msg.body.pwr_mgmt_info);
+ Handle_PowerManagement(msg.drv, &msg.body.pwr_mgmt_info);
break;
case HOST_IF_MSG_SET_WFIDRV_HANDLER:
- Handle_SetWfiDrvHandler(msg.drvHandler,
+ Handle_SetWfiDrvHandler(msg.drv,
&msg.body.drv);
break;
case HOST_IF_MSG_SET_OPERATION_MODE:
- Handle_SetOperationMode(msg.drvHandler, &msg.body.mode);
+ Handle_SetOperationMode(msg.drv, &msg.body.mode);
break;
case HOST_IF_MSG_SET_IPADDRESS:
PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n");
- Handle_set_IPAddress(msg.drvHandler, msg.body.ip_info.au8IPAddr, msg.body.ip_info.idx);
+ Handle_set_IPAddress(msg.drv, msg.body.ip_info.au8IPAddr, msg.body.ip_info.idx);
break;
case HOST_IF_MSG_GET_IPADDRESS:
PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n");
- Handle_get_IPAddress(msg.drvHandler, msg.body.ip_info.au8IPAddr, msg.body.ip_info.idx);
+ Handle_get_IPAddress(msg.drv, msg.body.ip_info.au8IPAddr, msg.body.ip_info.idx);
break;
case HOST_IF_MSG_SET_MAC_ADDRESS:
- Handle_SetMacAddress(msg.drvHandler, &msg.body.set_mac_info);
+ Handle_SetMacAddress(msg.drv, &msg.body.set_mac_info);
break;
case HOST_IF_MSG_GET_MAC_ADDRESS:
- Handle_GetMacAddress(msg.drvHandler, &msg.body.get_mac_info);
+ Handle_GetMacAddress(msg.drv, &msg.body.get_mac_info);
break;
case HOST_IF_MSG_REMAIN_ON_CHAN:
PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_REMAIN_ON_CHAN\n");
- Handle_RemainOnChan(msg.drvHandler, &msg.body.remain_on_ch);
+ Handle_RemainOnChan(msg.drv, &msg.body.remain_on_ch);
break;
case HOST_IF_MSG_REGISTER_FRAME:
PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_REGISTER_FRAME\n");
- Handle_RegisterFrame(msg.drvHandler, &msg.body.reg_frame);
+ Handle_RegisterFrame(msg.drv, &msg.body.reg_frame);
break;
case HOST_IF_MSG_LISTEN_TIMER_FIRED:
- Handle_ListenStateExpired(msg.drvHandler, &msg.body.remain_on_ch);
+ Handle_ListenStateExpired(msg.drv, &msg.body.remain_on_ch);
break;
case HOST_IF_MSG_SET_MULTICAST_FILTER:
PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_MULTICAST_FILTER\n");
- Handle_SetMulticastFilter(msg.drvHandler, &msg.body.multicast_info);
+ Handle_SetMulticastFilter(msg.drv, &msg.body.multicast_info);
break;
case HOST_IF_MSG_ADD_BA_SESSION:
- Handle_AddBASession(msg.drvHandler, &msg.body.session_info);
+ Handle_AddBASession(msg.drv, &msg.body.session_info);
break;
case HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS:
- Handle_DelAllRxBASessions(msg.drvHandler, &msg.body.session_info);
+ Handle_DelAllRxBASessions(msg.drv, &msg.body.session_info);
break;
case HOST_IF_MSG_DEL_ALL_STA:
- Handle_DelAllSta(msg.drvHandler, &msg.body.del_all_sta_info);
+ Handle_DelAllSta(msg.drv, &msg.body.del_all_sta_info);
break;
default:
@@ -4123,7 +4123,7 @@ static void TimerCB_Scan(unsigned long arg)
/* prepare the Timer Callback message */
memset(&msg, 0, sizeof(struct host_if_msg));
- msg.drvHandler = pvArg;
+ msg.drv = pvArg;
msg.id = HOST_IF_MSG_SCAN_TIMER_FIRED;
/* send the message */
@@ -4137,7 +4137,7 @@ static void TimerCB_Connect(unsigned long arg)
/* prepare the Timer Callback message */
memset(&msg, 0, sizeof(struct host_if_msg));
- msg.drvHandler = pvArg;
+ msg.drv = pvArg;
msg.id = HOST_IF_MSG_CONNECT_TIMER_FIRED;
/* send the message */
@@ -4206,7 +4206,7 @@ s32 host_int_remove_wep_key(struct host_if_drv *hWFIDrv, u8 u8keyIdx)
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.enuKeyType = WEP;
msg.body.key_info.u8KeyAction = REMOVEKEY;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
@@ -4254,7 +4254,7 @@ s32 host_int_set_WEPDefaultKeyID(struct host_if_drv *hWFIDrv, u8 u8Index)
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.enuKeyType = WEP;
msg.body.key_info.u8KeyAction = DEFAULTKEY;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
msg.body.key_info.
@@ -4308,7 +4308,7 @@ s32 host_int_add_wep_key_bss_sta(struct host_if_drv *hWFIDrv, const u8 *pu8WepKe
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.enuKeyType = WEP;
msg.body.key_info.u8KeyAction = ADDKEY;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
msg.body.key_info.
@@ -4374,7 +4374,7 @@ s32 host_int_add_wep_key_bss_ap(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.enuKeyType = WEP;
msg.body.key_info.u8KeyAction = ADDKEY_AP;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
msg.body.key_info.
@@ -4490,7 +4490,7 @@ s32 host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeyl
uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode = u8Ciphermode;
msg.body.key_info.
uniHostIFkeyAttr.strHostIFwpaAttr.pu8macaddr = mac_addr;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -4551,7 +4551,7 @@ s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk, u8 u8Gt
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.enuKeyType = WPARxGtk;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
if (mode == AP_MODE) {
msg.body.key_info.u8KeyAction = ADDKEY_AP;
@@ -4641,7 +4641,7 @@ s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv, struct host_if_pmkid_at
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.enuKeyType = PMKSA;
msg.body.key_info.u8KeyAction = ADDKEY;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
for (i = 0; i < pu8PmkidInfoArray->numpmkid; i++) {
@@ -4747,7 +4747,7 @@ s32 host_int_get_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress)
msg.id = HOST_IF_MSG_GET_MAC_ADDRESS;
msg.body.get_mac_info.u8MacAddress = pu8MacAddress;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
if (s32Error) {
@@ -4781,7 +4781,7 @@ s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_MAC_ADDRESS;
memcpy(msg.body.set_mac_info.u8MacAddress, pu8MacAddress, ETH_ALEN);
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
if (s32Error)
@@ -4927,7 +4927,7 @@ s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid,
msg.body.con_info.pfConnectResult = pfConnectResult;
msg.body.con_info.pvUserArg = pvUserArg;
msg.body.con_info.pJoinParams = pJoinParams;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
if (pu8bssid != NULL) {
msg.body.con_info.pu8bssid = kmalloc(6, GFP_KERNEL); /* will be deallocated by the receiving thread */
@@ -4999,7 +4999,7 @@ s32 host_int_flush_join_req(struct host_if_drv *hWFIDrv)
}
msg.id = HOST_IF_MSG_FLUSH_CONNECT;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -5037,7 +5037,7 @@ s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_DISCONNECT;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -5218,7 +5218,7 @@ int host_int_set_mac_chnl_num(struct host_if_drv *wfi_drv, u8 channel)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_CHANNEL;
msg.body.channel_info.u8SetChan = channel;
- msg.drvHandler = wfi_drv;
+ msg.drv = wfi_drv;
result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
if (result) {
@@ -5264,7 +5264,7 @@ s32 host_int_set_wfi_drv_handler(struct host_if_drv *u32address)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_WFIDRV_HANDLER;
msg.body.drv.u32Address = get_id_from_handler(u32address);
- msg.drvHandler = u32address;
+ msg.drv = u32address;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
if (s32Error) {
@@ -5289,7 +5289,7 @@ s32 host_int_set_operation_mode(struct host_if_drv *hWFIDrv, u32 u32mode)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_OPERATION_MODE;
msg.body.mode.u32Mode = u32mode;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
if (s32Error) {
@@ -5330,7 +5330,7 @@ s32 host_int_get_host_chnl_num(struct host_if_drv *hWFIDrv, u8 *pu8ChNo)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_GET_CHNL;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -5418,7 +5418,7 @@ s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac, u32 *
mac, ETH_ALEN);
msg.id = HOST_IF_MSG_GET_INACTIVETIME;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -5499,7 +5499,7 @@ s32 host_int_get_rssi(struct host_if_drv *hWFIDrv, s8 *ps8Rssi)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_GET_RSSI;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -5536,7 +5536,7 @@ s32 host_int_get_link_speed(struct host_if_drv *hWFIDrv, s8 *ps8lnkspd)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_GET_LINKSPEED;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -5571,7 +5571,7 @@ s32 host_int_get_statistics(struct host_if_drv *hWFIDrv, tstrStatistics *pstrSta
msg.id = HOST_IF_MSG_GET_STATISTICS;
msg.body.data = (char *)pstrStatistics;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
if (s32Error) {
@@ -5629,7 +5629,7 @@ s32 host_int_scan(struct host_if_drv *hWFIDrv, u8 u8ScanSource,
} else
PRINT_D(HOSTINF_DBG, "pstrHiddenNetwork IS EQUAL TO NULL\n");
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
msg.body.scan_info.u8ScanSource = u8ScanSource;
msg.body.scan_info.u8ScanType = u8ScanType;
msg.body.scan_info.pfScanResult = ScanResult;
@@ -5689,7 +5689,7 @@ s32 hif_set_cfg(struct host_if_drv *hWFIDrv, struct cfg_param_val *pstrCfgParamV
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_CFG_PARAMS;
msg.body.cfg_info.pstrCfgParamVal = *pstrCfgParamVal;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -5860,7 +5860,7 @@ static void GetPeriodicRSSI(unsigned long arg)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_GET_RSSI;
- msg.drvHandler = pstrWFIDrv;
+ msg.drv = pstrWFIDrv;
/* send the message */
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -6068,7 +6068,7 @@ s32 host_int_deinit(struct host_if_drv *hWFIDrv)
/* msleep(HOST_IF_CONNECT_TIMEOUT+1000); */
}
msg.id = HOST_IF_MSG_EXIT;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -6134,7 +6134,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_RCVD_NTWRK_INFO;
- msg.drvHandler = pstrWFIDrv;
+ msg.drv = pstrWFIDrv;
msg.body.net_info.u32Length = u32Length;
msg.body.net_info.pu8Buffer = kmalloc(u32Length, GFP_KERNEL); /* will be deallocated by the receiving thread */
@@ -6190,7 +6190,7 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)
msg.id = HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO;
- msg.drvHandler = pstrWFIDrv;
+ msg.drv = pstrWFIDrv;
msg.body.async_info.u32Length = u32Length;
@@ -6237,7 +6237,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_RCVD_SCAN_COMPLETE;
- msg.drvHandler = pstrWFIDrv;
+ msg.drv = pstrWFIDrv;
/* will be deallocated by the receiving thread */
@@ -6295,7 +6295,7 @@ s32 host_int_remain_on_channel(struct host_if_drv *hWFIDrv, u32 u32SessionID, u3
msg.body.remain_on_ch.pVoid = pvUserArg;
msg.body.remain_on_ch.u32duration = u32duration;
msg.body.remain_on_ch.u32ListenSessionID = u32SessionID;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
if (s32Error)
@@ -6335,7 +6335,7 @@ s32 host_int_ListenStateExpired(struct host_if_drv *hWFIDrv, u32 u32SessionID)
/* prepare the timer fire Message */
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_LISTEN_TIMER_FIRED;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
msg.body.remain_on_ch.u32ListenSessionID = u32SessionID;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -6385,7 +6385,7 @@ s32 host_int_frame_register(struct host_if_drv *hWFIDrv, u16 u16FrameType, bool
}
msg.body.reg_frame.u16FrameType = u16FrameType;
msg.body.reg_frame.bReg = bReg;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
if (s32Error)
@@ -6429,7 +6429,7 @@ s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_ADD_BEACON;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
pstrSetBeaconParam->u32Interval = u32Interval;
pstrSetBeaconParam->u32DTIMPeriod = u32DTIMPeriod;
pstrSetBeaconParam->u32HeadLen = u32HeadLen;
@@ -6492,7 +6492,7 @@ s32 host_int_del_beacon(struct host_if_drv *hWFIDrv)
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_DEL_BEACON;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
PRINT_D(HOSTINF_DBG, "Setting deleting beacon message queue params\n");
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -6533,7 +6533,7 @@ s32 host_int_add_station(struct host_if_drv *hWFIDrv,
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_ADD_STATION;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param));
if (pstrAddStationMsg->u8NumRates > 0) {
@@ -6582,7 +6582,7 @@ s32 host_int_del_station(struct host_if_drv *hWFIDrv, const u8 *pu8MacAddr)
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_DEL_STATION;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
if (pu8MacAddr == NULL)
memset(pstrDelStationMsg->au8MacAddr, 255, ETH_ALEN);
@@ -6626,7 +6626,7 @@ s32 host_int_del_allstation(struct host_if_drv *hWFIDrv,
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_DEL_ALL_STA;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
/* Handling situation of deauthenticing all associated stations*/
for (i = 0; i < MAX_NUM_STA; i++) {
@@ -6684,7 +6684,7 @@ s32 host_int_edit_station(struct host_if_drv *hWFIDrv,
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_EDIT_STATION;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param));
if (pstrAddStationMsg->u8NumRates > 0) {
@@ -6725,7 +6725,7 @@ s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u3
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_POWER_MGMT;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
pstrPowerMgmtParam->bIsEnabled = bIsEnabled;
pstrPowerMgmtParam->u32Timeout = u32Timeout;
@@ -6758,7 +6758,7 @@ s32 host_int_setup_multicast_filter(struct host_if_drv *hWFIDrv, bool bIsEnabled
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_SET_MULTICAST_FILTER;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
pstrMulticastFilterParam->bIsEnabled = bIsEnabled;
pstrMulticastFilterParam->u32count = u32count;
@@ -7006,7 +7006,7 @@ s32 host_int_delBASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID)
memcpy(pBASessionInfo->au8Bssid, pBSSID, ETH_ALEN);
pBASessionInfo->u8Ted = TID;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
if (s32Error)
@@ -7036,7 +7036,7 @@ s32 host_int_del_All_Rx_BASession(struct host_if_drv *hWFIDrv, char *pBSSID, cha
memcpy(pBASessionInfo->au8Bssid, pBSSID, ETH_ALEN);
pBASessionInfo->u8Ted = TID;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
if (s32Error)
@@ -7075,7 +7075,7 @@ s32 host_int_setup_ipaddress(struct host_if_drv *hWFIDrv, u8 *u16ipadd, u8 idx)
msg.id = HOST_IF_MSG_SET_IPADDRESS;
msg.body.ip_info.au8IPAddr = u16ipadd;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
msg.body.ip_info.idx = idx;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
@@ -7112,7 +7112,7 @@ s32 host_int_get_ipaddress(struct host_if_drv *hWFIDrv, u8 *u16ipadd, u8 idx)
msg.id = HOST_IF_MSG_GET_IPADDRESS;
msg.body.ip_info.au8IPAddr = u16ipadd;
- msg.drvHandler = hWFIDrv;
+ msg.drv = hWFIDrv;
msg.body.ip_info.idx = idx;
s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/6] staging: wilc1000: host_interface.c : removes unused local variables
2015-10-05 10:28 [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv Tony Cho
2015-10-05 10:28 ` [PATCH 2/6] staging: wilc1000: rename the member variable, drvHandler of host_if_msg Tony Cho
@ 2015-10-05 10:28 ` Tony Cho
2015-10-05 10:28 ` [PATCH 4/6] staging: wilc1000: wilc_wfi_cfgoperations.c " Tony Cho
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Tony Cho @ 2015-10-05 10:28 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
adham.abozaeid, Nicolas.FERRE
From: Leo Kim <leo.kim@atmel.com>
This patch removes unused local variables from host_interface.c.
The unused local variable, s32Error is used just to return zero, so this
patch calls "returns 0" instead of "return s32Error" after removing
s32Error.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
drivers/staging/wilc1000/host_interface.c | 34 +++++++++----------------------
1 file changed, 10 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index d59fcaa..b12801b 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1202,11 +1202,9 @@ ERRORHANDLER:
*/
static s32 Handle_wait_msg_q_empty(void)
{
- s32 s32Error = 0;
-
g_wilc_initialized = 0;
up(&hWaitResponse);
- return s32Error;
+ return 0;
}
/**
@@ -4160,7 +4158,6 @@ static void TimerCB_Connect(unsigned long arg)
/* Check implementation in core adding 9 bytes to the input! */
s32 host_int_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress)
{
- s32 s32Error = 0;
tstrWID strWID;
strWID.u16WIDid = (u16)WID_REMOVE_KEY;
@@ -4168,8 +4165,7 @@ s32 host_int_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress)
strWID.ps8WidVal = (s8 *)pu8StaAddress;
strWID.s32ValueSize = 6;
- return s32Error;
-
+ return 0;
}
/**
@@ -4684,7 +4680,6 @@ s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv, struct host_if_pmkid_at
s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray,
u32 u32PmkidInfoLen)
{
- s32 s32Error = 0;
tstrWID strWID;
strWID.u16WIDid = (u16)WID_PMKID_INFO;
@@ -4692,7 +4687,7 @@ s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray,
strWID.s32ValueSize = u32PmkidInfoLen;
strWID.ps8WidVal = pu8PmkidInfoArray;
- return s32Error;
+ return 0;
}
/**
@@ -4712,7 +4707,6 @@ s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray,
s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv, u8 *pu8PassPhrase,
u8 u8Psklength)
{
- s32 s32Error = 0;
tstrWID strWID;
/*validating psk length*/
@@ -4723,7 +4717,7 @@ s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv, u8 *pu8Pas
strWID.s32ValueSize = u8Psklength;
}
- return s32Error;
+ return 0;
}
/**
* @brief host_int_get_MacAddress
@@ -4808,7 +4802,6 @@ s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress)
s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
u8 *pu8PassPhrase, u8 u8Psklength)
{
- s32 s32Error = 0;
tstrWID strWID;
strWID.u16WIDid = (u16)WID_11I_PSK;
@@ -4816,7 +4809,7 @@ s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
strWID.s32ValueSize = u8Psklength;
strWID.ps8WidVal = pu8PassPhrase;
- return s32Error;
+ return 0;
}
/**
@@ -4836,7 +4829,6 @@ s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
*/
s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource)
{
- s32 s32Error = 0;
tstrWID strWID;
strWID.u16WIDid = (u16)WID_START_SCAN_REQ;
@@ -4844,7 +4836,7 @@ s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource)
strWID.ps8WidVal = (s8 *)&scanSource;
strWID.s32ValueSize = sizeof(char);
- return s32Error;
+ return 0;
}
/**
@@ -4865,7 +4857,6 @@ s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource)
s32 host_int_get_start_scan_req(struct host_if_drv *hWFIDrv, u8 *pu8ScanSource)
{
- s32 s32Error = 0;
tstrWID strWID;
strWID.u16WIDid = (u16)WID_START_SCAN_REQ;
@@ -4873,7 +4864,7 @@ s32 host_int_get_start_scan_req(struct host_if_drv *hWFIDrv, u8 *pu8ScanSource)
strWID.ps8WidVal = (s8 *)pu8ScanSource;
strWID.s32ValueSize = sizeof(char);
- return s32Error;
+ return 0;
}
/**
@@ -5063,7 +5054,6 @@ s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode)
*/
s32 host_int_disconnect_station(struct host_if_drv *hWFIDrv, u8 assoc_id)
{
- s32 s32Error = 0;
tstrWID strWID;
strWID.u16WIDid = (u16)WID_DISCONNECT;
@@ -5071,7 +5061,7 @@ s32 host_int_disconnect_station(struct host_if_drv *hWFIDrv, u8 assoc_id)
strWID.ps8WidVal = (s8 *)&assoc_id;
strWID.s32ValueSize = sizeof(char);
- return s32Error;
+ return 0;
}
/**
@@ -5103,7 +5093,6 @@ s32 host_int_disconnect_station(struct host_if_drv *hWFIDrv, u8 assoc_id)
s32 host_int_get_assoc_req_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocReqInfo,
u32 u32AssocReqInfoLen)
{
- s32 s32Error = 0;
tstrWID strWID;
strWID.u16WIDid = (u16)WID_ASSOC_REQ_INFO;
@@ -5111,8 +5100,7 @@ s32 host_int_get_assoc_req_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocReqInfo
strWID.ps8WidVal = pu8AssocReqInfo;
strWID.s32ValueSize = u32AssocReqInfoLen;
-
- return s32Error;
+ return 0;
}
/**
@@ -5176,7 +5164,6 @@ s32 host_int_get_assoc_res_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocRespInf
s32 host_int_get_rx_power_level(struct host_if_drv *hWFIDrv, u8 *pu8RxPowerLevel,
u32 u32RxPowerLevelLen)
{
- s32 s32Error = 0;
tstrWID strWID;
strWID.u16WIDid = (u16)WID_RX_POWER_LEVEL;
@@ -5184,8 +5171,7 @@ s32 host_int_get_rx_power_level(struct host_if_drv *hWFIDrv, u8 *pu8RxPowerLevel
strWID.ps8WidVal = pu8RxPowerLevel;
strWID.s32ValueSize = u32RxPowerLevelLen;
-
- return s32Error;
+ return 0;
}
/**
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/6] staging: wilc1000: wilc_wfi_cfgoperations.c : removes unused local variables
2015-10-05 10:28 [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv Tony Cho
2015-10-05 10:28 ` [PATCH 2/6] staging: wilc1000: rename the member variable, drvHandler of host_if_msg Tony Cho
2015-10-05 10:28 ` [PATCH 3/6] staging: wilc1000: host_interface.c : removes unused local variables Tony Cho
@ 2015-10-05 10:28 ` Tony Cho
2015-10-05 10:28 ` [PATCH 5/6] staging: wilc1000: remove bool bRespRequired from send_config_pkt Tony Cho
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Tony Cho @ 2015-10-05 10:28 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
adham.abozaeid, Nicolas.FERRE
From: Leo Kim <leo.kim@atmel.com>
This patch removes useless local variable, s32Error and returns directly
zero from wilc_wfi_cfgoperations.c and also removes incorrect break in
switch-case statement. The break is not useless which is being called right
after return statement.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 30 +++++++----------------
1 file changed, 9 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index fb79612..42219ea 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1360,7 +1360,6 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
const u8 *mac_addr)
{
struct wilc_priv *priv;
- s32 s32Error = 0;
priv = wiphy_priv(wiphy);
@@ -1446,7 +1445,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
host_int_remove_key(priv->hWILCWFIDrv, mac_addr);
}
- return s32Error;
+ return 0;
}
/**
@@ -1466,9 +1465,6 @@ static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
bool pairwise,
const u8 *mac_addr, void *cookie, void (*callback)(void *cookie, struct key_params *))
{
-
- s32 s32Error = 0;
-
struct wilc_priv *priv;
struct key_params key_params;
u32 i;
@@ -1501,7 +1497,7 @@ static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
callback(cookie, &key_params);
- return s32Error; /* priv->wilc_gtk->key_len ?0 : -ENOENT; */
+ return 0; /* priv->wilc_gtk->key_len ?0 : -ENOENT; */
}
/**
@@ -1516,7 +1512,6 @@ static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
static int set_default_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
bool unicast, bool multicast)
{
- s32 s32Error = 0;
struct wilc_priv *priv;
@@ -1529,7 +1524,7 @@ static int set_default_key(struct wiphy *wiphy, struct net_device *netdev, u8 ke
host_int_set_WEPDefaultKeyID(priv->hWILCWFIDrv, key_index);
}
- return s32Error;
+ return 0;
}
/**
@@ -1545,7 +1540,6 @@ static int set_default_key(struct wiphy *wiphy, struct net_device *netdev, u8 ke
static int get_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_info *sinfo)
{
- s32 s32Error = 0;
struct wilc_priv *priv;
perInterface_wlan_t *nic;
u32 i = 0;
@@ -1569,10 +1563,8 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
}
if (associatedsta == -1) {
- s32Error = -ENOENT;
- PRINT_ER("Station required is not associated : Error(%d)\n", s32Error);
-
- return s32Error;
+ PRINT_ER("Station required is not associated\n");
+ return -ENOENT;
}
sinfo->filled |= BIT(NL80211_STA_INFO_INACTIVE_TIME);
@@ -1608,7 +1600,7 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
PRINT_D(CORECONFIG_DBG, "*** stats[%d][%d][%d][%d][%d]\n", sinfo->signal, sinfo->rx_packets, sinfo->tx_packets,
sinfo->tx_failed, sinfo->txrate.legacy);
}
- return s32Error;
+ return 0;
}
@@ -2248,7 +2240,6 @@ static int mgmt_tx(struct wiphy *wiphy,
const struct ieee80211_mgmt *mgmt;
struct p2p_mgmt_data *mgmt_tx;
struct wilc_priv *priv;
- s32 s32Error = 0;
struct host_if_drv *pstrWFIDrv;
u32 i;
perInterface_wlan_t *nic;
@@ -2386,7 +2377,7 @@ static int mgmt_tx(struct wiphy *wiphy,
} else {
PRINT_D(GENERIC_DBG, "This function transmits only management frames\n");
}
- return s32Error;
+ return 0;
}
static int mgmt_tx_cancel_wait(struct wiphy *wiphy,
@@ -2574,7 +2565,6 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic);
static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
enum nl80211_iftype type, u32 *flags, struct vif_params *params)
{
- s32 s32Error = 0;
struct wilc_priv *priv;
perInterface_wlan_t *nic;
u8 interface_type;
@@ -2885,12 +2875,10 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
default:
PRINT_ER("Unknown interface type= %d\n", type);
- s32Error = -EINVAL;
- return s32Error;
- break;
+ return -EINVAL;
}
- return s32Error;
+ return 0;
}
/* (austin.2013-07-23)
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/6] staging: wilc1000: remove bool bRespRequired from send_config_pkt
2015-10-05 10:28 [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv Tony Cho
` (2 preceding siblings ...)
2015-10-05 10:28 ` [PATCH 4/6] staging: wilc1000: wilc_wfi_cfgoperations.c " Tony Cho
@ 2015-10-05 10:28 ` Tony Cho
2015-10-05 10:28 ` [PATCH 6/6] staging: wilc1000: change parameter names in send_config_pkt Tony Cho
2015-10-08 9:57 ` [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv Greg KH
5 siblings, 0 replies; 7+ messages in thread
From: Tony Cho @ 2015-10-05 10:28 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
adham.abozaeid, Nicolas.FERRE
This patch removes 4th parameter, bool bRespRequired from the
send_config_pkt function because it is not used inside the funcntion.
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/host_interface.c | 92 ++++++++++++++---------------
3 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 65a130d..4bc17b2 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -596,7 +596,7 @@ s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo)
* @version 1.0
*/
s32 send_config_pkt(u8 u8Mode, tstrWID *pstrWIDs,
- u32 u32WIDsCount, bool bRespRequired, u32 drvHandler)
+ u32 u32WIDsCount, u32 drvHandler)
{
s32 counter = 0, ret = 0;
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 58aa13c..4d65088 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -129,7 +129,7 @@ typedef struct {
} tstrDisconnectNotifInfo;
s32 send_config_pkt(u8 u8Mode, tstrWID *pstrWIDs,
- u32 u32WIDsCount, bool bRespRequired, u32 drvHandler);
+ u32 u32WIDsCount, u32 drvHandler);
s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo);
s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo);
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index b12801b..982bb4c 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -582,7 +582,7 @@ static s32 Handle_SetChannel(struct host_if_drv *drvHandler,
PRINT_D(HOSTINF_DBG, "Setting channel\n");
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error) {
PRINT_ER("Failed to set channel\n");
@@ -618,7 +618,7 @@ static s32 Handle_SetWfiDrvHandler(struct host_if_drv *drvHandler,
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
pstrHostIfSetDrvHandler->u32Address);
if (pstrWFIDrv == NULL)
@@ -660,7 +660,7 @@ static s32 Handle_SetOperationMode(struct host_if_drv *drvHandler,
/*Sending Cfg*/
PRINT_INFO(HOSTINF_DBG, "pstrWFIDrv= %p\n", pstrWFIDrv);
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
@@ -706,7 +706,7 @@ s32 Handle_set_IPAddress(struct host_if_drv *drvHandler, u8 *pu8IPAddr, u8 idx)
strWID.ps8WidVal = (u8 *)pu8IPAddr;
strWID.s32ValueSize = IP_ALEN;
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
@@ -745,7 +745,7 @@ s32 Handle_get_IPAddress(struct host_if_drv *drvHandler, u8 *pu8IPAddr, u8 idx)
strWID.ps8WidVal = kmalloc(IP_ALEN, GFP_KERNEL);
strWID.s32ValueSize = IP_ALEN;
- s32Error = send_config_pkt(GET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(GET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
PRINT_INFO(HOSTINF_DBG, "%pI4\n", strWID.ps8WidVal);
@@ -802,7 +802,7 @@ static s32 Handle_SetMacAddress(struct host_if_drv *drvHandler,
strWID.s32ValueSize = ETH_ALEN;
PRINT_D(GENERIC_DBG, "mac addr = :%pM\n", strWID.ps8WidVal);
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error) {
PRINT_ER("Failed to set mac address\n");
@@ -837,7 +837,7 @@ static s32 Handle_GetMacAddress(struct host_if_drv *drvHandler,
strWID.s32ValueSize = ETH_ALEN;
/*Sending Cfg*/
- s32Error = send_config_pkt(GET_CFG, &strWID, 1, false,
+ s32Error = send_config_pkt(GET_CFG, &strWID, 1,
get_id_from_handler(drvHandler));
if (s32Error) {
PRINT_ER("Failed to get mac address\n");
@@ -1179,7 +1179,7 @@ static s32 Handle_CfgParam(struct host_if_drv *drvHandler,
}
u8WidCnt++;
}
- s32Error = send_config_pkt(SET_CFG, strWIDList, u8WidCnt, false,
+ s32Error = send_config_pkt(SET_CFG, strWIDList, u8WidCnt,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
@@ -1331,7 +1331,7 @@ static s32 Handle_Scan(struct host_if_drv *drvHandler,
else if (pstrWFIDrv->enuHostIFstate == HOST_IF_IDLE)
gbScanWhileConnected = false;
- s32Error = send_config_pkt(SET_CFG, strWIDList, u32WidsCount, false,
+ s32Error = send_config_pkt(SET_CFG, strWIDList, u32WidsCount,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
@@ -1406,7 +1406,7 @@ static s32 Handle_ScanDone(struct host_if_drv *drvHandler, tenuScanEvent enuEven
strWID.s32ValueSize = sizeof(char);
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error) {
PRINT_ER("Failed to set abort running scan\n");
@@ -1717,7 +1717,7 @@ static s32 Handle_Connect(struct host_if_drv *drvHandler,
PRINT_D(GENERIC_DBG, "save bssid = %pM\n", u8ConnectedSSID);
}
- s32Error = send_config_pkt(SET_CFG, strWIDList, u32WidsCount, false,
+ s32Error = send_config_pkt(SET_CFG, strWIDList, u32WidsCount,
get_id_from_handler(pstrWFIDrv));
if (s32Error) {
PRINT_ER("failed to send config packet\n");
@@ -1843,7 +1843,7 @@ static s32 Handle_FlushConnect(struct host_if_drv *drvHandler)
u32WidsCount++;
- s32Error = send_config_pkt(SET_CFG, strWIDList, u32WidsCount, false,
+ s32Error = send_config_pkt(SET_CFG, strWIDList, u32WidsCount,
get_id_from_handler(gu8FlushedJoinReqDrvHandler));
if (s32Error) {
PRINT_ER("failed to send config packet\n");
@@ -1924,7 +1924,7 @@ static s32 Handle_ConnectTimeout(struct host_if_drv *drvHandler)
PRINT_D(HOSTINF_DBG, "Sending disconnect request\n");
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, false,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
PRINT_ER("Failed to send dissconect config packet\n");
@@ -2461,7 +2461,7 @@ static int Handle_Key(struct host_if_drv *drvHandler,
strWIDList[3].ps8WidVal = (s8 *)pu8keybuf;
- s32Error = send_config_pkt(SET_CFG, strWIDList, 4, true,
+ s32Error = send_config_pkt(SET_CFG, strWIDList, 4,
get_id_from_handler(pstrWFIDrv));
kfree(pu8keybuf);
@@ -2489,7 +2489,7 @@ static int Handle_Key(struct host_if_drv *drvHandler,
strWID.ps8WidVal = (s8 *)pu8keybuf;
strWID.s32ValueSize = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2;
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
kfree(pu8keybuf);
} else if (pstrHostIFkeyAttr->u8KeyAction & REMOVEKEY) {
@@ -2502,7 +2502,7 @@ static int Handle_Key(struct host_if_drv *drvHandler,
strWID.ps8WidVal = s8idxarray;
strWID.s32ValueSize = 1;
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
} else {
strWID.u16WIDid = (u16)WID_KEY_ID;
@@ -2512,7 +2512,7 @@ static int Handle_Key(struct host_if_drv *drvHandler,
PRINT_D(HOSTINF_DBG, "Setting default key index\n");
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
}
up(&(pstrWFIDrv->hSemTestKeyBlock));
@@ -2558,7 +2558,7 @@ static int Handle_Key(struct host_if_drv *drvHandler,
strWIDList[1].ps8WidVal = (s8 *)pu8keybuf;
strWIDList[1].s32ValueSize = RX_MIC_KEY_MSG_LEN;
- s32Error = send_config_pkt(SET_CFG, strWIDList, 2, true,
+ s32Error = send_config_pkt(SET_CFG, strWIDList, 2,
get_id_from_handler(pstrWFIDrv));
kfree(pu8keybuf);
@@ -2604,7 +2604,7 @@ static int Handle_Key(struct host_if_drv *drvHandler,
strWID.ps8WidVal = (s8 *)pu8keybuf;
strWID.s32ValueSize = RX_MIC_KEY_MSG_LEN;
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
kfree(pu8keybuf);
@@ -2661,7 +2661,7 @@ _WPARxGtk_end_case_:
strWIDList[1].ps8WidVal = (s8 *)pu8keybuf;
strWIDList[1].s32ValueSize = PTK_KEY_MSG_LEN + 1;
- s32Error = send_config_pkt(SET_CFG, strWIDList, 2, true,
+ s32Error = send_config_pkt(SET_CFG, strWIDList, 2,
get_id_from_handler(pstrWFIDrv));
kfree(pu8keybuf);
@@ -2702,7 +2702,7 @@ _WPARxGtk_end_case_:
strWID.ps8WidVal = (s8 *)pu8keybuf;
strWID.s32ValueSize = PTK_KEY_MSG_LEN;
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
kfree(pu8keybuf);
@@ -2742,7 +2742,7 @@ _WPAPtk_end_case_:
strWID.ps8WidVal = (s8 *)pu8keybuf;
strWID.s32ValueSize = (pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFpmkidAttr.numpmkid * PMKSA_KEY_LEN) + 1;
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
kfree(pu8keybuf);
@@ -2789,7 +2789,7 @@ static void Handle_Disconnect(struct host_if_drv *drvHandler)
memset(u8ConnectedSSID, 0, ETH_ALEN);
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, false,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error) {
@@ -2906,7 +2906,7 @@ static s32 Handle_GetChnl(struct host_if_drv *drvHandler)
PRINT_D(HOSTINF_DBG, "Getting channel value\n");
- s32Error = send_config_pkt(GET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(GET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
/*get the value by searching the local copy*/
if (s32Error) {
@@ -2946,7 +2946,7 @@ static void Handle_GetRssi(struct host_if_drv *drvHandler)
/*Sending Cfg*/
PRINT_D(HOSTINF_DBG, "Getting RSSI value\n");
- s32Error = send_config_pkt(GET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(GET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error) {
PRINT_ER("Failed to get RSSI value\n");
@@ -2974,7 +2974,7 @@ static void Handle_GetLinkspeed(struct host_if_drv *drvHandler)
/*Sending Cfg*/
PRINT_D(HOSTINF_DBG, "Getting LINKSPEED value\n");
- s32Error = send_config_pkt(GET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(GET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error) {
PRINT_ER("Failed to get LINKSPEED value\n");
@@ -3021,7 +3021,7 @@ s32 Handle_GetStatistics(struct host_if_drv *drvHandler, tstrStatistics *pstrSta
strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrStatistics->u32TxFailureCount));
u32WidsCount++;
- s32Error = send_config_pkt(GET_CFG, strWIDList, u32WidsCount, false,
+ s32Error = send_config_pkt(GET_CFG, strWIDList, u32WidsCount,
get_id_from_handler(drvHandler));
if (s32Error)
@@ -3066,7 +3066,7 @@ static s32 Handle_Get_InActiveTime(struct host_if_drv *drvHandler,
PRINT_D(CFG80211_DBG, "SETING STA inactive time\n");
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
/*get the value by searching the local copy*/
if (s32Error) {
@@ -3081,7 +3081,7 @@ static s32 Handle_Get_InActiveTime(struct host_if_drv *drvHandler,
strWID.s32ValueSize = sizeof(u32);
- s32Error = send_config_pkt(GET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(GET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
/*get the value by searching the local copy*/
if (s32Error) {
@@ -3158,7 +3158,7 @@ static void Handle_AddBeacon(struct host_if_drv *drvHandler,
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, false,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
PRINT_ER("Failed to send add beacon config packet\n");
@@ -3200,7 +3200,7 @@ static void Handle_DelBeacon(struct host_if_drv *drvHandler)
/* TODO: build del beacon message*/
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, false,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
PRINT_ER("Failed to send delete beacon config packet\n");
@@ -3292,7 +3292,7 @@ static void Handle_AddStation(struct host_if_drv *drvHandler,
pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam);
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, false,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error != 0)
PRINT_ER("Failed to send add station config packet\n");
@@ -3346,7 +3346,7 @@ static void Handle_DelAllSta(struct host_if_drv *drvHandler,
}
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
PRINT_ER("Failed to send add station config packet\n");
@@ -3390,7 +3390,7 @@ static void Handle_DelStation(struct host_if_drv *drvHandler,
memcpy(pu8CurrByte, pstrDelStaParam->au8MacAddr, ETH_ALEN);
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, false,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
PRINT_ER("Failed to send add station config packet\n");
@@ -3430,7 +3430,7 @@ static void Handle_EditStation(struct host_if_drv *drvHandler,
pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam);
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, false,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
PRINT_ER("Failed to send edit station config packet\n");
@@ -3504,7 +3504,7 @@ static int Handle_RemainOnChan(struct host_if_drv *drvHandler,
strWID.ps8WidVal[1] = (s8)pstrHostIfRemainOnChan->u16Channel;
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error != 0)
PRINT_ER("Failed to set remain on channel\n");
@@ -3564,7 +3564,7 @@ static int Handle_RegisterFrame(struct host_if_drv *drvHandler,
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error) {
PRINT_ER("Failed to frame register config packet\n");
@@ -3611,7 +3611,7 @@ static u32 Handle_ListenStateExpired(struct host_if_drv *drvHandler,
strWID.ps8WidVal[1] = FALSE_FRMWR_CHANNEL;
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error != 0) {
PRINT_ER("Failed to set remain on channel\n");
@@ -3692,7 +3692,7 @@ static void Handle_PowerManagement(struct host_if_drv *drvHandler,
PRINT_D(HOSTINF_DBG, "Handling Power Management\n");
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
PRINT_ER("Failed to send power management config packet\n");
@@ -3738,7 +3738,7 @@ static void Handle_SetMulticastFilter(struct host_if_drv *drvHandler,
memcpy(pu8CurrByte, gau8MulticastMacAddrList, ((strHostIfSetMulti->u32count) * ETH_ALEN));
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, false,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(drvHandler));
if (s32Error)
PRINT_ER("Failed to send setup multicast config packet\n");
@@ -3803,7 +3803,7 @@ static s32 Handle_AddBASession(struct host_if_drv *drvHandler,
/* Group Buffer Timeout */
*ptr++ = 0;
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
PRINT_D(HOSTINF_DBG, "Couldn't open BA Session\n");
@@ -3828,7 +3828,7 @@ static s32 Handle_AddBASession(struct host_if_drv *drvHandler,
*ptr++ = ((strHostIfBASessionInfo->u16SessionTimeout >> 16) & 0xFF);
/*Ack-Policy */
*ptr++ = 3;
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (strWID.ps8WidVal != NULL)
@@ -3877,7 +3877,7 @@ static s32 Handle_DelAllRxBASessions(struct host_if_drv *drvHandler,
/* Delba Reason */
*ptr++ = 32; /* Unspecific QOS reason */
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error)
PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n");
@@ -5133,7 +5133,7 @@ s32 host_int_get_assoc_res_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocRespInf
/* Sending Configuration packet */
- s32Error = send_config_pkt(GET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(GET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error) {
*pu32RcvdAssocRespInfoLen = 0;
@@ -5362,7 +5362,7 @@ s32 host_int_test_set_int_wid(struct host_if_drv *hWFIDrv, u32 u32TestMemAddr)
strWID.s32ValueSize = sizeof(u32);
/*Sending Cfg*/
- s32Error = send_config_pkt(SET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
if (s32Error) {
PRINT_ER("Failed to set wid value\n");
@@ -5446,7 +5446,7 @@ s32 host_int_test_get_int_wid(struct host_if_drv *hWFIDrv, u32 *pu32TestMemAddr)
strWID.ps8WidVal = (s8 *)pu32TestMemAddr;
strWID.s32ValueSize = sizeof(u32);
- s32Error = send_config_pkt(GET_CFG, &strWID, 1, true,
+ s32Error = send_config_pkt(GET_CFG, &strWID, 1,
get_id_from_handler(pstrWFIDrv));
/*get the value by searching the local copy*/
if (s32Error) {
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 6/6] staging: wilc1000: change parameter names in send_config_pkt
2015-10-05 10:28 [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv Tony Cho
` (3 preceding siblings ...)
2015-10-05 10:28 ` [PATCH 5/6] staging: wilc1000: remove bool bRespRequired from send_config_pkt Tony Cho
@ 2015-10-05 10:28 ` Tony Cho
2015-10-08 9:57 ` [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv Greg KH
5 siblings, 0 replies; 7+ messages in thread
From: Tony Cho @ 2015-10-05 10:28 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
adham.abozaeid, Nicolas.FERRE
This patch changes the parameter names in send_config_pkt function as
the followings:
- u8Mode to mode
- pstrWIDs to wids
- u32WIDsCount to count
- drvHandler to drv
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
drivers/staging/wilc1000/coreconfigurator.c | 41 ++++++++++++++---------------
drivers/staging/wilc1000/coreconfigurator.h | 3 +--
2 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 4bc17b2..189be4a 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -595,41 +595,40 @@ s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo)
* @date 1 Mar 2012
* @version 1.0
*/
-s32 send_config_pkt(u8 u8Mode, tstrWID *pstrWIDs,
- u32 u32WIDsCount, u32 drvHandler)
+s32 send_config_pkt(u8 mode, tstrWID *wids, u32 count, u32 drv)
{
s32 counter = 0, ret = 0;
- if (u8Mode == GET_CFG) {
- for (counter = 0; counter < u32WIDsCount; counter++) {
+ if (mode == GET_CFG) {
+ for (counter = 0; counter < count; counter++) {
PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet [%d][%d]\n", !counter,
- (counter == u32WIDsCount - 1));
+ (counter == count - 1));
if (!wilc_wlan_cfg_get(!counter,
- pstrWIDs[counter].u16WIDid,
- (counter == u32WIDsCount - 1),
- drvHandler)) {
+ wids[counter].u16WIDid,
+ (counter == count - 1),
+ drv)) {
ret = -1;
printk("[Sendconfigpkt]Get Timed out\n");
break;
}
}
counter = 0;
- for (counter = 0; counter < u32WIDsCount; counter++) {
- pstrWIDs[counter].s32ValueSize = wilc_wlan_cfg_get_val(
- pstrWIDs[counter].u16WIDid,
- pstrWIDs[counter].ps8WidVal,
- pstrWIDs[counter].s32ValueSize);
+ for (counter = 0; counter < count; counter++) {
+ wids[counter].s32ValueSize = wilc_wlan_cfg_get_val(
+ wids[counter].u16WIDid,
+ wids[counter].ps8WidVal,
+ wids[counter].s32ValueSize);
}
- } else if (u8Mode == SET_CFG) {
- for (counter = 0; counter < u32WIDsCount; counter++) {
- PRINT_D(CORECONFIG_DBG, "Sending config SET PACKET WID:%x\n", pstrWIDs[counter].u16WIDid);
+ } else if (mode == SET_CFG) {
+ for (counter = 0; counter < count; counter++) {
+ PRINT_D(CORECONFIG_DBG, "Sending config SET PACKET WID:%x\n", wids[counter].u16WIDid);
if (!wilc_wlan_cfg_set(!counter,
- pstrWIDs[counter].u16WIDid,
- pstrWIDs[counter].ps8WidVal,
- pstrWIDs[counter].s32ValueSize,
- (counter == u32WIDsCount - 1),
- drvHandler)) {
+ wids[counter].u16WIDid,
+ wids[counter].ps8WidVal,
+ wids[counter].s32ValueSize,
+ (counter == count - 1),
+ drv)) {
ret = -1;
printk("[Sendconfigpkt]Set Timed out\n");
break;
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 4d65088..8ba30dc 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -128,8 +128,7 @@ typedef struct {
size_t ie_len;
} tstrDisconnectNotifInfo;
-s32 send_config_pkt(u8 u8Mode, tstrWID *pstrWIDs,
- u32 u32WIDsCount, u32 drvHandler);
+s32 send_config_pkt(u8 mode, tstrWID *wids, u32 count, u32 drv);
s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo);
s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo);
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv
2015-10-05 10:28 [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv Tony Cho
` (4 preceding siblings ...)
2015-10-05 10:28 ` [PATCH 6/6] staging: wilc1000: change parameter names in send_config_pkt Tony Cho
@ 2015-10-08 9:57 ` Greg KH
5 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2015-10-08 9:57 UTC (permalink / raw)
To: Tony Cho
Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
glen.lee, leo.kim, austin.shin, adel.noureldin, adham.abozaeid,
Nicolas.FERRE
On Mon, Oct 05, 2015 at 07:28:09PM +0900, Tony Cho wrote:
> From: Leo Kim <leo.kim@atmel.com>
>
> This patch removes typedef from the struct tstrWILC_WFIDrv and
> rename it to host_if_drv.
> This patch includes the removal of the comment for tstrWILC_WFIDrv as well.
>
> Signed-off-by: Leo Kim <leo.kim@atmel.com>
> Signed-off-by: Tony Cho <tony.cho@atmel.com>
> ---
> drivers/staging/wilc1000/host_interface.c | 362 +++++++++++-----------
> drivers/staging/wilc1000/host_interface.h | 108 +++----
> drivers/staging/wilc1000/linux_wlan.c | 16 +-
> drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 24 +-
> drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 +-
> 5 files changed, 253 insertions(+), 261 deletions(-)
This patch fails to apply :(
Please rebase and resend the whole series.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-10-08 10:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 10:28 [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv Tony Cho
2015-10-05 10:28 ` [PATCH 2/6] staging: wilc1000: rename the member variable, drvHandler of host_if_msg Tony Cho
2015-10-05 10:28 ` [PATCH 3/6] staging: wilc1000: host_interface.c : removes unused local variables Tony Cho
2015-10-05 10:28 ` [PATCH 4/6] staging: wilc1000: wilc_wfi_cfgoperations.c " Tony Cho
2015-10-05 10:28 ` [PATCH 5/6] staging: wilc1000: remove bool bRespRequired from send_config_pkt Tony Cho
2015-10-05 10:28 ` [PATCH 6/6] staging: wilc1000: change parameter names in send_config_pkt Tony Cho
2015-10-08 9:57 ` [PATCH 1/6] staging: wilc1000: remove typedef from tstrWILC_WFIDrv Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).