From nobody Wed Feb 11 02:53:45 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 D288CC77B7A for ; Wed, 7 Jun 2023 15:01:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241021AbjFGPB5 (ORCPT ); Wed, 7 Jun 2023 11:01:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241010AbjFGPBt (ORCPT ); Wed, 7 Jun 2023 11:01:49 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A9741FCE for ; Wed, 7 Jun 2023 08:01:46 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-651e298be3fso7364855b3a.2 for ; Wed, 07 Jun 2023 08:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686150105; x=1688742105; 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=lESAI44jK8lmdOmkk5nFnrQMYUILCez8k/el0obunUU=; b=cbMzcV5Cw0osxGhAezosV9ljOtfaU9OauaLrcoXOALU+qc8nULFnG/ku+12tzlgADH qPCtrcZBg2u6SAkBXAI5C4y/Vq307naZ74laDdP73+HpvrSGIVNDDf9DxCeWpSrJ5c4j aYQ5/YgPo0eOCDV1nNnyZ3g6V8YglQUhj0xAvVW/e7k8/9kkb6Bp1ZTRotED90hNfwAK K+Dw0rTLraaaM/2eCqM6LfGyCq8foEIXJWSzK0qtdhIo5FW4xOMhvO5U7aqaMTe0mjGJ JySf/nps6k3eb4pfLtp0Qp+qlg2uE1XDnziSfUWAkXm0cPJ3lrLEV7hHcw6E22roPNTt zSGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686150105; x=1688742105; 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=lESAI44jK8lmdOmkk5nFnrQMYUILCez8k/el0obunUU=; b=JhpOzB7BmsEzbsr3WvVoZTFuJyqnfu6dosy4i9jilkdJ2rqe7aKy7OE3r5iskvgtP6 MOCHVfG8iDhfbcre1XhxDGap54SuMeQpgDaJ3Skt8sTSGdXDeb3LdBUZUBntoo7a8/P2 pCJBH2Hz6MN5KRpxC3BmBe08NoHbZ5YoyhHQ9NgDGgM/rmah+5PMnIHk0d5q2gU9mKPI /YtVCChbFOegFRkIKbcBfeiT4eECgZhazusaGpXQofp+rhlAjrnhXzN1FMVbZw2MW9Su 72WY21vTvqBHO9E2w3+c+9OhLtkTH3ZU2esf7603HgdLhHoeFbckPEJONLF2TfOvcKhn J/sw== X-Gm-Message-State: AC+VfDyvIkzdNqNIr8e2/OY7/8Ol296Y0Hp8/Ijq7CDmwWl1CL2edWBs WRrwGpJLPA9tAhoeKo3boPE= X-Google-Smtp-Source: ACHHUZ5bA4LaskD3jId1gka+sSU5c2YwDpMXXw2xTQN7TA68HiIT2X3O9E8oSmphVjxG/QzxOiW5Iw== X-Received: by 2002:a05:6a00:1782:b0:662:56b4:c2f2 with SMTP id s2-20020a056a00178200b0066256b4c2f2mr1648793pfg.25.1686150105470; Wed, 07 Jun 2023 08:01:45 -0700 (PDT) Received: from yogi-Zephyrus ([103.251.210.211]) by smtp.gmail.com with ESMTPSA id c14-20020aa78e0e000000b0063d24fcc2besm8523788pfr.125.2023.06.07.08.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 08:01:45 -0700 (PDT) Date: Wed, 7 Jun 2023 20:31:41 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] staging: rtl8192e: Remove variable SetWirelessMode Message-ID: 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" The variable SetWirelessMode is set in only one place throughout the driver. This patch removes the variable and calls the real function directly instead, eliminating the unnecessary indirection. Additionally, the removal of the variable aligns with the checkpatch guidelines by removing the use of CamelCase. Signed-off-by: Yogesh Hegde Reviewed-by: Dan Carpenter --- v2: Removed the variable and called the function direction instead of just renaming the variable as suggested by Greg Kroah-Hartman . --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtllib.h | 1 - drivers/staging/rtl8192e/rtllib_softmac.c | 16 +++++++--------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging= /rtl8192e/rtl8192e/rtl_core.c index 17b70dde7eeb..bbe0864e1348 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -716,7 +716,6 @@ static void _rtl92e_init_priv_handler(struct net_device= *dev) priv->rtllib->check_nic_enough_desc =3D _rtl92e_check_nic_enough_desc; priv->rtllib->handle_assoc_response =3D _rtl92e_handle_assoc_response; priv->rtllib->handle_beacon =3D _rtl92e_handle_beacon; - priv->rtllib->SetWirelessMode =3D rtl92e_set_wireless_mode; priv->rtllib->LeisurePSLeave =3D rtl92e_leisure_ps_leave; priv->rtllib->SetBWModeHandler =3D rtl92e_set_bw_mode; priv->rf_set_chan =3D rtl92e_set_channel; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/r= tllib.h index 4aa5ce9f7792..68a3b8af3119 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1710,7 +1710,6 @@ struct rtllib_device { enum ht_channel_width bandwidth, enum ht_extchnl_offset Offset); bool (*GetNmodeSupportBySecCfg)(struct net_device *dev); - void (*SetWirelessMode)(struct net_device *dev, u8 wireless_mode); bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev); u8 (*rtllib_ap_sec_type)(struct rtllib_device *ieee); void (*InitialGainHandler)(struct net_device *dev, u8 Operation); diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rt= l8192e/rtllib_softmac.c index 7c4cba6dcf46..ed171eca4916 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -19,6 +19,7 @@ #include #include #include "dot11d.h" +#include "rtl8192e/rtl_core.h" =20 static void rtllib_sta_wakeup(struct rtllib_device *ieee, short nl); =20 @@ -1503,7 +1504,7 @@ static void rtllib_associate_complete_wq(void *data) netdev_info(ieee->dev, "Using G rates:%d\n", ieee->rate); } else { ieee->rate =3D 22; - ieee->SetWirelessMode(ieee->dev, IEEE_B); + rtl92e_set_wireless_mode(ieee->dev, IEEE_B); netdev_info(ieee->dev, "Using B rates:%d\n", ieee->rate); } if (ieee->ht_info->bCurrentHTSupport && ieee->ht_info->enable_ht) { @@ -1687,14 +1688,12 @@ inline void rtllib_softmac_new_net(struct rtllib_de= vice *ieee, (ieee->modulation & RTLLIB_OFDM_MODULATION)) { ieee->rate =3D 108; - ieee->SetWirelessMode(ieee->dev, - IEEE_G); + rtl92e_set_wireless_mode(ieee->dev, IEEE_G); netdev_info(ieee->dev, "Using G rates\n"); } else { ieee->rate =3D 22; - ieee->SetWirelessMode(ieee->dev, - IEEE_B); + rtl92e_set_wireless_mode(ieee->dev, IEEE_B); netdev_info(ieee->dev, "Using B rates\n"); } @@ -2276,11 +2275,10 @@ static void rtllib_rx_auth_resp(struct rtllib_devic= e *ieee, struct sk_buff *skb) } /* Dummy wirless mode setting to avoid encryption issue */ if (bSupportNmode) { - ieee->SetWirelessMode(ieee->dev, - ieee->current_network.mode); + rtl92e_set_wireless_mode(ieee->dev, ieee->current_network.mode); } else { /*TODO*/ - ieee->SetWirelessMode(ieee->dev, IEEE_G); + rtl92e_set_wireless_mode(ieee->dev, IEEE_G); } =20 if ((ieee->current_network.mode =3D=3D IEEE_N_24G) && @@ -2615,7 +2613,7 @@ static void rtllib_start_ibss_wq(void *data) } =20 ieee->current_network.qos_data.supported =3D 0; - ieee->SetWirelessMode(ieee->dev, IEEE_G); + rtl92e_set_wireless_mode(ieee->dev, IEEE_G); ieee->current_network.mode =3D ieee->mode; ieee->current_network.atim_window =3D 0; ieee->current_network.capability =3D WLAN_CAPABILITY_IBSS; --=20 2.25.1 From nobody Wed Feb 11 02:53:45 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 E8EFCC7EE25 for ; Wed, 7 Jun 2023 15:02:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236191AbjFGPCc (ORCPT ); Wed, 7 Jun 2023 11:02:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241181AbjFGPCS (ORCPT ); Wed, 7 Jun 2023 11:02:18 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6360B2101 for ; Wed, 7 Jun 2023 08:02:12 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-65314ee05c6so3535154b3a.1 for ; Wed, 07 Jun 2023 08:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686150131; x=1688742131; 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=zG5lPa3pt3CBh78GFYF12trQ1TmiLPYaWhXfF67zHG0=; b=fvS9ICf7N5XMNdzgrh45C2R3ReuaMK6GJBriQnHXs0Czvd5kFAFdhB2MeUD11cgxww Y9juJb9+7UyrACHWPXzuyF4j3BtDCEnCpxOEaD2Zmn9+xYt9zKPCyhS54JSo3FJpeLtD paBmgmY+Og8RqX9BHdfL7KguvfxIsK8DXboc8CvH4tz1gk1kL3gfaV/0k8lRJ9dseVkO ZTay6y56HSk2Vag9sf3Ok3MqubW3yh8OX67pXgHoxS5tT14V7YcJtrZx3MQ6QiS2j0WD 3ZOJvzK9jx7W0SFciPjJKsXqQFJjoNS2M9F8oxFpLfC5QZNxiJDwxNXvLkFothhoTuOf V7yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686150131; x=1688742131; 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=zG5lPa3pt3CBh78GFYF12trQ1TmiLPYaWhXfF67zHG0=; b=eejv+j4EK9Hx0fqcq9yxXCKmWhI38AJ49iPA+BUuduSlgtFkymrKIgxpUu2IYadT0R oVONjTE4MD2bY2eJADSaGZyEKst5hBnQvLHl7i3EveiseA0S2DEdqdJmAp5+mYTBiyEr X9xlZ3gPRGtWcd1anHuk+j7e5uuk4r4CwVmgzkF5VQEb56KBUFZoFrCD4g6ozG9gIfiU j9j+4/U5y00Vdvky9bMAie1njKB6sy8NHesz/1605rwBcdqcvbBOyRYNEZD1uz9bXcqi 2apsOuju33X2AU47+IIlwr6/gQsDRSX04nxCzeHU/g4+Eo9d7hyZDw+FyNLsHIxVsM+L RWog== X-Gm-Message-State: AC+VfDwdzWXGw0HenlOccPJ7mCt4LInSzFkZOE6nMgSKsVyyAj6PaQw8 5JuqJfzxC1l6UsejpEevY+k= X-Google-Smtp-Source: ACHHUZ6h3Y9+P1svH1XAJ9BG/1uE9rCcobjW9vR+sGhuY7lgwDoF35Dt2eX4NYdlDEjqipeESYwzBQ== X-Received: by 2002:a05:6a00:2284:b0:64d:6c6f:84f2 with SMTP id f4-20020a056a00228400b0064d6c6f84f2mr3234856pfe.19.1686150130489; Wed, 07 Jun 2023 08:02:10 -0700 (PDT) Received: from yogi-Zephyrus ([103.251.210.211]) by smtp.gmail.com with ESMTPSA id c14-20020aa78e0e000000b0063d24fcc2besm8524214pfr.125.2023.06.07.08.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 08:02:10 -0700 (PDT) Date: Wed, 7 Jun 2023 20:32:06 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] staging: rtl8192e: Remove variable SetBWModeHandler Message-ID: <0af9595916447a28e27c249f3696fe107382ca53.1686149467.git.yogi.kernel@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" The variable SetBWModeHandler is set in only one place throughout the driver. This patch removes the variable and calls the real function directly instead, eliminating the unnecessary indirection. Additionally, the removal of the variable aligns with the checkpatch guidelines by removing the use of CamelCase. Signed-off-by: Yogesh Hegde Reviewed-by: Dan Carpenter --- v2: Removed the variable and called the function direction instead of just renaming the variable as suggested by Greg Kroah-Hartman --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 8 ++++---- drivers/staging/rtl8192e/rtllib.h | 3 --- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 6 +++--- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging= /rtl8192e/rtl8192e/rtl_core.c index bbe0864e1348..6f6c31344441 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -717,7 +717,6 @@ static void _rtl92e_init_priv_handler(struct net_device= *dev) priv->rtllib->handle_assoc_response =3D _rtl92e_handle_assoc_response; priv->rtllib->handle_beacon =3D _rtl92e_handle_beacon; priv->rtllib->LeisurePSLeave =3D rtl92e_leisure_ps_leave; - priv->rtllib->SetBWModeHandler =3D rtl92e_set_bw_mode; priv->rf_set_chan =3D rtl92e_set_channel; =20 priv->rtllib->start_send_beacons =3D rtl92e_start_beacon; diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rt= l8192e/rtl819x_HTProc.c index fe30a291e64c..ad92a8230055 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -6,6 +6,8 @@ */ #include "rtllib.h" #include "rtl819x_HT.h" +#include "rtl8192e/r8192E_phy.h" + u8 MCS_FILTER_ALL[16] =3D { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 @@ -835,12 +837,10 @@ static void HTSetConnectBwModeCallback(struct rtllib_= device *ieee) ieee->set_chan(ieee->dev, ieee->current_network.channel); =20 - ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20_40, - ht_info->CurSTAExtChnlOffset); + rtl92e_set_bw_mode(ieee->dev, HT_CHANNEL_WIDTH_20_40, ht_info->CurSTAExt= ChnlOffset); } else { ieee->set_chan(ieee->dev, ieee->current_network.channel); - ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, - HT_EXTCHNL_OFFSET_NO_EXT); + rtl92e_set_bw_mode(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_= EXT); } =20 ht_info->sw_bw_in_progress =3D false; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/r= tllib.h index 68a3b8af3119..d22a586043f2 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1706,9 +1706,6 @@ struct rtllib_device { =20 /* check whether Tx hw resource available */ short (*check_nic_enough_desc)(struct net_device *dev, int queue_index); - void (*SetBWModeHandler)(struct net_device *dev, - enum ht_channel_width bandwidth, - enum ht_extchnl_offset Offset); bool (*GetNmodeSupportBySecCfg)(struct net_device *dev); bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev); u8 (*rtllib_ap_sec_type)(struct rtllib_device *ieee); diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging= /rtl8192e/rtllib_softmac_wx.c index d85a32d2d050..9fb4fee93990 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -15,6 +15,7 @@ =20 #include "rtllib.h" #include "dot11d.h" +#include "rtl8192e/r8192E_phy.h" /* FIXME: add A freqs */ =20 const long rtllib_wlan_frequencies[] =3D { @@ -359,8 +360,7 @@ void rtllib_wx_sync_scan_wq(void *data) b40M =3D 1; chan_offset =3D ieee->ht_info->CurSTAExtChnlOffset; bandwidth =3D (enum ht_channel_width)ieee->ht_info->bCurBW40MHz; - ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, - HT_EXTCHNL_OFFSET_NO_EXT); + rtl92e_set_bw_mode(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_= EXT); } =20 rtllib_start_scan_syncro(ieee, 0); @@ -372,7 +372,7 @@ void rtllib_wx_sync_scan_wq(void *data) ieee->set_chan(ieee->dev, chan - 2); else ieee->set_chan(ieee->dev, chan); - ieee->SetBWModeHandler(ieee->dev, bandwidth, chan_offset); + rtl92e_set_bw_mode(ieee->dev, bandwidth, chan_offset); } else { ieee->set_chan(ieee->dev, chan); } --=20 2.25.1 From nobody Wed Feb 11 02:53:45 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 A02D6C77B7A for ; Wed, 7 Jun 2023 15:02:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241093AbjFGPCv (ORCPT ); Wed, 7 Jun 2023 11:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241248AbjFGPCh (ORCPT ); Wed, 7 Jun 2023 11:02:37 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D18C91FCE for ; Wed, 7 Jun 2023 08:02:35 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-653f9c7b3e4so3246891b3a.2 for ; Wed, 07 Jun 2023 08:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686150155; x=1688742155; 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=b2ADMSx2umuqEvoBHVVXSUc2jdp3ipOUY5DdCNizpaM=; b=ij1M2eNTekSpxOUXRRF9mkoieb28xM8pDUyZvBwBHImPB/I8Dh23nA6BKXriRZHOBg sN2xUJ/8QIlJ3TOJ4LHh7Nz9FwqHC9qwA3Lt5DYd25lREOJbFEmRZCt1Z5C6R1IlcyLk wpKi9BygFhPohF7qI3PN5gFtAjf2yYO43QCg8CeHezxHbMn7CwFoeebEAKX29SS0s1gq k3ZP+QvEFKva1gko2SCEDopH92454YqJg4kie+gIAe1khkRCTDgkFUWs1KSWw17vYoqS deL5iF59WFlekjH6IXXOuVu/kx1IJlI87ByglKBI3h96jl4TicMuN/L38X+cBA+RkLo3 7G9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686150155; x=1688742155; 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=b2ADMSx2umuqEvoBHVVXSUc2jdp3ipOUY5DdCNizpaM=; b=ZX4emvEyGVzzgNksHJ5yiOmgt9fnfjTWfpQ+y/4MuRGPxSM7ta3Ra5AkCRA1lbiG93 r/s6DTCEjE1fpP4ZYouZnj0tPiEd5KHow3jM5M2shs0/fYU0MW7Z2Q7ZLgnjtWt6ODEw a4lcnnY/nOBqq12fB0rE8mv27h5vvH8SyIJeyto9Md23/WRsNDv/N7UZhbVnkIHZfuaD D/pgIyKeFP9ueIEBriltvd1TyX5/UfeFuCxhCJsMW7pUxdei/+zoakrvPaHPDZS5gsC7 q/8TtE0RXL8m4Qw4QEpQCwmOR+rFBF54gSuJ5VTq9VOeHKwNXycOVIMvAXU6yWxaC4R2 D+Pw== X-Gm-Message-State: AC+VfDxNR3eb6i515MRL2HLm35CyIrCkcGjZ5r7hzCK2XbSG/kHKCM5+ 0IGvQ4HUtCsj6qtAO2UWlV0IGrDKMOw= X-Google-Smtp-Source: ACHHUZ7anfTta4o6oWSTW9RlfDa2eqa4r2iZe046/nK2wrjcPMTEbAVUG2p9+IAoqKlxfnypbO8/IA== X-Received: by 2002:a05:6a00:b8a:b0:654:9d3a:f970 with SMTP id g10-20020a056a000b8a00b006549d3af970mr4634432pfj.31.1686150155142; Wed, 07 Jun 2023 08:02:35 -0700 (PDT) Received: from yogi-Zephyrus ([103.251.210.211]) by smtp.gmail.com with ESMTPSA id y24-20020aa78058000000b00634dde2992bsm2300379pfm.132.2023.06.07.08.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 08:02:34 -0700 (PDT) Date: Wed, 7 Jun 2023 20:32:31 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/5] staging: rtl8192e: Remove variable LeisurePSLeave Message-ID: 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" The variable LeisurePSLeave is set in only one place throughout the driver. This patch removes the variable and calls the real function directly instead, eliminating the unnecessary indirection. Additionally, the removal of the variable aligns with the checkpatch guidelines by removing the use of CamelCase. Signed-off-by: Yogesh Hegde Reviewed-by: Dan Carpenter --- v2: Removed the variable and called the function direction instead of just renaming the variable as suggested by Greg Kroah-Hartman --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtllib.h | 1 - drivers/staging/rtl8192e/rtllib_rx.c | 3 ++- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 3 ++- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging= /rtl8192e/rtl8192e/rtl_core.c index 6f6c31344441..231903002233 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -716,7 +716,6 @@ static void _rtl92e_init_priv_handler(struct net_device= *dev) priv->rtllib->check_nic_enough_desc =3D _rtl92e_check_nic_enough_desc; priv->rtllib->handle_assoc_response =3D _rtl92e_handle_assoc_response; priv->rtllib->handle_beacon =3D _rtl92e_handle_beacon; - priv->rtllib->LeisurePSLeave =3D rtl92e_leisure_ps_leave; priv->rf_set_chan =3D rtl92e_set_channel; =20 priv->rtllib->start_send_beacons =3D rtl92e_start_beacon; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/r= tllib.h index d22a586043f2..f7fd8b77db99 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1719,7 +1719,6 @@ struct rtllib_device { =20 void (*rtllib_ips_leave_wq)(struct net_device *dev); void (*rtllib_ips_leave)(struct net_device *dev); - void (*LeisurePSLeave)(struct net_device *dev); =20 /* This must be the last item so that it points to the data * allocated beyond this structure by alloc_rtllib diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192= e/rtllib_rx.c index d44bf261de54..d8acede4b808 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -35,6 +35,7 @@ =20 #include "rtllib.h" #include "dot11d.h" +#include "rtl8192e/rtl_ps.h" =20 static void rtllib_rx_mgt(struct rtllib_device *ieee, struct sk_buff *skb, struct rtllib_rx_stats *stats); @@ -1212,7 +1213,7 @@ static void rtllib_rx_check_leave_lps(struct rtllib_d= evice *ieee, u8 unicast, if (((ieee->link_detect_info.NumRxUnicastOkInPeriod + ieee->link_detect_info.NumTxOkInPeriod) > 8) || (ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) { - ieee->LeisurePSLeave(ieee->dev); + rtl92e_leisure_ps_leave(ieee->dev); } } } diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging= /rtl8192e/rtllib_softmac_wx.c index 9fb4fee93990..07c46ad4f20e 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -16,6 +16,7 @@ #include "rtllib.h" #include "dot11d.h" #include "rtl8192e/r8192E_phy.h" +#include "rtl8192e/rtl_ps.h" /* FIXME: add A freqs */ =20 const long rtllib_wlan_frequencies[] =3D { @@ -341,7 +342,7 @@ void rtllib_wx_sync_scan_wq(void *data) =20 chan =3D ieee->current_network.channel; =20 - ieee->LeisurePSLeave(ieee->dev); + rtl92e_leisure_ps_leave(ieee->dev); /* notify AP to be in PS mode */ rtllib_sta_ps_send_null_frame(ieee, 1); rtllib_sta_ps_send_null_frame(ieee, 1); --=20 2.25.1 From nobody Wed Feb 11 02:53:45 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 D091FC7EE25 for ; Wed, 7 Jun 2023 15:05:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236343AbjFGPFI (ORCPT ); Wed, 7 Jun 2023 11:05:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241249AbjFGPC7 (ORCPT ); Wed, 7 Jun 2023 11:02:59 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C47821FC1 for ; Wed, 7 Jun 2023 08:02:54 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-53fbf2c42bfso6713282a12.3 for ; Wed, 07 Jun 2023 08:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686150174; x=1688742174; 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=ciCWuo7mkukE2uWGAYr6I0+J8XwMl63aYshkUdvmROQ=; b=VCxEtwdUm8HLNHQcljdU0bHwGkU554jQ9c9dorWKjf7VEN+f0JQeiDrT0d8aIgdBoN ssCPxv4w0oIcMiuOB25ZSy4jxoJc6BdNi0gjR8oJ9T2tSRYX8CxiR4GZck0qC3LvU1mc 2wtdVzce0PnIs7CErGRS3EP8l4VAFSeIao8Y+HNAJKGZc6oK/nvcPgrOb9f1rVpyih7I hqU0Mv2k0lVHOjN/vKKaGgJ/S4nxQaPDZR+fCrLJKS/pcSZRASNWCdjLhuLjl/DU+y+I VEeqg185Kio6zQl52dkxPSPNtJ/AoKjAwZo7Zj03NO044l57kDn0+PMAVtvsEt6Sztls 3n/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686150174; x=1688742174; 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=ciCWuo7mkukE2uWGAYr6I0+J8XwMl63aYshkUdvmROQ=; b=eyfvK0X61P5Gz/cOl5e+aoNB+XtAhOfxVXMwWZsBJVznBa09RqKA5Y9fdo69S9ZB+R Eyqmpmnt8VoSI2WQvBMmEXta5Evrxdj5O57c7U7nIq2yvVBxGtCcYfmJyuSg4NquJ2QK M34+clsN3/Vt3WbebGh7wjjn8tNsM/oJh+nobcfxXNBUks4q1sRkbj7iQv/GVGHtlCzC CXmYfgZwwmap4r9Z05POoqIT0iXSuWBNigQR2o2Fu7zkrBmtg6l3oClNxEzG8ZojftaG dKZnusMg3GctGl2LnJeuR2kgnNf1FKlLtpquxCugQel/tyMgOB3wG3M/0L5yMyBvz7j4 glNA== X-Gm-Message-State: AC+VfDwAo8gL6iZBjN4GYaz7iV+hL8H4BAkg0MTtv0uPZcP83ZHB0dKo KCE9G1MLXn2xna0gh8o6M80= X-Google-Smtp-Source: ACHHUZ4l5u97Jt7CCXzYWcOorreKz2dWoum4LQB1l3ensFhK3vI4lOOlDXpEYPrzw0rgb1vJ0Qj8uQ== X-Received: by 2002:a17:90a:598b:b0:253:26e5:765a with SMTP id l11-20020a17090a598b00b0025326e5765amr4456240pji.48.1686150174229; Wed, 07 Jun 2023 08:02:54 -0700 (PDT) Received: from yogi-Zephyrus ([103.251.210.211]) by smtp.gmail.com with ESMTPSA id nn4-20020a17090b38c400b002562cfb81dfsm1486061pjb.28.2023.06.07.08.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 08:02:53 -0700 (PDT) Date: Wed, 7 Jun 2023 20:32:50 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/5] staging: rtl8192e: Remove variable InitialGainHandler Message-ID: <15852c9ce64695e60b8dfa3d459ad5b1d26ba07e.1686149467.git.yogi.kernel@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" The variable InitialGainHandler is set in only one place throughout the driver. This patch removes the variable and calls the real function directly instead, eliminating the unnecessary indirection. Additionally, the removal of the variable aligns with the checkpatch guidelines by removing the use of CamelCase. Signed-off-by: Yogesh Hegde Reviewed-by: Dan Carpenter --- v2: Removed the variable and called the function direction instead of just renaming the variable as suggested by Greg Kroah-Hartman --- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 4 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtllib.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/stagi= ng/rtl8192e/rtl8192e/r8192E_phy.c index 641e993aaa86..5385bb099c56 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -1129,11 +1129,11 @@ void rtl92e_scan_op_backup(struct net_device *dev, = u8 Operation) if (priv->up) { switch (Operation) { case SCAN_OPT_BACKUP: - priv->rtllib->InitialGainHandler(dev, IG_Backup); + rtl92e_init_gain(dev, IG_Backup); break; =20 case SCAN_OPT_RESTORE: - priv->rtllib->InitialGainHandler(dev, IG_Restore); + rtl92e_init_gain(dev, IG_Restore); break; } } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging= /rtl8192e/rtl8192e/rtl_core.c index 231903002233..8218319ad834 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -731,7 +731,6 @@ static void _rtl92e_init_priv_handler(struct net_device= *dev) =20 priv->rtllib->SetHwRegHandler =3D rtl92e_set_reg; priv->rtllib->AllowAllDestAddrHandler =3D rtl92e_set_monitor_mode; - priv->rtllib->InitialGainHandler =3D rtl92e_init_gain; priv->rtllib->rtllib_ips_leave_wq =3D rtl92e_rtllib_ips_leave_wq; priv->rtllib->rtllib_ips_leave =3D rtl92e_rtllib_ips_leave; priv->rtllib->ScanOperationBackupHandler =3D rtl92e_scan_op_backup; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/r= tllib.h index f7fd8b77db99..92ed1b493f6b 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1709,7 +1709,6 @@ struct rtllib_device { bool (*GetNmodeSupportBySecCfg)(struct net_device *dev); bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev); u8 (*rtllib_ap_sec_type)(struct rtllib_device *ieee); - void (*InitialGainHandler)(struct net_device *dev, u8 Operation); void (*ScanOperationBackupHandler)(struct net_device *dev, u8 Operation); void (*SetHwRegHandler)(struct net_device *dev, u8 variable, u8 *val); --=20 2.25.1 From nobody Wed Feb 11 02:53:45 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 9D2ACC7EE25 for ; Wed, 7 Jun 2023 15:03:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235805AbjFGPDY (ORCPT ); Wed, 7 Jun 2023 11:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235973AbjFGPDN (ORCPT ); Wed, 7 Jun 2023 11:03:13 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 719411FF7 for ; Wed, 7 Jun 2023 08:03:12 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-662b85f4640so146604b3a.0 for ; Wed, 07 Jun 2023 08:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686150192; x=1688742192; 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=Msfw3FZTKqUZwLFrkysjS96Cdf9AFaQ0r06ieq0j1EI=; b=ae8/YKfoLrOaxVyfBu/iJH3C6PAtvFYaQurwvNiYf1D9kRVaGAfUs0+4s1rxmS0/f1 QAWo9JqKmCam0wf0B/CDYNnWcMId90CBErwYs1nGzPp6KLjyfu/699sLJqpmxt44Ju2j y3EvTLYYI9qZZKAJEawMh9XwfYCBcNYwTt/kJGrhTlbB+GTP+xgjgi3dW9JE74V1jvPM rktd/zKC2Ndwf0oe7MKoP0os2CLh4V3jyJRzSrZNZftsDfqNwp1+siCwC2y1pw4Nn3Bh I/ZlWvthFgDf27Ix00KcIyLDulsUnkl4rWRBXM1+FZIOMt/KRPwxvapLDLA0E/0P60z6 R2ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686150192; x=1688742192; 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=Msfw3FZTKqUZwLFrkysjS96Cdf9AFaQ0r06ieq0j1EI=; b=TO3zJ7cVBz0ItF300BrMDwFdrN12vbLRc/doY5BC/GT17r5KTCR4tsmAhFsioe/Fvv K7BcOHwDiU3rCOEbFAWTQuIoYt8VXDQfG4hRe6ugZCE/44AKP49JdKIhbAE9nhZlyIUZ 6Oei7N+Sr4vSCN04yR+fE7rHPxUlN63t4Ago1enpskkH33gx5/RP7w0v9BqkwVsklhbe rkg9XBhEJR74kHywNUAn/Iauc7F2inA07h6pi/9midTWaLjduAgultfktgTLZ76wQLkD 184wLYW3k3UZ7DVn6RR7EdxYlXGY2UjDHzl0SEf277MbIXFfom+OHkqH0cOuPVmIVUlM +lbA== X-Gm-Message-State: AC+VfDxG0JaNZ1z7sxHmE1xkqV+iNJmJrRvKiduyxp0Zkgug+mp/1Dls qWu1QVQElGYHVRDnm3fCcZw= X-Google-Smtp-Source: ACHHUZ5zTs8y/Itlfgfy+8u0sBdZokuQYGHRt7t3asqdPwB0slrZgugbMII/lgbtqzi09ALnSjxDnQ== X-Received: by 2002:a17:903:234c:b0:1ae:1659:bfe2 with SMTP id c12-20020a170903234c00b001ae1659bfe2mr2531711plh.34.1686150191792; Wed, 07 Jun 2023 08:03:11 -0700 (PDT) Received: from yogi-Zephyrus ([103.251.210.211]) by smtp.gmail.com with ESMTPSA id ld6-20020a170902fac600b001b04c2023e3sm10569143plb.218.2023.06.07.08.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 08:03:11 -0700 (PDT) Date: Wed, 7 Jun 2023 20:33:07 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/5] staging: rtl8192e: Remove DRV_NAME definition in rtllib_debug.h Message-ID: <41c6c24e703eedf6fb4febcf4cc7ef180af1db58.1686149467.git.yogi.kernel@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" The macro DRV_NAME is defined twice within the driver, once in "rtl_core.h" and again in "rtllib_debug.h". The definition in "rtllib_debug.h" overrides the definition in "rtl_core.h", resulting in warnings during compilation. This patch removes the redundant definition in "rtllib_debug.h" to avoid the warnings. Signed-off-by: Yogesh Hegde Reviewed-by: Dan Carpenter --- v2: No changes. --- drivers/staging/rtl8192e/rtllib_debug.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_debug.h b/drivers/staging/rtl8= 192e/rtllib_debug.h index f6b23defe225..ab8bd5fc4ca0 100644 --- a/drivers/staging/rtl8192e/rtllib_debug.h +++ b/drivers/staging/rtl8192e/rtllib_debug.h @@ -9,11 +9,6 @@ =20 #include =20 -/* Allow files to override DRV_NAME */ -#ifndef DRV_NAME -#define DRV_NAME "rtllib_92e" -#endif - extern u32 rt_global_debug_component; =20 /* These are the defines for rt_global_debug_component */ --=20 2.25.1