staging: wilc1000: rename variable gMsgQHostIF
This patch renames variable gMsgQHostIF to hif_msg_q
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index b93776a..72ac25c 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -234,7 +234,7 @@
bool g_obtainingIP;
u8 P2P_LISTEN_STATE;
static struct task_struct *hif_thread_handler;
-static WILC_MsgQueueHandle gMsgQHostIF;
+static WILC_MsgQueueHandle hif_msg_q;
static struct semaphore hSemHostIFthrdEnd;
struct semaphore hSemDeinitDrvHandle;
@@ -2708,7 +2708,7 @@
msg.drv = hif_drv;
msg.body.remain_on_ch.u32ListenSessionID = hif_drv->strHostIfRemainOnChan.u32ListenSessionID;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
}
@@ -2894,7 +2894,7 @@
memset(&msg, 0, sizeof(struct host_if_msg));
while (1) {
- wilc_mq_recv(&gMsgQHostIF, &msg, sizeof(struct host_if_msg), &u32Ret);
+ wilc_mq_recv(&hif_msg_q, &msg, sizeof(struct host_if_msg), &u32Ret);
hif_drv = (struct host_if_drv *)msg.drv;
if (msg.id == HOST_IF_MSG_EXIT) {
PRINT_D(GENERIC_DBG, "THREAD: Exiting HostIfThread\n");
@@ -2904,13 +2904,13 @@
if ((!g_wilc_initialized)) {
PRINT_D(GENERIC_DBG, "--WAIT--");
usleep_range(200 * 1000, 200 * 1000);
- wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
continue;
}
if (msg.id == HOST_IF_MSG_CONNECT && hif_drv->strWILC_UsrScanReq.pfUserScanResult != NULL) {
PRINT_D(HOSTINF_DBG, "Requeue connect request till scan done received\n");
- wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
usleep_range(2 * 1000, 2 * 1000);
continue;
}
@@ -3104,7 +3104,7 @@
msg.drv = pvArg;
msg.id = HOST_IF_MSG_SCAN_TIMER_FIRED;
- wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
}
static void TimerCB_Connect(unsigned long arg)
@@ -3116,7 +3116,7 @@
msg.drv = pvArg;
msg.id = HOST_IF_MSG_CONNECT_TIMER_FIRED;
- wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
}
s32 host_int_remove_key(struct host_if_drv *hif_drv, const u8 *pu8StaAddress)
@@ -3150,7 +3150,7 @@
msg.drv = hif_drv;
msg.body.key_info.attr.wep.index = index;
- result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result)
PRINT_ER("Error in sending message queue : Request to remove WEP key\n");
down(&hif_drv->hSemTestKeyBlock);
@@ -3179,7 +3179,7 @@
msg.drv = hif_drv;
msg.body.key_info.attr.wep.index = u8Index;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Error in sending message queue : Default key index\n");
down(&hif_drv->hSemTestKeyBlock);
@@ -3214,7 +3214,7 @@
msg.body.key_info.attr.wep.key_len = (u8WepKeylen);
msg.body.key_info.attr.wep.index = u8Keyidx;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Error in sending message queue :WEP Key\n");
down(&hif_drv->hSemTestKeyBlock);
@@ -3258,7 +3258,7 @@
msg.body.key_info.attr.wep.mode = u8mode;
msg.body.key_info.attr.wep.auth_type = tenuAuth_type;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Error in sending message queue :WEP Key\n");
@@ -3323,7 +3323,7 @@
msg.body.key_info.attr.wpa.mode = u8Ciphermode;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Error in sending message queue: PTK Key\n");
@@ -3386,7 +3386,7 @@
msg.body.key_info.attr.wpa.key_len = u8KeyLen;
msg.body.key_info.attr.wpa.seq_len = u32KeyRSClen;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Error in sending message queue: RX GTK\n");
@@ -3422,7 +3422,7 @@
PMKID_LEN);
}
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER(" Error in sending messagequeue: PMKID Info\n");
@@ -3470,7 +3470,7 @@
msg.body.get_mac_info.u8MacAddress = pu8MacAddress;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error) {
PRINT_ER("Failed to send get mac address\n");
return -EFAULT;
@@ -3492,7 +3492,7 @@
memcpy(msg.body.set_mac_info.u8MacAddress, pu8MacAddress, ETH_ALEN);
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Failed to send message queue: Set mac address\n");
@@ -3591,7 +3591,7 @@
else
PRINT_D(GENERIC_DBG, "Don't set state to 'connecting' as state is %d\n", hif_drv->enuHostIFstate);
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error) {
PRINT_ER("Failed to send message queue: Set join request\n");
return -EFAULT;
@@ -3624,7 +3624,7 @@
msg.id = HOST_IF_MSG_FLUSH_CONNECT;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error) {
PRINT_ER("Failed to send message queue: Flush join request\n");
return -EFAULT;
@@ -3648,7 +3648,7 @@
msg.id = HOST_IF_MSG_DISCONNECT;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Failed to send message queue: disconnect\n");
@@ -3739,7 +3739,7 @@
msg.body.channel_info.set_ch = channel;
msg.drv = hif_drv;
- result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result) {
PRINT_ER("wilc mq send fail\n");
return -EINVAL;
@@ -3755,7 +3755,7 @@
struct host_if_msg msg;
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_Q_IDLE;
- result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result) {
PRINT_ER("wilc mq send fail\n");
result = -EINVAL;
@@ -3776,7 +3776,7 @@
msg.body.drv.u32Address = get_id_from_handler(hif_drv);
msg.drv = hif_drv;
- result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result) {
PRINT_ER("wilc mq send fail\n");
result = -EINVAL;
@@ -3795,7 +3795,7 @@
msg.body.mode.u32Mode = mode;
msg.drv = hif_drv;
- result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result) {
PRINT_ER("wilc mq send fail\n");
result = -EINVAL;
@@ -3819,7 +3819,7 @@
msg.id = HOST_IF_MSG_GET_CHNL;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc mq send fail\n");
down(&hif_drv->hSemGetCHNL);
@@ -3851,7 +3851,7 @@
msg.id = HOST_IF_MSG_GET_INACTIVETIME;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Failed to send get host channel param's message queue ");
@@ -3901,7 +3901,7 @@
msg.id = HOST_IF_MSG_GET_RSSI;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error) {
PRINT_ER("Failed to send get host channel param's message queue ");
return -EFAULT;
@@ -3931,7 +3931,7 @@
msg.id = HOST_IF_MSG_GET_LINKSPEED;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error) {
PRINT_ER("Failed to send GET_LINKSPEED to message queue ");
return -EFAULT;
@@ -3962,7 +3962,7 @@
msg.body.data = (char *)pstrStatistics;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error) {
PRINT_ER("Failed to send get host channel param's message queue ");
return -EFAULT;
@@ -4011,7 +4011,7 @@
msg.body.scan_info.ies = kmalloc(IEsLen, GFP_KERNEL);
memcpy(msg.body.scan_info.ies, pu8IEs, IEsLen);
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error) {
PRINT_ER("Error in sending message queue\n");
return -EINVAL;
@@ -4044,7 +4044,7 @@
msg.body.cfg_info.cfg_attr_info = *pstrCfgParamVal;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
return s32Error;
@@ -4168,7 +4168,7 @@
msg.id = HOST_IF_MSG_GET_RSSI;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error) {
PRINT_ER("Failed to send get host channel param's message queue ");
return;
@@ -4229,7 +4229,7 @@
PRINT_D(HOSTINF_DBG, "INIT: CLIENT COUNT %d\n", clients_count);
if (clients_count == 0) {
- result = wilc_mq_create(&gMsgQHostIF);
+ result = wilc_mq_create(&hif_msg_q);
if (result < 0) {
PRINT_ER("Failed to creat MQ\n");
@@ -4284,7 +4284,7 @@
del_timer_sync(&hif_drv->hScanTimer);
kthread_stop(hif_thread_handler);
_fail_mq_:
- wilc_mq_destroy(&gMsgQHostIF);
+ wilc_mq_destroy(&hif_msg_q);
_fail_:
return result;
}
@@ -4343,14 +4343,13 @@
msg.id = HOST_IF_MSG_EXIT;
msg.drv = hif_drv;
-
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error != 0)
PRINT_ER("Error in sending deinit's message queue message function: Error(%d)\n", s32Error);
down(&hSemHostIFthrdEnd);
- wilc_mq_destroy(&gMsgQHostIF);
+ wilc_mq_destroy(&hif_msg_q);
}
down(&(hif_drv->gtOsCfgValuesSem));
@@ -4394,7 +4393,7 @@
msg.body.net_info.buffer = kmalloc(u32Length, GFP_KERNEL);
memcpy(msg.body.net_info.buffer, pu8Buffer, u32Length);
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Error in sending network info message queue message parameters: Error(%d)\n", s32Error);
}
@@ -4435,7 +4434,7 @@
msg.body.async_info.buffer = kmalloc(u32Length, GFP_KERNEL);
memcpy(msg.body.async_info.buffer, pu8Buffer, u32Length);
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Error in sending message queue asynchronous message info: Error(%d)\n", s32Error);
@@ -4464,7 +4463,7 @@
msg.id = HOST_IF_MSG_RCVD_SCAN_COMPLETE;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Error in sending message queue scan complete parameters: Error(%d)\n", s32Error);
}
@@ -4499,7 +4498,7 @@
msg.body.remain_on_ch.u32ListenSessionID = u32SessionID;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc mq send fail\n");
@@ -4523,7 +4522,7 @@
msg.drv = hif_drv;
msg.body.remain_on_ch.u32ListenSessionID = u32SessionID;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc mq send fail\n");
@@ -4562,7 +4561,7 @@
msg.body.reg_frame.bReg = bReg;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc mq send fail\n");
@@ -4612,7 +4611,7 @@
pstrSetBeaconParam->tail = NULL;
}
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc mq send fail\n");
@@ -4641,7 +4640,7 @@
msg.drv = hif_drv;
PRINT_D(HOSTINF_DBG, "Setting deleting beacon message queue params\n");
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
@@ -4679,8 +4678,7 @@
pstrAddStationMsg->pu8Rates = rates;
}
-
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
return s32Error;
@@ -4709,7 +4707,7 @@
else
memcpy(pstrDelStationMsg->mac_addr, pu8MacAddr, ETH_ALEN);
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
return s32Error;
@@ -4757,8 +4755,7 @@
}
pstrDelAllStationMsg->assoc_sta = u8AssocNumb;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
-
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
@@ -4799,7 +4796,7 @@
pstrAddStationMsg->pu8Rates = rates;
}
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
@@ -4831,7 +4828,7 @@
pstrPowerMgmtParam->enabled = bIsEnabled;
pstrPowerMgmtParam->timeout = u32Timeout;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
return s32Error;
@@ -4861,7 +4858,7 @@
pstrMulticastFilterParam->enabled = bIsEnabled;
pstrMulticastFilterParam->cnt = u32count;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
return s32Error;
@@ -5055,7 +5052,7 @@
pBASessionInfo->u8Ted = TID;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
@@ -5085,7 +5082,7 @@
pBASessionInfo->u8Ted = TID;
msg.drv = hif_drv;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
@@ -5114,7 +5111,7 @@
msg.drv = hif_drv;
msg.body.ip_info.idx = idx;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
@@ -5141,7 +5138,7 @@
msg.drv = hif_drv;
msg.body.ip_info.idx = idx;
- s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+ s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");