Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp429416pxb; Thu, 13 Jan 2022 09:15:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOqI8lz48hAaKPkGdc+8biHSvYs5oI8EEoMwwuHOTxQTUlBVrthJb7jMuBqRLa/rh96Q+m X-Received: by 2002:a17:907:7295:: with SMTP id dt21mr4136824ejc.216.1642094123785; Thu, 13 Jan 2022 09:15:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642094123; cv=none; d=google.com; s=arc-20160816; b=kzI2ZS8suRz4av3Q5+DmHCPLurN8zycY5wZ0fwZDYHBNhxC7JvAhwAfMOpSJ43YAey r/M6Mf4IvLnUkQc6I4DPbTYW0jIZZnpYXcOQ7FESE+LfOFKgBZNFgEEY3UJA5Lt3fx+E nlmfrx5tvh72UQQ/BSzEKxoMqSccKXJXoGChcE81S+Er0tRbl1iZYIxVKvRT7idpo6jW L3Nw1Lmy+mYW4w91E+mpvoIWv1kkIIt725R5DJxaFsnJLJJMa24Fq3yyuVICRBbA0R5M gk2v675YEKN1Jiw1bK3fCL2drYYpoB9t9qSWxHZE3OL6klX3mycrfDhLpUJze2ofqmlC VLAg== 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=gbXIbUk87vzyIcQ0LezuJGNVJpPmTaFYGVpfCHL36Vk=; b=Ye4lRPiDxGBO8oTuKg0D9rzH/ehze0izLT8wFvzA6m/TnQYwP3+qUb2m7Ow0jNf9XZ /fY0lvF9XY9M0tOnwp5GCeN3ck+AalQOQN9gsHzwb/3eVXJxuz3DYONNYMmtsMsQETN/ 1uerqiEfs6x5kdsDeKyzNB+W4mXchnde3F2g78x9OAHErMhkPZpy7nWoqDq7A3yOyeuN 3+XGIBS4tibzgQm80rLA+/wSS4dtCLawqzqlrghqUEkIwNTPcyNBsMXcgNyUtGcrAEKZ 6Hr1DZ+KQle9s9OF76QdiBJ67tl2JAbBpvM9/K9iTS6IhP4NgRdV+ZAcK88qBcvIYmDn 0e3w== 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 ay23si1218549edb.333.2022.01.13.09.15.05; Thu, 13 Jan 2022 09:15:23 -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 S234107AbiAMLQx convert rfc822-to-8bit (ORCPT + 71 others); Thu, 13 Jan 2022 06:16:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbiAMLQw (ORCPT ); Thu, 13 Jan 2022 06:16:52 -0500 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DEBCC06173F; Thu, 13 Jan 2022 03:16:51 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 4C16820004; Thu, 13 Jan 2022 11:16:47 +0000 (UTC) Date: Thu, 13 Jan 2022 12:16:45 +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: <20220113121645.434a6ef6@xps13> In-Reply-To: References: <20220112173312.764660-1-miquel.raynal@bootlin.com> <20220112173312.764660-9-miquel.raynal@bootlin.com> 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 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. Thanks, Miquèl