summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mac80211.c18
-rw-r--r--mac80211.h2
-rw-r--r--netsniff-ng.c4
-rw-r--r--trafgen.c2
4 files changed, 13 insertions, 13 deletions
diff --git a/mac80211.c b/mac80211.c
index efb4af8..326cf65 100644
--- a/mac80211.c
+++ b/mac80211.c
@@ -75,7 +75,7 @@ static inline struct nl_sock *nl80211_nl_socket_xalloc(void)
return ret;
}
-static void nl80211_init(struct nl80211_state *state, const char *device)
+static void nl80211_init(struct nl80211_state *state)
{
int ret;
@@ -103,7 +103,7 @@ static void nl80211_cleanup(struct nl80211_state *state)
nl_socket_free(state->nl_sock);
}
-static int nl80211_wait_handler(struct nl_msg *msg, void *arg)
+static int nl80211_wait_handler(struct nl_msg *msg __maybe_unused, void *arg)
{
int *finished = arg;
@@ -112,9 +112,9 @@ static int nl80211_wait_handler(struct nl_msg *msg, void *arg)
return NL_STOP;
}
-static int nl80211_error_handler(struct sockaddr_nl *nla,
+static int nl80211_error_handler(struct sockaddr_nl *nla __maybe_unused,
struct nlmsgerr *err,
- void *arg)
+ void *arg __maybe_unused)
{
panic("nl80211 returned with error %d\n", err->error);
}
@@ -178,7 +178,7 @@ nla_put_failure:
return -EIO; /* dummy */
}
-static int nl80211_del_mon_if(struct nl80211_state *state, const char *device,
+static int nl80211_del_mon_if(struct nl80211_state *state,
const char *mondevice)
{
int ifindex, ret;
@@ -219,7 +219,7 @@ void enter_rfmon_mac80211(const char *device, char **mondev)
/* XXX: is this already a monN device? */
get_mac80211_phydev(device, phydev_path, sizeof(phydev_path));
- nl80211_init(&nlstate, device);
+ nl80211_init(&nlstate);
for (n = 0; n < UINT_MAX; n++) {
char mondevice[32];
@@ -241,7 +241,7 @@ void enter_rfmon_mac80211(const char *device, char **mondev)
panic("No free monN interfaces!\n");
}
-void leave_rfmon_mac80211(const char *device, const char *mondev)
+void leave_rfmon_mac80211(const char *mondev)
{
short flags;
struct nl80211_state nlstate;
@@ -250,7 +250,7 @@ void leave_rfmon_mac80211(const char *device, const char *mondev)
flags &= ~(IFF_UP | IFF_RUNNING);
device_set_flags(mondev, flags);
- nl80211_init(&nlstate, device);
- nl80211_del_mon_if(&nlstate, device, mondev);
+ nl80211_init(&nlstate);
+ nl80211_del_mon_if(&nlstate, mondev);
nl80211_cleanup(&nlstate);
}
diff --git a/mac80211.h b/mac80211.h
index 7803625..dea4ae0 100644
--- a/mac80211.h
+++ b/mac80211.h
@@ -2,6 +2,6 @@
#define MAC80211_H
extern void enter_rfmon_mac80211(const char *device, char **mondev);
-extern void leave_rfmon_mac80211(const char *device, const char *mondev);
+extern void leave_rfmon_mac80211(const char *mondev);
#endif /* MAC80211_H */
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 0d9046c..1c0b1eb 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -320,7 +320,7 @@ static void pcap_to_xmit(struct ctx *ctx)
destroy_tx_ring(tx_sock, &tx_ring);
if (ctx->rfraw)
- leave_rfmon_mac80211(ctx->device_trans, ctx->device_out);
+ leave_rfmon_mac80211(ctx->device_out);
if (__pcap_io->prepare_close_pcap)
__pcap_io->prepare_close_pcap(fd, PCAP_MODE_RD);
@@ -1006,7 +1006,7 @@ static void recv_only_or_dump(struct ctx *ctx)
leave_promiscuous_mode(ctx->device_in, ifflags);
if (ctx->rfraw)
- leave_rfmon_mac80211(ctx->device_trans, ctx->device_in);
+ leave_rfmon_mac80211(ctx->device_in);
if (dump_to_pcap(ctx)) {
if (ctx->dump_dir)
diff --git a/trafgen.c b/trafgen.c
index 5beaaf3..7d51746 100644
--- a/trafgen.c
+++ b/trafgen.c
@@ -1071,7 +1071,7 @@ int main(int argc, char **argv)
}
if (ctx.rfraw)
- leave_rfmon_mac80211(ctx.device_trans, ctx.device);
+ leave_rfmon_mac80211(ctx.device);
reset_system_socket_memory(vals, array_size(vals));