netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN
@ 2006-08-28 20:50 mabbas
  2006-08-29  7:49 ` Johannes Berg
  2006-09-21 16:52 ` Jiri Benc
  0 siblings, 2 replies; 8+ messages in thread
From: mabbas @ 2006-08-28 20:50 UTC (permalink / raw)
  To: netdev; +Cc: jbenc

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: d80211-wnick.patch --]
[-- Type: text/x-patch, Size: 2381 bytes --]


This patch modify d80211 to add nick wireless command 

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>

diff --git a/net/d80211/ieee80211_i.h b/net/d80211/ieee80211_i.h
index 0d2d79d..02242c6 100644
--- a/net/d80211/ieee80211_i.h
+++ b/net/d80211/ieee80211_i.h
@@ -241,6 +241,7 @@ struct ieee80211_if_sta {
 		IEEE80211_IBSS_SEARCH, IEEE80211_IBSS_JOINED
 	} state;
 	struct timer_list timer;
+	u8 nick[IW_ESSID_MAX_SIZE];
 	u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
 	u8 ssid[IEEE80211_MAX_SSID_LEN];
 	size_t ssid_len;
diff --git a/net/d80211/ieee80211_ioctl.c b/net/d80211/ieee80211_ioctl.c
index 89a58e3..956eabb 100644
--- a/net/d80211/ieee80211_ioctl.c
+++ b/net/d80211/ieee80211_ioctl.c
@@ -2153,6 +2153,39 @@ static void ieee80211_ioctl_unmask_chann
 }
 
 
+static int ieee80211_ioctl_siwnick(struct net_device *dev,
+				   struct iw_request_info *info,
+				   union iwreq_data *wrqu, char *extra)
+{
+	struct ieee80211_sub_if_data *sdata;
+	struct ieee80211_if_sta *ifsta;
+
+	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+	ifsta = &sdata->u.sta;
+	if (wrqu->data.length >= IW_ESSID_MAX_SIZE)
+		return -E2BIG;
+
+	memset(ifsta->nick, 0, sizeof(ifsta->nick));
+	memcpy(ifsta->nick, extra, wrqu->data.length);
+	return 0;
+}
+
+static int ieee80211_ioctl_giwnick(struct net_device *dev,
+				   struct iw_request_info *info,
+				   union iwreq_data *wrqu, char *extra)
+{
+	struct ieee80211_sub_if_data *sdata;
+	struct ieee80211_if_sta *ifsta;
+
+	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+	ifsta = &sdata->u.sta;
+
+	wrqu->data.length = strlen(ifsta->nick) + 1;
+	memcpy(extra, ifsta->nick, wrqu->data.length);
+	wrqu->data.flags = 1;   /* active */
+	return 0;
+}
+
 static int ieee80211_ioctl_test_mode(struct net_device *dev, int mode)
 {
 	struct ieee80211_local *local = dev->ieee80211_ptr;
@@ -3138,8 +3171,8 @@ static const iw_handler ieee80211_handle
 	(iw_handler) ieee80211_ioctl_giwscan,		/* SIOCGIWSCAN */
 	(iw_handler) ieee80211_ioctl_siwessid,		/* SIOCSIWESSID */
 	(iw_handler) ieee80211_ioctl_giwessid,		/* SIOCGIWESSID */
-	(iw_handler) NULL,				/* SIOCSIWNICKN */
-	(iw_handler) NULL,				/* SIOCGIWNICKN */
+	(iw_handler) ieee80211_ioctl_siwnick,		/* SIOCSIWNICKN */
+	(iw_handler) ieee80211_ioctl_giwnick,		/* SIOCGIWNICKN */
 	(iw_handler) NULL,				/* -- hole -- */
 	(iw_handler) NULL,				/* -- hole -- */
 	(iw_handler) NULL,				/* SIOCSIWRATE */

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN
  2006-08-28 20:50 [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN mabbas
@ 2006-08-29  7:49 ` Johannes Berg
  2006-08-29 11:49   ` John W. Linville
  2006-09-21 16:52 ` Jiri Benc
  1 sibling, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2006-08-29  7:49 UTC (permalink / raw)
  To: mabbas; +Cc: netdev, jbenc

I intend to kill the nick command with nl80211 since it seems to be
useless. Any objections?

johannes

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN
  2006-08-29  7:49 ` Johannes Berg
@ 2006-08-29 11:49   ` John W. Linville
  2006-08-29 17:45     ` Jouni Malinen
  0 siblings, 1 reply; 8+ messages in thread
From: John W. Linville @ 2006-08-29 11:49 UTC (permalink / raw)
  To: Johannes Berg; +Cc: mabbas, netdev, jbenc

On Tue, Aug 29, 2006 at 09:49:17AM +0200, Johannes Berg wrote:
> I intend to kill the nick command with nl80211 since it seems to be
> useless. Any objections?

I can't defend it myself, but I have heard of people using it.
I think some of the distro's init scripts might set it as well?

Can anyone defend the practice of setting a nickname for a wireless
device?

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN
  2006-08-29 11:49   ` John W. Linville
@ 2006-08-29 17:45     ` Jouni Malinen
  2006-08-29 22:15       ` Ulrich Kunitz
  0 siblings, 1 reply; 8+ messages in thread
From: Jouni Malinen @ 2006-08-29 17:45 UTC (permalink / raw)
  To: John W. Linville; +Cc: Johannes Berg, mabbas, netdev, jbenc

On Tue, Aug 29, 2006 at 07:49:22AM -0400, John W. Linville wrote:
> On Tue, Aug 29, 2006 at 09:49:17AM +0200, Johannes Berg wrote:
> > I intend to kill the nick command with nl80211 since it seems to be
> > useless. Any objections?
> 
> I can't defend it myself, but I have heard of people using it.
> I think some of the distro's init scripts might set it as well?
> 
> Can anyone defend the practice of setting a nickname for a wireless
> device?

I think that this was added either based on a non-802.11 protocol or
based on a specific hardware/firmware design that had possibility of
configuring a name for the client (to be exchanged with some proprietary
network management protocol as the device name).

After that, this ioctl seems to be just used for binding some arbitrary
data to an interface to help scripts etc. In other words, I don't see
any real use for this from the view point of IEEE 802.11 networks and it
is confusing at best. This may be useful for some setup scripts, but I
would rather hope they would use something else instead.

The only reason for adding nick command would be to maintain backwards
compatibility with some scripts. I do not use any distro configuration
mechanisms for setting up wireless, so I do not know what is currently
being used. I would not add these ioctls into d80211 unless someone can
point out an existing (and widely used) mechanism that depends on these
ioctls being available.

-- 
Jouni Malinen                                            PGP id EFC895FA

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN
  2006-08-29 17:45     ` Jouni Malinen
@ 2006-08-29 22:15       ` Ulrich Kunitz
  2006-08-29 22:26         ` Michael Wu
  2006-08-30 13:36         ` Dan Williams
  0 siblings, 2 replies; 8+ messages in thread
From: Ulrich Kunitz @ 2006-08-29 22:15 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: John W. Linville, Johannes Berg, mabbas, netdev, jbenc

On 06-08-29 10:45 Jouni Malinen wrote:

> The only reason for adding nick command would be to maintain backwards
> compatibility with some scripts. I do not use any distro configuration
> mechanisms for setting up wireless, so I do not know what is currently
> being used. I would not add these ioctls into d80211 unless someone can
> point out an existing (and widely used) mechanism that depends on these
> ioctls being available.

The softmac-broadcom and the zd1211 driver are using it to give some
information about the driver bound to the interface. I found it
quite useful to know which driver is bound to which WLAN
interface. A readonly driver text info field would get my support.

-- 
Uli Kunitz

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN
  2006-08-29 22:15       ` Ulrich Kunitz
@ 2006-08-29 22:26         ` Michael Wu
  2006-08-30 13:36         ` Dan Williams
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Wu @ 2006-08-29 22:26 UTC (permalink / raw)
  To: Ulrich Kunitz
  Cc: Jouni Malinen, John W. Linville, Johannes Berg, mabbas, netdev,
	jbenc

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

On Tuesday 29 August 2006 15:15, Ulrich Kunitz wrote:
> The softmac-broadcom and the zd1211 driver are using it to give some
> information about the driver bound to the interface. I found it
> quite useful to know which driver is bound to which WLAN
> interface. A readonly driver text info field would get my support.
Sounds like a job for sysfs.

-Michael Wu

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN
  2006-08-29 22:15       ` Ulrich Kunitz
  2006-08-29 22:26         ` Michael Wu
@ 2006-08-30 13:36         ` Dan Williams
  1 sibling, 0 replies; 8+ messages in thread
From: Dan Williams @ 2006-08-30 13:36 UTC (permalink / raw)
  To: Ulrich Kunitz
  Cc: Jouni Malinen, John W. Linville, Johannes Berg, mabbas, netdev,
	jbenc

On Wed, 2006-08-30 at 00:15 +0200, Ulrich Kunitz wrote:
> On 06-08-29 10:45 Jouni Malinen wrote:
> 
> > The only reason for adding nick command would be to maintain backwards
> > compatibility with some scripts. I do not use any distro configuration
> > mechanisms for setting up wireless, so I do not know what is currently
> > being used. I would not add these ioctls into d80211 unless someone can
> > point out an existing (and widely used) mechanism that depends on these
> > ioctls being available.
> 
> The softmac-broadcom and the zd1211 driver are using it to give some
> information about the driver bound to the interface. I found it
> quite useful to know which driver is bound to which WLAN
> interface. A readonly driver text info field would get my support.

That's what the 'driver' link is for in sysfs.

[dcbw@localhost devel]$ ls -al /sys/class/net/eth1/device/
lrwxrwxrwx 1 root root    0 Aug 30 09:18 driver -> ../../../../bus/pci/drivers/ipw2200

Dan


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN
  2006-08-28 20:50 [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN mabbas
  2006-08-29  7:49 ` Johannes Berg
@ 2006-09-21 16:52 ` Jiri Benc
  1 sibling, 0 replies; 8+ messages in thread
From: Jiri Benc @ 2006-09-21 16:52 UTC (permalink / raw)
  To: mabbas; +Cc: netdev

On Mon, 28 Aug 2006 13:50:54 -0700, mabbas wrote:
> This patch modify d80211 to add nick wireless command 

The nick command is useless as was pointed by several other developers.
Therefore NAK.

Thanks,

 Jiri

-- 
Jiri Benc
SUSE Labs

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-09-21 16:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-28 20:50 [PATCH 4/7] d80211: add support for SIOCSIWNICKN SIOCGIWNICKN mabbas
2006-08-29  7:49 ` Johannes Berg
2006-08-29 11:49   ` John W. Linville
2006-08-29 17:45     ` Jouni Malinen
2006-08-29 22:15       ` Ulrich Kunitz
2006-08-29 22:26         ` Michael Wu
2006-08-30 13:36         ` Dan Williams
2006-09-21 16:52 ` Jiri Benc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).