Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1595799ybb; Thu, 2 Apr 2020 03:59:32 -0700 (PDT) X-Google-Smtp-Source: APiQypL8w+7jg4nGIhw+kDEOVFYuZqsuaO/5XOabj8TSgeeItxQZwSU59ryMHsjHzEljkTvTNv5W X-Received: by 2002:aca:fc0f:: with SMTP id a15mr1762020oii.68.1585825172261; Thu, 02 Apr 2020 03:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585825172; cv=none; d=google.com; s=arc-20160816; b=RX9lgzsd4x3SO3c0yyVvrJRtPlCfTDfmygg164FjId6OAl6H7uDsVMkz2NZ0eOWY5G 2FQS3ViJ3dcDYY2c0zKGs/Rd9RpenXK0eF+3MJ7C0K0xzkIFOiKySENtxqVU0U/f1gf5 4pwL8BZbRjKlQA3RKeO0S9uQi6DCSHoS1HdLDZOlBt5OAoQYLskPIMq00o2vLWDhWMsZ 4KG9TH8tbbTx9XMCEgveshcd+vK9ZDjmY9PHutfHAXp7JLbk6QxESV8JttNPlXEfmrqu kTWQbGKTn/wDqFbn7w76qeW4my6daTxfurU2FCQY9WicUYr8NGTubEAbgHCar03dnKbu XVjw== 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=47lPMSxdt4f25c5HwPuDBnuxGeMfln6TbzT50KS/Jbs=; b=MiqpsAyCUmnAF+6j6ruMOzhOfY5EeBQQ5uoY7mJ9WW9er5oOMN/C8Z4T5kpRMtRGmF iOtPvHwmTGnRDeJtOW/1Xop876j/JaJ99/cBKe1e+yB0DvhfNL1d8kWznW7LX/Ec13e0 djeioEwWpSrK3sqAgHZcMDR0Vq9ShPImGxzo2tNhCVvedFEzpfH+w506pktzFAsggCUO IV3//VGI/KUp68cpGzIHOavXC9qEkmuOiFxsLdwKVJhG79QnlJZrCjDB6mo5ZNwSketo L84Ylk7L1DwrTBDEfkFwqMF2Mlft/fazW5kFD3Qsc+tooufKv+Z6Y8nA1kE74rRQICvh 7OEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hVDIPQj6; 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 t13si2146141otp.249.2020.04.02.03.59.19; Thu, 02 Apr 2020 03:59:32 -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=hVDIPQj6; 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 S2387984AbgDBK6N (ORCPT + 99 others); Thu, 2 Apr 2020 06:58:13 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54743 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728803AbgDBK6N (ORCPT ); Thu, 2 Apr 2020 06:58:13 -0400 Received: by mail-wm1-f67.google.com with SMTP id c81so2898140wmd.4 for ; Thu, 02 Apr 2020 03:58:11 -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=47lPMSxdt4f25c5HwPuDBnuxGeMfln6TbzT50KS/Jbs=; b=hVDIPQj6XR3HIdYvciCYuMFsrUmHZxXhV6ruRRBRtp4dFH5YOz2uNY5BFXbL7ci2BH FU9HaQCVe4R0FWsf7owA34pkFkKL4KH1ipmazO6g+JK8/2Hljc8+PPFZilBSJ1EfOoCj 1yIBeZ+mRXeUkamn0beQQDZ6hz/V9FMAk3hassXm9QCJPzg5srzybvV/C431NZST8qJN PpGkPwlNPC+HTN5NSq2ObcO3rw1FXIpbd4xL4tS6ImtuUCWanwIhkx5/UD5/6mHDCuL3 YmADwQ0Px3gDTQMKNjRk6oparIE2hnupgR7J/MQA74t5PDjM/cUsrGuGq1MsahIU4eyU AjIQ== 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=47lPMSxdt4f25c5HwPuDBnuxGeMfln6TbzT50KS/Jbs=; b=QmRWhL/jplv4h7NlsxR+xVUs/VEwijx5rYs4V16486rilp33Xn14NP0Fh6PRzFX3U9 LGY3odW4d98UElE8ndKf5aRzhtYkzpY3l/+fJzd66CFVOtogzDlRsuTm+iduwnbgoib8 oXoacYIJ4d+GBUFUoasHvCjn7EhR72eRlhFj0zf6Qms/zi9RdRZ1hEcGWNiJGONeWPOe Bg2m6pWoi5uC/Gom/oi5iJkDaX85Dmk6mF7cLQV4skpjjdboiK3SDhoJNWotg440/Y94 /HhR/HUIqplTiBADL+GajcOvSORG99/fW0CXG/ZoDHOQ1eX0z8Fc/ctyvLDKHFFvkO7H MqDQ== X-Gm-Message-State: AGi0Pub3QdcZsBOkFPnyLK0MUv/+nixDMC9fDtsv0Pf1bs/qV477NJU+ PyE/WGjD2HJe0S0PLzRMK8QPSU7K X-Received: by 2002:a7b:cb59:: with SMTP id v25mr2906449wmj.139.1585825090573; Thu, 02 Apr 2020 03:58:10 -0700 (PDT) Received: from [192.168.43.227] (188.29.165.56.threembb.co.uk. [188.29.165.56]) by smtp.gmail.com with ESMTPSA id j6sm7406601wrb.4.2020.04.02.03.58.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Apr 2020 03:58:09 -0700 (PDT) Subject: Re: [PATCH] staging: vt6656: Use defines in vnt_mac_reg_bits_* functions To: Quentin Deslandes , Oscar Carter Cc: Dan Carpenter , Forest Bond , Greg Kroah-Hartman , Amir Mahdi Ghorbanian , Colin Ian King , Gabriela Bittencourt , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20200328095433.7879-1-oscar.carter@gmx.com> <20200331102906.GA2066@kadam> <20200401165537.GC3109@ubuntu> <20200402091917.GA17323@jiffies> From: Malcolm Priestley Message-ID: <4e5fc495-9355-02b7-4148-ea4de5370617@gmail.com> Date: Thu, 2 Apr 2020 11:58:07 +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: <20200402091917.GA17323@jiffies> 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 02/04/2020 10:19, Quentin Deslandes wrote: > On 04/01/20 18:55:38, Oscar Carter wrote: >> On Tue, Mar 31, 2020 at 01:29:06PM +0300, Dan Carpenter wrote: >>> On Sat, Mar 28, 2020 at 10:54:33AM +0100, Oscar Carter wrote: >>>> Define the necessary bits in the CHANNEL, PAPEDELAY and GPIOCTL0 >>>> registers to can use them in the calls to vnt_mac_reg_bits_on and >>>> vnt_mac_reg_bits_off functions. In this way, avoid the use of BIT() >>>> macros and clarify the code. >>>> >>>> Fixes: 3017e587e368 ("staging: vt6656: Use BIT() macro in vnt_mac_reg_bits_* functions") >>>> Suggested-by: Dan Carpenter >>>> Signed-off-by: Oscar Carter >>>> --- >>>> drivers/staging/vt6656/baseband.c | 6 ++++-- >>>> drivers/staging/vt6656/card.c | 3 +-- >>>> drivers/staging/vt6656/mac.h | 12 ++++++++++++ >>>> drivers/staging/vt6656/main_usb.c | 2 +- >>>> 4 files changed, 18 insertions(+), 5 deletions(-) >>>> >>>> diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c >>>> index a19a563d8bcc..dd3c3bf5e8b5 100644 >>>> --- a/drivers/staging/vt6656/baseband.c >>>> +++ b/drivers/staging/vt6656/baseband.c >>>> @@ -442,7 +442,8 @@ int vnt_vt3184_init(struct vnt_private *priv) >>>> if (ret) >>>> goto end; >>>> >>>> - ret = vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, BIT(0)); >>>> + ret = vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, >>>> + PAPEDELAY_B0); >>> >>> This doesn't clarify anything. It makes it less clear because someone >>> would assume B0 means something but it's just hiding a magic number >>> behind a meaningless define. B0 means BIT(0) which means nothing. So >>> now we have to jump through two hoops to find out that we don't know >>> anything. >>> >> I created this names due to the lack of information about the hardware. I >> searched but I did not find anything. >> >>> Just leave it as-is. Same for the rest. >> Ok. >> >>> >>> There problem is a hardware spec which explains what this stuff is. >>> >> It's possible to find a datasheet of this hardware to make this modification >> accordingly to the correct bit names of registers ? > > I haven't found any so far, if your researches are luckier than mine, I > would be interested too. Even getting your hands on the actual device is > complicated. All I can tell you is it related to command above it MAC_REG_ITRTMSET without it the device will not associate with access point is probably TX timing/power rated. Other bits in MAC_REG_PAPEDELAY are related to LED function and defined in LEDSTS_* in mac.h. I think it is some kind of enable so something like ITRTMSET_ENABLE would do. Regards Malcolm