Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp12396845rwb; Sat, 26 Nov 2022 08:24:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf44/ea2iSarJ1JVwJOXlP1SgGa4EunmdpDIwNtmYb1QOqj5xtm/U/xnQetwPyEQN+4lFoMS X-Received: by 2002:a17:906:d297:b0:7b8:4c22:2d6c with SMTP id ay23-20020a170906d29700b007b84c222d6cmr20887660ejb.144.1669479852927; Sat, 26 Nov 2022 08:24:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669479852; cv=none; d=google.com; s=arc-20160816; b=Cu6fx8+1Opn6co3K4IVSQKAj5Oh+ZkaXsBmHVADBSS1ZFUol8DtaQgGz3q+92PV4Fj fBqH/jRYjW2pYLWeH9435hgodSpJMzx24D8il+g7oUh5X58y3iS66B9uTU7jaW5qwDEL UQkB1sRCdwhOzIKpofkihrae4gSXpoWTmOVBFYYjZF5LMGdbfyLCGVN0GhaItK7PsU7B wL4NB/GkGx4EgbJlb9n3dK4812d2mtRpovVuqw4x+VglCyS8XQUDjvban5yjPrmZalBg 3YeU0jrXp6w7vpQW51Kozt2Zbyv2iRkc7mlSlG7sUIkVuAQDHwzHree+UkyQszDvq7Pw LtNg== 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=ZNT/djaKtegO85izbz5C4xLiq4K3i2xWDr56ic48Nrs=; b=gpTiPIPg2ywmZBhwa/bBJho1wni4wM3T4BPMKzBTVXO4n4dpBbjDWcRSndDDQl+qQH vjZBWLGzyhzjyE6ppGnExT3hWSGB2okoATkDcInj7k+ioJBKxpGIlkySEe8qlmv9RscM GhVdsw6SG/pzNwctUVMkiGJqAxKobpIzcYQjz85fgKgbzO/1zzC2+HJsW+eN1sqdPRiz 59pkhlxWB6wO8E6bCX3oV/hs+mGIPJ3OaZN+R3zHZIBOAd2Mi78CIUuiL503sY9aJz5G sgx9Ws3MX9eO1YJqYmpkvrUAlFd5g2TGLe8UScykMuR8c7UQf/Q0NJwBNWVT56HJ+6+q YcOw== 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 di13-20020a170906730d00b007abafd4d7d0si7204533ejc.702.2022.11.26.08.23.52; Sat, 26 Nov 2022 08:24:12 -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 S229751AbiKZQCG (ORCPT + 84 others); Sat, 26 Nov 2022 11:02:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229627AbiKZQBo (ORCPT ); Sat, 26 Nov 2022 11:01:44 -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 34AB8193F0 for ; Sat, 26 Nov 2022 08:01:43 -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 1oyxcY-0000Ub-JA; Sat, 26 Nov 2022 17:01:38 +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 06/10] staging: r8188eu: simplify update_sta_support_rate params Date: Sat, 26 Nov 2022 17:01:25 +0100 Message-Id: <20221126160129.178697-7-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221126160129.178697-1-martin@kaiser.cx> References: <20221126160129.178697-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 update_sta_support_rate function takes a pointer to information elements and the total length of all these elements. Use our variables for pointer and length instead of calculating them manually. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 38dc98cffbc4..f7d3ecf551bf 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -621,7 +621,7 @@ static void OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame) return; /* get supported rate */ - if (update_sta_support_rate(padapter, (pframe + WLAN_HDR_A3_LEN + _BEACON_IE_OFFSET_), (len - WLAN_HDR_A3_LEN - _BEACON_IE_OFFSET_), cam_idx) == _FAIL) { + if (update_sta_support_rate(padapter, ie_ptr, ie_len, cam_idx) == _FAIL) { pmlmeinfo->FW_sta_info[cam_idx].status = 0; return; } -- 2.30.2