From nobody Fri May 8 00:59:24 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 BB525C433F5 for ; Sun, 15 May 2022 15:54:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237497AbiEOPyV (ORCPT ); Sun, 15 May 2022 11:54:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237447AbiEOPyO (ORCPT ); Sun, 15 May 2022 11:54:14 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D7D112D0D for ; Sun, 15 May 2022 08:54:13 -0700 (PDT) Received: from dslb-188-096-141-066.188.096.pools.vodafone-ip.de ([188.96.141.66] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nqGZL-0006NT-SG; Sun, 15 May 2022 17:54:07 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 1/5] staging: r8188eu: use ieee80211 helper to check for beacon Date: Sun, 15 May 2022 17:53:57 +0200 Message-Id: <20220515155401.352742-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220515155401.352742-1-martin@kaiser.cx> References: <20220515155401.352742-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use the ieee80211_is_beacon helper to check if the incoming frame is a beacon frame. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c b/drivers/stagin= g/r8188eu/hal/rtl8188e_rxdesc.c index 7e50a42b6f75..dff0cba751df 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c @@ -128,9 +128,7 @@ void update_recvframe_phyinfo_88e(struct recv_frame *pr= ecvframe, struct phy_stat (!memcmp(get_da(wlanhdr), myid(&padapter->eeprompriv), ETH_ALEN)); =20 - pkt_info.bPacketBeacon =3D pkt_info.bPacketMatchBSSID && - (GetFrameSubType(wlanhdr) =3D=3D WIFI_BEACON); - + pkt_info.bPacketBeacon =3D pkt_info.bPacketMatchBSSID && ieee80211_is_bea= con(fc); if (pkt_info.bPacketBeacon) { if (check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE)) sa =3D padapter->mlmepriv.cur_network.network.MacAddress; --=20 2.30.2 From nobody Fri May 8 00:59:24 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 ED558C433F5 for ; Sun, 15 May 2022 15:54:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237486AbiEOPyQ (ORCPT ); Sun, 15 May 2022 11:54:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbiEOPyO (ORCPT ); Sun, 15 May 2022 11:54:14 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FA2F12D16 for ; Sun, 15 May 2022 08:54:13 -0700 (PDT) Received: from dslb-188-096-141-066.188.096.pools.vodafone-ip.de ([188.96.141.66] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nqGZM-0006NT-NJ; Sun, 15 May 2022 17:54:08 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 2/5] staging: r8188eu: remove obsolete comments Date: Sun, 15 May 2022 17:53:58 +0200 Message-Id: <20220515155401.352742-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220515155401.352742-1-martin@kaiser.cx> References: <20220515155401.352742-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Remove some comments in HalPwrSeqCmd.c that contain no useful information. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/staging/r8188eu/hal/HalPwrSeqCmd.c b/drivers/staging/r= 8188eu/hal/HalPwrSeqCmd.c index 5b91aec6a7e3..150ea380c39e 100644 --- a/drivers/staging/r8188eu/hal/HalPwrSeqCmd.c +++ b/drivers/staging/r8188eu/hal/HalPwrSeqCmd.c @@ -1,30 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2007 - 2011 Realtek Corporation. */ =20 -/*++ - -Module Name: - HalPwrSeqCmd.c - -Abstract: - Implement HW Power sequence configuration CMD handling routine for Realte= k devices. - -Major Change History: - When Who What - ---------- --------------- ------------------------------- - 2011-10-26 Lucas Modify to be compatible with SD4-CE driver. - 2011-07-07 Roger Create. - ---*/ - #include "../include/HalPwrSeqCmd.h" =20 -/* Description: */ -/* This routine deals with the Power Configuration CMDs parsing - * for RTL8723/RTL8188E Series IC. - * Assumption: - * We should follow specific format which was released from HW SD. - */ u8 HalPwrSeqCmdParsing(struct adapter *padapter, struct wl_pwr_cfg pwrseqc= md[]) { struct wl_pwr_cfg pwrcfgcmd =3D {0}; --=20 2.30.2 From nobody Fri May 8 00:59:24 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 A4F52C433F5 for ; Sun, 15 May 2022 15:54:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237558AbiEOPy3 (ORCPT ); Sun, 15 May 2022 11:54:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237450AbiEOPyO (ORCPT ); Sun, 15 May 2022 11:54:14 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3D6B12D1C for ; Sun, 15 May 2022 08:54:13 -0700 (PDT) Received: from dslb-188-096-141-066.188.096.pools.vodafone-ip.de ([188.96.141.66] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nqGZN-0006NT-Fr; Sun, 15 May 2022 17:54:09 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/5] staging: r8188eu: simplify error handling in recv_func_prehandle Date: Sun, 15 May 2022 17:53:59 +0200 Message-Id: <20220515155401.352742-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220515155401.352742-1-martin@kaiser.cx> References: <20220515155401.352742-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Simplify the error handling in recv_func_prehandle. There's no need to goto exit, this would be the next statement anyway. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_recv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r818= 8eu/core/rtw_recv.c index 4060c0457613..df518439aea2 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -1673,12 +1673,9 @@ static int recv_func_prehandle(struct adapter *padap= ter, struct recv_frame *rfra =20 /* check the frame crtl field and decache */ ret =3D validate_recv_frame(padapter, rframe); - if (ret !=3D _SUCCESS) { + if (ret !=3D _SUCCESS) rtw_free_recvframe(rframe, pfree_recv_queue);/* free this recv_frame */ - goto exit; - } =20 -exit: return ret; } =20 --=20 2.30.2 From nobody Fri May 8 00:59:24 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 4BA1DC433F5 for ; Sun, 15 May 2022 15:54:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237573AbiEOPyc (ORCPT ); Sun, 15 May 2022 11:54:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237456AbiEOPyO (ORCPT ); Sun, 15 May 2022 11:54:14 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCE0512D1B for ; Sun, 15 May 2022 08:54:13 -0700 (PDT) Received: from dslb-188-096-141-066.188.096.pools.vodafone-ip.de ([188.96.141.66] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nqGZO-0006NT-6Q; Sun, 15 May 2022 17:54:10 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 4/5] staging: r8188eu: last_rx_mgnt_pkts is set but not used Date: Sun, 15 May 2022 17:54:00 +0200 Message-Id: <20220515155401.352742-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220515155401.352742-1-martin@kaiser.cx> References: <20220515155401.352742-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" last_rx_mgnt_pkts in struct stainfo_stats is set but not used. Remove it. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/sta_info.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/r8188eu/include/sta_info.h b/drivers/staging/r= 8188eu/include/sta_info.h index b7e6b1f319a2..4112c837bcef 100644 --- a/drivers/staging/r8188eu/include/sta_info.h +++ b/drivers/staging/r8188eu/include/sta_info.h @@ -48,7 +48,6 @@ struct stainfo_stats { u64 rx_ctrl_pkts; u64 rx_data_pkts; =20 - u64 last_rx_mgnt_pkts; u64 last_rx_beacon_pkts; u64 last_rx_probereq_pkts; u64 last_rx_probersp_pkts; @@ -230,7 +229,6 @@ struct sta_info { =20 #define sta_update_last_rx_pkts(sta) \ do { \ - sta->sta_stats.last_rx_mgnt_pkts =3D sta->sta_stats.rx_mgnt_pkts; \ sta->sta_stats.last_rx_beacon_pkts =3D sta->sta_stats.rx_beacon_pkts; \ sta->sta_stats.last_rx_probereq_pkts =3D sta->sta_stats.rx_probereq_pkts;= \ sta->sta_stats.last_rx_probersp_pkts =3D sta->sta_stats.rx_probersp_pkts;= \ --=20 2.30.2 From nobody Fri May 8 00:59:24 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 E1077C433F5 for ; Sun, 15 May 2022 15:54:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237590AbiEOPye (ORCPT ); Sun, 15 May 2022 11:54:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237487AbiEOPyQ (ORCPT ); Sun, 15 May 2022 11:54:16 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AA3012D26 for ; Sun, 15 May 2022 08:54:15 -0700 (PDT) Received: from dslb-188-096-141-066.188.096.pools.vodafone-ip.de ([188.96.141.66] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nqGZO-0006NT-V4; Sun, 15 May 2022 17:54:11 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 5/5] staging: r8188eu: assoc_rsp and assoc_rsp_len are not used Date: Sun, 15 May 2022 17:54:01 +0200 Message-Id: <20220515155401.352742-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220515155401.352742-1-martin@kaiser.cx> References: <20220515155401.352742-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The assoc_rsp buffer in struct mlme_priv is not used. There's no need to store an incoming association response after receiving an processing it. Remove the buffer pointer and its length from struct mlme_priv. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme.c | 1 - drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ------ drivers/staging/r8188eu/include/rtw_mlme.h | 2 -- 3 files changed, 9 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r818= 8eu/core/rtw_mlme.c index c44e636d2c05..5a815642c3f6 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -40,7 +40,6 @@ static void rtw_free_mlme_ie_data(u8 **ppie, u32 *plen) void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv) { kfree(pmlmepriv->assoc_req); - kfree(pmlmepriv->assoc_rsp); rtw_free_mlme_ie_data(&pmlmepriv->wps_beacon_ie, &pmlmepriv->wps_beacon_i= e_len); rtw_free_mlme_ie_data(&pmlmepriv->wps_probe_req_ie, &pmlmepriv->wps_probe= _req_ie_len); rtw_free_mlme_ie_data(&pmlmepriv->wps_probe_resp_ie, &pmlmepriv->wps_prob= e_resp_ie_len); diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 65330baa5a73..faf23fc950c5 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1272,7 +1272,6 @@ unsigned int OnAssocRsp(struct adapter *padapter, str= uct recv_frame *precv_frame int res; unsigned short status; struct ndis_802_11_var_ie *pIE; - struct mlme_priv *pmlmepriv =3D &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext =3D &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo =3D &pmlmeext->mlmext_info; /* struct wlan_bssid_ex *cur_network =3D &(pmlmeinfo->network); */ @@ -1343,11 +1342,6 @@ unsigned int OnAssocRsp(struct adapter *padapter, st= ruct recv_frame *precv_frame UpdateBrateTbl(padapter, pmlmeinfo->network.SupportedRates); =20 report_assoc_result: - if (res > 0) - rtw_buf_update(&pmlmepriv->assoc_rsp, &pmlmepriv->assoc_rsp_len, pframe,= pkt_len); - else - kfree(pmlmepriv->assoc_rsp); - report_join_res(padapter, res); =20 return _SUCCESS; diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r= 8188eu/include/rtw_mlme.h index 95c23bf1139d..d81668498e46 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme.h +++ b/drivers/staging/r8188eu/include/rtw_mlme.h @@ -363,8 +363,6 @@ struct mlme_priv { =20 u8 *assoc_req; u32 assoc_req_len; - u8 *assoc_rsp; - u32 assoc_rsp_len; =20 /* Number of associated Non-ERP stations (i.e., stations using 802.11b * in 802.11g BSS) */ --=20 2.30.2