netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/7] d80211: indicate if unassociate/radio off status
@ 2006-08-28 20:49 mabbas
  2006-08-28 21:17 ` Michael Wu
  2006-09-21 17:01 ` Jiri Benc
  0 siblings, 2 replies; 23+ messages in thread
From: mabbas @ 2006-08-28 20:49 UTC (permalink / raw)
  To: netdev; +Cc: jbenc

[-- 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:

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

end of thread, other threads:[~2006-09-27 15:34 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-28 20:49 [PATCH 5/7] d80211: indicate if unassociate/radio off status mabbas
2006-08-28 21:17 ` 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

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).