summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.cpp
Unidiff
Diffstat (limited to 'libopie2/opienet/onetwork.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index 1f529d2..45ee4c0 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -922,28 +922,34 @@ void OWlanNGMonitoringInterface::setEnabled( bool b )
922 cmd.sprintf( "$(which wlanctl-ng) %s lnxreq_wlansniff channel=%d enable=%s prismheader=%s", 922 cmd.sprintf( "$(which wlanctl-ng) %s lnxreq_wlansniff channel=%d enable=%s prismheader=%s",
923 (const char*) _if->name(), 1, (const char*) enable, (const char*) prism ); 923 (const char*) _if->name(), 1, (const char*) enable, (const char*) prism );
924 system( cmd ); 924 system( cmd );
925} 925}
926 926
927 927
928QString OWlanNGMonitoringInterface::name() const 928QString OWlanNGMonitoringInterface::name() const
929{ 929{
930 return "wlan-ng"; 930 return "wlan-ng";
931} 931}
932 932
933 933
934void OWlanNGMonitoringInterface::setChannel( int ) 934void OWlanNGMonitoringInterface::setChannel( int c )
935{ 935{
936 // wlan-ng devices automatically switch channels when in monitor mode 936 //NOTE: Older wlan-ng drivers automatically hopped channels while lnxreq_wlansniff=true. Newer ones don't.
937 // NOTE: The above note no longer seems to be true for recent driver versions! 937
938 QString enable = "true"; //_if->monitorMode() ? "true" : "false";
939 QString prism = _prismHeader ? "true" : "false";
940 QString cmd;
941 cmd.sprintf( "$(which wlanctl-ng) %s lnxreq_wlansniff channel=%d enable=%s prismheader=%s",
942 (const char*) _if->name(), c+1, (const char*) enable, (const char*) prism );
943 system( cmd );
938} 944}
939 945
940 946
941/*====================================================================================== 947/*======================================================================================
942 * OHostAPMonitoringInterface 948 * OHostAPMonitoringInterface
943 *======================================================================================*/ 949 *======================================================================================*/
944 950
945OHostAPMonitoringInterface::OHostAPMonitoringInterface( ONetworkInterface* iface, bool prismHeader ) 951OHostAPMonitoringInterface::OHostAPMonitoringInterface( ONetworkInterface* iface, bool prismHeader )
946 :OMonitoringInterface( iface, prismHeader ) 952 :OMonitoringInterface( iface, prismHeader )
947{ 953{
948 iface->setMonitoring( this ); 954 iface->setMonitoring( this );
949} 955}