aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_common.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-09-10 17:34:56 (GMT)
committerJouni Malinen <j@w1.fi>2014-09-13 14:21:54 (GMT)
commit7a4a93b9593575ffd64ba72739429d98e4b90858 (patch)
tree04c80b6f58059e7fd47ecce6d0898c5c3270a5ec /src/drivers/driver_common.c
parenta6ab82d7b409cd95c4e64452c2a672d4ce4c3c99 (diff)
downloadhostap-7a4a93b9593575ffd64ba72739429d98e4b90858.zip
hostap-7a4a93b9593575ffd64ba72739429d98e4b90858.tar.gz
hostap-7a4a93b9593575ffd64ba72739429d98e4b90858.tar.bz2
dbus: Add SignalPoll() method to report current signal properties
Analogous to the control interface's SIGNAL_POLL request. Signed-hostap: Dan Williams <dcbw@redhat.com>
Diffstat (limited to 'src/drivers/driver_common.c')
-rw-r--r--src/drivers/driver_common.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/drivers/driver_common.c b/src/drivers/driver_common.c
index 3058cd5..77e6905 100644
--- a/src/drivers/driver_common.c
+++ b/src/drivers/driver_common.c
@@ -84,3 +84,24 @@ const char * event_to_string(enum wpa_event_type event)
return "UNKNOWN";
#undef E2S
}
+
+
+const char * channel_width_to_string(enum chan_width width)
+{
+ switch (width) {
+ case CHAN_WIDTH_20_NOHT:
+ return "20 MHz (no HT)";
+ case CHAN_WIDTH_20:
+ return "20 MHz";
+ case CHAN_WIDTH_40:
+ return "40 MHz";
+ case CHAN_WIDTH_80:
+ return "80 MHz";
+ case CHAN_WIDTH_80P80:
+ return "80+80 MHz";
+ case CHAN_WIDTH_160:
+ return "160 MHz";
+ default:
+ return "unknown";
+ }
+}