From patchwork Mon Oct 12 07:56:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7373081 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 391FCBEEA4 for ; Mon, 12 Oct 2015 08:00:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2ED95205D3 for ; Mon, 12 Oct 2015 08:00:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D81612055C for ; Mon, 12 Oct 2015 08:00:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752040AbbJLIAo (ORCPT ); Mon, 12 Oct 2015 04:00:44 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:13528 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751895AbbJLIAS (ORCPT ); Mon, 12 Oct 2015 04:00:18 -0400 Received: from tony-itx.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Mon, 12 Oct 2015 10:00:16 +0200 From: Tony Cho To: CC: , , , , , , , , , , , Subject: [PATCH V2 34/41] staging: wilc1000: rename strHostIFwepAttr of union host_if_key_attr Date: Mon, 12 Oct 2015 16:56:08 +0900 Message-ID: <1444636575-2486-34-git-send-email-tony.cho@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444636575-2486-1-git-send-email-tony.cho@atmel.com> References: <1444636575-2486-1-git-send-email-tony.cho@atmel.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch renames strHostIFwepAttr of union host_if_key_attr to wep to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 71 ++++++++++++++----------------- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index d905e17..d03643d 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -126,7 +126,7 @@ struct host_if_wep_attr { * @version 1.0 */ union host_if_key_attr { - struct host_if_wep_attr strHostIFwepAttr; + struct host_if_wep_attr wep; struct host_if_wpa_attr strHostIFwpaAttr; struct host_if_pmkid_attr strHostIFpmkidAttr; }; @@ -2349,25 +2349,25 @@ static int Handle_Key(struct host_if_drv *hif_drv, if (pstrHostIFkeyAttr->u8KeyAction & ADDKEY_AP) { PRINT_D(HOSTINF_DBG, "Handling WEP key\n"); - PRINT_D(GENERIC_DBG, "ID Hostint is %d\n", (pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx)); + PRINT_D(GENERIC_DBG, "ID Hostint is %d\n", (pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8Wepidx)); strWIDList[0].id = (u16)WID_11I_MODE; strWIDList[0].type = WID_CHAR; strWIDList[0].size = sizeof(char); - strWIDList[0].val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8mode)); + strWIDList[0].val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8mode)); strWIDList[1].id = WID_AUTH_TYPE; strWIDList[1].type = WID_CHAR; strWIDList[1].size = sizeof(char); - strWIDList[1].val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.tenuAuth_type)); + strWIDList[1].val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.tenuAuth_type)); strWIDList[2].id = (u16)WID_KEY_ID; strWIDList[2].type = WID_CHAR; - strWIDList[2].val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx)); + strWIDList[2].val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8Wepidx)); strWIDList[2].size = sizeof(char); - pu8keybuf = kmalloc(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen, GFP_KERNEL); + pu8keybuf = kmalloc(pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8WepKeylen, GFP_KERNEL); if (pu8keybuf == NULL) { @@ -2375,15 +2375,15 @@ static int Handle_Key(struct host_if_drv *hif_drv, return -1; } - memcpy(pu8keybuf, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey, - pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen); + memcpy(pu8keybuf, pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.pu8WepKey, + pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8WepKeylen); - kfree(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey); + kfree(pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.pu8WepKey); strWIDList[3].id = (u16)WID_WEP_KEY_VALUE; strWIDList[3].type = WID_STR; - strWIDList[3].size = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen; + strWIDList[3].size = pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8WepKeylen; strWIDList[3].val = (s8 *)pu8keybuf; @@ -2396,24 +2396,24 @@ static int Handle_Key(struct host_if_drv *hif_drv, if (pstrHostIFkeyAttr->u8KeyAction & ADDKEY) { PRINT_D(HOSTINF_DBG, "Handling WEP key\n"); - pu8keybuf = kmalloc(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2, GFP_KERNEL); + pu8keybuf = kmalloc(pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8WepKeylen + 2, GFP_KERNEL); if (pu8keybuf == NULL) { PRINT_ER("No buffer to send Key\n"); return -1; } - pu8keybuf[0] = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx; + pu8keybuf[0] = pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8Wepidx; - memcpy(pu8keybuf + 1, &pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen, 1); + memcpy(pu8keybuf + 1, &pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8WepKeylen, 1); - memcpy(pu8keybuf + 2, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey, - pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen); + memcpy(pu8keybuf + 2, pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.pu8WepKey, + pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8WepKeylen); - kfree(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey); + kfree(pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.pu8WepKey); strWID.id = (u16)WID_ADD_WEP_KEY; strWID.type = WID_STR; strWID.val = (s8 *)pu8keybuf; - strWID.size = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2; + strWID.size = pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8WepKeylen + 2; s32Error = send_config_pkt(SET_CFG, &strWID, 1, get_id_from_handler(hif_drv)); @@ -2424,7 +2424,7 @@ static int Handle_Key(struct host_if_drv *hif_drv, strWID.id = (u16)WID_REMOVE_WEP_KEY; strWID.type = WID_STR; - s8idxarray[0] = (s8)pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx; + s8idxarray[0] = (s8)pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8Wepidx; strWID.val = s8idxarray; strWID.size = 1; @@ -2433,7 +2433,7 @@ static int Handle_Key(struct host_if_drv *hif_drv, } else { strWID.id = (u16)WID_KEY_ID; strWID.type = WID_CHAR; - strWID.val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx)); + strWID.val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.wep.u8Wepidx)); strWID.size = sizeof(char); PRINT_D(HOSTINF_DBG, "Setting default key index\n"); @@ -4092,9 +4092,7 @@ int host_int_remove_wep_key(struct host_if_drv *hif_drv, u8 index) msg.body.key_info.enuKeyType = WEP; msg.body.key_info.u8KeyAction = REMOVEKEY; msg.drv = hif_drv; - - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = index; + msg.body.key_info.uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = index; /* send the message */ result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); @@ -4139,8 +4137,7 @@ s32 host_int_set_WEPDefaultKeyID(struct host_if_drv *hif_drv, u8 u8Index) msg.drv = hif_drv; - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Index; + msg.body.key_info.uniHostIFkeyAttr.wep.u8Wepidx = u8Index; /* send the message */ s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); @@ -4196,17 +4193,15 @@ s32 host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv, msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey = kmalloc(u8WepKeylen, GFP_KERNEL); + uniHostIFkeyAttr.wep.pu8WepKey = kmalloc(u8WepKeylen, GFP_KERNEL); - memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey, + memcpy(msg.body.key_info.uniHostIFkeyAttr.wep.pu8WepKey, pu8WepKey, u8WepKeylen); - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen = (u8WepKeylen); + msg.body.key_info.uniHostIFkeyAttr.wep.u8WepKeylen = (u8WepKeylen); - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Keyidx; + msg.body.key_info.uniHostIFkeyAttr.wep.u8Wepidx = u8Keyidx; /* send the message */ s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); @@ -4266,24 +4261,20 @@ s32 host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey = kmalloc(u8WepKeylen, GFP_KERNEL); + uniHostIFkeyAttr.wep.pu8WepKey = kmalloc(u8WepKeylen, GFP_KERNEL); - memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey, + memcpy(msg.body.key_info.uniHostIFkeyAttr.wep.pu8WepKey, pu8WepKey, (u8WepKeylen)); - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen = (u8WepKeylen); + msg.body.key_info.uniHostIFkeyAttr.wep.u8WepKeylen = (u8WepKeylen); - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Keyidx; + msg.body.key_info.uniHostIFkeyAttr.wep.u8Wepidx = u8Keyidx; - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.u8mode = u8mode; + msg.body.key_info.uniHostIFkeyAttr.wep.u8mode = u8mode; - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.tenuAuth_type = tenuAuth_type; + msg.body.key_info.uniHostIFkeyAttr.wep.tenuAuth_type = tenuAuth_type; /* send the message */ s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));