Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp776967rwj; Sat, 29 Oct 2022 10:37:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM46Mx/1zElVdJwcpsO00b1F9tESMN62ScWrxqNuqtKsnd9E/IP6uEYEq2qTgMwLLU7WrxY2 X-Received: by 2002:a17:902:8549:b0:178:6399:3e0f with SMTP id d9-20020a170902854900b0017863993e0fmr5435365plo.35.1667065047069; Sat, 29 Oct 2022 10:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667065047; cv=none; d=google.com; s=arc-20160816; b=hS0BLfWzHDtbJ2PhMYijO9PQd/i2t9J/Bw5m0E7HhG1baJDImLxnIbbySQjFbMjnCP fIrRqvvMeFc/bowdmG0uqaIL8WsZGk8PPnLZftZ073Rtf4Es5GSxlXtFsBSyT1IYCk3O Vzi6x2Re8k2joQHC9RaV5Zm9SpY+Ht3O7JgcaDlC75YRDRLr4aAvDADCHKfZNUU11NVr W2/xlz9WkZZ2MqrmF8iievZDH4HI9XaZLj4f2XgZAOGngmPG3tQ+uDaFCejBiF5/k2ga GYFJBY2O25RVKT9adTWvE9uFX02ppvxUp1K2quvvp6q5ApsNPsbAHcKMdcuOQCERkKx3 xt0Q== 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=unIj9r9+tg0ftI9zdpChAVbHf9VgjST/l/T6vzY/4/lqvQJtqPC+xvGpxzKMi+/kXb pLtYC2K9dyJp6f8IEBGi2+YGnJD1US8iHzaMO/3tagu2zSKs+LZLyJXGTjhkGU++uzW0 eO9EPU4W3Ev/ghi6zHYVkaKVDZFIlHbfrZTDN2ZKlyYKjGr09JPK008gyxJA7xkckQz9 tRRPCFnIQBzj+DQfvaFgcG/AKAngvrZw78ieCNkDYrXdRHpAaU/CY1CK2ZrufRW+szAZ Z7kU950Q5wQy9YE6qmlI05PcutrQn1xjUYV/HAVO4WVJXQZrkJwfdW3OS9i2wl3rgOxx qk9w== 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 u22-20020a056a00159600b0056c72071d3esi2977104pfk.235.2022.10.29.10.37.16; Sat, 29 Oct 2022 10:37:27 -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 S229919AbiJ2RYU (ORCPT + 99 others); Sat, 29 Oct 2022 13:24:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbiJ2RYH (ORCPT ); Sat, 29 Oct 2022 13:24: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 8353840E11 for ; Sat, 29 Oct 2022 10:24:00 -0700 (PDT) Received: from dslb-188-097-213-253.188.097.pools.vodafone-ip.de ([188.97.213.253] 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 1oopYo-00074v-QI; Sat, 29 Oct 2022 19:23:54 +0200 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 02/13] staging: r8188eu: remove duplicate category check Date: Sat, 29 Oct 2022 19:23:26 +0200 Message-Id: <20221029172337.1574593-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221029172337.1574593-1-martin@kaiser.cx> References: <20221029172337.1574593-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