author | mickeyl <mickeyl> | 2004-02-23 19:04:50 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-23 19:04:50 (UTC) |
commit | 7206bf5ae8a9940a9c30a9dc3dd3cb663e64874b (patch) (unidiff) | |
tree | f48e9183a4ffcb9d9bc4c448f79c6f424ac4a387 /libopie2/opienet | |
parent | 4f8be1658bc82040bac404aa98fe70c24239f10c (diff) | |
download | opie-7206bf5ae8a9940a9c30a9dc3dd3cb663e64874b.zip opie-7206bf5ae8a9940a9c30a9dc3dd3cb663e64874b.tar.gz opie-7206bf5ae8a9940a9c30a9dc3dd3cb663e64874b.tar.bz2 |
The Orinoco (and Symbol/Spectrum) driver recently got the monitor mode
patch applied. It uses the WE15 IW_MODE_MONITOR.
Fix OOrinocoMonitoringInterface to work with recent Orinoco drivers
-rw-r--r-- | libopie2/opienet/onetwork.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp index 36f409b..915814d 100644 --- a/libopie2/opienet/onetwork.cpp +++ b/libopie2/opienet/onetwork.cpp | |||
@@ -1197,17 +1197,20 @@ OOrinocoMonitoringInterface::~OOrinocoMonitoringInterface() | |||
1197 | 1197 | ||
1198 | void OOrinocoMonitoringInterface::setChannel( int c ) | 1198 | void OOrinocoMonitoringInterface::setChannel( int c ) |
1199 | { | 1199 | { |
1200 | if ( !_if->hasPrivate( "monitor" ) ) | ||
1201 | { | ||
1202 | this->OMonitoringInterface::setChannel( c ); | ||
1203 | } | ||
1204 | else | ||
1205 | { | ||
1200 | int monitorCode = _prismHeader ? 1 : 2; | 1206 | int monitorCode = _prismHeader ? 1 : 2; |
1201 | _if->setPrivate( "monitor", 2, monitorCode, c ); | 1207 | _if->setPrivate( "monitor", 2, monitorCode, c ); |
1202 | } | 1208 | } |
1209 | } | ||
1203 | 1210 | ||
1204 | 1211 | ||
1205 | void OOrinocoMonitoringInterface::setEnabled( bool b ) | 1212 | void OOrinocoMonitoringInterface::setEnabled( bool b ) |
1206 | { | 1213 | { |
1207 | // IW_MODE_MONITOR was introduced in Wireless Extensions Version 15 | ||
1208 | // Wireless Extensions < Version 15 need iwpriv commandos for monitoring | ||
1209 | // However, as of recent orinoco drivers, IW_MODE_MONITOR is still not supported | ||
1210 | |||
1211 | if ( b ) | 1214 | if ( b ) |
1212 | { | 1215 | { |
1213 | setChannel( 1 ); | 1216 | setChannel( 1 ); |