projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[package] iwinfo: properly cast nl80211 mBm signal levels to reported dBm values...
[openwrt.git]
/
package
/
iwinfo
/
src
/
iwinfo_wext.c
diff --git
a/package/iwinfo/src/iwinfo_wext.c
b/package/iwinfo/src/iwinfo_wext.c
index
c74785f
..
cf3dccc
100644
(file)
--- a/
package/iwinfo/src/iwinfo_wext.c
+++ b/
package/iwinfo/src/iwinfo_wext.c
@@
-70,7
+70,7
@@
void wext_close(void)
/* Nop */
}
/* Nop */
}
-int wext_get_mode(const char *ifname,
char
*buf)
+int wext_get_mode(const char *ifname,
int
*buf)
{
struct iwreq wrq;
{
struct iwreq wrq;
@@
-78,36
+78,25
@@
int wext_get_mode(const char *ifname, char *buf)
{
switch(wrq.u.mode)
{
{
switch(wrq.u.mode)
{
- case 0:
- sprintf(buf, "Auto");
- break;
-
case 1:
case 1:
-
sprintf(buf, "Ad-Hoc")
;
+
*buf = IWINFO_OPMODE_ADHOC
;
break;
case 2:
break;
case 2:
-
sprintf(buf, "Client")
;
+
*buf = IWINFO_OPMODE_CLIENT
;
break;
case 3:
break;
case 3:
- sprintf(buf, "Master");
- break;
-
- case 4:
- sprintf(buf, "Repeater");
- break;
-
- case 5:
- sprintf(buf, "Secondary");
+ *buf = IWINFO_OPMODE_MASTER;
break;
case 6:
break;
case 6:
-
sprintf(buf, "Monitor")
;
+
*buf = IWINFO_OPMODE_MONITOR
;
break;
default:
break;
default:
- sprintf(buf, "Unknown");
+ *buf = IWINFO_OPMODE_UNKNOWN;
+ break;
}
return 0;
}
return 0;
This page took
0.022207 seconds
and
4
git commands to generate.