Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4212237imu; Tue, 18 Dec 2018 10:51:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/X4Jzu3HQiNGcSHeMOp1Da5f215XQ+ZuFxo5U4nNRPJTkinDdukMJUomol526qtPonJjwqs X-Received: by 2002:a63:6a05:: with SMTP id f5mr16457024pgc.72.1545159096173; Tue, 18 Dec 2018 10:51:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545159096; cv=none; d=google.com; s=arc-20160816; b=FSt2t0mrdJe7J31xfFqfCcjic5lLwWATn7Tl6VdnBeG+LeRUz6FjsShLRcsbcuWK3a pqCmx3lexjaKGjj4zQkjVG87CPo70oV/uQBcHMrH62P8NLkNXNSMA6NZfkYQmC5YPZMG W8MuJuWS9wAImrVDL0AzBcfCbThM6fvHDHQ2+K48cQPqqcD4dsvHGKPIBlXMdmeVciY/ kfigtyu8/BGWYNFgREraLVkFGYwpo2Ev9SK6I45asApFFVXKnS8BzZ4sYn1gcqJ8Lho1 RHqv1wYL/vf446DG72bBnVGiMakEbfeblRvhRzU6ehfUZMVft5QFeBi+U6IOKqgzOdv+ smAA== 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:organization:autocrypt:openpgp:from:references:cc:to :subject; bh=eduqzQ28vYX6wQJVNyIB9k8v3zIREq0HFutER5g0Pxc=; b=J2EKYQ39YINQECIYi3eexBF4qhxQwF99lkMdrEgqFV70g8ZXVYzxrNc6sT6cc5rDFP 4ZgJQ1jhFjwoIofMuS7hQtwqS9csWF6w2k5iBzFlbvFW06yqLVwinUI2ay2Y2RJdgSzo 7H2D9BadFeiOitbFnX8z2Jp8wf+7WcJbGbW6HiyEYcV4FoURk7EbVGJuHkn1e3mhtABe Ks91wmk9eoNNvMEy3CSI3CqpP1bX46tdClwF49Cq/dcF1rK7HWWil5cnsRDAzccpzLwZ 9bntOZMt9pUenpHX+sNaBq2wAOPyI9x1uX2EOqTZgVwSRZElq1JF8D+UuS8BEne/LPnU jogg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si13087964plk.9.2018.12.18.10.51.20; Tue, 18 Dec 2018 10:51:36 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726903AbeLRStL (ORCPT + 99 others); Tue, 18 Dec 2018 13:49:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:50216 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726822AbeLRStK (ORCPT ); Tue, 18 Dec 2018 13:49:10 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8D859B0FB; Tue, 18 Dec 2018 18:49:07 +0000 (UTC) Subject: Re: [PATCH v5 5/6] net: maclorawan: Implement maclorawan class module To: Jian-Hong Pan , Jiri Pirko , Ben Whitten Cc: "David S. Miller" , Alan Cox , linux-lpwan@lists.infradead.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marcel Holtmann , Dollar Chen , Ken Yu , linux-wpan - ML References: <20181216101858.9585-6-starnight@g.ncu.edu.tw> <20181217140233.GG2096@nanopsycho> From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Openpgp: preference=signencrypt Autocrypt: addr=afaerber@suse.de; prefer-encrypt=mutual; keydata= xsFNBE6W6ZQBEAC/BIukDnkVenIkK9O14UucicBIVvRB5WSMHC23msS+R2h915mW7/vXfn+V 0nrr5ECmEg/5OjujKf0x/uhJYrsxcp45nDyYCk+RYoOJmGzzUFya1GvT/c04coZ8VmgFUWGE vCfhHJro85dZUL99IoLP21VXEVlCPyIngSstikeuf14SY17LPTN1aIpGQDI2Qt8HHY1zOVWv iz53aiFLFeIVhQlBmOABH2Ifr2M9loRC9yOyGcE2GhlzgyHGlQxEVGFn/QptX6iYbtaTBTU0 c72rpmbe1Nec6hWuzSwu2uE8lF+HYcYi+22ml1XBHNMBeAdSEbSfDbwc///8QKtckUzbDvME S8j4KuqQhwvYkSg7dV9rs53WmjO2Wd4eygkC3tBhPM5s38/6CVGl3ABiWJs3kB08asUNy8Wk juusU/nRJbXDzxu1d+hv0d+s5NOBy/5+7Pa6HeyBnh1tUmCs5/f1D/cJnuzzYwAmZTHFUsfQ ygGBRRKpAVu0VxCFNPSYKW0ULi5eZV6bcj+NAhtafGsWcv8WPFXgVE8s2YU38D1VtlBvCo5/ 0MPtQORqAQ/Itag1EHHtnfuK3MBtA0fNxQbb2jha+/oMAi5hKpmB/zAlFoRtYHwjFPFldHfv Iljpe1S0rDASaF9NsQPfUBEm7dA5UUkyvvi00HZ3e7/uyBGb0QARAQABzSJBbmRyZWFzIEbD pHJiZXIgPGFmYWVyYmVyQHN1c2UuZGU+wsF7BBMBAgAlAhsDBgsJCAcDAgYVCAIJCgsEFgID AQIeAQIXgAUCTqGJnQIZAQAKCRD6LtEtPn4BPzetD/4rF6k/HF+9U9KqykfJaWdUHJvXpI85 Roab12rQbiIrL4hVEYKrYwPEKpCf+FthXpgOq+JdTGJ831DMlTx7Ed5/QJ9KAAQuhZlSNjSc +FNobJm7EbFv9jWFjQC0JcOl17Ji1ikgRcIRDCul1nQh9jCdfh1b848GerZmzteNdT9afRJm 7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JOFwfpJgsFU4xLoO/8N0RNFsnelBgWgZE3ZEctEd4BsWFUw+czYCPYfqOcJ556QUGA9y DeDcxSitpYrNIvpk4C5CHbvskVLKPIUVXxTNl8hAGo1Ahm1VbNkYlocAEQEAAcLBXwQYAQIA CQUCTpbplAIbDAAKCRD6LtEtPn4BPzA6D/9TbSBOPM99SHPX9JiEQAw4ITCBF2oTWeZQ6RJg RKpB15lzyPfyFbNSceJp9dCiwDWe+pzKaX6KYOFZ5+YTS0Ph2eCR+uT2l6Mt6esAun8dvER/ xlPDW7p88dwGUcV8mHEukWdurSEDTj8V3K29vpgvIgRq2lHCn2wqRQBGpiJAt72Vg0HxUlwN GAJNvhpeW8Yb43Ek7lWExkUgOfNsDCTvDInF8JTFtEXMnUcPxC0d/GdAuvBilL9SlmzvoDIZ 5k2k456bkY3+3/ydDvKU5WIgThydyCEQUHlmE6RdA3C1ccIrIvKjVEwSH27Pzy5jKQ78qnhv dtLLAavOXyBJnOGlNDOpOyBXfv02x91RoRiyrSIM7dKmMEINKQlAMgB/UU/6B+mvzosbs5d3 4FPzBLuuRz9WYzXmnC460m2gaEVk1GjpidBWw0yY6kgnAM3KhwCFSecqUQCvwKFDGSXDDbCr w08b3GDk40UoCoUq9xrGfhlf05TUSFTg2NlSrK7+wAEsTUgs2ZYLpHyEeftoDDnKpM4ghs/O ceCeyZUP1zSgRSjgITQp691Uli5Nd1mIzaaM8RjOE/Rw67FwgblKR6HAhSy/LYw1HVOu+Ees RAEdbtRt37A8brlb/ENxbLd9SGC8/j20FQjit7oPNMkTJDs7Uo2eb7WxOt5pSTVVqZkv7Q== Organization: SUSE Linux GmbH Message-ID: <60ff6940-4bcc-750c-ad38-0a183375169f@suse.de> Date: Tue, 18 Dec 2018 19:49:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 18.12.18 um 15:27 schrieb Jian-Hong Pan: >> Sun, Dec 16, 2018 at 11:18:59AM CET, starnight@g.ncu.edu.tw wrote: >>> LoRaWAN defined by LoRa Alliance(TM) is the MAC layer over LoRa devices. >>> >>> This patch implements part of Class A end-devices SoftMAC defined in >>> LoRaWAN(TM) Specification Ver. 1.0.2: >>> 1. End-device receive slot timing >>> 2. Only single channel and single data rate for now >>> 3. Unconfirmed data up/down message types >>> >>> On the other side, it defines the basic interface and operation >>> functions for compatible LoRa device drivers. >>> >>> Signed-off-by: Jian-Hong Pan [...] >>> net/maclorawan/Kconfig | 14 + >>> net/maclorawan/Makefile | 2 + >>> net/maclorawan/mac.c | 555 ++++++++++++++++++++++++++++++++++++ >>> net/maclorawan/main.c | 606 ++++++++++++++++++++++++++++++++++++++++ >>> 4 files changed, 1177 insertions(+) >>> create mode 100644 net/maclorawan/Kconfig >>> create mode 100644 net/maclorawan/Makefile >>> create mode 100644 net/maclorawan/mac.c >>> create mode 100644 net/maclorawan/main.c >> >> I don't get it. In patch "Add LoRaWAN API declaration for LoRa devices" >> you add headers for "API" and here you implement functions. That is just >> weird. Does it mean you can have other implementations? > > LoRaWAN defined by LoRa Alliance(TM) is the MAC layer over LoRa PHY. > This part is soft-MAC as Andreas mentioned > http://lists.infradead.org/pipermail/linux-lpwan/2018-December/000010.html > >> Also, you don't really have any user of this API in the set. Please >> introduce at least 1 driver, preferably more (I see that Andreas has >> multiple ones in his patchset). You cannot push kernel infrastructure >> without kernel user. > > The soft-MAC is suitable for the LoRa chips' device drivers, like > sx1276/77/78/79, RFM95/96/97/98W ... > Still waiting for Andreas' sx1276 version 2 patch and more discussion. sx1276 regmap conversion was pushed to my staging tree together with Ben's sx1301 final conversion last night, lightly tested. https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-lora.git/log/?h=lora-next TBD: rename to sx127x, implement regmap fields, only auto-detect reset when no OF node available (all low priority atm, patches welcome) (and for sx1301 I still need to update my DT overlays with the new clk) > For example, how to make PF_LORA and PF_LORAWAN like Ethernet, PF_INET > and PF_INET6 don't need separate devices either, both use eth0. > https://lkml.org/lkml/2018/8/3/266 Jiri, I am expecting the maclorawan driver to lower packets from ETH_P_LORAWAN to ETH_P_LORA in a generic way, so that any of the LoRa device drivers can benefit of it, with maclorawan using the LoRa netlink commands that the individual drivers implement. Not sure what if anything is missing for that in the current revision? Still dealing with the lower-level infrastructure and my test setup ... progressing slowly. I'll probably need to queue the remaining generic LoRaWAN part 1/6 in my tree to resolve this circular dependency between Jian-Hong and me, so that only the soft-MAC implementation remains a separate patch series. The hard-MAC implementations will be on my plate mostly, as both SX1276 and SX1301 need the soft-MAC. Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)