Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2171899ybb; Thu, 2 Apr 2020 14:44:03 -0700 (PDT) X-Google-Smtp-Source: APiQypK6jICRfwJ/sldh0ZK2ftYP2lSMXsdJkWu4MCAOKDExzcMtDWZfahd/TayX4KIEiQa86Q9V X-Received: by 2002:a9d:1b31:: with SMTP id l46mr3793668otl.95.1585863842959; Thu, 02 Apr 2020 14:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585863842; cv=none; d=google.com; s=arc-20160816; b=FPeC3R1xGuh/dQSxAIXqc8SO2yexG3xPHyeV/YTaT8cxJJdQX0zHZ5ZHB+KYCqaVis vUemuAkgUagnK5egUQEPreB5sohFE/zE13eQ4Fgl36z70kxgVJ9YnIm0iFKqhMxB3WCn 019j7wWWIXEZ5RUnakqFAcfUqgE1hWLFDodqjtbDTFSgzki227Wy9pByBHnnRZJIuGCX aK9URKdCJpxAqQtwNYGdTLYoujKSdXpplvufQHnUBqKa/KnxafOKu2sfgLwADWrt8o/5 XjlslOGtrdcodQlVVa+ImLlLgrD646xG3zPQXZZPjLuoacmOcTd+MHJ23ZXx4p9UMoQq RmkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:dkim-signature; bh=deUrCaIYg9VqgBtDxyvSfNVjqbAj9bWkcCoGMyJST/s=; b=QZBafPW8Zklu/IEozK8m+nN/g9Jypp//+70mEnWRzVa9qO6+1CLcSfUTpruSpkzUDv 1t670bKhbEYO9psgV7YYcZNq3YFNZhJR5c/jrYTwIo/oPwsQkQ1lmkQQHWvlXeBLORL9 nhFQlxE88nCMiB+Pf9LCR5q90ESj3oqM8tJYK3FLQfv4QbuSkOpHKAfNz9c+qfx9PQx2 XEbxgR2k5LF4SwEIB3XeuaLhaWfL3HNvWXJOXVpYjar6kmsuAMWxNn3mdViBqRWxcYMd DToxhKFuOeRp/R1BOirsO7jU2JAFTmtB0U2yq5FJrGQq5kMluwa1/QA1SmzTwSaZO6PM LzjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=THfwV+3E; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f29si2840253ooh.85.2020.04.02.14.43.51; Thu, 02 Apr 2020 14:44:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=THfwV+3E; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388008AbgDBVmV (ORCPT + 99 others); Thu, 2 Apr 2020 17:42:21 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55855 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726963AbgDBVmV (ORCPT ); Thu, 2 Apr 2020 17:42:21 -0400 Received: by mail-wm1-f67.google.com with SMTP id r16so5023688wmg.5 for ; Thu, 02 Apr 2020 14:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=deUrCaIYg9VqgBtDxyvSfNVjqbAj9bWkcCoGMyJST/s=; b=THfwV+3EtI6U2dmE7J9hZ6dlveFN4xZx7dFH4LVuA9JOP1RqHbbisSH/XqVzDHLDHt w7HgnXPEThde/sWy0nm185afUHdPIpcllMCy7wtVekiGas0/Y3ASI4wJy4x6UWgWwdZG BfzvjCQTgXNaUVg3kHkLZLDpNpNedFbWyYmBF6qtQdcXOnMiO1hFQbI/nb8XgjzaODqb Y0RXK/pYexQTM3rxvao6ypIvuLzlN+tncnPH4ZdQL6MB+xlENqhCEoCC9gqWJHuORhxA JOP4w39hIjuQ0p5FNCR5qX6syvb6hrh+ddoCodlB6lewmi6pPTfW8ZjuTvpu0uAiw67f mv2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=deUrCaIYg9VqgBtDxyvSfNVjqbAj9bWkcCoGMyJST/s=; b=QXWZT0279syj6Ajldy+gXanAZWpRfR6/r9iIFRNi6pN7Sma4bEMWr+3ZZcUKFGN09a SaVhh88EmdEJdQnovI77wJrVK05B7oi06kebH0pNjRl3VYSFwtZfJNSOyTBKzDniOCRN P1Z4/OomMtnl28PdZ9vGgwNgWTHc5Ayj73nYHmnUM1DajLeHza2z2JhtCZdpbEkMsBve b+wdJ8PxddN3t4rpIr8QwoIR6lbzyVFGRRMYGIkiifhTc4BpFqWILwHv23if5tYPNoDu T47T7ZwvL92Sn4ipfs8wQy6SRP81LGtOBXw/mLB77HsSUYdzR0/UkeWBOUDjZldMa5/s AhRA== X-Gm-Message-State: AGi0PuZvrWsbWgIS26O3IGk7EyebhOxP8P63uQhO9KVsDyzsQ1EHQBKL guPsn2gi+1KZ8fYB9+8NyMbL1/Jt X-Received: by 2002:a1c:51:: with SMTP id 78mr5213590wma.157.1585863738628; Thu, 02 Apr 2020 14:42:18 -0700 (PDT) Received: from [192.168.43.18] (188.29.165.56.threembb.co.uk. [188.29.165.56]) by smtp.gmail.com with ESMTPSA id a145sm1050802wmd.20.2020.04.02.14.42.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Apr 2020 14:42:18 -0700 (PDT) To: Greg Kroah-Hartman Cc: "devel@driverdev.osuosl.org" , linux-wireless@vger.kernel.org From: Malcolm Priestley Subject: [PATCH 2/2] staging: vt6656: set all cck rates to default. Message-ID: Date: Thu, 2 Apr 2020 22:42:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org mac80211 rate control decides which cck rates to use so all of them should be set enabled at the appropriate bit rate. This means vnt_get_cck_rate is no longer required. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/card.c | 38 ++++------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 4abbe9b30b65..97e1538a528e 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -74,32 +74,6 @@ void vnt_set_channel(struct vnt_private *priv, u32 connection_channel) (u8)(connection_channel | 0x80)); } -/* - * Description: Get CCK mode basic rate - * - * Parameters: - * In: - * priv - The adapter to be set - * rate_idx - Receiving data rate - * Out: - * none - * - * Return Value: response Control frame rate - * - */ -static u16 vnt_get_cck_rate(struct vnt_private *priv, u16 rate_idx) -{ - u16 ui = rate_idx; - - while (ui > RATE_1M) { - if (priv->basic_rates & (1 << ui)) - return ui; - ui--; - } - - return RATE_1M; -} - /* * Description: Calculate TxRate and RsvTime fields for RSPINF in OFDM mode. * @@ -216,20 +190,16 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type) int i; /*RSPINF_b_1*/ - vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_1M), - PK_TYPE_11B, &phy[0]); + vnt_get_phy_field(priv, 14, RATE_1M, PK_TYPE_11B, &phy[0]); /*RSPINF_b_2*/ - vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_2M), - PK_TYPE_11B, &phy[1]); + vnt_get_phy_field(priv, 14, RATE_2M, PK_TYPE_11B, &phy[1]); /*RSPINF_b_5*/ - vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_5M), - PK_TYPE_11B, &phy[2]); + vnt_get_phy_field(priv, 14, RATE_5M, PK_TYPE_11B, &phy[2]); /*RSPINF_b_11*/ - vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_11M), - PK_TYPE_11B, &phy[3]); + vnt_get_phy_field(priv, 14, RATE_11M, PK_TYPE_11B, &phy[3]); /*RSPINF_a_6*/ vnt_calculate_ofdm_rate(RATE_6M, bb_type, &tx_rate[0], &rsv_time[0]); -- 2.25.1