netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: mabbas <mabbas@linux.intel.com>
To: netdev@vger.kernel.org
Cc: jbenc@suse.cz
Subject: [PATCH 5/7] d80211: indicate if unassociate/radio off status
Date: Mon, 28 Aug 2006 13:49:35 -0700	[thread overview]
Message-ID: <44F356DF.9000000@linux.intel.com> (raw)

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



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


This patch indicate unassociated and radio off status
in name field

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

diff --git a/net/d80211/ieee80211_ioctl.c b/net/d80211/ieee80211_ioctl.c
index 89a58e3..44b2698 100644
--- a/net/d80211/ieee80211_ioctl.c
+++ b/net/d80211/ieee80211_ioctl.c
@@ -1538,6 +1538,19 @@ static int ieee80211_ioctl_giwname(struc
 				   char *name, char *extra)
 {
 	struct ieee80211_local *local = dev->ieee80211_ptr;
+	struct ieee80211_sub_if_data *sdata;
+
+	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+	if (!local->conf.radio_enabled) {
+        	strcpy(name, "radio off");
+                return 0;
+	} else if (sdata->type == IEEE80211_IF_TYPE_STA) {
+		if ((sdata->u.sta.state != IEEE80211_ASSOCIATED) ||
+		    (sdata->u.sta.probereq_poll)) {
+			strcpy(name, "unassociated");
+			return 0;
+		}
+	}
 
 	switch (local->conf.phymode) {
 	case MODE_IEEE80211A:

             reply	other threads:[~2006-08-28 20:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-28 20:49 mabbas [this message]
2006-08-28 21:17 ` [PATCH 5/7] d80211: indicate if unassociate/radio off status Michael Wu
2006-08-29 17:55   ` Jouni Malinen
2006-08-29 22:28     ` Mohamed Abbas
2006-08-29 22:50       ` Michael Wu
2006-08-29 23:01         ` Michael Wu
2006-08-30 13:41           ` Dan Williams
2006-08-30 17:22             ` Michael Wu
2006-09-21 17:01 ` Jiri Benc
2006-09-21 19:03   ` Dan Williams
2006-09-21 19:47     ` mabbas
2006-09-21 20:30       ` Dan Williams
2006-09-21 20:39         ` mabbas
2006-09-21 22:38           ` Jiri Benc
2006-09-21 22:55             ` Jean Tourrilhes
2006-09-22  0:42               ` Jouni Malinen
2006-09-22  0:57                 ` Jean Tourrilhes
2006-09-22 22:29                   ` [d80211 patch 1/1] setting bss freq and phymode using rx_status mabbas
2006-09-25 16:16                     ` Jiri Benc
2006-09-25 17:15                       ` mabbas
2006-09-27 15:34                         ` Jiri Benc
2006-09-22  8:32         ` [PATCH 5/7] d80211: indicate if unassociate/radio off status Johannes Berg
2006-09-22 14:05           ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44F356DF.9000000@linux.intel.com \
    --to=mabbas@linux.intel.com \
    --cc=jbenc@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).