From nobody Mon Apr 13 14:27:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E4CEC4332F for ; Sun, 13 Nov 2022 04:36:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235213AbiKMEgZ (ORCPT ); Sat, 12 Nov 2022 23:36:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235164AbiKMEfy (ORCPT ); Sat, 12 Nov 2022 23:35:54 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B5E512D1B for ; Sat, 12 Nov 2022 20:35:52 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id d9so6928952wrm.13 for ; Sat, 12 Nov 2022 20:35:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=5tZwItwL6s7lK3c+/8kCHb4udKHuff6wggT5kROdGK0=; b=PbWShGzBJPGbiRKsvmA0+Of1Q2hjrvNcZtQ9snSBkDjv3sUDgqR76LMQr3OmBfDKqJ miv/z/k4VMST+1xYB/goAtAoBoCsNCRILNbA3ye7MjOepB/ggksGF6JEADBY570MOOd1 JoJMR02Zw27r5qE1znonwRLTOsNFt5AD7geOPudRuC/PA9aoWi05HIi/68qu6IsXReN8 HMoQdWYuLIcZwRhRUIdbet1RDw4gfef1ZxrFYZAFdZNEt8SE8eSBwrEf3GHlq5SZspG1 +mOjCYItnF+hoXz4G25QJ4a7IRAZvEWLULoXOGs9KkkGunGrs3iBWuBLCgFA3dly1Cwm nksg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5tZwItwL6s7lK3c+/8kCHb4udKHuff6wggT5kROdGK0=; b=GVgYLrtYxPUtLmFbcoFevzbSEQvLci4hL7bqippWiZ7c3ToNXqoHj4O/tTALD2JtUG 5ncz0MwJnjfvOfrRI+uUEP3ljXp6C0O1pF5p4guy7Rrq6J8aqG3o2/BBAuNhnP/Ljo6s EBzA8oSsLlRrV/4qBYq1GV25oQRy6kFBvK1nSnyaX9sly90M+LOhFynHfBWIsK4ABra6 YR+mXnUPgYuRF98UwOa+kX4TDAV4sQEAp5OXetMjHlKUnWVMpgEX5l9VQsu++ht/6goK TQkscCyL1E84uCrRPcAQpIoGgyXMoXhkAfPs/zo0YvAq3qoxiaN8EV5bNrc6CxiqAphb 141A== X-Gm-Message-State: ANoB5pnq4tNQtFptlvXqkNcdc+F1fOEVHhzUGl6L2L48EvhMateD78Us 4wgIxsKGAqEp+4jaOIYazTA= X-Google-Smtp-Source: AA0mqf7oX67XqqD1ToukRTizzMIUIX/MbWx1hSLaiCbk6tyoOxcQmTMzenLPcwkCfmASOwn7H9qIog== X-Received: by 2002:a5d:688f:0:b0:236:70ab:52fb with SMTP id h15-20020a5d688f000000b0023670ab52fbmr4555451wru.557.1668314151144; Sat, 12 Nov 2022 20:35:51 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p54a07888.dip0.t-ipconnect.de. [84.160.120.136]) by smtp.gmail.com with ESMTPSA id z8-20020adfec88000000b00236722ebe66sm5967890wrn.75.2022.11.12.20.35.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 20:35:50 -0800 (PST) Date: Sun, 13 Nov 2022 05:35:49 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 06/10] staging: rtl8192e: Rename LinkDetectInfo Message-ID: <48d043893fa755490e810af204e5b7ad2ba606de.1668313325.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rename variable LinkDetectInfo to link_detect_info to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 58 ++++++++++---------- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 14 ++--- drivers/staging/rtl8192e/rtllib_softmac.c | 26 ++++----- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 8 +-- 6 files changed, 55 insertions(+), 55 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging= /rtl8192e/rtl8192e/rtl_core.c index 1bf5e760d87a..3379b4229a85 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -1250,15 +1250,15 @@ static void _rtl92e_update_rxcounts(struct r8192_pr= iv *priv, u32 *TotalRxBcnNum, *TotalRxBcnNum =3D 0; *TotalRxDataNum =3D 0; =20 - SlotIndex =3D (priv->rtllib->LinkDetectInfo.SlotIndex++) % - (priv->rtllib->LinkDetectInfo.SlotNum); - priv->rtllib->LinkDetectInfo.RxBcnNum[SlotIndex] =3D - priv->rtllib->LinkDetectInfo.NumRecvBcnInPeriod; - priv->rtllib->LinkDetectInfo.RxDataNum[SlotIndex] =3D - priv->rtllib->LinkDetectInfo.NumRecvDataInPeriod; - for (i =3D 0; i < priv->rtllib->LinkDetectInfo.SlotNum; i++) { - *TotalRxBcnNum +=3D priv->rtllib->LinkDetectInfo.RxBcnNum[i]; - *TotalRxDataNum +=3D priv->rtllib->LinkDetectInfo.RxDataNum[i]; + SlotIndex =3D (priv->rtllib->link_detect_info.SlotIndex++) % + (priv->rtllib->link_detect_info.SlotNum); + priv->rtllib->link_detect_info.RxBcnNum[SlotIndex] =3D + priv->rtllib->link_detect_info.NumRecvBcnInPeriod; + priv->rtllib->link_detect_info.RxDataNum[SlotIndex] =3D + priv->rtllib->link_detect_info.NumRecvDataInPeriod; + for (i =3D 0; i < priv->rtllib->link_detect_info.SlotNum; i++) { + *TotalRxBcnNum +=3D priv->rtllib->link_detect_info.RxBcnNum[i]; + *TotalRxDataNum +=3D priv->rtllib->link_detect_info.RxDataNum[i]; } } =20 @@ -1304,22 +1304,22 @@ static void _rtl92e_watchdog_wq_cb(void *data) } if ((ieee->state =3D=3D RTLLIB_LINKED) && (ieee->iw_mode =3D=3D IW_MODE_INFRA) && (!ieee->bNetPromiscuousMode)) { - if (ieee->LinkDetectInfo.NumRxOkInPeriod > 100 || - ieee->LinkDetectInfo.NumTxOkInPeriod > 100) + if (ieee->link_detect_info.NumRxOkInPeriod > 100 || + ieee->link_detect_info.NumTxOkInPeriod > 100) bBusyTraffic =3D true; =20 - if (ieee->LinkDetectInfo.NumRxOkInPeriod > 4000 || - ieee->LinkDetectInfo.NumTxOkInPeriod > 4000) { + if (ieee->link_detect_info.NumRxOkInPeriod > 4000 || + ieee->link_detect_info.NumTxOkInPeriod > 4000) { bHigherBusyTraffic =3D true; - if (ieee->LinkDetectInfo.NumRxOkInPeriod > 5000) + if (ieee->link_detect_info.NumRxOkInPeriod > 5000) bHigherBusyRxTraffic =3D true; else bHigherBusyRxTraffic =3D false; } =20 - if (((ieee->LinkDetectInfo.NumRxUnicastOkInPeriod + - ieee->LinkDetectInfo.NumTxOkInPeriod) > 8) || - (ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) + if (((ieee->link_detect_info.NumRxUnicastOkInPeriod + + ieee->link_detect_info.NumTxOkInPeriod) > 8) || + (ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) bEnterPS =3D false; else bEnterPS =3D true; @@ -1336,13 +1336,13 @@ static void _rtl92e_watchdog_wq_cb(void *data) rtl92e_leisure_ps_leave(dev); } =20 - ieee->LinkDetectInfo.NumRxOkInPeriod =3D 0; - ieee->LinkDetectInfo.NumTxOkInPeriod =3D 0; - ieee->LinkDetectInfo.NumRxUnicastOkInPeriod =3D 0; - ieee->LinkDetectInfo.bBusyTraffic =3D bBusyTraffic; + ieee->link_detect_info.NumRxOkInPeriod =3D 0; + ieee->link_detect_info.NumTxOkInPeriod =3D 0; + ieee->link_detect_info.NumRxUnicastOkInPeriod =3D 0; + ieee->link_detect_info.bBusyTraffic =3D bBusyTraffic; =20 - ieee->LinkDetectInfo.bHigherBusyTraffic =3D bHigherBusyTraffic; - ieee->LinkDetectInfo.bHigherBusyRxTraffic =3D bHigherBusyRxTraffic; + ieee->link_detect_info.bHigherBusyTraffic =3D bHigherBusyTraffic; + ieee->link_detect_info.bHigherBusyRxTraffic =3D bHigherBusyRxTraffic; =20 if (ieee->state =3D=3D RTLLIB_LINKED && ieee->iw_mode =3D=3D IW_MODE_INFR= A) { u32 TotalRxBcnNum =3D 0; @@ -1383,8 +1383,8 @@ static void _rtl92e_watchdog_wq_cb(void *data) =20 priv->check_roaming_cnt =3D 0; } - ieee->LinkDetectInfo.NumRecvBcnInPeriod =3D 0; - ieee->LinkDetectInfo.NumRecvDataInPeriod =3D 0; + ieee->link_detect_info.NumRecvBcnInPeriod =3D 0; + ieee->link_detect_info.NumRecvDataInPeriod =3D 0; } =20 spin_lock_irqsave(&priv->tx_lock, flags); @@ -2213,25 +2213,25 @@ static irqreturn_t _rtl92e_irq(int irq, void *netde= v) =20 if (inta & IMR_BKDOK) { priv->stats.txbkokint++; - priv->rtllib->LinkDetectInfo.NumTxOkInPeriod++; + priv->rtllib->link_detect_info.NumTxOkInPeriod++; _rtl92e_tx_isr(dev, BK_QUEUE); } =20 if (inta & IMR_BEDOK) { priv->stats.txbeokint++; - priv->rtllib->LinkDetectInfo.NumTxOkInPeriod++; + priv->rtllib->link_detect_info.NumTxOkInPeriod++; _rtl92e_tx_isr(dev, BE_QUEUE); } =20 if (inta & IMR_VIDOK) { priv->stats.txviokint++; - priv->rtllib->LinkDetectInfo.NumTxOkInPeriod++; + priv->rtllib->link_detect_info.NumTxOkInPeriod++; _rtl92e_tx_isr(dev, VI_QUEUE); } =20 if (inta & IMR_VODOK) { priv->stats.txvookint++; - priv->rtllib->LinkDetectInfo.NumTxOkInPeriod++; + priv->rtllib->link_detect_info.NumTxOkInPeriod++; _rtl92e_tx_isr(dev, VO_QUEUE); } =20 diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/r= tl8192e/rtl8192e/rtl_wx.c index b200d53c8e3d..4f16c3d079cc 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -393,7 +393,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev, rt_state =3D priv->rtllib->rf_power_state; if (!priv->up) return -ENETDOWN; - if (priv->rtllib->LinkDetectInfo.bBusyTraffic =3D=3D true) + if (priv->rtllib->link_detect_info.bBusyTraffic =3D=3D true) return -EAGAIN; =20 if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/r= tllib.h index 6b7b2c887c34..b5313c1ea32d 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1643,7 +1643,7 @@ struct rtllib_device { struct bandwidth_autoswitch bandwidth_auto_switch; bool FwRWRF; =20 - struct rt_link_detect LinkDetectInfo; + struct rt_link_detect link_detect_info; bool bIsAggregateFrame; struct rt_pwr_save_ctrl pwr_save_ctrl; =20 diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192= e/rtllib_rx.c index 46d75e925ee9..f9a35fcb1d1b 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1211,9 +1211,9 @@ static void rtllib_rx_check_leave_lps(struct rtllib_d= evice *ieee, u8 unicast, if (unicast) { =20 if (ieee->state =3D=3D RTLLIB_LINKED) { - if (((ieee->LinkDetectInfo.NumRxUnicastOkInPeriod + - ieee->LinkDetectInfo.NumTxOkInPeriod) > 8) || - (ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) { + if (((ieee->link_detect_info.NumRxUnicastOkInPeriod + + ieee->link_detect_info.NumTxOkInPeriod) > 8) || + (ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) { if (ieee->LeisurePSLeave) ieee->LeisurePSLeave(ieee->dev); } @@ -1355,8 +1355,8 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device = *ieee, struct sk_buff *skb, =20 /* Update statstics for AP roaming */ if (!bToOtherSTA) { - ieee->LinkDetectInfo.NumRecvDataInPeriod++; - ieee->LinkDetectInfo.NumRxOkInPeriod++; + ieee->link_detect_info.NumRecvDataInPeriod++; + ieee->link_detect_info.NumRxOkInPeriod++; } =20 /* Data frame - extract src/dst addresses */ @@ -1437,7 +1437,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device = *ieee, struct sk_buff *skb, else nr_subframes =3D 1; if (unicast) - ieee->LinkDetectInfo.NumRxUnicastOkInPeriod +=3D nr_subframes; + ieee->link_detect_info.NumRxUnicastOkInPeriod +=3D nr_subframes; rtllib_rx_check_leave_lps(ieee, unicast, nr_subframes); } =20 @@ -2620,7 +2620,7 @@ static inline void rtllib_process_probe_response( } if (is_beacon(frame_ctl)) { if (ieee->state >=3D RTLLIB_LINKED) - ieee->LinkDetectInfo.NumRecvBcnInPeriod++; + ieee->link_detect_info.NumRecvBcnInPeriod++; } } list_for_each_entry(target, &ieee->network_list, list) { diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rt= l8192e/rtllib_softmac.c index ac8132d8c45a..1d583e73d753 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1534,13 +1534,13 @@ static void rtllib_associate_complete_wq(void *data) ieee->pHTInfo->enable_ht); memset(ieee->dot11ht_oper_rate_set, 0, 16); } - ieee->LinkDetectInfo.SlotNum =3D 2 * (1 + + ieee->link_detect_info.SlotNum =3D 2 * (1 + ieee->current_network.beacon_interval / 500); - if (ieee->LinkDetectInfo.NumRecvBcnInPeriod =3D=3D 0 || - ieee->LinkDetectInfo.NumRecvDataInPeriod =3D=3D 0) { - ieee->LinkDetectInfo.NumRecvBcnInPeriod =3D 1; - ieee->LinkDetectInfo.NumRecvDataInPeriod =3D 1; + if (ieee->link_detect_info.NumRecvBcnInPeriod =3D=3D 0 || + ieee->link_detect_info.NumRecvDataInPeriod =3D=3D 0) { + ieee->link_detect_info.NumRecvBcnInPeriod =3D 1; + ieee->link_detect_info.NumRecvDataInPeriod =3D 1; } psc->LpsIdleCount =3D 0; ieee->link_change(ieee->dev); @@ -2369,7 +2369,7 @@ rtllib_rx_deauth(struct rtllib_device *ieee, struct s= k_buff *skb) ieee->state =3D RTLLIB_ASSOCIATING; ieee->softmac_stats.reassoc++; ieee->is_roaming =3D true; - ieee->LinkDetectInfo.bBusyTraffic =3D false; + ieee->link_detect_info.bBusyTraffic =3D false; rtllib_disassociate(ieee); RemovePeerTS(ieee, header->addr2); if (ieee->LedControlHandler !=3D NULL) @@ -2963,13 +2963,13 @@ int rtllib_softmac_init(struct rtllib_device *ieee) if (!ieee->dot11d_info) return -ENOMEM; =20 - ieee->LinkDetectInfo.SlotIndex =3D 0; - ieee->LinkDetectInfo.SlotNum =3D 2; - ieee->LinkDetectInfo.NumRecvBcnInPeriod =3D 0; - ieee->LinkDetectInfo.NumRecvDataInPeriod =3D 0; - ieee->LinkDetectInfo.NumTxOkInPeriod =3D 0; - ieee->LinkDetectInfo.NumRxOkInPeriod =3D 0; - ieee->LinkDetectInfo.NumRxUnicastOkInPeriod =3D 0; + ieee->link_detect_info.SlotIndex =3D 0; + ieee->link_detect_info.SlotNum =3D 2; + ieee->link_detect_info.NumRecvBcnInPeriod =3D 0; + ieee->link_detect_info.NumRecvDataInPeriod =3D 0; + ieee->link_detect_info.NumTxOkInPeriod =3D 0; + ieee->link_detect_info.NumRxOkInPeriod =3D 0; + ieee->link_detect_info.NumRxUnicastOkInPeriod =3D 0; ieee->bIsAggregateFrame =3D false; ieee->assoc_id =3D 0; ieee->queue_stop =3D 0; diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging= /rtl8192e/rtllib_softmac_wx.c index 7bac30b87c93..e02e7d9566b2 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -391,10 +391,10 @@ void rtllib_wx_sync_scan_wq(void *data) /* Notify AP that I wake up again */ rtllib_sta_ps_send_null_frame(ieee, 0); =20 - if (ieee->LinkDetectInfo.NumRecvBcnInPeriod =3D=3D 0 || - ieee->LinkDetectInfo.NumRecvDataInPeriod =3D=3D 0) { - ieee->LinkDetectInfo.NumRecvBcnInPeriod =3D 1; - ieee->LinkDetectInfo.NumRecvDataInPeriod =3D 1; + if (ieee->link_detect_info.NumRecvBcnInPeriod =3D=3D 0 || + ieee->link_detect_info.NumRecvDataInPeriod =3D=3D 0) { + ieee->link_detect_info.NumRecvBcnInPeriod =3D 1; + ieee->link_detect_info.NumRecvDataInPeriod =3D 1; } =20 if (ieee->data_hard_resume) --=20 2.37.3