Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5692774pxv; Wed, 21 Jul 2021 11:27:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCyKgXJxv614D2pwuij1IouPeIOgsurc4gcCjuC31mwcmSVVMxYzYRf4iVJ0LJFJOoEAY8 X-Received: by 2002:a05:6e02:1d15:: with SMTP id i21mr25115440ila.307.1626892070287; Wed, 21 Jul 2021 11:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626892070; cv=none; d=google.com; s=arc-20160816; b=ijkGBGBxj/7u4/56hcDJ/b92a6kpPqInAli98h4+PwCQGwSFBPgV1AGaj1yDonvTRs 7x+BMwb35C5hKHhoxrXIhK8cuBpqUF07bZNc01CM4u7TsqXALYWUQ7C3FVjDDuMhBduj tGxLkeaNZxQVEj5qdfUNWLFZSv2Ywx50N2IECXRo2fHFzZAlO3ImEPiGpNpuJ4PmNO7m iQnIp4n9Ww5XFBMgicReh4AM5ND5cO8Hk3qq8bZ6wcKIyk9ofWQUcEsxpTTt4YxqFZTN awKYsHzpP8j0CWFe6nHaLaPWf1OxYgmiqa4GYzl5Kc/tIMUpTHP4l6G2oQIrX/UtBI70 +Dqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5Bi9DwmNWWWg3asORS1IMubF6JoFpH2zkAxIka24O8c=; b=CQcbkUOJFWVfgcsIuj0T33BHNXcPYWkE+72/ne/+JbTDmzR2Hh0TilIBbgO6k2D0VN kOl3B/+u1iUCwN7dabPoJ5pmXNEZ1rn7YJYZbWpBh/W4RnnBk0vyAaEo2hAAqbi9bXw6 og4DHFff21Q0/jBQLbYaLYf2BFPk2TTDtLjDLgMtxENQmzqUzVSic/geAu5fWEdXCtZO N4qnZnO1vMTfu9zcIWFqDchTH2+l0pxvs52zEXItHvvniIEmfvW4FOWVHE2GSlB095go tHiScs4zXSPF421aVl5dkC2o4p8YJYdSK/QZMHh0u4pn/3/NByzSDr2es9Fyei+ZMqOx 5C3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gaagWJxS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si27046837ile.92.2021.07.21.11.27.36; Wed, 21 Jul 2021 11:27:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gaagWJxS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238187AbhGUM5b (ORCPT + 99 others); Wed, 21 Jul 2021 08:57:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238393AbhGUM5O (ORCPT ); Wed, 21 Jul 2021 08:57:14 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54773C061574 for ; Wed, 21 Jul 2021 06:37:50 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id dt7so3254722ejc.12 for ; Wed, 21 Jul 2021 06:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5Bi9DwmNWWWg3asORS1IMubF6JoFpH2zkAxIka24O8c=; b=gaagWJxSOfTULyUGxXZU1ytIx1Irjg9JkZblJdqUOolOKZN+2z3caDItaVNOi62fQE /3qTmm7YegmDFfhscsvIT9CHtHNUMzD8ve45BwQT2nvkzJMf6Z0XfG+GtqGSTm2fqoOg O/dZaANMv9iVams16mVki0w6WnWkkBSW9ABUN4u+sQpKgtlasdXim/23jxLU70dSld14 csZaIfScCCTYnChsXWnAbtiXgt2LIg78orfdZH7Yb1Mv0wIjsP7/z9jPfjGYiw242kvs 60wEAI2Q/C/HpTwE4eBE5vSnSzXIDj5wSnhWXIJdAgY8v1StyXOzftocYTFIgxTTbdUA 5zlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5Bi9DwmNWWWg3asORS1IMubF6JoFpH2zkAxIka24O8c=; b=awQhSWgaPtmGkCh4dhG+/+lXR6dBVt8bdCGjGaje2l4/9WaMpEQmBg2/GbXpN+F6Y1 5tWY85fFYwtwfVEC1GUXIAUnD2zXci2vaz2Dm6ZvqJa1UJDG06tAxxTOrHIsvy8hrLUs qrAPszLdYK0jXw+OTCVvLU1OEmyd+B6aTpWkay8NjZ4KrnhdXwARquezZQ6JbTr+IM2M 4COva7ivQvr9ZJFbrS5ukWcQOkIplEU7lihHY5kMdqF5cV83OVCZjCcRfBzWF8I1JL5N c5bRc6kykt5vcAkc1WfPYg/VYMYFtUV8SNLC8LoiW+i4PYAh7MQK9vaHPWJixVyDPZ62 hdPA== X-Gm-Message-State: AOAM533tNqVN8omOgvnZDPF2yFsbJVXer1X+hhuQj12NnK5aEdjNqzu9 SOQWDygR0ieCdLGczuSh3woc6KsS3NE= X-Received: by 2002:a17:907:2717:: with SMTP id w23mr24597386ejk.377.1626874668801; Wed, 21 Jul 2021 06:37:48 -0700 (PDT) Received: from agape ([5.171.73.45]) by smtp.gmail.com with ESMTPSA id b19sm3111699edt.53.2021.07.21.06.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 06:37:48 -0700 (PDT) From: Fabio Aiuto To: gregkh@linuxfoundation.org Cc: hdegoede@redhat.com, Larry.Finger@lwfinger.net, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 16/16] staging: rtl8723bs: fix camel case in struct ndis_802_11_wep Date: Wed, 21 Jul 2021 15:37:23 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix camel case in struct ndis_802_11_wep all over the driver. Signed-off-by: Fabio Aiuto --- .../staging/rtl8723bs/core/rtw_ioctl_set.c | 8 +-- .../staging/rtl8723bs/include/wlan_bssdef.h | 8 +-- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 12 ++--- .../staging/rtl8723bs/os_dep/ioctl_linux.c | 54 +++++++++---------- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c index 03a7da84bf23..8914ef3d33c8 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c @@ -494,14 +494,14 @@ u8 rtw_set_802_11_add_wep(struct adapter *padapter, struct ndis_802_11_wep *wep) struct security_priv *psecuritypriv = &(padapter->securitypriv); u8 ret = _SUCCESS; - keyid = wep->KeyIndex & 0x3fffffff; + keyid = wep->key_index & 0x3fffffff; if (keyid >= 4) { ret = false; goto exit; } - switch (wep->KeyLength) { + switch (wep->key_length) { case 5: psecuritypriv->dot11PrivacyAlgrthm = _WEP40_; break; @@ -513,9 +513,9 @@ u8 rtw_set_802_11_add_wep(struct adapter *padapter, struct ndis_802_11_wep *wep) break; } - memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]), &(wep->KeyMaterial), wep->KeyLength); + memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]), &(wep->key_material), wep->key_length); - psecuritypriv->dot11DefKeylen[keyid] = wep->KeyLength; + psecuritypriv->dot11DefKeylen[keyid] = wep->key_length; psecuritypriv->dot11PrivacyKeyIndex = keyid; diff --git a/drivers/staging/rtl8723bs/include/wlan_bssdef.h b/drivers/staging/rtl8723bs/include/wlan_bssdef.h index b101a3ac40ff..530c95275c1e 100644 --- a/drivers/staging/rtl8723bs/include/wlan_bssdef.h +++ b/drivers/staging/rtl8723bs/include/wlan_bssdef.h @@ -110,10 +110,10 @@ enum { /* Key mapping keys require a BSSID */ struct ndis_802_11_wep { - u32 Length; /* Length of this structure */ - u32 KeyIndex; /* 0 is the per-client key, 1-N are the global keys */ - u32 KeyLength; /* length of key in bytes */ - u8 KeyMaterial[16];/* variable length depending on above field */ + u32 length; /* Length of this structure */ + u32 key_index; /* 0 is the per-client key, 1-N are the global keys */ + u32 key_length; /* length of key in bytes */ + u8 key_material[16];/* variable length depending on above field */ }; /* mask for authentication/integrity fields */ diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c index bcd8d03a35a0..dc23470fcdef 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c @@ -1874,7 +1874,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, if (wep_key_len > 0) { wep_key_len = wep_key_len <= 5 ? 5 : 13; - wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial); + wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, key_material); pwep = rtw_malloc(wep_total_len); if (pwep == NULL) { ret = -ENOMEM; @@ -1883,8 +1883,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, memset(pwep, 0, wep_total_len); - pwep->KeyLength = wep_key_len; - pwep->Length = wep_total_len; + pwep->key_length = wep_key_len; + pwep->length = wep_total_len; if (wep_key_len == 13) { padapter->securitypriv.dot11PrivacyAlgrthm = _WEP104_; @@ -1895,10 +1895,10 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, goto exit; } - pwep->KeyIndex = wep_key_idx; - pwep->KeyIndex |= 0x80000000; + pwep->key_index = wep_key_idx; + pwep->key_index |= 0x80000000; - memcpy(pwep->KeyMaterial, (void *)sme->key, pwep->KeyLength); + memcpy(pwep->key_material, (void *)sme->key, pwep->key_length); if (rtw_set_802_11_add_wep(padapter, pwep) == (u8)_FAIL) ret = -EOPNOTSUPP; diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c index 8c44db696b52..1383f84a4425 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c @@ -411,15 +411,15 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, if (wep_key_len > 0) { wep_key_len = wep_key_len <= 5 ? 5 : 13; - wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial); + wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, key_material); pwep = kzalloc(wep_total_len, GFP_KERNEL); if (!pwep) { ret = -ENOMEM; goto exit; } - pwep->KeyLength = wep_key_len; - pwep->Length = wep_total_len; + pwep->key_length = wep_key_len; + pwep->length = wep_total_len; if (wep_key_len == 13) { padapter->securitypriv.dot11PrivacyAlgrthm = _WEP104_; @@ -430,10 +430,10 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, goto exit; } - pwep->KeyIndex = wep_key_idx; - pwep->KeyIndex |= 0x80000000; + pwep->key_index = wep_key_idx; + pwep->key_index |= 0x80000000; - memcpy(pwep->KeyMaterial, param->u.crypt.key, pwep->KeyLength); + memcpy(pwep->key_material, param->u.crypt.key, pwep->key_length); if (param->u.crypt.set_tx) { if (rtw_set_802_11_add_wep(padapter, pwep) == (u8)_FAIL) @@ -447,8 +447,8 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, goto exit; } - memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); - psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength; + memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->key_material, pwep->key_length); + psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->key_length; rtw_set_key(padapter, psecuritypriv, wep_key_idx, 0, true); } @@ -1667,15 +1667,15 @@ static int rtw_wx_set_enc(struct net_device *dev, padapter->securitypriv.ndisauthtype = authmode; } - wep.KeyIndex = key; + wep.key_index = key; if (erq->length > 0) { - wep.KeyLength = erq->length <= 5 ? 5 : 13; + wep.key_length = erq->length <= 5 ? 5 : 13; - wep.Length = wep.KeyLength + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial); + wep.length = wep.key_length + FIELD_OFFSET(struct ndis_802_11_wep, key_material); } else { - wep.KeyLength = 0; + wep.key_length = 0; - if (keyindex_provided == 1) { /* set key_id only, no given KeyMaterial(erq->length == 0). */ + if (keyindex_provided == 1) { /* set key_id only, no given key_material(erq->length == 0). */ padapter->securitypriv.dot11PrivacyKeyIndex = key; switch (padapter->securitypriv.dot11DefKeylen[key]) { @@ -1696,9 +1696,9 @@ static int rtw_wx_set_enc(struct net_device *dev, } - wep.KeyIndex |= 0x80000000; + wep.key_index |= 0x80000000; - memcpy(wep.KeyMaterial, keybuf, wep.KeyLength); + memcpy(wep.key_material, keybuf, wep.key_length); if (rtw_set_802_11_add_wep(padapter, &wep) == false) { if (rf_on == pwrpriv->rf_pwrstate) @@ -2974,19 +2974,19 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, if (wep_key_len > 0) { wep_key_len = wep_key_len <= 5 ? 5 : 13; - wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial); + wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, key_material); pwep = kzalloc(wep_total_len, GFP_KERNEL); if (!pwep) goto exit; - pwep->KeyLength = wep_key_len; - pwep->Length = wep_total_len; + pwep->key_length = wep_key_len; + pwep->length = wep_total_len; } - pwep->KeyIndex = wep_key_idx; + pwep->key_index = wep_key_idx; - memcpy(pwep->KeyMaterial, param->u.crypt.key, pwep->KeyLength); + memcpy(pwep->key_material, param->u.crypt.key, pwep->key_length); if (param->u.crypt.set_tx) { psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Auto; @@ -2994,7 +2994,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, psecuritypriv->dot11PrivacyAlgrthm = _WEP40_; psecuritypriv->dot118021XGrpPrivacy = _WEP40_; - if (pwep->KeyLength == 13) { + if (pwep->key_length == 13) { psecuritypriv->dot11PrivacyAlgrthm = _WEP104_; psecuritypriv->dot118021XGrpPrivacy = _WEP104_; } @@ -3002,20 +3002,20 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx; - memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); + memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->key_material, pwep->key_length); - psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength; + psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->key_length; - rtw_ap_set_wep_key(padapter, pwep->KeyMaterial, pwep->KeyLength, wep_key_idx, 1); + rtw_ap_set_wep_key(padapter, pwep->key_material, pwep->key_length, wep_key_idx, 1); } else { /* don't update "psecuritypriv->dot11PrivacyAlgrthm" and */ /* psecuritypriv->dot11PrivacyKeyIndex =keyid", but can rtw_set_key to cam */ - memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); + memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->key_material, pwep->key_length); - psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength; + psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->key_length; - rtw_ap_set_wep_key(padapter, pwep->KeyMaterial, pwep->KeyLength, wep_key_idx, 0); + rtw_ap_set_wep_key(padapter, pwep->key_material, pwep->key_length, wep_key_idx, 0); } goto exit; -- 2.20.1