Return-path: Received: from senator.holtmann.net ([87.106.208.187]:44582 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbaLGJG4 convert rfc822-to-8bit (ORCPT ); Sun, 7 Dec 2014 04:06:56 -0500 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: [PATCH] mac80211: Supporting of IFLA_INFO_KIND rtnl attribute From: Marcel Holtmann In-Reply-To: <1417910690-2021-1-git-send-email-vadim4j@gmail.com> Date: Sun, 7 Dec 2014 10:06:52 +0100 Cc: Johannes Berg , "John W. Linville" , "David S. Miller" , linux-wireless , netdev@vger.kernel.org Message-Id: <88214C7B-ED89-4E9C-BB24-8F0187B88D5E@holtmann.org> (sfid-20141207_100709_656382_06AE4BAD) References: <1417910690-2021-1-git-send-email-vadim4j@gmail.com> To: Vadim Kochan Sender: linux-wireless-owner@vger.kernel.org List-ID: Hi Vadim, > It allows to identify the wireless kind of device for > the user application, e.g.: > > # ip -d link > > 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 > 2: enp0s25: mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000 > link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff promiscuity 0 > 3: wlp3s0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 > link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff promiscuity 0 > wireless > 4: wlp0s26u1u2: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 > link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff promiscuity 0 > wireless > > Signed-off-by: Vadim Kochan > --- > net/mac80211/iface.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c > index 653f5eb..b993c7d 100644 > --- a/net/mac80211/iface.c > +++ b/net/mac80211/iface.c > @@ -18,6 +18,7 @@ > #include > #include > #include > +#include > #include "ieee80211_i.h" > #include "sta_info.h" > #include "debugfs_netdev.h" > @@ -1624,6 +1625,10 @@ static void ieee80211_assign_perm_addr(struct ieee80211_local *local, > mutex_unlock(&local->iflist_mtx); > } > > +static struct rtnl_link_ops wireless_link_ops __read_mostly = { > + .kind = "wireless", > +}; > + I would prefer if we use "wlan" here. Same as what we use for DEVTYPE and RFKILL switches. Being consistent across the kernel helps a lot. Since other subsystems including Bluetooth might want to identify their netdev as well and "wireless" would be just too generic. Regards Marcel