Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp767686ybb; Fri, 10 Apr 2020 09:42:25 -0700 (PDT) X-Google-Smtp-Source: APiQypKrCfb/UwrU4zF9XYmL/3owV4VtoU9CzJmrrCEwMzqdeNLBtCZI0fEeALpkqyYjVuqrx1Zu X-Received: by 2002:ac8:248c:: with SMTP id s12mr22023qts.259.1586536945411; Fri, 10 Apr 2020 09:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586536945; cv=none; d=google.com; s=arc-20160816; b=AE4AgcKeC7z3/jqvyGoyztf9ToNUatwVc6Tizo5qQpcmCDT9MSApt4b5hMBwQW4kyA XfxsUFAt3RhSvfMQPclo+0KHAl+xeoZNVAkc3i3BP8y1iP+iRAwwxKX/I/8N2BZ7Hg4R bOcKbeUVoPNpZvnvnsmi6uflvUAzAyYPdaVwG86K6azIobPaZ8qMa8D+QRV8DNPLgHOj qeBbtNNtXqz4rLgBJULog0qqh80NqhraeVp86rv222G9EryQYKbDoicBRlS7hTvN6kwN zHn7u4MGFca4EUkd52UA2bNCEGxpBW6uusWaMGZTONFEzd2JivuhVyYd+nuuhCv329eR xGDA== 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:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=hQN/YbSH1U0Hdym1a0eKmIzW7Vl10c/CjDwiNW+YpC8=; b=bBcnH0sRZ+JZ8gzHAE7hzKY6+zKJP8zCE4AezpiBTKpDjaFCpTSc9oC2Fqrfv6eSoF w/VZiJ0tE85r1F/nrlew8AV0F/l9P+GtS2rx+SSvPXQFvYaP/Nzu6sSAMHfjG+oiV4xO ZEuJ/JzKOIAjxxEe4YwIeNbR+hLrWtQZJeBaWaP7kXY14HApdXcTdkpNtITIkONbV6P8 ZRg6Mk+8vPSYinPQqgOOBJKHTZ9hW8grcwJRLntTHwJlL7LBRhkt4yfYtHZ3Cpg11PvL OY+pJb/+qCOHGMtZWL0+lBuSZ1m3E5A6yvPSQjUw/pdbxT3NfOn+kDSFtMhjJpieKaJJ WWmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="rsK67ak/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 k12si1376666qvb.3.2020.04.10.09.42.09; Fri, 10 Apr 2020 09:42:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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="rsK67ak/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726595AbgDJQk5 (ORCPT + 99 others); Fri, 10 Apr 2020 12:40:57 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46327 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726177AbgDJQk5 (ORCPT ); Fri, 10 Apr 2020 12:40:57 -0400 Received: by mail-wr1-f67.google.com with SMTP id f13so2822333wrm.13 for ; Fri, 10 Apr 2020 09:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hQN/YbSH1U0Hdym1a0eKmIzW7Vl10c/CjDwiNW+YpC8=; b=rsK67ak/QIkS4dSW//qtxUdMlLEkfnTtXsElMGAefgL1zRabCq092PAXFJ6rYPp8Mf 1ZtA8SMpgWt7ur5BK1il8bVz0DavyiJWhvyRzNBlkcRH56kL9WBOPs/TEjvaFdX8IQPp DpllDqyn7Wq4uOBw0e5KpJINVdRtcQGk+f8ecePPV3ogN5Q/TYOjBn3m0VonYMFliE6q WfhTt8Wx4MKSkcPKo61NHhbrneNzzgDrqZ3nMOXOU8qOhA6tCBPsbETAJoXfaQ9AGuOb ML2MWSu7+njetBcevS5hqh5Fhh1euE4SFRKY68P37FVQETyKdWKLrUxibvtNIVoRj53d 0MmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hQN/YbSH1U0Hdym1a0eKmIzW7Vl10c/CjDwiNW+YpC8=; b=f7O2lEeifuYKVmIIH5z00Tbmns17Ch0VY1XUksxlSCAWb6YyCrry+EgLe4rJd8YbwH K6zqf1aeVf+LDLKA2hoenkRt1D5FuphFDHJdPW4e55ptKgYIES0xN2LjvcpHkoo7A893 QIuGk0iIgvYRRLdgcdlkpUwvreBsEmY5fjEFlAb5BBNRkI9ZxsjfwAUtjvhruBcDLKYb laBpdQSxICDrngZLinHOjHVzdOHjkXkUgBUitzuCIcs+85D3Y//3/Z+K8uBQU3TTgOeo du1H8VMMfd05RSlzcOGiiayRFOyumPFOOXTcL255p/fFFMXWmOJtraCB1ANFrTbcLRSA EWTQ== X-Gm-Message-State: AGi0PuaPX6xYRcCCDQO4gFbpTW5GveaTsdShLZh3p23qczB08j37RoNA 9TYCcucCb+jd7e563qsGz6GkI3un X-Received: by 2002:a5d:688f:: with SMTP id h15mr5486012wru.352.1586536855546; Fri, 10 Apr 2020 09:40:55 -0700 (PDT) Received: from [192.168.43.227] (94.197.121.102.threembb.co.uk. [94.197.121.102]) by smtp.gmail.com with ESMTPSA id z3sm3309100wma.22.2020.04.10.09.40.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Apr 2020 09:40:55 -0700 (PDT) Subject: Re: [PATCH 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable To: Oscar Carter Cc: Forest Bond , Greg Kroah-Hartman , Quentin Deslandes , Amir Mahdi Ghorbanian , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20200410112834.17490-1-oscar.carter@gmx.com> <20200410112834.17490-2-oscar.carter@gmx.com> <986e8e5e-245a-cc70-2c6f-8ac3a4a485c9@gmail.com> <20200410155911.GA3426@ubuntu> From: Malcolm Priestley Message-ID: Date: Fri, 10 Apr 2020 17:40:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200410155911.GA3426@ubuntu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/04/2020 16:59, Oscar Carter wrote: > On Fri, Apr 10, 2020 at 04:37:59PM +0100, Malcolm Priestley wrote: >> >> >> On 10/04/2020 12:28, Oscar Carter wrote: >>> Create a constant array with the values of the "phy->signal" for every >>> rate. Remove all "phy->signal" assignments inside the switch statement >>> and replace these with a single reading from the new vnt_phy_signal >>> array. >>> >>> Signed-off-by: Oscar Carter >>> --- >>> drivers/staging/vt6656/baseband.c | 101 +++++++----------------------- >>> 1 file changed, 21 insertions(+), 80 deletions(-) >>> >>> diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c >>> index a19a563d8bcc..47f93bf6e07b 100644 >>> --- a/drivers/staging/vt6656/baseband.c >>> +++ b/drivers/staging/vt6656/baseband.c >>> @@ -115,6 +115,21 @@ static const u16 vnt_frame_time[MAX_RATE] = { >>> 10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216 >>> }; >> >> Actually you don't need the second values > > Great. >>> >>> +static const u8 vnt_phy_signal[][2] = { >>> + {0x00, 0x00}, /* RATE_1M */ >> The driver would never attempt use preamble at this rate >> so it's safe to include in with the next 3 rates Sorry got this wrong the driver is trying to do preamble (short) at this rate and it is not working. So don't apply it to RATE_1M rate. Regards Malcolm