Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp792148rwj; Sat, 29 Oct 2022 10:56:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM45uWKbLDP+rBEYplJM7Pb6YZykF3ZwuIMzbckYwJsQlGBI3Ev9wn2+QOprwlN/u4x/ZBfr X-Received: by 2002:a05:6402:1292:b0:463:27a0:72b4 with SMTP id w18-20020a056402129200b0046327a072b4mr251067edv.419.1667066217174; Sat, 29 Oct 2022 10:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667066217; cv=none; d=google.com; s=arc-20160816; b=AI+HjpxGhLWagFgaJH/jBVPoUcyGkE/m/7YygT8eDCQPVvFKPBW2//WdB06P98XKF9 3W2QlzlNWY35p5K+pCZWBj2sooLjJiXkcvIMnYvDgOz9lbXei1mjIXeBNjFWwiRPAmbn nVgZXDltP7LNAS6PLLno+vX2hRso5xF0PX5EGRyZWLTusenvWCxRofPv7sukD1Xwn2Mp p4ghitzM7p/gDzRmi+EO82lK3DUPKmLScDYeY/ldlmH6oD30bgvSjGCRFEsrJxmoZB4c xX0G5H0zAWXZZIFI+imx5208KhBBHLqWCB4Y7E8GskCTPQz3qBH6kcVKXR6Oai+VTO57 Uxag== 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=xucvsVs4NhnGYaPGBS0xBYYt3ezp5YpiLO2H6O3Jwo0=; b=KAoeOnUrAT4Oj3BapRI0kuVcRieU4Q1Eqqw6EWgVxgA+h37jw34FigcXbnPIfdBBUU /fJVgD7aj5SriPgVoIalE6qidSPWMYMeWKkW9Mn3/lummLjM12Os9v7CRNmaZVvKx+Au BEn4Lf5GNz4Q1ZPprSCYLF6iUFUlClzc8mszl6ToH3c0GYmGBWY2nvFMfIyHRzK+1d2x aW0Ugl0GTw1ufrNvWBaN9Tz3uunQn7ZC6tltFkfqRBLHDghRD/Me2rZHg8D6oGA3YYD8 KtJ8bSGhbjhj63u5NUFr5ehRFlEWMFomGnsl6uJtHhKp+b3W7HpGUg8PvRcDny8QKylW uifg== 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 dr19-20020a170907721300b0079b8cce1170si2251469ejc.950.2022.10.29.10.56.27; Sat, 29 Oct 2022 10:56:57 -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 S229934AbiJ2RYW (ORCPT + 99 others); Sat, 29 Oct 2022 13:24:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiJ2RYI (ORCPT ); Sat, 29 Oct 2022 13:24: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 41D9A40E24 for ; Sat, 29 Oct 2022 10:24:01 -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 1oopYs-00074v-2S; Sat, 29 Oct 2022 19:23:58 +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 06/13] staging: r8188eu: remove category check in OnAction_p2p Date: Sat, 29 Oct 2022 19:23:30 +0200 Message-Id: <20221029172337.1574593-7-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 OnAction_p2p has already checked the action category. We can remove the check in OnAction_p2p. 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 0c2db015656f..97bcef078ea2 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3836,7 +3836,7 @@ static void on_action_public(struct adapter *padapter, struct recv_frame *precv_ static void OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_frame) { u8 *frame_body; - u8 category, OUI_Subtype; + u8 OUI_Subtype; u8 *pframe = precv_frame->rx_data; uint len = precv_frame->len; struct wifidirect_info *pwdinfo = &padapter->wdinfo; @@ -3847,10 +3847,6 @@ static void OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_fram frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr)); - category = frame_body[0]; - if (category != RTW_WLAN_CATEGORY_P2P) - return; - if (be32_to_cpu(*((__be32 *)(frame_body + 1))) != P2POUI) return; -- 2.30.2