Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2170873ybb; Thu, 2 Apr 2020 14:42:22 -0700 (PDT) X-Google-Smtp-Source: APiQypKzxCNbxxe0gi29EkbcctlsYHe/7LIb3CgC5bY6ATuZuGU85dJr+bIULB7w8ZSxNptfwi+5 X-Received: by 2002:a9d:5781:: with SMTP id q1mr4217132oth.258.1585863741939; Thu, 02 Apr 2020 14:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585863741; cv=none; d=google.com; s=arc-20160816; b=MAwRn+vWt2uIxoH9tVC7Frq1/unlbMJJg4NHa/omzs/tp6Wn5Bg6nQWt3tyIbQAZzG 97yvQXpVYEgkGwCxJB25hDlx9bAkbDfwD1axdcdvVSZmP8f3fO6/ttQBCid1YGwXrDMH d863dX1G0wIveBgUkASTNVEcBXNI/dfxOkmH+E/rIDbKBmICI98IYptvP42Z3NI/J2KF s8N3yOs/78k/UONj9ovFF5lkJ89XQZo2MaegJpZCwa5y6gzUYOkgD32KavxvvTLPNJIG QmnrQbc58/OuqRT5F5pDTcuGu833BQAwV8/L6V58EQh7Ed20hvy7JxNyi8L/M7EnacAP eyVw== 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:cc:to :subject:from:dkim-signature; bh=d2LuQ9+tNaM4iX/cPzhdZ44JC45KzMGRSOTVMyTga64=; b=JhbQ2isOBNlgPG0uJhZ4kQd4y3EHIJ/wDPlUL9p+tndLBw1ktpFj0+F5HvshY8Mmbi sczesUeG1Smkd/A0b9tOht6qm7JdMAXy2Bp7eoqMwPPZqyQYAQ62n/LyZyi0GHcV3zon hCyc12ulIS3DliqGb4Tsh6WjX9pzXpLNCRcK1SEeKu60KtAxaM02X2FKry5uiAearIVl QFPFVo06P3PouhSL/lG3QIGstf+7T/VtVUBcEjV4cRWG50LubOHjOBl62hWoZctTHurB LutDyP93xW1NbyOpWFq85P+UwB/9vw7ZlhtgmatHGIvoREAeeQ4LZbq7kIJOHCmVGcwO XmWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="c79F/GVE"; 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 p126si2850957oib.73.2020.04.02.14.41.55; Thu, 02 Apr 2020 14:42:21 -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="c79F/GVE"; 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 S1732995AbgDBVlj (ORCPT + 99 others); Thu, 2 Apr 2020 17:41:39 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:38975 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729549AbgDBVlj (ORCPT ); Thu, 2 Apr 2020 17:41:39 -0400 Received: by mail-wr1-f68.google.com with SMTP id p10so6029321wrt.6 for ; Thu, 02 Apr 2020 14:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=d2LuQ9+tNaM4iX/cPzhdZ44JC45KzMGRSOTVMyTga64=; b=c79F/GVEsGXKxyOu7A9T1Qfohd2O5y0eRvw8sV/dT6rBmaI28MM9db9/0HN9CPuXzL 361BRQBo8MFfwCZr3fpIwnlZR5Mup51v4ON7YZ66/4Uo18Fa/oC3UZ8M7dFXuBLkgMmF DiHM6zR0vLV2JRMww5ocIJsvGwvJjf5Nph6YIPup8ybhLWqYSVidC2iEdlYdCwruhP6u ZxQZlaadfZpKkmEoyo+5KQ6BsF2nIVyUHnqcjRky61V9oqT++hDaZr7ij5cjIqLA8//C 8d9+HstFCYn0kV0EirNcFnc8T6Sew/u5rN7+H9fTL0NsFPuWmz/pdRo6piRwjIrEHbV1 i92A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=d2LuQ9+tNaM4iX/cPzhdZ44JC45KzMGRSOTVMyTga64=; b=pRqyuALnccqEbmnqDbKQiBBdW0bVI4qMAR2MX+jcO7YhmTWwgJGxADJV3G5od+NX+0 ecAh49NHGewxqQrLbrFgP3zuoAjgnpBJVq+1aJdhx+9dMz1KjH2DVdPqqt7HK/iJKOCE UMHTZTl3+A9K0DrWYglC5SxyJJUo1tdblRXRx4VOR65hXyaOsj16bTWQ8n5zBiwl/n2/ G+eeqmF8WFsjBuJxZ9DDEDdWW5kV0uGzG6Qb6H9bM9Q6xETrkd5HsZKLZeyn/Si9Nseq aaQErYUTdv/D38zKJ2JeZfZKWEsifIm8xvwlVRN0D0vrzRGczey0PC0gfymHYsLqSbt4 dytQ== X-Gm-Message-State: AGi0PuaNulblN7+5E5XMyNcAAn9+x/a80jIhDSx2t7Psq1VkQf/l1zSY MmQ2K5NXrnBTbqcPnWYmPio9/Ikc X-Received: by 2002:a5d:5230:: with SMTP id i16mr5423057wra.15.1585863697150; Thu, 02 Apr 2020 14:41:37 -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 91sm3123622wrf.79.2020.04.02.14.41.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Apr 2020 14:41:36 -0700 (PDT) From: Malcolm Priestley Subject: [PATCH 1/2] staging: vt6656: set all ofdm rates to default To: Greg Kroah-Hartman Cc: "devel@driverdev.osuosl.org" , linux-wireless@vger.kernel.org Message-ID: <9a52d7f4-dd3e-efdc-eef8-bb794f7dea6d@gmail.com> Date: Thu, 2 Apr 2020 22:41:34 +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 odfm rates to use so all of them should be set enabled at the appropriate bit rate. This means vnt_get_ofdm_rate is no longer required. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/card.c | 54 +++-------------------------------- 1 file changed, 4 insertions(+), 50 deletions(-) diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index dc3ab10eb630..4abbe9b30b65 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -100,48 +100,6 @@ static u16 vnt_get_cck_rate(struct vnt_private *priv, u16 rate_idx) return RATE_1M; } -/* - * Description: Get OFDM 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_ofdm_rate(struct vnt_private *priv, u16 rate_idx) -{ - u16 ui = rate_idx; - - dev_dbg(&priv->usb->dev, "%s basic rate: %d\n", - __func__, priv->basic_rates); - - if (!vnt_ofdm_min_rate(priv)) { - dev_dbg(&priv->usb->dev, "%s (NO OFDM) %d\n", - __func__, rate_idx); - if (rate_idx > RATE_24M) - rate_idx = RATE_24M; - return rate_idx; - } - - while (ui > RATE_11M) { - if (priv->basic_rates & (1 << ui)) { - dev_dbg(&priv->usb->dev, "%s rate: %d\n", - __func__, ui); - return ui; - } - ui--; - } - - dev_dbg(&priv->usb->dev, "%s basic rate: 24M\n", __func__); - - return RATE_24M; -} - /* * Description: Calculate TxRate and RsvTime fields for RSPINF in OFDM mode. * @@ -289,20 +247,16 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type) vnt_calculate_ofdm_rate(RATE_24M, bb_type, &tx_rate[4], &rsv_time[4]); /*RSPINF_a_36*/ - vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_36M), - bb_type, &tx_rate[5], &rsv_time[5]); + vnt_calculate_ofdm_rate(RATE_36M, bb_type, &tx_rate[5], &rsv_time[5]); /*RSPINF_a_48*/ - vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_48M), - bb_type, &tx_rate[6], &rsv_time[6]); + vnt_calculate_ofdm_rate(RATE_48M, bb_type, &tx_rate[6], &rsv_time[6]); /*RSPINF_a_54*/ - vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M), - bb_type, &tx_rate[7], &rsv_time[7]); + vnt_calculate_ofdm_rate(RATE_54M, bb_type, &tx_rate[7], &rsv_time[7]); /*RSPINF_a_72*/ - vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M), - bb_type, &tx_rate[8], &rsv_time[8]); + vnt_calculate_ofdm_rate(RATE_54M, bb_type, &tx_rate[8], &rsv_time[8]); put_unaligned(phy[0].len, (u16 *)&data[0]); data[2] = phy[0].signal; -- 2.25.1