diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-02-23 13:16:09 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-02-23 13:16:09 +0000 |
commit | bfef9dc359ac8667eed503e92057c679a1448914 (patch) | |
tree | 2208fc689a08735c90768187d87c8ac18e3d2473 /package/iwinfo/src/iwinfo_wl.c | |
parent | 250113e1c6c0ad9498f03b4e58d2aaaf7588fffd (diff) |
[package] iwinfo: replace internal constant mode strings with enums
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30692 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/iwinfo/src/iwinfo_wl.c')
-rw-r--r-- | package/iwinfo/src/iwinfo_wl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/package/iwinfo/src/iwinfo_wl.c b/package/iwinfo/src/iwinfo_wl.c index 038361f3e8..b7e5d19786 100644 --- a/package/iwinfo/src/iwinfo_wl.c +++ b/package/iwinfo/src/iwinfo_wl.c @@ -82,7 +82,7 @@ void wl_close(void) /* Nop */ } -int wl_get_mode(const char *ifname, char *buf) +int wl_get_mode(const char *ifname, int *buf) { int ret = -1; int ap, infra, passive; @@ -97,13 +97,13 @@ int wl_get_mode(const char *ifname, char *buf) return ret; if (passive) - sprintf(buf, "Monitor"); + *buf = IWINFO_OPMODE_MONITOR; else if (!infra) - sprintf(buf, "Ad-Hoc"); + *buf = IWINFO_OPMODE_ADHOC; else if (ap) - sprintf(buf, "Master"); + *buf = IWINFO_OPMODE_MASTER; else - sprintf(buf, "Client"); + *buf = IWINFO_OPMODE_CLIENT; return 0; } |