summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc7
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh1
2 files changed, 8 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc
index 7362f14..d462488 100644
--- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc
+++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc
@@ -58,2 +58,9 @@ int card_into_monitormode (pcap_t **orighandle, char *device, int cardtype)
wl_logerr("Got a host-ap card, nothing is implemented now");
+ char hostapcmd[250];
+ snprintf(hostapcmd, sizeof(hostapcmd) -1, "%s %s monitor 2", IWPRIV_PATH, device);
+ if (system(hostapcmd) !=0)
+ {
+ wl_logerr("Could not set %s in raw mode, check cardtype", device);
+ return 0;
+ }
}
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh
index b85b7b7..9721b39 100644
--- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh
+++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh
@@ -30,2 +30,3 @@ extern "C"
#define WLANCTL_PATH "/sbin/wlanctl-ng"
+#define IWPRIV_PATH "/sbin/iwpriv"