From patchwork Sat Nov 26 16:01:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 26267 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4707778wrr; Sat, 26 Nov 2022 08:04:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf60qQzU7KtWIfbA/HqC+O5W9JEF1sT0n2jarjFWtLY6vd+ywTpCQFNo0Gf2uK9Ug09PU4H7 X-Received: by 2002:a63:1a48:0:b0:477:786:f557 with SMTP id a8-20020a631a48000000b004770786f557mr21484323pgm.476.1669478639733; Sat, 26 Nov 2022 08:03:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669478639; cv=none; d=google.com; s=arc-20160816; b=ilGWgCiojHmATywpihXpegxAusGsx0b3Z2bthCGzD8TLv10J6U+/QikLUTAXLJRxFM LN1ShBc3QlU0fkC3aHNztaBY5atgFyF7PXXJ24mgtVBVk55Nk0dh0NoPErPxhziTJnOp bPqYMCz3A2maRIdU/8n7T//Uu6CVcILJ9df0UkWET0obZR1lkiOXkFdHUhTAMJVmkbRv 9TpgTDoDtYBKlzNJ2L/sU+T++Ty1egaRojL2zis6xJJNZ5DLTAceTsGDbSC3Q9GNcCSA giwCMgJs+ZAD9QF0JUZYZu2o3o+l0+urAPL8zX+L5YfRDldz0r0xAuyFsN6AiZUwCbB+ EG6A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i64-20020a638743000000b004767bc4252csi6915365pge.519.2022.11.26.08.03.46; Sat, 26 Nov 2022 08:03:59 -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 + 99 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 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?1750575234240820409?= X-GMAIL-MSGID: =?utf-8?q?1750575234240820409?= 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; }