Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2394220rwb; Mon, 7 Nov 2022 12:46:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf6rmOHTHTY96Lg4WaYlcWch/Y0MyaJrg1tzVR/3P4SMR+iChhyJh/gYPeih7PlrnKNujojK X-Received: by 2002:a17:902:e5c7:b0:188:71b1:8f0e with SMTP id u7-20020a170902e5c700b0018871b18f0emr15178992plf.27.1667853962656; Mon, 07 Nov 2022 12:46:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667853962; cv=none; d=google.com; s=arc-20160816; b=sKQYGWnedJuOSaYwgluQO2IZanZjAKfNZ3PEMl85345MPYLHTOAfcMS6AkIxF31BcT +eO6bLuJOlm4k+5CMp2IME/+v27mpsKLoAOUosaiJ30QzPMYthfm2rSfbxgl3wRP8lSQ 4ZkGLbVZg2PEXZjEvD3iqWiY5USPs7oZk6FSDMkc0duiajJcTRO33Jtuvx03VZGXuW4k cqqUaiZIQYen8+Ga0JfF1M7WCb3J7D1uTJ3xN5JeCmU3WduLf75GBiBwYxb2T2eboLy2 nGCCrucaw98QDprc0GdVFUu9UDBTawPZqDl8eldklTDVXGBFIPV2PVo8p/IUdSqn/GmN Yxcw== 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=xfNxVhybfKl5gi348mpSZ7LIuOrIKyGa9hl7V6e0URI=; b=prebQ8dKQXYCzw3UQUAHPigEG4AXDw3kTUGYXVuQA43r2dV5LWKiDyz4HxRqzNBRb/ JyKHVaRh54a6gMLtTQ2f8qO1jSetD30CeyGfWFRAhJXMmz/STGWkqnhbyfxF1YpMcpv7 fSJTWG78DNCk2WuN1xikrSFPI2z5aFbVYBjuEVg2CHjtmHTGpWkSQebQN2mGjG0rC45P EKKw4An1J2lSDFDan7VXIraztCAmuz1i6f/1gZMFLkAMDfdySsAq8HYKnSMBUWgXZwJa ckWQ5/wMoF9XXQCrylRcEAlcLFM2y7BP2PwCpXTo51cibqtI1rGS76wI8iF73Ca/8Q+M CmkA== 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 ot12-20020a17090b3b4c00b0020055731860si13190465pjb.105.2022.11.07.12.45.42; Mon, 07 Nov 2022 12:46:02 -0800 (PST) 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 S232972AbiKGU2u (ORCPT + 92 others); Mon, 7 Nov 2022 15:28:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232895AbiKGU2q (ORCPT ); Mon, 7 Nov 2022 15:28:46 -0500 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 3F4C3201A2 for ; Mon, 7 Nov 2022 12:28:46 -0800 (PST) Received: from ipservice-092-217-067-198.092.217.pools.vodafone-ip.de ([92.217.67.198] 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 1os8jZ-0004bP-6j; Mon, 07 Nov 2022 21:28:41 +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 3/3] staging: r8188eu: drop removal/stop check in dump_mgntframe_and_wait_ack Date: Mon, 7 Nov 2022 21:28:24 +0100 Message-Id: <20221107202824.61431-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221107202824.61431-1-martin@kaiser.cx> References: <20221107202824.61431-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 We can remove the checks for bDriverStopped and bSurpriseRemoved in dump_mgntframe_and_wait_ack. The code path from this function looks like dump_mgntframe_and_wait_ack rtl8188eu_mgnt_xmit rtw_dump_xframe loop over all fragments rtw_write_port is called for each fragment. bSurpriseRemoved and bDriverStopped are checked in rtw_write_port. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index bfd6afd7266e..be33489d3dfd 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3988,9 +3988,6 @@ s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmg u32 timeout_ms = 500;/* 500ms */ struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - if (padapter->bSurpriseRemoved || padapter->bDriverStopped) - return -1; - mutex_lock(&pxmitpriv->ack_tx_mutex); pxmitpriv->ack_tx = true; -- 2.30.2