From patchwork Sat Oct 22 05:05:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Lawrence X-Patchwork-Id: 7077 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1054746wrr; Fri, 21 Oct 2022 22:33:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4bkxGIzzw16FHazEjpCsOuXZs6dMMBwBBuLVSaNVMOFe/M4yUvjF0Z+7E0hROhOhwtxCPg X-Received: by 2002:a17:907:6e24:b0:791:905f:7881 with SMTP id sd36-20020a1709076e2400b00791905f7881mr18590729ejc.120.1666416792041; Fri, 21 Oct 2022 22:33:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666416792; cv=pass; d=google.com; s=arc-20160816; b=PvS7rWznwtSxFbm/Y12bN5XwpQV/jKlXu8g5+uKLIFz+z5r648usMdwn1TKuPPtA9r oyDuIdihMk6pUS3XrOARsjM2yhEIxjGzVAgdC6Afo1qwBRuRY3UBB+SEd3SLSYM2a2C9 tqNsKrl6FW6wg+Mt/Az7UQQMLW/aKaaafjENYz8GlWObbnqvS6iGl/XxKEucPfKtjDZl HOFWoV1x3l+saMW5EDUORuE7SBC7LVEcHXldaxERyurpynDavm64TqRtDQPby6AELDJk jIedgMge2FPWM72LTJjuL6Z93M+DrHqUoT22RusucO90b4sXrqYfzPKqhVpY/gfHUDu7 FLRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:date:cc:to:from:subject :message-id:dkim-signature; bh=NWkzLV1hl/Kd2bUPFdV4XEHmduPaGX3ceoKbkNdVcdw=; b=UCyCr0VtwO7Nd8tcrV4c69e5hRthc8jx/saW9au/OQM3lL10xncwylm2rKvbe/m4Hb S+O0I7WBTkcFGE1Kqg6VbOLc0sFD+K12gpsWOk4CRkDMPazfdCpBm/Q7cDzArUA1PR8O GcEjOS7dJ/XaSKc4Y37mdaqKt4NnoIxXw6E9taD1iAUWv/xdEkEP6GZRg7QwMDE7NYpu 7Vb1oYZllrD+jtF9PSQfPvs59gK0DLYkpyBKIXQ+KUyR4F8R9Ax5xSYQ3a51zkGvdLst Jfpl71aVryjT4O6i0PnbuQ3P1pIHQ4FLruiYLZDZT+4nCWCbeany3Rg3JYPv7OApBtuy 8ZQw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zohomail.com header.s=zm2022 header.b="T4RFpOr/"; arc=pass (i=1 spf=pass spfdomain=zohomail.com dkim=pass dkdomain=zohomail.com dmarc=pass fromdomain=zohomail.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=zohomail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a170906600900b0078054af5eeasi20195381ejj.374.2022.10.21.22.32.46; Fri, 21 Oct 2022 22:33:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@zohomail.com header.s=zm2022 header.b="T4RFpOr/"; arc=pass (i=1 spf=pass spfdomain=zohomail.com dkim=pass dkdomain=zohomail.com dmarc=pass fromdomain=zohomail.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=zohomail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229588AbiJVFVe (ORCPT + 99 others); Sat, 22 Oct 2022 01:21:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbiJVFVb (ORCPT ); Sat, 22 Oct 2022 01:21:31 -0400 X-Greylist: delayed 905 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 21 Oct 2022 22:21:29 PDT Received: from sender4-pp-o95.zoho.com (sender4-pp-o95.zoho.com [136.143.188.95]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24D7F24A557 for ; Fri, 21 Oct 2022 22:21:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666415178; cv=none; d=zohomail.com; s=zohoarc; b=RL+toDvYPPSbKiquYwZWJSUtxzSJyBnxnCrjY31FKAkYhJ1s6o1+XHuhy7KvdHNbqtRdXOxJWtL4wA+A/Onc8CMnKbAej6ZzJGuR1i0hmflxdzDxJFfY6cOGt9hiPLJeRBRayRbZ2op579ZRzns0vDnGGPYexm7yC6Ihk2O3uIo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666415178; h=Content-Type:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=NWkzLV1hl/Kd2bUPFdV4XEHmduPaGX3ceoKbkNdVcdw=; b=KJ4ie9ZHLfP+XYVmGBE+WbtSTGWcqV/c/GIlFQUfK+m6lIux8tdcP6zY8Wz2j+1ttu5egmzsuUXhvrRzDnFC0VeJMHFv5RfTrihEIAkPSFJ4i31WzaMyVt1crSncQB6u6tQS4EGjBffpPV7CFElWNsikrIRXAjRmIL5tHNq05fQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zohomail.com; spf=pass smtp.mailfrom=t4rmin@zohomail.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1666415178; s=zm2022; d=zohomail.com; i=t4rmin@zohomail.com; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:Content-Type:MIME-Version:Message-Id:Reply-To; bh=NWkzLV1hl/Kd2bUPFdV4XEHmduPaGX3ceoKbkNdVcdw=; b=T4RFpOr/ep9WcuKGHW2mlmnW3ynWCmiGfTUXrLgov2enDdqRHVpT2t7oIJWKOJdB YzuhcICyvJJa91N8WWt2hQ8bd2kjZ3dXVLERZBWMAY+gnlmS780X/UcevlUpfbmqS8F Qm0lMdC5lkTq6HviuAndSnU0TYVLk0cWZLQdoDb0= Received: from [192.168.0.106] (101.128.127.165 [101.128.127.165]) by mx.zohomail.com with SMTPS id 1666415177078986.9220283925443; Fri, 21 Oct 2022 22:06:17 -0700 (PDT) Message-ID: Subject: [PATCH] Staging: rtl8192e: fixed multiple coding style issues From: Aaron Lawrence To: linux-staging@lists.linux.dev Cc: linux-kernel@vger.kernel.org Date: Sat, 22 Oct 2022 12:05:58 +0700 User-Agent: Evolution 3.44.4 MIME-Version: 1.0 X-Zoho-Virus-Status: 1 X-ZohoMailClient: External X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747364654107382153?= X-GMAIL-MSGID: =?utf-8?q?1747364654107382153?= From 66a313db135ffaa86d2aaddb3b2286c7b004b5f1 Mon Sep 17 00:00:00 2001 From: Aaron Lawrence Date: Sat, 22 Oct 2022 11:30:22 +0700 Subject: [PATCH] Staging: rtl8192e: fixed multiple coding style issues Fixed multiple coding style issues on multiple files according to the checkpatchscript. Signed-off-by: Aaron Lawrence --- drivers/staging/rtl8192e/rtl819x_HTProc.c | 1 + drivers/staging/rtl8192e/rtl819x_TSProc.c | 11 ++++---- drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 12 +-------- drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 28 +------------------- drivers/staging/rtl8192e/rtllib_crypt_wep.c | 10 +------ drivers/staging/rtl8192e/rtllib_tx.c | 15 +++++------ 6 files changed, 15 insertions(+), 62 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index ef3dca51cf99..b763cf0ba356 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -70,6 +70,7 @@ static u8 LINKSYS_MARVELL_4400N[3] = {0x00, 0x14, 0xa4}; void HTUpdateDefaultSetting(struct rtllib_device *ieee) { struct rt_hi_throughput *pHTInfo = ieee->pHTInfo; + pHTInfo->bRegShortGI20MHz = 1; pHTInfo->bRegShortGI40MHz = 1; diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c index 05c7e822f372..a3757c2dddee 100644 --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c @@ -29,7 +29,7 @@ static void RxPktPendingTimeout(struct timer_list *t) u8 index = 0; bool bPktInBuf = false; - spin_lock_irqsave(&(ieee->reorder_spinlock), flags); + spin_lock_irqsave(&ieee->reorder_spinlock, flags); if (pRxTs->rx_timeout_indicate_seq != 0xffff) { while (!list_empty(&pRxTs->rx_pending_pkt_list)) { pReorderEntry = (struct rx_reorder_entry *) @@ -72,8 +72,7 @@ static void RxPktPendingTimeout(struct timer_list *t) netdev_warn(ieee->dev, "%s(): Rx Reorder struct buffer full\n", __func__); - spin_unlock_irqrestore(&(ieee->reorder_spinlock), - flags); + spin_unlock_irqrestore(&ieee->reorder_spinlock, flags); return; } rtllib_indicate_packets(ieee, ieee->stats_IndicateArray, index); @@ -86,7 +85,7 @@ static void RxPktPendingTimeout(struct timer_list *t) msecs_to_jiffies(ieee->pHTInfo->rx_reorder_pending_time) ); } - spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags); + spin_unlock_irqrestore(&ieee->reorder_spinlock, flags); } static void TsAddBaProcess(struct timer_list *t) @@ -274,11 +273,11 @@ static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr, memcpy(pTsCommonInfo->Addr, Addr, 6); if (pTSPEC) - memcpy((u8 *)(&(pTsCommonInfo->TSpec)), (u8 *)pTSPEC, + memcpy((u8 *)(&pTsCommonInfo->TSpec), (u8 *)pTSPEC, sizeof(union tspec_body)); for (count = 0; count < TCLAS_Num; count++) - memcpy((u8 *)(&(pTsCommonInfo->TClass[count])), + memcpy((u8 *)(&pTsCommonInfo->TClass[count]), (u8 *)pTCLAS, sizeof(union qos_tclas)); pTsCommonInfo->TClasProc = TCLAS_Proc; diff --git a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c index a8d22da8bc9a..84fa4f23b0e6 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c @@ -52,7 +52,7 @@ static void *rtllib_ccmp_init(int key_idx) struct rtllib_ccmp_data *priv; priv = kzalloc(sizeof(*priv), GFP_ATOMIC); - if (priv == NULL) + if (!priv) goto fail; priv->key_idx = key_idx; @@ -74,7 +74,6 @@ static void *rtllib_ccmp_init(int key_idx) return NULL; } - static void rtllib_ccmp_deinit(void *priv) { struct rtllib_ccmp_data *_priv = priv; @@ -84,7 +83,6 @@ static void rtllib_ccmp_deinit(void *priv) kfree(priv); } - static int ccmp_init_iv_and_aad(struct rtllib_hdr_4addr *hdr, u8 *pn, u8 *iv, u8 *aad) { @@ -150,8 +148,6 @@ static int ccmp_init_iv_and_aad(struct rtllib_hdr_4addr *hdr, return aad_len; } - - static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) { struct rtllib_ccmp_data *key = priv; @@ -220,7 +216,6 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) return 0; } - static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) { struct rtllib_ccmp_data *key = priv; @@ -315,7 +310,6 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) return keyidx; } - static int rtllib_ccmp_set_key(void *key, int len, u8 *seq, void *priv) { struct rtllib_ccmp_data *data = priv; @@ -349,7 +343,6 @@ static int rtllib_ccmp_set_key(void *key, int len, u8 *seq, void *priv) return 0; } - static int rtllib_ccmp_get_key(void *key, int len, u8 *seq, void *priv) { struct rtllib_ccmp_data *data = priv; @@ -373,7 +366,6 @@ static int rtllib_ccmp_get_key(void *key, int len, u8 *seq, void *priv) return CCMP_TK_LEN; } - static void rtllib_ccmp_print_stats(struct seq_file *m, void *priv) { struct rtllib_ccmp_data *ccmp = priv; @@ -403,13 +395,11 @@ static struct lib80211_crypto_ops rtllib_crypt_ccmp = { .owner = THIS_MODULE, }; - static int __init rtllib_crypto_ccmp_init(void) { return lib80211_register_crypto_ops(&rtllib_crypt_ccmp); } - static void __exit rtllib_crypto_ccmp_exit(void) { lib80211_unregister_crypto_ops(&rtllib_crypt_ccmp); diff --git a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c index 8bc95651e384..6f749ebf29cf 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c @@ -62,7 +62,7 @@ static void *rtllib_tkip_init(int key_idx) return NULL; priv = kzalloc(sizeof(*priv), GFP_ATOMIC); - if (priv == NULL) + if (!priv) goto fail; priv->key_idx = key_idx; @@ -91,7 +91,6 @@ static void *rtllib_tkip_init(int key_idx) return NULL; } - static void rtllib_tkip_deinit(void *priv) { struct rtllib_tkip_data *_priv = priv; @@ -103,49 +102,41 @@ static void rtllib_tkip_deinit(void *priv) kfree_sensitive(priv); } - static inline u16 RotR1(u16 val) { return (val >> 1) | (val << 15); } - static inline u8 Lo8(u16 val) { return val & 0xff; } - static inline u8 Hi8(u16 val) { return val >> 8; } - static inline u16 Lo16(u32 val) { return val & 0xffff; } - static inline u16 Hi16(u32 val) { return val >> 16; } - static inline u16 Mk16(u8 hi, u8 lo) { return lo | (hi << 8); } - static inline u16 Mk16_le(u16 *v) { return *v; } - static const u16 Sbox[256] = { 0xC6A5, 0xF884, 0xEE99, 0xF68D, 0xFF0D, 0xD6BD, 0xDEB1, 0x9154, 0x6050, 0x0203, 0xCEA9, 0x567D, 0xE719, 0xB562, 0x4DE6, 0xEC9A, @@ -181,17 +172,14 @@ static const u16 Sbox[256] = { 0x82C3, 0x29B0, 0x5A77, 0x1E11, 0x7BCB, 0xA8FC, 0x6DD6, 0x2C3A, }; - static inline u16 _S_(u16 v) { u16 t = Sbox[Hi8(v)]; return Sbox[Lo8(v)] ^ ((t << 8) | (t >> 8)); } - #define PHASE1_LOOP_COUNT 8 - static void tkip_mixing_phase1(u16 *TTAK, const u8 *TK, const u8 *TA, u32 IV32) { int i, j; @@ -213,7 +201,6 @@ static void tkip_mixing_phase1(u16 *TTAK, const u8 *TK, const u8 *TA, u32 IV32) } } - static void tkip_mixing_phase2(u8 *WEPSeed, const u8 *TK, const u16 *TTAK, u16 IV16) { @@ -263,7 +250,6 @@ static void tkip_mixing_phase2(u8 *WEPSeed, const u8 *TK, const u16 *TTAK, #endif } - static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) { struct rtllib_tkip_data *tkey = priv; @@ -293,7 +279,6 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) } else tkey->tx_phase1_done = 1; - len = skb->len - hdr_len; pos = skb_push(skb, 8); memmove(pos, pos + 8, hdr_len); @@ -336,8 +321,6 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) if (!tcb_desc->bHwSec) return ret; return 0; - - } static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) @@ -436,7 +419,6 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) tkey->dot11RSNAStatsTKIPICVErrors++; return -5; } - } /* Update real counters only after Michael MIC verification has @@ -453,7 +435,6 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) return keyidx; } - static int michael_mic(struct crypto_shash *tfm_michael, u8 *key, u8 *hdr, u8 *data, size_t data_len, u8 *mic) { @@ -511,7 +492,6 @@ static void michael_mic_hdr(struct sk_buff *skb, u8 *hdr) hdr[13] = hdr[14] = hdr[15] = 0; /* reserved */ } - static int rtllib_michael_mic_add(struct sk_buff *skb, int hdr_len, void *priv) { struct rtllib_tkip_data *tkey = priv; @@ -539,7 +519,6 @@ static int rtllib_michael_mic_add(struct sk_buff *skb, int hdr_len, void *priv) return 0; } - static void rtllib_michael_mic_failure(struct net_device *dev, struct rtllib_hdr_4addr *hdr, int keyidx) @@ -609,7 +588,6 @@ static int rtllib_michael_mic_verify(struct sk_buff *skb, int keyidx, return 0; } - static int rtllib_tkip_set_key(void *key, int len, u8 *seq, void *priv) { struct rtllib_tkip_data *tkey = priv; @@ -640,7 +618,6 @@ static int rtllib_tkip_set_key(void *key, int len, u8 *seq, void *priv) return 0; } - static int rtllib_tkip_get_key(void *key, int len, u8 *seq, void *priv) { struct rtllib_tkip_data *tkey = priv; @@ -671,7 +648,6 @@ static int rtllib_tkip_get_key(void *key, int len, u8 *seq, void *priv) return TKIP_KEY_LEN; } - static void rtllib_tkip_print_stats(struct seq_file *m, void *priv) { struct rtllib_tkip_data *tkip = priv; @@ -713,13 +689,11 @@ static struct lib80211_crypto_ops rtllib_crypt_tkip = { .owner = THIS_MODULE, }; - static int __init rtllib_crypto_tkip_init(void) { return lib80211_register_crypto_ops(&rtllib_crypt_tkip); } - static void __exit rtllib_crypto_tkip_exit(void) { lib80211_unregister_crypto_ops(&rtllib_crypt_tkip); diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c b/drivers/staging/rtl8192e/rtllib_crypt_wep.c index 7790271a6a40..21c2b7666d6f 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c @@ -27,7 +27,6 @@ struct prism2_wep_data { struct arc4_ctx tx_ctx_arc4; }; - static void *prism2_wep_init(int keyidx) { struct prism2_wep_data *priv; @@ -36,7 +35,7 @@ static void *prism2_wep_init(int keyidx) return NULL; priv = kzalloc(sizeof(*priv), GFP_ATOMIC); - if (priv == NULL) + if (!priv) return NULL; priv->key_idx = keyidx; @@ -46,7 +45,6 @@ static void *prism2_wep_init(int keyidx) return priv; } - static void prism2_wep_deinit(void *priv) { kfree_sensitive(priv); @@ -120,7 +118,6 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) return 0; } - /* Perform WEP decryption on given struct buffer. Buffer includes whole WEP * part of the frame: IV (4 bytes), encrypted payload (including SNAP header), * ICV (4 bytes). len includes both IV and ICV. @@ -180,7 +177,6 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) return 0; } - static int prism2_wep_set_key(void *key, int len, u8 *seq, void *priv) { struct prism2_wep_data *wep = priv; @@ -194,7 +190,6 @@ static int prism2_wep_set_key(void *key, int len, u8 *seq, void *priv) return 0; } - static int prism2_wep_get_key(void *key, int len, u8 *seq, void *priv) { struct prism2_wep_data *wep = priv; @@ -207,7 +202,6 @@ static int prism2_wep_get_key(void *key, int len, u8 *seq, void *priv) return wep->key_len; } - static void prism2_wep_print_stats(struct seq_file *m, void *priv) { struct prism2_wep_data *wep = priv; @@ -231,13 +225,11 @@ static struct lib80211_crypto_ops rtllib_crypt_wep = { .owner = THIS_MODULE, }; - static int __init rtllib_crypto_wep_init(void) { return lib80211_register_crypto_ops(&rtllib_crypt_wep); } - static void __exit rtllib_crypto_wep_exit(void) { lib80211_unregister_crypto_ops(&rtllib_crypt_wep); diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c index e307020580a0..a8de6c34882b 100644 --- a/drivers/staging/rtl8192e/rtllib_tx.c +++ b/drivers/staging/rtl8192e/rtllib_tx.c @@ -191,7 +191,6 @@ int rtllib_encrypt_fragment(struct rtllib_device *ieee, struct sk_buff *frag, return 0; } - void rtllib_txb_free(struct rtllib_txb *txb) { if (unlikely(!txb)) @@ -307,7 +306,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, goto FORCED_AGG_SETTING; } else if (!pTxTs->bUsingBa) { if (SN_LESS(pTxTs->TxAdmittedBARecord.ba_start_seq_ctrl.field.seq_num, - (pTxTs->TxCurSeq+1)%4096)) + (pTxTs->TxCurSeq + 1) % 4096)) pTxTs->bUsingBa = true; else goto FORCED_AGG_SETTING; @@ -404,7 +403,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, if (tcb_desc->bBroadcast || tcb_desc->bMulticast) return; - if (is_broadcast_ether_addr(skb->data+16)) + if (is_broadcast_ether_addr(skb->data + 16)) return; if (ieee->mode < IEEE_N_24G) { @@ -475,7 +474,6 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, tcb_desc->bRTSBW = false; } - static void rtllib_txrate_selectmode(struct rtllib_device *ieee, struct cb_desc *tcb_desc) { @@ -506,7 +504,7 @@ static u16 rtllib_query_seqnum(struct rtllib_device *ieee, struct sk_buff *skb, skb->priority, TX_DIR, true)) return 0; seqnum = pTS->TxCurSeq; - pTS->TxCurSeq = (pTS->TxCurSeq+1)%4096; + pTS->TxCurSeq = (pTS->TxCurSeq + 1) % 4096; return seqnum; } return 0; @@ -614,7 +612,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) if (skb->len > 282) { if (ether_type == ETH_P_IP) { const struct iphdr *ip = (struct iphdr *) - ((u8 *)skb->data+14); + ((u8 *)skb->data + 14); if (ip->protocol == IPPROTO_UDP) { struct udphdr *udp; @@ -818,10 +816,10 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) cpu_to_le16(rtllib_query_seqnum(ieee, skb_frag, header.addr1)); frag_hdr->seq_ctl = - cpu_to_le16(le16_to_cpu(frag_hdr->seq_ctl)<<4 | i); + cpu_to_le16(le16_to_cpu(frag_hdr->seq_ctl) << 4 | i); } else { frag_hdr->seq_ctl = - cpu_to_le16(ieee->seq_ctrl[0]<<4 | i); + cpu_to_le16(ieee->seq_ctrl[0] << 4 | i); } /* Put a SNAP header on the first fragment */ if (i == 0) { @@ -959,7 +957,6 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) netif_stop_queue(dev); stats->tx_errors++; return 1; - } netdev_tx_t rtllib_xmit(struct sk_buff *skb, struct net_device *dev) -- 2.38.1