Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp2063783rwj; Sun, 30 Oct 2022 10:36:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zQ9t93C26pFA+ty0skEIXzkFSyCXe+YWcIUE5JDV5z1WwBzjKrMmWHJ88n+uSdg/DJkvr X-Received: by 2002:aa7:c2ca:0:b0:461:89a6:2281 with SMTP id m10-20020aa7c2ca000000b0046189a62281mr10110304edp.260.1667151400336; Sun, 30 Oct 2022 10:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667151400; cv=none; d=google.com; s=arc-20160816; b=v3rjeTQ27AOBtWbpWiQZO9soAd0KhevtJvTwmws8AgCQRdWGTY2piT9yZFrAo484yj Fm55sI4Lgm4mRshxAzsJHvZ82koouPngmGURiuxW50Hy70HNr1NCsKhTTTfZqyfqMTYt kt3hTx6konFzLOFUI8AJrm9x+yuAfU7Hl6Wa9pZJ5jio1e0G5ZCbgXkvcVMwccD0G+39 TOfeakxhkhDHTpNiOwf0JgHk8x5cvqG7Rp2Ot0sMKxD8lYyN9TxNyztCDKpj0j40aLVy YJthmum+ayZfNXHagToQC+dPIRTVz8BHoK0WTeeyd0gCQYuqB4lkvdiovlTHI90p282S CUrQ== 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=FIPzMOo/7ZY4X/JJTF9vCJkO6336Krn30eUPwsuZ/Do=; b=SeDfEwM261ggro+SJL4yJbBZvkK+2843EBp2Auel4SfnjKEMMHrPulSRQRwpp/C7+S swgZEUUjG/xPnC/iMCMlxUJT36xFWNepJ3bhR9iBHJmfJ8GHwIiGAfxa+ECc9nNpFULc DDZajSjiZEi6qIhUt+8yw2NiOJExLY0XmKielIK2uaJ54ws4wJtAOLyLJPIjF6iHfvrd ChXV0xBRqsQt1hq5kjEcrmTGtRqJ6+0yCx9ilOnekZicyazTNkKoZ4AnSr0H1K4xqQzp iYClQxeu1ebk4kZH11OQzotpTOZFQJlSjuU2juPLJIC+qaTo7g7ekKoLQkmG7RJKkVLJ a25A== 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 d25-20020a170906175900b0078b85fdf4e4si4264328eje.532.2022.10.30.10.36.15; Sun, 30 Oct 2022 10:36:40 -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 S229927AbiJ3ReN (ORCPT + 99 others); Sun, 30 Oct 2022 13:34:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbiJ3Rdv (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 463B495B4 for ; Sun, 30 Oct 2022 10:33:51 -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 1opCBt-000469-Le; Sun, 30 Oct 2022 18:33:45 +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 06/13] staging: r8188eu: remove category check in OnAction_p2p Date: Sun, 30 Oct 2022 18:33:19 +0100 Message-Id: <20221030173326.1588647-7-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 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 f1054192bfb1..efcb2f3b6d3f 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3835,7 +3835,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; @@ -3846,10 +3846,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