From patchwork Sat Nov 26 15:42:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 26258 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4700208wrr; Sat, 26 Nov 2022 07:47:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf7IsmQ82RBEJpwidv9y5iYcMw0qz0gfjjRQeGbYZDYd0IIYNrLu6CAVH3dL0y5prALVbor+ X-Received: by 2002:a05:6402:5308:b0:460:19c3:2992 with SMTP id eo8-20020a056402530800b0046019c32992mr22852478edb.1.1669477669294; Sat, 26 Nov 2022 07:47:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669477669; cv=none; d=google.com; s=arc-20160816; b=NcZJ2kdBM+L8n7wyHHxZha0iJ582+ixrEa8mCeN37NHOrcgNfVNfktliYQSmxsRmR5 /4R+AXZnMQtkuI4qeH2DtW+9Q40igg6kkczotqXPjtAg33KZZa4n5K2Vxj6KGAE08Xkd rX24buPJFWm8gJ5+OiJUuBXXpBysJC3aRSJuvT/R4v/iLn+cd8SCgk/MvbsTS+EVM3Gq XaK+pAoJ6NjX6XzBzzJ7/D8VLyDP2rdgWRv3EqVHZTSDL+7Vfx1yxtHMzqskb8K4fWAx 7WGg6rrB3KjfHa7op+Yq4tEN4Mpt6XdeCfP7IFh+R3cy/s4FTAJjewN2MEmzIu61FU4z SccA== 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=h4qNoa7tZrDDG2UjMz+a8hmcwdbeLgReRKbA3QxReao=; b=jOQBFrvuABeEa4QXCaECS+WGh/oE0jTec0gGlS+U1cJYk/9IuX3qJcAEG9LxB/JlMq vjXZ5fkVEk42RGRW/Fxk0owODnSX4DdSTvx3Zs5lXQGUjgvsqWLZc44gFY2IBdZ541Jo uzw6rCVlV9id9I+qCHqkHdG6kuyoqFUx9XEeUhntInW4LQ3kf1fWX2awNk/H8eWndH93 riK4B9vPW8ntJ48ixL//N4SHcPxpIPC76D4bjVhEAn5fTSQo664EhnldQ5ZuL3kU0j7j SDUplNUBSYalwdSTiGTUVr8xII869bVO/JbWyPEgMOsZ4KSmkmfTmekHlTgPP4YeDw6L fh2w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a0564021e8800b0045eec876883si7435620edf.229.2022.11.26.07.47.26; Sat, 26 Nov 2022 07:47:49 -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 S229671AbiKZPnL (ORCPT + 99 others); Sat, 26 Nov 2022 10:43:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbiKZPnG (ORCPT ); Sat, 26 Nov 2022 10:43:06 -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 97CE9D13B for ; Sat, 26 Nov 2022 07:43:05 -0800 (PST) Received: from dslb-188-096-151-149.188.096.pools.vodafone-ip.de ([188.96.151.149] 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 1oyxKV-0000Lt-Ry; Sat, 26 Nov 2022 16:42:59 +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 2/5] staging: r8188eu: remove wait_ms parameter Date: Sat, 26 Nov 2022 16:42:50 +0100 Message-Id: <20221126154253.178275-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221126154253.178275-1-martin@kaiser.cx> References: <20221126154253.178275-1-martin@kaiser.cx> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750574216188240088?= X-GMAIL-MSGID: =?utf-8?q?1750574216188240088?= Remove the wait_ms parameter from function issue_probereq_ex. There's only one caller, who requests a waiting time of 1 ms. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 12 ++++++------ drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 2f3f7da08d0c..990336244030 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -4483,20 +4483,20 @@ inline void issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *ps } void issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, - int try_cnt, int wait_ms) + int try_cnt) { int ret; int i = 0; do { - ret = _issue_probereq(padapter, pssid, da, wait_ms > 0); + ret = _issue_probereq(padapter, pssid, da, true); i++; - if (i < try_cnt && wait_ms > 0 && ret == _FAIL) - msleep(wait_ms); + if (i < try_cnt && ret == _FAIL) + msleep(1); - } while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0))); + } while ((i < try_cnt) && (ret == _FAIL)); } /* if psta == NULL, indicate we are station (client) now... */ @@ -7046,7 +7046,7 @@ void linked_status_chk(struct adapter *padapter) } if (rx_chk != _SUCCESS) - issue_probereq_ex(padapter, &pmlmeinfo->network.Ssid, psta->hwaddr, 3, 1); + issue_probereq_ex(padapter, &pmlmeinfo->network.Ssid, psta->hwaddr, 3); if ((tx_chk != _SUCCESS && pmlmeinfo->link_count++ == 0xf) || rx_chk != _SUCCESS) { tx_chk = issue_nulldata(padapter, psta->hwaddr, 0, 3, 1); diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h index 720610bc8fef..04fd673d3a04 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -513,7 +513,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, void issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da); void issue_probereq_ex(struct adapter *adapter, struct ndis_802_11_ssid *pssid, - u8 *da, int try_cnt, int wait_ms); + u8 *da, int try_cnt); int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms); int issue_qos_nulldata(struct adapter *padapter, unsigned char *da,