From patchwork Sun Nov 2 05:44:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 405825 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C168E1400A0 for ; Sun, 2 Nov 2014 16:46:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750792AbaKBFqA (ORCPT ); Sun, 2 Nov 2014 01:46:00 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:57243 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750745AbaKBFp6 (ORCPT ); Sun, 2 Nov 2014 01:45:58 -0400 Received: by mail-wi0-f179.google.com with SMTP id h11so4039112wiw.0 for ; Sat, 01 Nov 2014 22:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=qGptK3GzKelJmqGpYJjW6KO9RJYMs52qfPei3Of3SCk=; b=MTafrMbMG2d0bE/CQe5XJeCm68Wa7MNFi19qa3+R8on8Qx96hKbT2fPMzX0TKUAFC/ 0YqgLXar/WQ2Dp3zYa/fNidMB0aLWV0fogEyzEV4Z8pAKPmGYAyzab0BNWGYL93Pduit 7Xi1QkeiDQ4kEue+ssRGuYIz/5dLcjVHUAHXPka9nW3ImicdkXLoiBPlGWW4P3QJWcbJ m0B7ljiBXV7S5jN7bB12f7fZOcT3wsVbR2mMwKAZ9zZh/NPhLFip1BRVocYfZLmkrVop 6H9IktYZK8Y5YkphnmSJmYcDmR2X2Ck1wXJJT6W718JCGwXpmL0LU2H2o/xSQT0BM7rb mRrA== X-Received: by 10.180.109.100 with SMTP id hr4mr7768520wib.39.1414907124435; Sat, 01 Nov 2014 22:45:24 -0700 (PDT) Received: from omega.localdomain (p4FD3893E.dip0.t-ipconnect.de. [79.211.137.62]) by mx.google.com with ESMTPSA id dc8sm4060736wib.7.2014.11.01.22.45.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 01 Nov 2014 22:45:23 -0700 (PDT) From: Alexander Aring To: linux-wpan@vger.kernel.org Cc: kernel@pengutronix.de, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Alexander Aring , "David S. Miller" Subject: [PATCH bluetooth-next] netdevice: add ieee802154_ptr to net_device Date: Sun, 2 Nov 2014 06:44:54 +0100 Message-Id: <1414907094-9623-1-git-send-email-alex.aring@gmail.com> X-Mailer: git-send-email 2.1.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch adds an ieee802154_ptr to the net_device structure. Furthermore the 802.15.4 subsystem will introduce a nl802154 framework which is similar like the nl80211 framework and a wpan_dev structure. The wpan_dev structure will hold additional net_device attributes like address options which are 802.15.4 specific. In the upcoming nl802154 implementation we will introduce a NL802154_FLAG_NEED_WPAN_DEV like NL80211_FLAG_NEED_WDEV. For this flag an ieee802154_ptr in net_device is needed. Additional we can access the wpan_dev attributes in upper layers like IEEE 802.15.4 6LoWPAN easily. Current solution is a complicated callback interface and getting these values over subif data structure in mac802154. Signed-off-by: Alexander Aring Cc: David S. Miller Acked-by: David S. Miller --- Another option would be to combine ieee80211_ptr and ieee802154_ptr in an union. These pointer can't be used twice at the same time and the union solution will not make the struct net_device bigger. My working repository is bluetooth-next. Marcel will apply all 802.15.4 changes. That's why this patch should go into bluetooth-next. Then I can send new patches which depends on this patch for introducing wpan_dev and nl802154. include/linux/netdevice.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 74fd5d3..c9bcf33 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -57,6 +57,8 @@ struct device; struct phy_device; /* 802.11 specific */ struct wireless_dev; +/* 802.15.4 specific */ +struct wpan_dev; void netdev_set_default_ethtool_ops(struct net_device *dev, const struct ethtool_ops *ops); @@ -1572,6 +1574,7 @@ struct net_device { struct inet6_dev __rcu *ip6_ptr; void *ax25_ptr; struct wireless_dev *ieee80211_ptr; + struct wpan_dev *ieee802154_ptr; /* * Cache lines mostly used on receive path (including eth_type_trans())