diff -uNr gnome-netstatus-2.9.4.orig/configure.in gnome-netstatus-2.9.4/configure.in
--- gnome-netstatus-2.9.4.orig/configure.in	2005-01-10 18:35:28.000000000 +0100
+++ gnome-netstatus-2.9.4/configure.in	2005-02-19 20:13:31.539185654 +0100
@@ -44,6 +44,15 @@
    AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
 fi
 
+dnl ******************************************
+dnl ** wireless check                       **
+dnl ******************************************
+
+HAVE_LIBIW=no
+AC_CHECK_LIB(iw,iw_print_version_info,[HAVE_LIBIW=yes],[HAVE_LIBIW=no])
+AC_SUBST(HAVE_LIBIW)
+AM_CONDITIONAL(HAVE_LIBIW, test "x$HAVE_LIBIW" = "xyes")
+
 PKG_CHECK_MODULES(NETSTATUS, libgnomeui-2.0 >= 2.5.2
 			     libglade-2.0 >= 2.0.0
 			     libpanelapplet-2.0 >= 2.0.0
diff -uNr gnome-netstatus-2.9.4.orig/src/Makefile.am gnome-netstatus-2.9.4/src/Makefile.am
--- gnome-netstatus-2.9.4.orig/src/Makefile.am	2004-11-10 12:32:00.000000000 +0100
+++ gnome-netstatus-2.9.4/src/Makefile.am	2005-02-19 20:13:31.539185654 +0100
@@ -1,6 +1,16 @@
+if HAVE_LIBIW
+IWLIB = -liw
+IWDIR =
+IWINC = -DHAVE_LIBIW
+else
+IWLIB =
+IWDIR =
+IWINC =
+endif
 
 INCLUDES = \
 	-I$(top_builddir)/src \
+        $(IWINC) \
 	-DPREFIX=\""$(prefix)\"" \
 	-DSYSCONFDIR=\""$(sysconfdir)\"" \
 	-DDATADIR=\""$(datadir)\"" \
@@ -14,7 +24,7 @@
 
 libexec_PROGRAMS = gnome-netstatus-applet
 
-gnome_netstatus_applet_LDADD = $(NETSTATUS_LIBS)
+gnome_netstatus_applet_LDADD = $(NETSTATUS_LIBS) $(IWLIB)
 
 gnome_netstatus_applet_SOURCES = \
 	netstatus-applet.c \
diff -uNr gnome-netstatus-2.9.4.orig/src/netstatus-iface.c gnome-netstatus-2.9.4/src/netstatus-iface.c
--- gnome-netstatus-2.9.4.orig/src/netstatus-iface.c	2004-07-30 09:39:00.000000000 +0200
+++ gnome-netstatus-2.9.4/src/netstatus-iface.c	2005-02-19 21:04:20.749673801 +0100
@@ -70,6 +70,10 @@
 
   NetstatusState  state;
   NetstatusStats  stats;
+#ifdef HAVE_LIBIW
+  int             signal_avg_qual;
+  int             signal_max_qual;
+#endif
   int             signal_strength;
   GError         *error;
 
@@ -557,6 +561,10 @@
   gboolean  is_wireless;
 
   error_message = netstatus_sysdeps_read_iface_wireless_details (iface->priv->name,
+#ifdef HAVE_LIBIW
+                                                                 iface->priv->signal_avg_qual,
+                                                                 iface->priv->signal_max_qual,
+#endif
 								 &is_wireless,
 								 signal_strength);
 
@@ -625,7 +633,14 @@
       g_object_notify (G_OBJECT (iface), "state");
     }
 
-  is_wireless = netstatus_iface_poll_wireless_details (iface, &signal_strength);
+  is_wireless = netstatus_iface_poll_wireless_details (iface,
+                                                       &signal_strength);
+#ifdef HAVE_LIBIW
+  if (iface->priv->is_wireless == FALSE && is_wireless)
+    netstatus_sysdeps_read_iface_wireless_range (iface->priv->name,
+                                                 &iface->priv->signal_avg_qual,
+                                                 &iface->priv->signal_max_qual);
+#endif
   if (iface->priv->is_wireless != is_wireless)
     {
       iface->priv->is_wireless = is_wireless;
@@ -650,6 +665,10 @@
   iface->priv->stats.out_packets = 0;
   iface->priv->stats.in_bytes    = 0;
   iface->priv->stats.out_bytes   = 0;
+#ifdef HAVE_LIBIW
+  iface->priv->signal_avg_qual   = 0;
+  iface->priv->signal_max_qual   = 0;
+#endif
   iface->priv->signal_strength   = 0;
   iface->priv->is_wireless       = FALSE;
 
Binary files gnome-netstatus-2.9.4.orig/src/.netstatus-iface.c.swp and gnome-netstatus-2.9.4/src/.netstatus-iface.c.swp differ
diff -uNr gnome-netstatus-2.9.4.orig/src/netstatus-sysdeps.c gnome-netstatus-2.9.4/src/netstatus-sysdeps.c
--- gnome-netstatus-2.9.4.orig/src/netstatus-sysdeps.c	2004-07-30 10:21:30.000000000 +0200
+++ gnome-netstatus-2.9.4/src/netstatus-sysdeps.c	2005-02-19 20:13:31.541185206 +0100
@@ -33,6 +33,9 @@
 #include <unistd.h>
 #include <errno.h>
 #include <glib.h>
+#ifdef HAVE_LIBIW
+#include <iwlib.h>
+#endif
 #include <libgnome/gnome-i18n.h>
 
 static inline gboolean
@@ -275,6 +278,10 @@
 
 char *
 netstatus_sysdeps_read_iface_wireless_details (const char *iface,
+#ifdef HAVE_LIBIW
+                                               int        signal_avg_qual,
+                                               int        signal_max_qual,
+#endif
 					       gboolean   *is_wireless,
 					       int        *signal_strength)
 {
@@ -282,6 +289,10 @@
   char  buf [512];
   int   link_idx;
   char *error_message = NULL;
+#ifdef HAVE_LIBIW
+  int   avg_qual;
+  int   max_qual;
+#endif
 
   g_return_val_if_fail (iface != NULL, NULL);
   g_return_val_if_fail (is_wireless != NULL, NULL);
@@ -333,8 +344,22 @@
 	  continue;
 	}
 
+#ifdef HAVE_LIBIW
+      /* sanity check */
+      if (signal_max_qual == signal_avg_qual || signal_avg_qual == 0)
+        {
+          signal_avg_qual = 46;
+          signal_max_qual = 92;
+        }
+      if (link > signal_avg_qual )
+        *signal_strength = 50 + (float)(link - signal_avg_qual)
+                                /(signal_max_qual - signal_avg_qual) * 50.0;
+      else
+        *signal_strength = (float)link/signal_avg_qual * 50.0;
+#else
       /* Stolen from the wireless applet */
       *signal_strength = (int) rint ((log (link) / log (92)) * 100.0);
+#endif
       *signal_strength = CLAMP (*signal_strength, 0, 100);
       *is_wireless = TRUE;
 
@@ -347,6 +372,32 @@
   return error_message;
 }
 
+#ifdef HAVE_LIBIW
+void
+netstatus_sysdeps_read_iface_wireless_range (const char *iface,
+					     int *signal_avg_qual,
+					     int *signal_max_qual)
+{
+  struct iw_range range;
+  int skfd;
+
+  g_return_val_if_fail (iface != NULL, NULL);
+  g_return_val_if_fail (signal_avg_qual != NULL, NULL);
+  g_return_val_if_fail (signal_max_qual != NULL, NULL);
+
+  if (signal_avg_qual)
+    *signal_avg_qual = 0;
+  if (signal_max_qual)
+    *signal_max_qual = 0;
+
+  skfd = iw_sockets_open();
+  g_return_val_if_fail (skfd >= 0, NULL);
+  iw_get_range_info (skfd, iface, &range);
+  *signal_avg_qual = range.avg_qual.qual;
+  *signal_max_qual = range.max_qual.qual;
+  close (skfd);
+}
+#endif
 #else /* defined(__FreeBSD__) */
 
 static inline void
@@ -489,12 +540,16 @@
 
 char *
 netstatus_sysdeps_read_iface_wireless_details (const char *iface,
+#ifdef HAVE_LIBIW
+                                               int        signal_avg_qual,
+                                               int        signal_max_qual,
+#endif
 					       gboolean   *is_wireless,
 					       int        *signal_strength)
 {
   g_return_val_if_fail (iface != NULL, NULL);
   g_return_val_if_fail (is_wireless != NULL, NULL);
-  g_return_val_if_fail (signal_strength_wireless != NULL, NULL);
+  g_return_val_if_fail (signal_strength != NULL, NULL);
 
   if (is_wireless)
     *is_wireless = FALSE;
@@ -504,4 +559,20 @@
   return NULL;
 }
 
+#ifdef HAVE_LIBIW
+void
+netstatus_sysdeps_read_iface_wireless_range (const char *iface,
+					     int *signal_avg_qual,
+					     int *signal_max_qual)
+{
+  g_return_val_if_fail (iface != NULL, NULL);
+  g_return_val_if_fail (signal_avg_qual != NULL, NULL);
+  g_return_val_if_fail (signal_max_qual != NULL, NULL);
+
+  if (signal_avg_qual)
+    *signal_avg_qual = 46;
+  if (signal_max_qual)
+    *signal_max_qual = 92;
+}
+#endif
 #endif /* !defined(__FreeBSD__) */
Binary files gnome-netstatus-2.9.4.orig/src/.netstatus-sysdeps.c.swp and gnome-netstatus-2.9.4/src/.netstatus-sysdeps.c.swp differ
diff -uNr gnome-netstatus-2.9.4.orig/src/netstatus-sysdeps.h gnome-netstatus-2.9.4/src/netstatus-sysdeps.h
--- gnome-netstatus-2.9.4.orig/src/netstatus-sysdeps.h	2004-07-30 09:39:00.000000000 +0200
+++ gnome-netstatus-2.9.4/src/netstatus-sysdeps.h	2005-02-19 20:13:31.541185206 +0100
@@ -36,9 +36,18 @@
 						     gulong     *in_bytes,
 						     gulong     *out_bytes);
 char *netstatus_sysdeps_read_iface_wireless_details (const char *iface,
+#ifdef HAVE_LIBIW
+                                                     int        signal_avg_qual,
+                                                     int        signal_max_qual,
+#endif
 						     gboolean   *is_wireless,
 						     int        *signal_strength);
 
+#ifdef HAVE_LIBIW
+void netstatus_sysdeps_read_iface_wireless_range (const char *iface,
+                                                  int *signal_avg_qual,
+                                                  int *signal_max_qual);
+#endif
 G_END_DECLS
 
 #endif /* __NETSTATUS_SYSDEPS_H__ */
