From patchwork Mon Oct 12 07:56:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7373051 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DFE2C9F37F for ; Mon, 12 Oct 2015 08:00:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B798020883 for ; Mon, 12 Oct 2015 08:00:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59134207AA for ; Mon, 12 Oct 2015 08:00:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752465AbbJLIA0 (ORCPT ); Mon, 12 Oct 2015 04:00:26 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:13567 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbbJLIAZ (ORCPT ); Mon, 12 Oct 2015 04:00:25 -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:22 +0200 From: Tony Cho To: CC: , , , , , , , , , , , Subject: [PATCH V2 35/41] staging: wilc1000: rename strHostIFwpaAttr of union host_if_key_attr Date: Mon, 12 Oct 2015 16:56:09 +0900 Message-ID: <1444636575-2486-35-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 strHostIFwpaAttr of union host_if_key_attr to wpa to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 95 ++++++++++++++----------------- 1 file changed, 44 insertions(+), 51 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index d03643d..83818b8 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -127,7 +127,7 @@ struct host_if_wep_attr { */ union host_if_key_attr { struct host_if_wep_attr wep; - struct host_if_wpa_attr strHostIFwpaAttr; + struct host_if_wpa_attr wpa; struct host_if_pmkid_attr strHostIFpmkidAttr; }; @@ -2463,21 +2463,21 @@ static int Handle_Key(struct host_if_drv *hif_drv, - if (pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8seq != NULL) - memcpy(pu8keybuf + 6, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8seq, 8); + if (pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8seq != NULL) + memcpy(pu8keybuf + 6, pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8seq, 8); - memcpy(pu8keybuf + 14, &pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8keyidx, 1); + memcpy(pu8keybuf + 14, &pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8keyidx, 1); - memcpy(pu8keybuf + 15, &pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen, 1); + memcpy(pu8keybuf + 15, &pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8Keylen, 1); - memcpy(pu8keybuf + 16, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, - pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen); + memcpy(pu8keybuf + 16, pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8key, + pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8Keylen); /* pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode = 0X51; */ strWIDList[0].id = (u16)WID_11I_MODE; strWIDList[0].type = WID_CHAR; strWIDList[0].size = sizeof(char); - strWIDList[0].val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode)); + strWIDList[0].val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8Ciphermode)); strWIDList[1].id = (u16)WID_ADD_RX_GTK; strWIDList[1].type = WID_STR; @@ -2517,13 +2517,13 @@ static int Handle_Key(struct host_if_drv *hif_drv, else PRINT_ER("Couldn't handle WPARxGtk while enuHostIFstate is not HOST_IF_CONNECTED\n"); - memcpy(pu8keybuf + 6, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8seq, 8); + memcpy(pu8keybuf + 6, pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8seq, 8); - memcpy(pu8keybuf + 14, &pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8keyidx, 1); + memcpy(pu8keybuf + 14, &pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8keyidx, 1); - memcpy(pu8keybuf + 15, &pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen, 1); - memcpy(pu8keybuf + 16, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, - pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen); + memcpy(pu8keybuf + 15, &pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8Keylen, 1); + memcpy(pu8keybuf + 16, pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8key, + pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8Keylen); strWID.id = (u16)WID_ADD_RX_GTK; strWID.type = WID_STR; @@ -2540,8 +2540,8 @@ static int Handle_Key(struct host_if_drv *hif_drv, /* ///////////////////////// */ } _WPARxGtk_end_case_: - kfree(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8key); - kfree(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8seq); + kfree(pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8key); + kfree(pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8seq); if (ret == -1) return ret; @@ -2568,19 +2568,19 @@ _WPARxGtk_end_case_: | 6 bytes | 1 byte | 1byte | 16 bytes | 8 bytes | 8 bytes | |-----------------------------------------------------------------------------|*/ - memcpy(pu8keybuf, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8macaddr, 6); /*1 bytes Key Length */ + memcpy(pu8keybuf, pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8macaddr, 6); /*1 bytes Key Length */ - memcpy(pu8keybuf + 6, &pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8keyidx, 1); - memcpy(pu8keybuf + 7, &pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen, 1); + memcpy(pu8keybuf + 6, &pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8keyidx, 1); + memcpy(pu8keybuf + 7, &pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8Keylen, 1); /*16 byte TK*/ - memcpy(pu8keybuf + 8, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, - pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen); + memcpy(pu8keybuf + 8, pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8key, + pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8Keylen); strWIDList[0].id = (u16)WID_11I_MODE; strWIDList[0].type = WID_CHAR; strWIDList[0].size = sizeof(char); - strWIDList[0].val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode)); + strWIDList[0].val = (s8 *)(&(pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8Ciphermode)); strWIDList[1].id = (u16)WID_ADD_PTK; strWIDList[1].type = WID_STR; @@ -2615,12 +2615,12 @@ _WPARxGtk_end_case_: | 6 bytes | 1byte | 16 bytes | 8 bytes | 8 bytes | |-----------------------------------------------------------------------------|*/ - memcpy(pu8keybuf, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8macaddr, 6); /*1 bytes Key Length */ + memcpy(pu8keybuf, pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8macaddr, 6); /*1 bytes Key Length */ - memcpy(pu8keybuf + 6, &pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen, 1); + memcpy(pu8keybuf + 6, &pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8Keylen, 1); /*16 byte TK*/ - memcpy(pu8keybuf + 7, pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, - pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen); + memcpy(pu8keybuf + 7, pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8key, + pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.u8Keylen); strWID.id = (u16)WID_ADD_PTK; @@ -2638,7 +2638,7 @@ _WPARxGtk_end_case_: } _WPAPtk_end_case_: - kfree(pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwpaAttr.pu8key); + kfree(pstrHostIFkeyAttr->uniHostIFkeyAttr.wpa.pu8key); if (ret == -1) return ret; @@ -4330,23 +4330,22 @@ s32 host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *pu8Ptk, msg.body.key_info.enuKeyType = WPAPtk; if (mode == AP_MODE) { msg.body.key_info.u8KeyAction = ADDKEY_AP; - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwpaAttr.u8keyidx = u8Idx; + msg.body.key_info.uniHostIFkeyAttr.wpa.u8keyidx = u8Idx; } if (mode == STATION_MODE) msg.body.key_info.u8KeyAction = ADDKEY; msg.body.key_info. - uniHostIFkeyAttr.strHostIFwpaAttr.pu8key = kmalloc(u8PtkKeylen, GFP_KERNEL); + uniHostIFkeyAttr.wpa.pu8key = kmalloc(u8PtkKeylen, GFP_KERNEL); - memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, + memcpy(msg.body.key_info.uniHostIFkeyAttr.wpa.pu8key, pu8Ptk, u8PtkKeylen); if (pu8RxMic != NULL) { - memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwpaAttr.pu8key + 16, + memcpy(msg.body.key_info.uniHostIFkeyAttr.wpa.pu8key + 16, pu8RxMic, RX_MIC_KEY_LEN); if (INFO) { for (i = 0; i < RX_MIC_KEY_LEN; i++) @@ -4355,7 +4354,7 @@ s32 host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *pu8Ptk, } if (pu8TxMic != NULL) { - memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwpaAttr.pu8key + 24, + memcpy(msg.body.key_info.uniHostIFkeyAttr.wpa.pu8key + 24, pu8TxMic, TX_MIC_KEY_LEN); if (INFO) { for (i = 0; i < TX_MIC_KEY_LEN; i++) @@ -4363,13 +4362,10 @@ s32 host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *pu8Ptk, } } - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen = u8KeyLen; + msg.body.key_info.uniHostIFkeyAttr.wpa.u8Keylen = u8KeyLen; - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode = u8Ciphermode; - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwpaAttr.pu8macaddr = mac_addr; + msg.body.key_info.uniHostIFkeyAttr.wpa.u8Ciphermode = u8Ciphermode; + msg.body.key_info.uniHostIFkeyAttr.wpa.pu8macaddr = mac_addr; msg.drv = hif_drv; /* send the message */ @@ -4423,9 +4419,9 @@ s32 host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *pu8RxGtk, u8KeyLen += TX_MIC_KEY_LEN; if (KeyRSC != NULL) { msg.body.key_info. - uniHostIFkeyAttr.strHostIFwpaAttr.pu8seq = kmalloc(u32KeyRSClen, GFP_KERNEL); + uniHostIFkeyAttr.wpa.pu8seq = kmalloc(u32KeyRSClen, GFP_KERNEL); - memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwpaAttr.pu8seq, + memcpy(msg.body.key_info.uniHostIFkeyAttr.wpa.pu8seq, KeyRSC, u32KeyRSClen); } @@ -4436,38 +4432,35 @@ s32 host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *pu8RxGtk, if (mode == AP_MODE) { msg.body.key_info.u8KeyAction = ADDKEY_AP; - msg.body.key_info.uniHostIFkeyAttr.strHostIFwpaAttr.u8Ciphermode = u8Ciphermode; + msg.body.key_info.uniHostIFkeyAttr.wpa.u8Ciphermode = u8Ciphermode; } if (mode == STATION_MODE) msg.body.key_info.u8KeyAction = ADDKEY; msg.body.key_info. - uniHostIFkeyAttr.strHostIFwpaAttr.pu8key = kmalloc(u8KeyLen, GFP_KERNEL); + uniHostIFkeyAttr.wpa.pu8key = kmalloc(u8KeyLen, GFP_KERNEL); - memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwpaAttr.pu8key, + memcpy(msg.body.key_info.uniHostIFkeyAttr.wpa.pu8key, pu8RxGtk, u8GtkKeylen); if (pu8RxMic != NULL) { - memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwpaAttr.pu8key + 16, + memcpy(msg.body.key_info.uniHostIFkeyAttr.wpa.pu8key + 16, pu8RxMic, RX_MIC_KEY_LEN); } if (pu8TxMic != NULL) { - memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwpaAttr.pu8key + 24, + memcpy(msg.body.key_info.uniHostIFkeyAttr.wpa.pu8key + 24, pu8TxMic, TX_MIC_KEY_LEN); } - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwpaAttr.u8keyidx = u8KeyIdx; - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwpaAttr.u8Keylen = u8KeyLen; + msg.body.key_info.uniHostIFkeyAttr.wpa.u8keyidx = u8KeyIdx; + msg.body.key_info.uniHostIFkeyAttr.wpa.u8Keylen = u8KeyLen; - msg.body.key_info. - uniHostIFkeyAttr.strHostIFwpaAttr.u8seqlen = u32KeyRSClen; + msg.body.key_info.uniHostIFkeyAttr.wpa.u8seqlen = u32KeyRSClen;