From nobody Sun May 10 22:40:29 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 0BC54C433F5 for ; Thu, 21 Apr 2022 20:08:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392232AbiDUUL1 (ORCPT ); Thu, 21 Apr 2022 16:11:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1392198AbiDUULH (ORCPT ); Thu, 21 Apr 2022 16:11:07 -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 561FF4C795 for ; Thu, 21 Apr 2022 13:08:17 -0700 (PDT) Received: from dslb-178-004-168-011.178.004.pools.vodafone-ip.de ([178.4.168.11] 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 1nhd65-0001vc-8t; Thu, 21 Apr 2022 22:08:13 +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/4] staging: r8188eu: remove dummy entries from OnAction_tbl Date: Thu, 21 Apr 2022 22:08:01 +0200 Message-Id: <20220421200805.192083-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220421200805.192083-1-martin@kaiser.cx> References: <20220421200805.192083-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" Unlike mlme_sta_tbl, OnAction_tbl is an array of structs. OnAction iterates over the array to find the entry for a specific action category. No action is performed if a category has no entry. We can remove the entries that point to the dummy function DoReserved. These were the last users of DoReserved, the function itself can be removed as well. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 -------- drivers/staging/r8188eu/include/ieee80211.h | 3 --- 2 files changed, 11 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 190de0b59c42..2d52e9b84786 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -38,10 +38,7 @@ static struct action_handler OnAction_tbl[] =3D { {RTW_WLAN_CATEGORY_DLS, "ACTION_DLS", &OnAction_dls}, {RTW_WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back}, {RTW_WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public}, - {RTW_WLAN_CATEGORY_RADIO_MEASUREMENT, "ACTION_RADIO_MEASUREMENT", &DoRese= rved}, - {RTW_WLAN_CATEGORY_FT, "ACTION_FT", &DoReserved}, {RTW_WLAN_CATEGORY_HT, "ACTION_HT", &OnAction_ht}, - {RTW_WLAN_CATEGORY_SA_QUERY, "ACTION_SA_QUERY", &DoReserved}, {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &OnAction_wmm}, {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &OnAction_p2p}, }; @@ -3959,11 +3956,6 @@ unsigned int OnAction(struct adapter *padapter, stru= ct recv_frame *precv_frame) return _SUCCESS; } =20 -unsigned int DoReserved(struct adapter *padapter, struct recv_frame *precv= _frame) -{ - return _SUCCESS; -} - struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv) { struct xmit_frame *pmgntframe; diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/= r8188eu/include/ieee80211.h index 0e37cd8974b5..81b16ca93429 100644 --- a/drivers/staging/r8188eu/include/ieee80211.h +++ b/drivers/staging/r8188eu/include/ieee80211.h @@ -601,10 +601,7 @@ enum rtw_ieee80211_category { RTW_WLAN_CATEGORY_DLS =3D 2, RTW_WLAN_CATEGORY_BACK =3D 3, RTW_WLAN_CATEGORY_PUBLIC =3D 4, /* IEEE 802.11 public action frames */ - RTW_WLAN_CATEGORY_RADIO_MEASUREMENT =3D 5, - RTW_WLAN_CATEGORY_FT =3D 6, RTW_WLAN_CATEGORY_HT =3D 7, - RTW_WLAN_CATEGORY_SA_QUERY =3D 8, RTW_WLAN_CATEGORY_TDLS =3D 12, RTW_WLAN_CATEGORY_WMM =3D 17, RTW_WLAN_CATEGORY_P2P =3D 0x7f,/* P2P action frames */ --=20 2.30.2 From nobody Sun May 10 22:40:29 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 9A19EC433EF for ; Thu, 21 Apr 2022 20:08:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392220AbiDUULN (ORCPT ); Thu, 21 Apr 2022 16:11:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1392207AbiDUULI (ORCPT ); Thu, 21 Apr 2022 16:11:08 -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 B1AAD4C79A for ; Thu, 21 Apr 2022 13:08:17 -0700 (PDT) Received: from dslb-178-004-168-011.178.004.pools.vodafone-ip.de ([178.4.168.11] 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 1nhd66-0001vc-Bu; Thu, 21 Apr 2022 22:08:14 +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/4] staging: r8188eu: on_action_spct does nothing Date: Thu, 21 Apr 2022 22:08:02 +0200 Message-Id: <20220421200805.192083-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220421200805.192083-1-martin@kaiser.cx> References: <20220421200805.192083-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" One of the entries in OnAction_tbl refers to on_action_spct. This function reads some information but it performs no action. Remove on_action_spct and its entry in OnAction_tbl. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 37 --------------------- drivers/staging/r8188eu/include/ieee80211.h | 1 - 2 files changed, 38 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 2d52e9b84786..d185280a0b93 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -33,7 +33,6 @@ static mlme_handler mlme_sta_tbl[] =3D { }; =20 static struct action_handler OnAction_tbl[] =3D { - {RTW_WLAN_CATEGORY_SPECTRUM_MGMT, "ACTION_SPECTRUM_MGMT", on_action_spct= }, {RTW_WLAN_CATEGORY_QOS, "ACTION_QOS", &OnAction_qos}, {RTW_WLAN_CATEGORY_DLS, "ACTION_DLS", &OnAction_dls}, {RTW_WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back}, @@ -1476,42 +1475,6 @@ unsigned int OnDisassoc(struct adapter *padapter, st= ruct recv_frame *precv_frame return _SUCCESS; } =20 -unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *p= recv_frame) -{ - unsigned int ret =3D _FAIL; - struct sta_info *psta =3D NULL; - struct sta_priv *pstapriv =3D &padapter->stapriv; - u8 *pframe =3D precv_frame->rx_data; - u8 *frame_body =3D (u8 *)(pframe + sizeof(struct ieee80211_hdr_3addr)); - u8 category; - u8 action; - - psta =3D rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); - - if (!psta) - goto exit; - - category =3D frame_body[0]; - if (category !=3D RTW_WLAN_CATEGORY_SPECTRUM_MGMT) - goto exit; - - action =3D frame_body[1]; - switch (action) { - case RTW_WLAN_ACTION_SPCT_MSR_REQ: - case RTW_WLAN_ACTION_SPCT_MSR_RPRT: - case RTW_WLAN_ACTION_SPCT_TPC_REQ: - case RTW_WLAN_ACTION_SPCT_TPC_RPRT: - break; - case RTW_WLAN_ACTION_SPCT_CHL_SWITCH: - break; - default: - break; - } - -exit: - return ret; -} - unsigned int OnAction_qos(struct adapter *padapter, struct recv_frame *pre= cv_frame) { return _SUCCESS; diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/= r8188eu/include/ieee80211.h index 81b16ca93429..69fdccff88a0 100644 --- a/drivers/staging/r8188eu/include/ieee80211.h +++ b/drivers/staging/r8188eu/include/ieee80211.h @@ -596,7 +596,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr) =20 /* Action category code */ enum rtw_ieee80211_category { - RTW_WLAN_CATEGORY_SPECTRUM_MGMT =3D 0, RTW_WLAN_CATEGORY_QOS =3D 1, RTW_WLAN_CATEGORY_DLS =3D 2, RTW_WLAN_CATEGORY_BACK =3D 3, --=20 2.30.2 From nobody Sun May 10 22:40:29 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 895AFC433F5 for ; Thu, 21 Apr 2022 20:08:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392245AbiDUULh (ORCPT ); Thu, 21 Apr 2022 16:11:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1392208AbiDUULJ (ORCPT ); Thu, 21 Apr 2022 16:11:09 -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 975E04C795 for ; Thu, 21 Apr 2022 13:08:18 -0700 (PDT) Received: from dslb-178-004-168-011.178.004.pools.vodafone-ip.de ([178.4.168.11] 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 1nhd67-0001vc-79; Thu, 21 Apr 2022 22:08:15 +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/4] staging: r8188eu: remove OnAction_qos Date: Thu, 21 Apr 2022 22:08:03 +0200 Message-Id: <20220421200805.192083-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220421200805.192083-1-martin@kaiser.cx> References: <20220421200805.192083-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 the empty function OnAction_qos and its entry in OnAction_tbl. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ------ drivers/staging/r8188eu/include/ieee80211.h | 1 - 2 files changed, 7 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index d185280a0b93..ed776de064ec 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -33,7 +33,6 @@ static mlme_handler mlme_sta_tbl[] =3D { }; =20 static struct action_handler OnAction_tbl[] =3D { - {RTW_WLAN_CATEGORY_QOS, "ACTION_QOS", &OnAction_qos}, {RTW_WLAN_CATEGORY_DLS, "ACTION_DLS", &OnAction_dls}, {RTW_WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back}, {RTW_WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public}, @@ -1475,11 +1474,6 @@ unsigned int OnDisassoc(struct adapter *padapter, st= ruct recv_frame *precv_frame return _SUCCESS; } =20 -unsigned int OnAction_qos(struct adapter *padapter, struct recv_frame *pre= cv_frame) -{ - return _SUCCESS; -} - unsigned int OnAction_dls(struct adapter *padapter, struct recv_frame *pre= cv_frame) { return _SUCCESS; diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/= r8188eu/include/ieee80211.h index 69fdccff88a0..2dd1318651ff 100644 --- a/drivers/staging/r8188eu/include/ieee80211.h +++ b/drivers/staging/r8188eu/include/ieee80211.h @@ -596,7 +596,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr) =20 /* Action category code */ enum rtw_ieee80211_category { - RTW_WLAN_CATEGORY_QOS =3D 1, RTW_WLAN_CATEGORY_DLS =3D 2, RTW_WLAN_CATEGORY_BACK =3D 3, RTW_WLAN_CATEGORY_PUBLIC =3D 4, /* IEEE 802.11 public action frames */ --=20 2.30.2 From nobody Sun May 10 22:40:29 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 58FC9C433FE for ; Thu, 21 Apr 2022 20:08:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392233AbiDUULn (ORCPT ); Thu, 21 Apr 2022 16:11:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1392223AbiDUULP (ORCPT ); Thu, 21 Apr 2022 16:11:15 -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 168EF4C79A for ; Thu, 21 Apr 2022 13:08:22 -0700 (PDT) Received: from dslb-178-004-168-011.178.004.pools.vodafone-ip.de ([178.4.168.11] 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 1nhd68-0001vc-2b; Thu, 21 Apr 2022 22:08:16 +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/4] staging: r8188eu: remove OnAction_dls Date: Thu, 21 Apr 2022 22:08:04 +0200 Message-Id: <20220421200805.192083-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220421200805.192083-1-martin@kaiser.cx> References: <20220421200805.192083-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 the empty function OnAction_dls and its entry in OnAction_tbl. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ------ drivers/staging/r8188eu/include/ieee80211.h | 1 - 2 files changed, 7 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index ed776de064ec..f426e26341ee 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -33,7 +33,6 @@ static mlme_handler mlme_sta_tbl[] =3D { }; =20 static struct action_handler OnAction_tbl[] =3D { - {RTW_WLAN_CATEGORY_DLS, "ACTION_DLS", &OnAction_dls}, {RTW_WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back}, {RTW_WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public}, {RTW_WLAN_CATEGORY_HT, "ACTION_HT", &OnAction_ht}, @@ -1474,11 +1473,6 @@ unsigned int OnDisassoc(struct adapter *padapter, st= ruct recv_frame *precv_frame return _SUCCESS; } =20 -unsigned int OnAction_dls(struct adapter *padapter, struct recv_frame *pre= cv_frame) -{ - return _SUCCESS; -} - unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *pr= ecv_frame) { u8 *addr; diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/= r8188eu/include/ieee80211.h index 2dd1318651ff..fe2dc2a0a802 100644 --- a/drivers/staging/r8188eu/include/ieee80211.h +++ b/drivers/staging/r8188eu/include/ieee80211.h @@ -596,7 +596,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr) =20 /* Action category code */ enum rtw_ieee80211_category { - RTW_WLAN_CATEGORY_DLS =3D 2, RTW_WLAN_CATEGORY_BACK =3D 3, RTW_WLAN_CATEGORY_PUBLIC =3D 4, /* IEEE 802.11 public action frames */ RTW_WLAN_CATEGORY_HT =3D 7, --=20 2.30.2