author | mickeyl <mickeyl> | 2003-10-09 16:01:08 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-09 16:01:08 (UTC) |
commit | 802c9ab6b89fd10f709aa012e8ff075e9b4a5d7f (patch) (unidiff) | |
tree | c6a33ab027752ca04d0d98a2e71a238aa954978d | |
parent | c5c5c9f9fc6cab574f35f8be21076ac81f8c0369 (diff) | |
download | opie-802c9ab6b89fd10f709aa012e8ff075e9b4a5d7f.zip opie-802c9ab6b89fd10f709aa012e8ff075e9b4a5d7f.tar.gz opie-802c9ab6b89fd10f709aa012e8ff075e9b4a5d7f.tar.bz2 |
- fix monitor mode on orinoco. Although WE > 14 define the standard mode
"MONITOR", the orinoco monitor patch for 0.13e still does not use that...
- add documentation, a warning, and a runtime check for setChannel(0)
-rw-r--r-- | libopie2/opienet/onetwork.cpp | 12 | ||||
-rw-r--r-- | libopie2/opienet/onetwork.h | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp index 45ee4c0..767651e 100644 --- a/libopie2/opienet/onetwork.cpp +++ b/libopie2/opienet/onetwork.cpp | |||
@@ -595,2 +595,8 @@ void OWirelessNetworkInterface::setChannel( int c ) const | |||
595 | { | 595 | { |
596 | if ( c ) | ||
597 | { | ||
598 | qWarning( "OWirelessNetworkInterface::setChannel( 0 ) called - fix your application!" ); | ||
599 | return; | ||
600 | } | ||
601 | |||
596 | if ( !_mon ) | 602 | if ( !_mon ) |
@@ -941,3 +947,3 @@ void OWlanNGMonitoringInterface::setChannel( int c ) | |||
941 | cmd.sprintf( "$(which wlanctl-ng) %s lnxreq_wlansniff channel=%d enable=%s prismheader=%s", | 947 | 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 ); | 948 | (const char*) _if->name(), c, (const char*) enable, (const char*) prism ); |
943 | system( cmd ); | 949 | system( cmd ); |
@@ -1017,4 +1023,6 @@ void OOrinocoMonitoringInterface::setEnabled( bool b ) | |||
1017 | // Wireless Extensions < Version 15 need iwpriv commandos for monitoring | 1023 | // Wireless Extensions < Version 15 need iwpriv commandos for monitoring |
1024 | // However, as of recent orinoco drivers, IW_MODE_MONITOR is still not supported | ||
1018 | 1025 | ||
1019 | #if WIRELESS_EXT > 14 | 1026 | #if 0 |
1027 | //#if WIRELESS_EXT > 14 | ||
1020 | if ( b ) | 1028 | if ( b ) |
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h index 2553a61..00d1ebb 100644 --- a/libopie2/opienet/onetwork.h +++ b/libopie2/opienet/onetwork.h | |||
@@ -338,2 +338,4 @@ class OWirelessNetworkInterface : public ONetworkInterface | |||
338 | * of the corresponding wireless network device. | 338 | * of the corresponding wireless network device. |
339 | * @note Common channel range is within [1-14]. A value of 0 is not allowed. | ||
340 | * @see channels() | ||
339 | */ | 341 | */ |