Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1702575imm; Sun, 23 Sep 2018 09:44:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Bamb1D6UPu5VdnJc3jVmWDD7HmlWHZx4QyXuwKpCk7FakACi7t0XvSJ19+EZtB/nT0k1n X-Received: by 2002:a17:902:1745:: with SMTP id i63-v6mr7252340pli.3.1537721069196; Sun, 23 Sep 2018 09:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537721069; cv=none; d=google.com; s=arc-20160816; b=xNb81SdIWGhkd4dywp+YWIbYdEF9zS4J48ORvccghsPU86b6gedDs71OGLsKo3sZRT 1BUIqJXUdCzUGenh2V89MqMSbI/6HFzQEoCeC4Kd7nZMd7+bElDz08riJh9UEKJbKy5X YKXUqxg6u/ZJk4W6WsHLCqyhmy7mM2chFlOu0qRG4+pldI55l62/0fi+XkyjFPN70CVo /s/yeZ264AbDMHmAj9nNVnLktBT7+hsndMn/N2vApczJxLHDEqE+rnFna1LmOEdjhKAr djCvvH3o0IurgzsDPDAJWtyVxu8eY/c8ok7T9xVZSi8dmFhDC7izJ81oQe4x4JiG2Bc2 yupA== 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:cc:organization:autocrypt:openpgp:from:references:to :subject; bh=Xy0rPUNo9Dxyp5pnyq8Mgvu3hRuPbyub0jK99J7yDz4=; b=C8zv5LDJcbudK2i5/F75ARP9bznhP8saC8wNzeXR+4x0vDp6ncGhhjoVgDY6/RbNXz jSjGZSsCAFPrn3fUSdoPTc7kvUZEqyFofHnDyXTYnbx6xAuqtyjBl8jKF8ymGaFOovvu 19ulnZPzoBmReZ/HYb7ml+FhINWleGtzRpjcIiFMfZghlWOfiNmBIvdxvPGPvVV+udsp DpHzk6eIEjO68Sisc4qHOoybjKWnh42QJReMVldzX9Fxqv0Kv/Ufjc6nLZfRx7Pp1AED j+2ALv+3XJBaTDiG5dlyBVk7pRoW+P8wp6LGd77v0HTGLsgvH7NNJ+9WWj2cDyCgw9U4 aCXA== 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 d11-v6si34842155pla.245.2018.09.23.09.44.10; Sun, 23 Sep 2018 09:44:29 -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; 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 S1726643AbeIWWmG (ORCPT + 99 others); Sun, 23 Sep 2018 18:42:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:44592 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726223AbeIWWmF (ORCPT ); Sun, 23 Sep 2018 18:42:05 -0400 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 8425BABDC; Sun, 23 Sep 2018 16:43:58 +0000 (UTC) Subject: Re: [RFC 1/3 net] lorawan: Add LoRaWAN class module To: Jian-Hong Pan References: 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+RYoO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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 Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jiri Pirko , Marcel Holtmann , "David S. Miller" , Matthias Brugger , Janus Piwek , =?UTF-8?Q?Michael_R=c3=b6der?= , Dollar Chen , Ken Yu , =?UTF-8?Q?Konstantin_B=c3=b6hm?= , Jan Jongboom , Jon Ortego , "contact@snootlab.com" , Ben Whitten , Brian Ray , lora@globalsat.com.tw, Alexander Graf , =?UTF-8?Q?Michal_Kube=c4=8dek?= , Rob Herring , devicetree@vger.kernel.org, Steve deRosier , Mark Brown , linux-spi@vger.kernel.org, Pieter ROBYNS , Hasnain Virk , linux-wpan - ML , Stefan Schmidt , Daniele Comel , shess@hessware.de, Xue Liu , fomi , Afonso Bordado Message-ID: Date: Sun, 23 Sep 2018 18:40:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.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 Hi Jian-Hong, [+ Afonso] Am 23.08.18 um 19:15 schrieb Jian-Hong Pan: > LoRaWAN defined by LoRa Alliance(TM) is the MAC layer over LoRa devices. > > This patch implements part of Class A end-devices features 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 > 4. Encryption/decryption for up/down link data messages > > It also implements the the functions and maps to Datagram socket for > LoRaWAN unconfirmed data messages. > > On the other side, it defines the basic interface and operation > functions for compatible LoRa device drivers. > > Signed-off-by: Jian-Hong Pan > --- > include/linux/maclorawan/lora.h | 239 +++++++++++ > net/maclorawan/Kconfig | 14 + > net/maclorawan/Makefile | 2 + > net/maclorawan/lorawan.h | 219 ++++++++++ > net/maclorawan/lrwsec.c | 237 +++++++++++ > net/maclorawan/lrwsec.h | 57 +++ > net/maclorawan/mac.c | 552 +++++++++++++++++++++++++ > net/maclorawan/main.c | 665 ++++++++++++++++++++++++++++++ > net/maclorawan/socket.c | 700 ++++++++++++++++++++++++++++++++ > 9 files changed, 2685 insertions(+) > create mode 100644 include/linux/maclorawan/lora.h Can we use include/linux/lora/lorawan.h for simplicity? > create mode 100644 net/maclorawan/Kconfig > create mode 100644 net/maclorawan/Makefile > create mode 100644 net/maclorawan/lorawan.h > create mode 100644 net/maclorawan/lrwsec.c > create mode 100644 net/maclorawan/lrwsec.h > create mode 100644 net/maclorawan/mac.c > create mode 100644 net/maclorawan/main.c > create mode 100644 net/maclorawan/socket.c This patch is much too large for me to review... It also doesn't seem to follow the structure I suggested: 802.15.4 has two separate directories, net/ieee802154/ and net/mac802154/. Therefore I had suggested net/maclorawan/ only for code that translates from ETH_P_LORAWAN to ETH_P_LORA socket buffers, i.e. your soft MAC. Generic socket code that applies also to hard MAC drivers I expected to go either to net/lora/lorawan/ or better net/lorawan/ or some other clearly separate location, with its own Kconfig symbol - any reason not to? Consider which parts can be enabled/used independently of each other, then you can put them into two (or more?) different patches. Also please use SPDX license identifiers in your headers. And please don't put the whole world in To, use CC. Thanks, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)