]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
Staging: rtl8192e: Rename variable bHwSec
authorTree Davies <tdavies@darkphysics.net>
Wed, 12 Jun 2024 03:22:07 +0000 (20:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2024 13:25:21 +0000 (15:25 +0200)
Rename variable bHwSec to hw_sec
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240612032230.9738-2-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
drivers/staging/rtl8192e/rtllib_crypt_tkip.c
drivers/staging/rtl8192e/rtllib_crypt_wep.c
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_tx.c

index a0fc33f984e8795d449c756cab145d3a0ff34144..27dfa268cd686ed19ba8db4ef80e92ef4739d6d0 100644 (file)
@@ -934,7 +934,7 @@ void  rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
 
        pdesc->NoEnc = 1;
        pdesc->SecType = 0x0;
-       if (cb_desc->bHwSec) {
+       if (cb_desc->hw_sec) {
                static u8 tmp;
 
                if (!tmp)
index 62af48c202293a2bcc670d9550fb81684d571a3b..46bc3561f56f57258811194d431b86470d780ad0 100644 (file)
@@ -105,7 +105,7 @@ struct cb_desc {
        u8 bCmdOrInit:1;
        u8 tx_dis_rate_fallback:1;
        u8 tx_use_drv_assinged_rate:1;
-       u8 bHwSec:1;
+       u8 hw_sec:1;
 
        u8 nStuckCount;
 
index da9e630b594c5919f1ec3e7225d4507029e76ce8..639877069fad255b35de0739e4e932e599588ada 100644 (file)
@@ -182,7 +182,7 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
        *pos++ = key->tx_pn[0];
 
        hdr = (struct ieee80211_hdr *)skb->data;
-       if (!tcb_desc->bHwSec) {
+       if (!tcb_desc->hw_sec) {
                struct aead_request *req;
                struct scatterlist sg[2];
                u8 *aad = key->tx_aad;
@@ -265,7 +265,7 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
                key->dot11rsna_stats_ccmp_replays++;
                return -4;
        }
-       if (!tcb_desc->bHwSec) {
+       if (!tcb_desc->hw_sec) {
                size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN;
                struct aead_request *req;
                struct scatterlist sg[2];
index 3969b6b916ed8a7b3b28fe50119b9e8416bd4355..dc0917b0351174c90364a7035dd1fa31b531ca79 100644 (file)
@@ -268,7 +268,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
 
        hdr = (struct ieee80211_hdr *)skb->data;
 
-       if (!tcb_desc->bHwSec) {
+       if (!tcb_desc->hw_sec) {
                if (!tkey->tx_phase1_done) {
                        tkip_mixing_phase1(tkey->tx_ttak, tkey->key, hdr->addr2,
                                           tkey->tx_iv32);
@@ -285,7 +285,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
        memmove(pos, pos + 8, hdr_len);
        pos += hdr_len;
 
-       if (tcb_desc->bHwSec) {
+       if (tcb_desc->hw_sec) {
                *pos++ = Hi8(tkey->tx_iv16);
                *pos++ = (Hi8(tkey->tx_iv16) | 0x20) & 0x7F;
                *pos++ = Lo8(tkey->tx_iv16);
@@ -301,7 +301,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
        *pos++ = (tkey->tx_iv32 >> 16) & 0xff;
        *pos++ = (tkey->tx_iv32 >> 24) & 0xff;
 
-       if (!tcb_desc->bHwSec) {
+       if (!tcb_desc->hw_sec) {
                icv = skb_put(skb, 4);
                crc = ~crc32_le(~0, pos, len);
                icv[0] = crc;
@@ -319,7 +319,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
                tkey->tx_iv32++;
        }
 
-       if (!tcb_desc->bHwSec)
+       if (!tcb_desc->hw_sec)
                return ret;
        return 0;
 }
@@ -371,7 +371,7 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        iv32 = pos[4] | (pos[5] << 8) | (pos[6] << 16) | (pos[7] << 24);
        pos += 8;
 
-       if (!tcb_desc->bHwSec || (skb->cb[0] == 1)) {
+       if (!tcb_desc->hw_sec || (skb->cb[0] == 1)) {
                if ((iv32 < tkey->rx_iv32 ||
                     (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) &&
                     tkey->initialized) {
index eae75d1225534209078314ccdc5767aac6f816e7..10092f6884ff1800c05cd3d3194045b619772589 100644 (file)
@@ -102,7 +102,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
        /* Copy rest of the WEP key (the secret part) */
        memcpy(key + 3, wep->key, wep->key_len);
 
-       if (!tcb_desc->bHwSec) {
+       if (!tcb_desc->hw_sec) {
                /* Append little-endian CRC32 and encrypt it to produce ICV */
                crc = ~crc32_le(~0, pos, len);
                icv = skb_put(skb, 4);
@@ -155,7 +155,7 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        /* Apply RC4 to data and compute CRC32 over decrypted data */
        plen = skb->len - hdr_len - 8;
 
-       if (!tcb_desc->bHwSec) {
+       if (!tcb_desc->hw_sec) {
                arc4_setkey(&wep->rx_ctx_arc4, key, klen);
                arc4_crypt(&wep->rx_ctx_arc4, pos, pos, plen + 4);
 
index 86b8d342ac80ab331820ceecba93f5e73c980108..3bff54efe66e63d7684b648bc2a5eabc4e92d232 100644 (file)
@@ -282,10 +282,10 @@ rtllib_rx_frame_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
                struct cb_desc *tcb_desc = (struct cb_desc *)
                                                (skb->cb + MAX_DEV_ADDR_SIZE);
 
-               tcb_desc->bHwSec = 1;
+               tcb_desc->hw_sec = 1;
 
                if (ieee->need_sw_enc)
-                       tcb_desc->bHwSec = 0;
+                       tcb_desc->hw_sec = 0;
        }
 
        hdr = (struct ieee80211_hdr *)skb->data;
@@ -321,10 +321,10 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
                struct cb_desc *tcb_desc = (struct cb_desc *)
                                                (skb->cb + MAX_DEV_ADDR_SIZE);
 
-               tcb_desc->bHwSec = 1;
+               tcb_desc->hw_sec = 1;
 
                if (ieee->need_sw_enc)
-                       tcb_desc->bHwSec = 0;
+                       tcb_desc->hw_sec = 0;
        }
 
        hdr = (struct ieee80211_hdr *)skb->data;
index b1bde5c0050ad2116bea1ecd809ae77ecaa07c38..87d1ff943617b3419ca3c39706fc1b962dc6fa83 100644 (file)
@@ -751,14 +751,14 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
 
                if (encrypt) {
                        if (ieee->hwsec_active)
-                               tcb_desc->bHwSec = 1;
+                               tcb_desc->hw_sec = 1;
                        else
-                               tcb_desc->bHwSec = 0;
+                               tcb_desc->hw_sec = 0;
                        skb_reserve(skb_frag,
                                    crypt->ops->extra_mpdu_prefix_len +
                                    crypt->ops->extra_msdu_prefix_len);
                } else {
-                       tcb_desc->bHwSec = 0;
+                       tcb_desc->hw_sec = 0;
                }
                frag_hdr = skb_put_data(skb_frag, &header, hdr_len);