From nobody Mon Jun 15 07:34:00 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 D9087C433F5 for ; Mon, 2 May 2022 20:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387151AbiEBUKs (ORCPT ); Mon, 2 May 2022 16:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235613AbiEBUKp (ORCPT ); Mon, 2 May 2022 16:10:45 -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 0DF74DF2B for ; Mon, 2 May 2022 13:07:15 -0700 (PDT) Received: from ipservice-092-217-077-109.092.217.pools.vodafone-ip.de ([92.217.77.109] 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 1nlcK7-0007ch-41; Mon, 02 May 2022 22:07: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 1/9] staging: r8188eu: action category ht is not used Date: Mon, 2 May 2022 22:06:44 +0200 Message-Id: <20220502200652.143665-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502200652.143665-1-martin@kaiser.cx> References: <20220502200652.143665-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 r8188eu driver does not handle the ht action category. Remove the empty handler function, the entry in OnAction_tbl and the define for the category. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ------ drivers/staging/r8188eu/include/ieee80211.h | 1 - drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 3 files changed, 9 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 839b0b85993e..01fcd996e192 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -35,7 +35,6 @@ static mlme_handler mlme_sta_tbl[] =3D { static struct action_handler OnAction_tbl[] =3D { {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}, {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &OnAction_wmm}, {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &OnAction_p2p}, }; @@ -3837,11 +3836,6 @@ unsigned int on_action_public(struct adapter *padapt= er, struct recv_frame *precv return ret; } =20 -unsigned int OnAction_ht(struct adapter *padapter, struct recv_frame *prec= v_frame) -{ - return _SUCCESS; -} - unsigned int OnAction_wmm(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 fe2dc2a0a802..0dd7da912891 100644 --- a/drivers/staging/r8188eu/include/ieee80211.h +++ b/drivers/staging/r8188eu/include/ieee80211.h @@ -598,7 +598,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr) enum rtw_ieee80211_category { RTW_WLAN_CATEGORY_BACK =3D 3, RTW_WLAN_CATEGORY_PUBLIC =3D 4, /* IEEE 802.11 public action frames */ - RTW_WLAN_CATEGORY_HT =3D 7, RTW_WLAN_CATEGORY_TDLS =3D 12, RTW_WLAN_CATEGORY_WMM =3D 17, RTW_WLAN_CATEGORY_P2P =3D 0x7f,/* P2P action frames */ diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/stagi= ng/r8188eu/include/rtw_mlme_ext.h index dcf91e7894a5..0deb6c963d0c 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -577,8 +577,6 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_frame); unsigned int on_action_public(struct adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAction_ht(struct adapter *padapter, - struct recv_frame *precv_frame); unsigned int OnAction_wmm(struct adapter *padapter, struct recv_frame *precv_frame); unsigned int OnAction_p2p(struct adapter *padapter, --=20 2.30.2 From nobody Mon Jun 15 07:34:00 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 8A6E2C433EF for ; Mon, 2 May 2022 20:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387182AbiEBUKw (ORCPT ); Mon, 2 May 2022 16:10:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235231AbiEBUKp (ORCPT ); Mon, 2 May 2022 16:10:45 -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 8BD7DDF32 for ; Mon, 2 May 2022 13:07:15 -0700 (PDT) Received: from ipservice-092-217-077-109.092.217.pools.vodafone-ip.de ([92.217.77.109] 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 1nlcK8-0007ch-1f; Mon, 02 May 2022 22:07:12 +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/9] staging: r8188eu: action category wmm is not used Date: Mon, 2 May 2022 22:06:45 +0200 Message-Id: <20220502200652.143665-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502200652.143665-1-martin@kaiser.cx> References: <20220502200652.143665-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 r8188eu driver does not handle the wmm action category. Remove the empty handler function, the entry in OnAction_tbl and the define for the category. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ------ drivers/staging/r8188eu/include/ieee80211.h | 1 - drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 3 files changed, 9 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 01fcd996e192..a581930b05df 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -35,7 +35,6 @@ static mlme_handler mlme_sta_tbl[] =3D { static struct action_handler OnAction_tbl[] =3D { {RTW_WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back}, {RTW_WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public}, - {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &OnAction_wmm}, {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &OnAction_p2p}, }; =20 @@ -3836,11 +3835,6 @@ unsigned int on_action_public(struct adapter *padapt= er, struct recv_frame *precv return ret; } =20 -unsigned int OnAction_wmm(struct adapter *padapter, struct recv_frame *pre= cv_frame) -{ - return _SUCCESS; -} - unsigned int OnAction_p2p(struct adapter *padapter, struct recv_frame *pre= cv_frame) { u8 *frame_body; diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/= r8188eu/include/ieee80211.h index 0dd7da912891..f9a8aa243877 100644 --- a/drivers/staging/r8188eu/include/ieee80211.h +++ b/drivers/staging/r8188eu/include/ieee80211.h @@ -599,7 +599,6 @@ enum rtw_ieee80211_category { RTW_WLAN_CATEGORY_BACK =3D 3, RTW_WLAN_CATEGORY_PUBLIC =3D 4, /* IEEE 802.11 public action frames */ RTW_WLAN_CATEGORY_TDLS =3D 12, - RTW_WLAN_CATEGORY_WMM =3D 17, RTW_WLAN_CATEGORY_P2P =3D 0x7f,/* P2P action frames */ }; =20 diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/stagi= ng/r8188eu/include/rtw_mlme_ext.h index 0deb6c963d0c..c68b3c77c378 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -577,8 +577,6 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_frame); unsigned int on_action_public(struct adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAction_wmm(struct adapter *padapter, - struct recv_frame *precv_frame); unsigned int OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_frame); =20 --=20 2.30.2 From nobody Mon Jun 15 07:34:00 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 F1C67C433F5 for ; Mon, 2 May 2022 20:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387192AbiEBUK5 (ORCPT ); Mon, 2 May 2022 16:10:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355431AbiEBUKq (ORCPT ); Mon, 2 May 2022 16:10:46 -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 E14DB63E6 for ; Mon, 2 May 2022 13:07:16 -0700 (PDT) Received: from ipservice-092-217-077-109.092.217.pools.vodafone-ip.de ([92.217.77.109] 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 1nlcK8-0007ch-T6; Mon, 02 May 2022 22:07:12 +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/9] staging: r8188eu: remove unused action handler prototypes Date: Mon, 2 May 2022 22:06:46 +0200 Message-Id: <20220502200652.143665-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502200652.143665-1-martin@kaiser.cx> References: <20220502200652.143665-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" For some action categories, we removed the handler function, but we forgot the prototypes. Remove them as well. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/stagi= ng/r8188eu/include/rtw_mlme_ext.h index c68b3c77c378..136879a0a0f9 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -567,12 +567,6 @@ unsigned int OnDeAuth(struct adapter *padapter, unsigned int OnAction(struct adapter *padapter, struct recv_frame *precv_frame); =20 -unsigned int on_action_spct(struct adapter *padapter, - struct recv_frame *precv_frame); -unsigned int OnAction_qos(struct adapter *padapter, - struct recv_frame *precv_frame); -unsigned int OnAction_dls(struct adapter *padapter, - struct recv_frame *precv_frame); unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_frame); unsigned int on_action_public(struct adapter *padapter, --=20 2.30.2 From nobody Mon Jun 15 07:34:00 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 DC87DC433F5 for ; Mon, 2 May 2022 20:07:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387207AbiEBULS (ORCPT ); Mon, 2 May 2022 16:11:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387186AbiEBUKz (ORCPT ); Mon, 2 May 2022 16:10:55 -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 A559CBCA7 for ; Mon, 2 May 2022 13:07:21 -0700 (PDT) Received: from ipservice-092-217-077-109.092.217.pools.vodafone-ip.de ([92.217.77.109] 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 1nlcK9-0007ch-Na; Mon, 02 May 2022 22:07: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 4/9] staging: r8188eu: remove action_handler string Date: Mon, 2 May 2022 22:06:47 +0200 Message-Id: <20220502200652.143665-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502200652.143665-1-martin@kaiser.cx> References: <20220502200652.143665-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 unused str component from struct action_handler and the corresponding entries in OnAction_tbl. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +++--- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index a581930b05df..9c83a74f0795 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -33,9 +33,9 @@ static mlme_handler mlme_sta_tbl[] =3D { }; =20 static struct action_handler OnAction_tbl[] =3D { - {RTW_WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back}, - {RTW_WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public}, - {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &OnAction_p2p}, + {RTW_WLAN_CATEGORY_BACK, &OnAction_back}, + {RTW_WLAN_CATEGORY_PUBLIC, on_action_public}, + {RTW_WLAN_CATEGORY_P2P, &OnAction_p2p}, }; =20 static u8 null_addr[ETH_ALEN] =3D {0, 0, 0, 0, 0, 0}; diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/stagi= ng/r8188eu/include/rtw_mlme_ext.h index 136879a0a0f9..63e4ee8e3dfb 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -188,7 +188,6 @@ typedef unsigned int (*mlme_handler)(struct adapter *ad= apt, struct recv_frame *f =20 struct action_handler { unsigned int num; - char* str; unsigned int (*func)(struct adapter *adapt, struct recv_frame *frame); }; =20 --=20 2.30.2 From nobody Mon Jun 15 07:34:00 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 76845C433EF for ; Mon, 2 May 2022 20:07:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387213AbiEBULF (ORCPT ); Mon, 2 May 2022 16:11:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387181AbiEBUKr (ORCPT ); Mon, 2 May 2022 16:10:47 -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 4985F6336 for ; Mon, 2 May 2022 13:07:18 -0700 (PDT) Received: from ipservice-092-217-077-109.092.217.pools.vodafone-ip.de ([92.217.77.109] 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 1nlcKA-0007ch-GR; Mon, 02 May 2022 22:07: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 5/9] staging: r8188eu: remove an unused category define Date: Mon, 2 May 2022 22:06:48 +0200 Message-Id: <20220502200652.143665-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502200652.143665-1-martin@kaiser.cx> References: <20220502200652.143665-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" RTW_WLAN_CATEGORY_TDLS is not used. Remove the define. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/ieee80211.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/= r8188eu/include/ieee80211.h index f9a8aa243877..c593f9278868 100644 --- a/drivers/staging/r8188eu/include/ieee80211.h +++ b/drivers/staging/r8188eu/include/ieee80211.h @@ -598,7 +598,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr) enum rtw_ieee80211_category { RTW_WLAN_CATEGORY_BACK =3D 3, RTW_WLAN_CATEGORY_PUBLIC =3D 4, /* IEEE 802.11 public action frames */ - RTW_WLAN_CATEGORY_TDLS =3D 12, RTW_WLAN_CATEGORY_P2P =3D 0x7f,/* P2P action frames */ }; =20 --=20 2.30.2 From nobody Mon Jun 15 07:34:00 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 DD17AC433F5 for ; Mon, 2 May 2022 20:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387200AbiEBULA (ORCPT ); Mon, 2 May 2022 16:11:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387178AbiEBUKr (ORCPT ); Mon, 2 May 2022 16:10:47 -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 AAEECBCA7 for ; Mon, 2 May 2022 13:07:17 -0700 (PDT) Received: from ipservice-092-217-077-109.092.217.pools.vodafone-ip.de ([92.217.77.109] 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 1nlcKB-0007ch-92; Mon, 02 May 2022 22:07: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 6/9] staging: r8188eu: replace OnAction_tbl with switch-case Date: Mon, 2 May 2022 22:06:49 +0200 Message-Id: <20220502200652.143665-7-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502200652.143665-1-martin@kaiser.cx> References: <20220502200652.143665-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" OnAction_tbl has only three entries. It's simpler to use a switch statement instead of iterating over the table. We can then remove the table itself and struct action_handler, which was used only for the table entries. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 22 +++++++++---------- .../staging/r8188eu/include/rtw_mlme_ext.h | 5 ----- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 9c83a74f0795..0df89bbdb63a 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -32,12 +32,6 @@ static mlme_handler mlme_sta_tbl[] =3D { OnAction, }; =20 -static struct action_handler OnAction_tbl[] =3D { - {RTW_WLAN_CATEGORY_BACK, &OnAction_back}, - {RTW_WLAN_CATEGORY_PUBLIC, on_action_public}, - {RTW_WLAN_CATEGORY_P2P, &OnAction_p2p}, -}; - static u8 null_addr[ETH_ALEN] =3D {0, 0, 0, 0, 0, 0}; =20 /************************************************** @@ -3877,9 +3871,7 @@ unsigned int OnAction_p2p(struct adapter *padapter, s= truct recv_frame *precv_fra =20 unsigned int OnAction(struct adapter *padapter, struct recv_frame *precv_f= rame) { - int i; unsigned char category; - struct action_handler *ptable; unsigned char *frame_body; u8 *pframe =3D precv_frame->rx_data; =20 @@ -3887,10 +3879,16 @@ unsigned int OnAction(struct adapter *padapter, str= uct recv_frame *precv_frame) =20 category =3D frame_body[0]; =20 - for (i =3D 0; i < ARRAY_SIZE(OnAction_tbl); i++) { - ptable =3D &OnAction_tbl[i]; - if (category =3D=3D ptable->num) - ptable->func(padapter, precv_frame); + switch (category) { + case RTW_WLAN_CATEGORY_BACK: + OnAction_back(padapter, precv_frame); + break; + case RTW_WLAN_CATEGORY_PUBLIC: + on_action_public(padapter, precv_frame); + break; + case RTW_WLAN_CATEGORY_P2P: + OnAction_p2p(padapter, precv_frame); + break; } return _SUCCESS; } diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/stagi= ng/r8188eu/include/rtw_mlme_ext.h index 63e4ee8e3dfb..888b12a9f755 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -186,11 +186,6 @@ enum SCAN_STATE { =20 typedef unsigned int (*mlme_handler)(struct adapter *adapt, struct recv_fr= ame *frame); =20 -struct action_handler { - unsigned int num; - unsigned int (*func)(struct adapter *adapt, struct recv_frame *frame); -}; - struct ss_res { int state; int bss_cnt; --=20 2.30.2 From nobody Mon Jun 15 07:34:00 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 9B158C433EF for ; Mon, 2 May 2022 20:07:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387247AbiEBULJ (ORCPT ); Mon, 2 May 2022 16:11:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231508AbiEBUKt (ORCPT ); Mon, 2 May 2022 16:10:49 -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 91668BCAF for ; Mon, 2 May 2022 13:07:19 -0700 (PDT) Received: from ipservice-092-217-077-109.092.217.pools.vodafone-ip.de ([92.217.77.109] 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 1nlcKC-0007ch-2j; Mon, 02 May 2022 22:07: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 7/9] staging: r8188eu: use ieee80211_mgmt for action category Date: Mon, 2 May 2022 22:06:50 +0200 Message-Id: <20220502200652.143665-8-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502200652.143665-1-martin@kaiser.cx> References: <20220502200652.143665-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 struct ieee80211_mgmt from ieee80211.h to read the action category. There's no need to parse the incoming frame ourselves. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 0df89bbdb63a..96b0da90c2ba 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3871,15 +3871,9 @@ unsigned int OnAction_p2p(struct adapter *padapter, = struct recv_frame *precv_fra =20 unsigned int OnAction(struct adapter *padapter, struct recv_frame *precv_f= rame) { - unsigned char category; - unsigned char *frame_body; - u8 *pframe =3D precv_frame->rx_data; - - frame_body =3D (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3ad= dr)); - - category =3D frame_body[0]; + struct ieee80211_mgmt *mgmt =3D (struct ieee80211_mgmt *)precv_frame->rx_= data; =20 - switch (category) { + switch (mgmt->u.action.category) { case RTW_WLAN_CATEGORY_BACK: OnAction_back(padapter, precv_frame); break; --=20 2.30.2 From nobody Mon Jun 15 07:34:00 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 80FB1C433EF for ; Mon, 2 May 2022 20:07:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387256AbiEBULO (ORCPT ); Mon, 2 May 2022 16:11:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387197AbiEBUKy (ORCPT ); Mon, 2 May 2022 16:10:54 -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 B5E7CDF0D for ; Mon, 2 May 2022 13:07:20 -0700 (PDT) Received: from ipservice-092-217-077-109.092.217.pools.vodafone-ip.de ([92.217.77.109] 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 1nlcKC-0007ch-SC; Mon, 02 May 2022 22:07:17 +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 8/9] staging: r8188eu: use standard category defines Date: Mon, 2 May 2022 22:06:51 +0200 Message-Id: <20220502200652.143665-9-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502200652.143665-1-martin@kaiser.cx> References: <20220502200652.143665-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" Replace some of the driver-specific defines for action categories with the defines from ieee80211.h. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 24 ++++++++++----------- drivers/staging/r8188eu/core/rtw_p2p.c | 4 ++-- drivers/staging/r8188eu/include/ieee80211.h | 2 -- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 96b0da90c2ba..848b5051aa13 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1494,7 +1494,7 @@ unsigned int OnAction_back(struct adapter *padapter, = struct recv_frame *precv_fr frame_body =3D (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3ad= dr)); =20 category =3D frame_body[0]; - if (category =3D=3D RTW_WLAN_CATEGORY_BACK) { /* representing Block Ack = */ + if (category =3D=3D WLAN_CATEGORY_BACK) { /* representing Block Ack */ if (!pmlmeinfo->HT_enable) return _SUCCESS; action =3D frame_body[1]; @@ -1551,7 +1551,7 @@ static int get_reg_classes_full_count(struct p2p_chan= nels *channel_list) =20 void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr) { - unsigned char category =3D RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category =3D WLAN_CATEGORY_PUBLIC; u8 action =3D P2P_PUB_ACTION_ACTION; __be32 p2poui =3D cpu_to_be32(P2POUI); u8 oui_subtype =3D P2P_GO_NEGO_REQ; @@ -1881,7 +1881,7 @@ void issue_p2p_GO_request(struct adapter *padapter, u= 8 *raddr) =20 static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 = *frame_body, uint len, u8 result) { - unsigned char category =3D RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category =3D WLAN_CATEGORY_PUBLIC; u8 action =3D P2P_PUB_ACTION_ACTION; __be32 p2poui =3D cpu_to_be32(P2POUI); u8 oui_subtype =3D P2P_GO_NEGO_RESP; @@ -2243,7 +2243,7 @@ static void issue_p2p_GO_response(struct adapter *pad= apter, u8 *raddr, u8 *frame =20 static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 r= esult) { - unsigned char category =3D RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category =3D WLAN_CATEGORY_PUBLIC; u8 action =3D P2P_PUB_ACTION_ACTION; __be32 p2poui =3D cpu_to_be32(P2POUI); u8 oui_subtype =3D P2P_GO_NEGO_CONF; @@ -2404,7 +2404,7 @@ static void issue_p2p_GO_confirm(struct adapter *pada= pter, u8 *raddr, u8 result) =20 void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr) { - unsigned char category =3D RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category =3D WLAN_CATEGORY_PUBLIC; u8 action =3D P2P_PUB_ACTION_ACTION; __be32 p2poui =3D cpu_to_be32(P2POUI); u8 oui_subtype =3D P2P_INVIT_REQ; @@ -2651,7 +2651,7 @@ void issue_p2p_invitation_request(struct adapter *pad= apter, u8 *raddr) =20 void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8= dialogToken, u8 status_code) { - unsigned char category =3D RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category =3D WLAN_CATEGORY_PUBLIC; u8 action =3D P2P_PUB_ACTION_ACTION; __be32 p2poui =3D cpu_to_be32(P2POUI); u8 oui_subtype =3D P2P_INVIT_RESP; @@ -2841,7 +2841,7 @@ void issue_p2p_invitation_response(struct adapter *pa= dapter, u8 *raddr, u8 dialo =20 void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid, u8 u= ssidlen, u8 *pdev_raddr) { - unsigned char category =3D RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category =3D WLAN_CATEGORY_PUBLIC; u8 action =3D P2P_PUB_ACTION_ACTION; u8 dialogToken =3D 1; u8 oui_subtype =3D P2P_PROVISION_DISC_REQ; @@ -3812,7 +3812,7 @@ unsigned int on_action_public(struct adapter *padapte= r, struct recv_frame *precv goto exit; =20 category =3D frame_body[0]; - if (category !=3D RTW_WLAN_CATEGORY_PUBLIC) + if (category !=3D WLAN_CATEGORY_PUBLIC) goto exit; =20 action =3D frame_body[1]; @@ -3874,10 +3874,10 @@ unsigned int OnAction(struct adapter *padapter, str= uct recv_frame *precv_frame) struct ieee80211_mgmt *mgmt =3D (struct ieee80211_mgmt *)precv_frame->rx_= data; =20 switch (mgmt->u.action.category) { - case RTW_WLAN_CATEGORY_BACK: + case WLAN_CATEGORY_BACK: OnAction_back(padapter, precv_frame); break; - case RTW_WLAN_CATEGORY_PUBLIC: + case WLAN_CATEGORY_PUBLIC: on_action_public(padapter, precv_frame); break; case RTW_WLAN_CATEGORY_P2P: @@ -5370,7 +5370,7 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da,= unsigned short reason, int =20 void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsig= ned char action, unsigned short status) { - u8 category =3D RTW_WLAN_CATEGORY_BACK; + u8 category =3D WLAN_CATEGORY_BACK; u16 start_seq; u16 BA_para_set; u16 reason_code; @@ -5504,7 +5504,7 @@ static void issue_action_BSSCoexistPacket(struct adap= ter *padapter) if (pmlmeinfo->bwmode_updated) return; =20 - category =3D RTW_WLAN_CATEGORY_PUBLIC; + category =3D WLAN_CATEGORY_PUBLIC; action =3D ACT_PUBLIC_BSSCOEXIST; =20 pmgntframe =3D alloc_mgtxmitframe(pxmitpriv); diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188= eu/core/rtw_p2p.c index fadacef44813..59bb1bd12d59 100644 --- a/drivers/staging/r8188eu/core/rtw_p2p.c +++ b/drivers/staging/r8188eu/core/rtw_p2p.c @@ -171,7 +171,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_in= fo *pwdinfo, u8 *da, u8 s struct adapter *padapter =3D pwdinfo->padapter; struct xmit_priv *pxmitpriv =3D &padapter->xmitpriv; struct mlme_ext_priv *pmlmeext =3D &padapter->mlmeextpriv; - unsigned char category =3D RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category =3D WLAN_CATEGORY_PUBLIC; u8 action =3D P2P_PUB_ACTION_ACTION; __be32 p2poui =3D cpu_to_be32(P2POUI); u8 oui_subtype =3D P2P_DEVDISC_RESP; @@ -233,7 +233,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_in= fo *pwdinfo, u8 *da, u8 s static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *= raddr, u8 *frame_body, u16 config_method) { struct adapter *padapter =3D pwdinfo->padapter; - unsigned char category =3D RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category =3D WLAN_CATEGORY_PUBLIC; u8 action =3D P2P_PUB_ACTION_ACTION; u8 dialogToken =3D frame_body[7]; /* The Dialog Token of provisioning d= iscovery request frame. */ __be32 p2poui =3D cpu_to_be32(P2POUI); diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/= r8188eu/include/ieee80211.h index c593f9278868..4d3e89939114 100644 --- a/drivers/staging/r8188eu/include/ieee80211.h +++ b/drivers/staging/r8188eu/include/ieee80211.h @@ -596,8 +596,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr) =20 /* Action category code */ enum rtw_ieee80211_category { - RTW_WLAN_CATEGORY_BACK =3D 3, - RTW_WLAN_CATEGORY_PUBLIC =3D 4, /* IEEE 802.11 public action frames */ RTW_WLAN_CATEGORY_P2P =3D 0x7f,/* P2P action frames */ }; =20 --=20 2.30.2 From nobody Mon Jun 15 07:34:00 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 EFFD4C433F5 for ; Mon, 2 May 2022 20:07:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387287AbiEBULV (ORCPT ); Mon, 2 May 2022 16:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387203AbiEBUKz (ORCPT ); Mon, 2 May 2022 16:10:55 -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 A5709DF20 for ; Mon, 2 May 2022 13:07:21 -0700 (PDT) Received: from ipservice-092-217-077-109.092.217.pools.vodafone-ip.de ([92.217.77.109] 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 1nlcKD-0007ch-O1; Mon, 02 May 2022 22:07:17 +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 9/9] staging: r8188eu: remove unused IEEE_* defines Date: Mon, 2 May 2022 22:06:52 +0200 Message-Id: <20220502200652.143665-10-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502200652.143665-1-martin@kaiser.cx> References: <20220502200652.143665-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 IEEE_* defines in the driver's ieee80211.h header file are not used. Remove them. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/ieee80211.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/r8188eu/include/ieee80211.h b/drivers/staging/= r8188eu/include/ieee80211.h index 4d3e89939114..15636a808f52 100644 --- a/drivers/staging/r8188eu/include/ieee80211.h +++ b/drivers/staging/r8188eu/include/ieee80211.h @@ -589,11 +589,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr) =20 #define MAXTID 16 =20 -#define IEEE_A (1<<0) -#define IEEE_B (1<<1) -#define IEEE_G (1<<2) -#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G) - /* Action category code */ enum rtw_ieee80211_category { RTW_WLAN_CATEGORY_P2P =3D 0x7f,/* P2P action frames */ --=20 2.30.2