Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp658332pxb; Fri, 14 Jan 2022 13:23:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvPORDnF0Z31SEsnpyhUt5a/sb6Ss9qBJDa36sUXgAs3u1Yw2g5WFhY2iitJcXBVi6vrTk X-Received: by 2002:a17:907:6e18:: with SMTP id sd24mr8732818ejc.90.1642195382087; Fri, 14 Jan 2022 13:23:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642195382; cv=none; d=google.com; s=arc-20160816; b=yMiofTTqqwY40gN13BH05MdeumrckuNYZ5MUmidi+PcMLQcI3tpzKWpNb062Ngnh2u nx9kXKzr397RzVklety8EgpsoC5i2QDyerFgVn86FIqjrwJ5jKUDdsr8cmUJ+Ya+XD2k jOLqu/ffujifTcmFfvQ/at5YSyTs2XmJspiJIcEVWMuAQaM2pRYWTtfyfscSedkCQvR5 YlCq8bGIaVoGX6aZQjQEh80pwbAo5W+cocPY3THSkQa6ujj4wWCv0PCNZWeLX4xCKBLN W/ibzZEbq48y4cXlCcFstpaZwt2oVTW7aLbw+CQaOGwFA45kcYmPx5mhfzvTOW4WwUj9 jxqQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=y0SKclKjK2cNJtcz/lrU9FeQywao4JHevcO11K6rCjM=; b=byavUC2W74HYIOQcqhv397Sw4Z54JHXHbkOLhKHU16T1UC02bhTZIABJh9dp6gJL/7 Ir78kUyZi5TocTkJ+OypUny+2ewqRMe06wCA08bPFkZHkvNSYHDiBv0FkOzste65Tlnr ZcMAXS1qW6OH1OipglFzhYuDVLhd76h4Vzy+ZUmAvm9Of5zZ+czQ/tMMYJ8E/gVfnQFD u/+WIF66RwL5b9eFLluGA4l0ZnjYuoGdG6HSpzumx5t4Koiz0B/g0ovE5Fx8ZmgH8P7E VRboyUw5IPU19P12deMhbSc5smlIW1CuF1JU1R2ZiNvx111VKphUcxJwWxrHNC3z5sSr fpKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c19si3786407edt.386.2022.01.14.13.22.43; Fri, 14 Jan 2022 13:23:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240393AbiANKVU convert rfc822-to-8bit (ORCPT + 71 others); Fri, 14 Jan 2022 05:21:20 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:53955 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237667AbiANKVU (ORCPT ); Fri, 14 Jan 2022 05:21:20 -0500 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 5B6D81C0008; Fri, 14 Jan 2022 10:21:15 +0000 (UTC) Date: Fri, 14 Jan 2022 11:21:13 +0100 From: Miquel Raynal To: Alexander Aring Cc: Stefan Schmidt , linux-wpan - ML , "David S. Miller" , Jakub Kicinski , "open list:NETWORKING [GENERAL]" , Michael Hennerich , Harry Morris , Varka Bhadram , Xue Liu , Alan Ott , David Girault , Romuald Despres , Frederic Blain , Nicolas Schodet , Thomas Petazzoni , "linux-wireless@vger.kernel.org Wireless" Subject: Re: [wpan-next v2 08/27] net: ieee802154: Drop symbol duration settings when the core does it already Message-ID: <20220114112113.63661251@xps13> In-Reply-To: References: <20220112173312.764660-1-miquel.raynal@bootlin.com> <20220112173312.764660-9-miquel.raynal@bootlin.com> <20220113121645.434a6ef6@xps13> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Alexander, alex.aring@gmail.com wrote on Thu, 13 Jan 2022 18:34:00 -0500: > Hi, > > On Thu, 13 Jan 2022 at 06:16, Miquel Raynal wrote: > > > > Hi Alexander, > > > > alex.aring@gmail.com wrote on Wed, 12 Jan 2022 17:26:14 -0500: > > > > > Hi, > > > > > > On Wed, 12 Jan 2022 at 12:33, Miquel Raynal wrote: > > > > > > > > The core now knows how to set the symbol duration in a few cases, when > > > > drivers correctly advertise the protocols used on each channel. For > > > > these drivers, there is no more need to bother with symbol duration, so > > > > just drop the duplicated code. > > > > > > > > Signed-off-by: Miquel Raynal > > > > --- > > > > drivers/net/ieee802154/ca8210.c | 1 - > > > > drivers/net/ieee802154/mcr20a.c | 2 -- > > > > 2 files changed, 3 deletions(-) > > > > > > > > diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c > > > > index 82b2a173bdbd..d3a9e4fe05f4 100644 > > > > --- a/drivers/net/ieee802154/ca8210.c > > > > +++ b/drivers/net/ieee802154/ca8210.c > > > > @@ -2977,7 +2977,6 @@ static void ca8210_hw_setup(struct ieee802154_hw *ca8210_hw) > > > > ca8210_hw->phy->cca.mode = NL802154_CCA_ENERGY_CARRIER; > > > > ca8210_hw->phy->cca.opt = NL802154_CCA_OPT_ENERGY_CARRIER_AND; > > > > ca8210_hw->phy->cca_ed_level = -9800; > > > > - ca8210_hw->phy->symbol_duration = 16 * 1000; > > > > ca8210_hw->phy->lifs_period = 40; > > > > ca8210_hw->phy->sifs_period = 12; > > > > ca8210_hw->flags = > > > > diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c > > > > index 8aa87e9bf92e..da2ab19cb5ee 100644 > > > > --- a/drivers/net/ieee802154/mcr20a.c > > > > +++ b/drivers/net/ieee802154/mcr20a.c > > > > @@ -975,7 +975,6 @@ static void mcr20a_hw_setup(struct mcr20a_local *lp) > > > > > > > > dev_dbg(printdev(lp), "%s\n", __func__); > > > > > > > > - phy->symbol_duration = 16 * 1000; > > > > phy->lifs_period = 40; > > > > phy->sifs_period = 12; > > > > > > > > @@ -1010,7 +1009,6 @@ static void mcr20a_hw_setup(struct mcr20a_local *lp) > > > > phy->current_page = 0; > > > > /* MCR20A default reset value */ > > > > phy->current_channel = 20; > > > > - phy->symbol_duration = 16 * 1000; > > > > phy->supported.tx_powers = mcr20a_powers; > > > > phy->supported.tx_powers_size = ARRAY_SIZE(mcr20a_powers); > > > > phy->cca_ed_level = phy->supported.cca_ed_levels[75]; > > > > > > What's about the atrf86230 driver? > > > > I couldn't find reliable information about what this meant: > > > > /* SUB:0 and BPSK:0 -> BPSK-20 */ > > /* SUB:1 and BPSK:0 -> BPSK-40 */ > > /* SUB:0 and BPSK:1 -> OQPSK-100/200/400 */ > > /* SUB:1 and BPSK:1 -> OQPSK-250/500/1000 */ > > > > None of these comments match the spec so I don't know what to put > > there. If you know what these protocols are, I will immediately > > provide this information into the driver and ensure the core handles > > these durations properly before dropping the symbol_durations settings > > from the code. > > I think those are from the transceiver datasheets (which are free to > access). Can you not simply merge them or is there a conflict? Actually I misread the driver, it supports several kind of chips with different channel settings and this disturbed me. I downloaded the datasheet and figured that the number after the protocol is the bit rate. This helped me to make the connection with what I already know, so both atusb and atrf86230 drivers have been converted too. Thanks, Miquèl