From patchwork Fri Jan 28 11:20:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 12728255 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 524CBC433F5 for ; Fri, 28 Jan 2022 11:20:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348138AbiA1LUL (ORCPT ); Fri, 28 Jan 2022 06:20:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348128AbiA1LUL (ORCPT ); Fri, 28 Jan 2022 06:20:11 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E158FC061714; Fri, 28 Jan 2022 03:20:10 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 13E28100002; Fri, 28 Jan 2022 11:20:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1643368809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ATxe8qBL+VheL5575a2nbwFegp1GRZ6tMQh4RRJj2xM=; b=pVsPI0UZ9EL788Af5Kkq2L1Lcj7GZUidaxqi/oUU0efjNmwoaoWNBoqQo0F5MsB9TdJHvE Qwxzqk8lSV0OXKJlqjduOPSDG48h3zi94a/o2iz2xpF3bMxiXJ9UqqAWCyZ8tOyvLFSfoq 78RzIuY9rOdYUmMGFDyVHTsGrNrnDiv1JRAXov4yDI/kfwQQS2WTQipFkLNiRGpMzt0/cN cfRIZeP7Dx4qKHKHxrxsQoycREa7fkgkBarfVZBLX2GNfGARGinrgNuCfaQdlWlFKZUJs9 Ny1vOwnHeI1+GfdBahRM5rLOZpPh9oz4r86g55tB3MKRu6+FvZYsom5EtHGvTA== From: Miquel Raynal To: Alexander Aring , Stefan Schmidt , linux-wpan@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Thomas Petazzoni , David Girault , Romuald Despres , Frederic Blain , Nicolas Schodet , Miquel Raynal Subject: [PATCH wpan-next v2 1/2] net: ieee802154: Move the IEEE 802.15.4 Kconfig main entries Date: Fri, 28 Jan 2022 12:20:01 +0100 Message-Id: <20220128112002.1121320-2-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220128112002.1121320-1-miquel.raynal@bootlin.com> References: <20220128112002.1121320-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org From: David Girault It makes certainly more sense to have all the low-range wireless protocols such as Bluetooth, IEEE 802.11 (WiFi) and IEEE 802.15.4 together, so let's move the main IEEE 802.15.4 stack Kconfig entry at a better location. As the softMAC layer has no meaning outside of the IEEE 802.15.4 stack and cannot be used without it, also move the mac802154 menu inside ieee802154/. Signed-off-by: David Girault [miquel.raynal@bootlin.com: Isolate this change from a bigger commit and rewrite the commit message.] Signed-off-by: Miquel Raynal --- net/Kconfig | 3 +-- net/ieee802154/Kconfig | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/Kconfig b/net/Kconfig index 8a1f9d0287de..a5e31078fd14 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -228,8 +228,6 @@ source "net/x25/Kconfig" source "net/lapb/Kconfig" source "net/phonet/Kconfig" source "net/6lowpan/Kconfig" -source "net/ieee802154/Kconfig" -source "net/mac802154/Kconfig" source "net/sched/Kconfig" source "net/dcb/Kconfig" source "net/dns_resolver/Kconfig" @@ -380,6 +378,7 @@ source "net/mac80211/Kconfig" endif # WIRELESS +source "net/ieee802154/Kconfig" source "net/rfkill/Kconfig" source "net/9p/Kconfig" source "net/caif/Kconfig" diff --git a/net/ieee802154/Kconfig b/net/ieee802154/Kconfig index 31aed75fe62d..7e4b1d49d445 100644 --- a/net/ieee802154/Kconfig +++ b/net/ieee802154/Kconfig @@ -36,6 +36,7 @@ config IEEE802154_SOCKET for 802.15.4 dataframes. Also RAW socket interface to build MAC header from userspace. +source "net/mac802154/Kconfig" source "net/ieee802154/6lowpan/Kconfig" endif From patchwork Fri Jan 28 11:20:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 12728256 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BB72C433EF for ; Fri, 28 Jan 2022 11:20:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348154AbiA1LUN (ORCPT ); Fri, 28 Jan 2022 06:20:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348151AbiA1LUM (ORCPT ); Fri, 28 Jan 2022 06:20:12 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79CF8C061714; Fri, 28 Jan 2022 03:20:12 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 8FA1010000C; Fri, 28 Jan 2022 11:20:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1643368811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CshcTBva/M2NVguvG7PsVBg3fiICK3DauHpB29xU1CE=; b=PuhYmaBgAqNv8+23pwzEJtXp9H2jv4i/Y40ewd3INoR0lRwNcN8eQuwMTpq2dNbPlZSJG9 0bEEU9Z9LT0rljVBJGr0kWffGhOMi9456yPEmCKAySf+gGWddmSLSBOizXSmx3yz8kAAOg oZ2If7v6Lti6Jt47bJoO2zupCO4NcS6g3GvthGxiXaDL69MYVLwckCRyrpegJn+Llb64PM 0pAJbaY7h4QdEDgqohGvDj07CDyDqk0A3Yi8uIhjsmZcmMix2OyUg06nI5YtUDHgK1LCU3 odLbGCuKqARKTNEJovj0St4t75drsBXB0ecEtLpnFhjjX/T7wmiYYG74QjQySA== From: Miquel Raynal To: Alexander Aring , Stefan Schmidt , linux-wpan@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Thomas Petazzoni , David Girault , Romuald Despres , Frederic Blain , Nicolas Schodet , Miquel Raynal Subject: [PATCH wpan-next v2 2/2] net: ieee802154: Move the address structure earlier and provide a kdoc Date: Fri, 28 Jan 2022 12:20:02 +0100 Message-Id: <20220128112002.1121320-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220128112002.1121320-1-miquel.raynal@bootlin.com> References: <20220128112002.1121320-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org From: David Girault Move the address structure earlier in the cfg802154.h header in order to use it in subsequent additions. Give this structure a header to better explain its content. Signed-off-by: David Girault [miquel.raynal@bootlin.com: Isolate this change from a bigger commit and reword the comment] Signed-off-by: Miquel Raynal --- include/net/cfg802154.h | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h index 4491e2724ff2..0b8b1812cea1 100644 --- a/include/net/cfg802154.h +++ b/include/net/cfg802154.h @@ -29,6 +29,25 @@ struct ieee802154_llsec_key_id; struct ieee802154_llsec_key; #endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */ +/** + * struct ieee802154_addr - IEEE802.15.4 device address + * @mode: Address mode from frame header. Can be one of: + * - @IEEE802154_ADDR_NONE + * - @IEEE802154_ADDR_SHORT + * - @IEEE802154_ADDR_LONG + * @pan_id: The PAN ID this address belongs to + * @short_addr: address if @mode is @IEEE802154_ADDR_SHORT + * @extended_addr: address if @mode is @IEEE802154_ADDR_LONG + */ +struct ieee802154_addr { + u8 mode; + __le16 pan_id; + union { + __le16 short_addr; + __le64 extended_addr; + }; +}; + struct cfg802154_ops { struct net_device * (*add_virtual_intf_deprecated)(struct wpan_phy *wpan_phy, const char *name, @@ -277,15 +296,6 @@ static inline void wpan_phy_net_set(struct wpan_phy *wpan_phy, struct net *net) write_pnet(&wpan_phy->_net, net); } -struct ieee802154_addr { - u8 mode; - __le16 pan_id; - union { - __le16 short_addr; - __le64 extended_addr; - }; -}; - struct ieee802154_llsec_key_id { u8 mode; u8 id;