From 7206bf5ae8a9940a9c30a9dc3dd3cb663e64874b Mon Sep 17 00:00:00 2001 From: mickeyl Date: Mon, 23 Feb 2004 19:04:50 +0000 Subject: 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 --- (limited to 'libopie2/opienet') 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() void OOrinocoMonitoringInterface::setChannel( int c ) { - int monitorCode = _prismHeader ? 1 : 2; - _if->setPrivate( "monitor", 2, monitorCode, c ); + if ( !_if->hasPrivate( "monitor" ) ) + { + this->OMonitoringInterface::setChannel( c ); + } + else + { + int monitorCode = _prismHeader ? 1 : 2; + _if->setPrivate( "monitor", 2, monitorCode, c ); + } } void OOrinocoMonitoringInterface::setEnabled( bool b ) { - // IW_MODE_MONITOR was introduced in Wireless Extensions Version 15 - // Wireless Extensions < Version 15 need iwpriv commandos for monitoring - // However, as of recent orinoco drivers, IW_MODE_MONITOR is still not supported - if ( b ) { setChannel( 1 ); -- cgit v0.9.0.2