Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp2063532rwj; Sun, 30 Oct 2022 10:36:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4rMBEN3sG+/fdvHeNLCTD3g8TbPx4lKnJM7n+KEq7abee+FFk6XG0f8X+oPgvz2/o5uJz/ X-Received: by 2002:a17:907:6d9b:b0:78d:f24b:e358 with SMTP id sb27-20020a1709076d9b00b0078df24be358mr8878858ejc.714.1667151385251; Sun, 30 Oct 2022 10:36:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667151385; cv=none; d=google.com; s=arc-20160816; b=uqLjTwoYCnFKG63i2weko4BMjhLDUlbDU0T88rBMKmIXej+/vDzqJIef04cR6RiPkg mun9DYP26Ihs6GrVla05E/X4/nlr3a/cbKiYR2OhYg+d7UrmQY7LPvmJp5/P6ie1pPmD R82WxwsDDvCtH2KThGR1709/QDo4X5iTV53nc09O2mTe+fdZEF4ijYFWx4zlJYgmqxnb 1qz0VY3pfWKrpxuiq/vnrmUslbRV5mQPtsCFea4mJ1j5Z7Z6AaPu+01uDXeW9XRwBoc8 ilsPGsUjSMalTgk17b9GWnWPqifRysp4cl6bJhmH7eJuK/4SMdI1q2AU+fKIPj3BQydL tsEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=c/etGoh4+SPCqPzmtQ82eLnf8KVfmpLT/m+vzxeS/9Y=; b=AmFUpuVUJtAnqL6dDo6a7tfNMImQjUJ3qY3TtanJWf7rIEIbBl6Y2t1GZrQ2nVSLIb x2yB16ZAfyq80Mt3RyJvzfGz1APXjvTWGmJNJCjY8uoRqV/ehuDFyAbxUkrDH7b0VxQf PWGzjrZXmUKcMcPiDxZld6Y8ZwGUZ94BwVsA322BBg4tRA1pebW3CEEWftcD69PElqlY oaqSFV1rkXvBVE1nJChuZtfx2/iLTgC3xJ17aRgQaS4/3NM8wf8CuARtBXhFnBMaOgQF aDCFZ7RUcv7oCp5ibsIlm//0qJ2tkW6muH1B6KRWSJ9+clTaXG8+t3iHDi7b0bwUPf2w Rd9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v8-20020a170906b00800b0078d23ac6981si3924759ejy.790.2022.10.30.10.36.01; Sun, 30 Oct 2022 10:36:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229968AbiJ3ReB (ORCPT + 99 others); Sun, 30 Oct 2022 13:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbiJ3Rdv (ORCPT ); Sun, 30 Oct 2022 13:33:51 -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 3B688A44C for ; Sun, 30 Oct 2022 10:33:46 -0700 (PDT) Received: from ipservice-092-217-067-184.092.217.pools.vodafone-ip.de ([92.217.67.184] 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 1opCBq-000469-If; Sun, 30 Oct 2022 18:33:42 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH v2 02/13] staging: r8188eu: remove duplicate category check Date: Sun, 30 Oct 2022 18:33:15 +0100 Message-Id: <20221030173326.1588647-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221030173326.1588647-1-martin@kaiser.cx> References: <20221030173326.1588647-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The caller of on_action_public has already checked the action category. We can remove the check in on_action_public. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 5a366688a3f7..7d4f208d161b 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3819,16 +3819,12 @@ unsigned int on_action_public(struct adapter *padapter, struct recv_frame *precv unsigned int ret = _FAIL; u8 *pframe = precv_frame->rx_data; u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr); - u8 category, action; + u8 action; /* check RA matches or not */ if (memcmp(myid(&padapter->eeprompriv), mgmt->da, ETH_ALEN)) goto exit; - category = frame_body[0]; - if (category != WLAN_CATEGORY_PUBLIC) - goto exit; - action = frame_body[1]; switch (action) { case ACT_PUBLIC_VENDOR: -- 2.30.2