}
DIAG_ON_CLANG(shorten-64-to-32)
-int ws80211_set_freq(const char *name, int freq, int chan_type, int _U_ center_freq, int _U_ center_freq2)
+int ws80211_set_freq(const char *name, guint32 freq, int chan_type, guint32 _U_ center_freq, guint32 _U_ center_freq2)
{
int devidx, err;
struct nl_msg *msg;
return 0;
}
-int ws80211_set_freq(const char *name, int freq, int chan_type, int _U_ center_freq, int _U_ center_freq2)
+int ws80211_set_freq(const char *name, guint32 freq, int chan_type, guint32 _U_ center_freq, guint32 _U_ center_freq2)
{
GList *airpcap_if_list;
int err;
* @param center_freq2 The 2nd center frequency in MHz (if 80+80MHz).
* @return Zero on success, nonzero on failure.
*/
-int ws80211_set_freq(const char *name, int freq, int chan_type, int _U_ center_freq, int _U_ center_freq2);
+int ws80211_set_freq(const char *name, guint32 freq, int chan_type, guint32 _U_ center_freq, guint32 _U_ center_freq2);
int ws80211_str_to_chan_type(const gchar *s); /* GTK+ only? */
const gchar *ws80211_chan_type_to_str(int type); /* GTK+ only? */
#include <wsutil/cmdarg_err.h>
#include <wsutil/crash_info.h>
+#include <wsutil/strtoi.h>
#include <ws_version_info.h>
#ifndef HAVE_GETOPT_LONG
static int
set_80211_channel(const char *iface, const char *opt)
{
- int freq = 0;
+ guint32 freq = 0;
int type = -1;
- int center_freq1 = -1;
- int center_freq2 = -1;
+ guint32 center_freq1 = 0;
+ guint32 center_freq2 = 0;
int args;
- int ret;
+ int ret = 0;
gchar **options = NULL;
options = g_strsplit_set(opt, ",", 4);
if (capture_child)
pipe_write_block(2, SP_SUCCESS, NULL);
- ret = 0;
out:
g_strfreev(options);