X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/c02a9bd7aaf1e6fbfa829ec2e1b66cefce3268c5..57b73bf423b68390a7ca428306ec0e30348e3401:/package/iwinfo/src/iwinfo_wext.c?ds=inline diff --git a/package/iwinfo/src/iwinfo_wext.c b/package/iwinfo/src/iwinfo_wext.c index 3923c9e76..cf3dccc18 100644 --- a/package/iwinfo/src/iwinfo_wext.c +++ b/package/iwinfo/src/iwinfo_wext.c @@ -70,7 +70,7 @@ void wext_close(void) /* Nop */ } -int wext_get_mode(const char *ifname, char *buf) +int wext_get_mode(const char *ifname, int *buf) { struct iwreq wrq; @@ -78,36 +78,25 @@ int wext_get_mode(const char *ifname, char *buf) { switch(wrq.u.mode) { - case 0: - sprintf(buf, "Auto"); - break; - case 1: - sprintf(buf, "Ad-Hoc"); + *buf = IWINFO_OPMODE_ADHOC; break; case 2: - sprintf(buf, "Client"); + *buf = IWINFO_OPMODE_CLIENT; 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: - sprintf(buf, "Monitor"); + *buf = IWINFO_OPMODE_MONITOR; break; default: - sprintf(buf, "Unknown"); + *buf = IWINFO_OPMODE_UNKNOWN; + break; } return 0; @@ -515,3 +504,17 @@ int wext_get_hardware_name(const char *ifname, char *buf) sprintf(buf, "Generic WEXT"); return 0; } + +int wext_get_txpower_offset(const char *ifname, int *buf) +{ + /* Stub */ + *buf = 0; + return -1; +} + +int wext_get_frequency_offset(const char *ifname, int *buf) +{ + /* Stub */ + *buf = 0; + return -1; +}