[kismac] [binaervarianz] r201 - in branches/usb-drivers/Sources: Core Driver/USBJack WaveDrivers
- From: svn@xxxxxxxxxxxxxxxx
- To: kismac@xxxxxxxxxxxxx
- Date: Fri, 06 Oct 2006 14:50:17 +0200
Author: gkruse
Date: 2006-10-06 14:50:10 +0200 (Fri, 06 Oct 2006)
New Revision: 201
Modified:
branches/usb-drivers/Sources/Core/WaveHelper.m
branches/usb-drivers/Sources/Driver/USBJack/IntersilJack.mm
branches/usb-drivers/Sources/Driver/USBJack/RalinkJack.mm
branches/usb-drivers/Sources/Driver/USBJack/USBJack.h
branches/usb-drivers/Sources/Driver/USBJack/USBJack.mm
branches/usb-drivers/Sources/WaveDrivers/WaveDriverUSBIntersil.mm
Log:
Added WUSB54GC as Raalink device other misc cleanups
Modified: branches/usb-drivers/Sources/Core/WaveHelper.m
===================================================================
--- branches/usb-drivers/Sources/Core/WaveHelper.m 2006-10-05 05:56:27 UTC
(rev 200)
+++ branches/usb-drivers/Sources/Core/WaveHelper.m 2006-10-06 12:50:10 UTC
(rev 201)
@@ -280,7 +280,7 @@
name = [driverProps objectForKey:@"deviceName"];
//the driver does not exist. go for it
- // if (![_waveDrivers objectForKey:name]) {
+ if (![_waveDrivers objectForKey:name]) {
//ugly hack but it works, this makes sure that the airport card is
used only once
//prefers the viha driver
@@ -327,7 +327,7 @@
NSLog(@"Error could not instanciate driver %@", interfaceName);
return NO;
}
- //}
+ }
NSLog(@"Driver %@ was created.", interfaceName);
}
Modified: branches/usb-drivers/Sources/Driver/USBJack/IntersilJack.mm
===================================================================
--- branches/usb-drivers/Sources/Driver/USBJack/IntersilJack.mm 2006-10-05
05:56:27 UTC (rev 200)
+++ branches/usb-drivers/Sources/Driver/USBJack/IntersilJack.mm 2006-10-06
12:50:10 UTC (rev 201)
@@ -187,29 +187,6 @@
}
IntersilJack::IntersilJack() {
- /* _isEnabled = false;
- _deviceInit = false;
- _devicePresent = false;
- deviceType = intersil;
-
- _interface = NULL;
- _runLoopSource = NULL;
- _runLoop = NULL;
- _intLoop = NULL;
- _channel = 3;
- _frameSize = 0;
- _notifyPort = NULL;
-
- pthread_mutex_init(&_wait_mutex, NULL);
- pthread_cond_init (&_wait_cond, NULL);
- pthread_mutex_init(&_recv_mutex, NULL);
- pthread_cond_init (&_recv_cond, NULL);
-
- // run();
-
- while (_runLoop==NULL || _intLoop==NULL)
- usleep(100);
-*/
}
IntersilJack::~IntersilJack() {
Modified: branches/usb-drivers/Sources/Driver/USBJack/RalinkJack.mm
===================================================================
--- branches/usb-drivers/Sources/Driver/USBJack/RalinkJack.mm 2006-10-05
05:56:27 UTC (rev 200)
+++ branches/usb-drivers/Sources/Driver/USBJack/RalinkJack.mm 2006-10-06
12:50:10 UTC (rev 201)
@@ -922,30 +922,6 @@
}
RalinkJack::RalinkJack() {
-
- /* _isEnabled = false;
- _deviceInit = false;
- _devicePresent = false;
- deviceType = ralink;
-
- _interface = NULL;
- _runLoopSource = NULL;
- _runLoop = NULL;
- _intLoop = NULL;
- _channel = 3;
- _frameSize = 0;
- _notifyPort = NULL;
-
- pthread_mutex_init(&_wait_mutex, NULL);
- pthread_cond_init (&_wait_cond, NULL);
- pthread_mutex_init(&_recv_mutex, NULL);
- pthread_cond_init (&_recv_cond, NULL);
-
- run();
-
- while (_runLoop==NULL || _intLoop==NULL)
- usleep(100);
- */
}
RalinkJack::~RalinkJack() {
Modified: branches/usb-drivers/Sources/Driver/USBJack/USBJack.h
===================================================================
--- branches/usb-drivers/Sources/Driver/USBJack/USBJack.h 2006-10-05
05:56:27 UTC (rev 200)
+++ branches/usb-drivers/Sources/Driver/USBJack/USBJack.h 2006-10-06
12:50:10 UTC (rev 201)
@@ -98,7 +98,6 @@
static void _interruptRecieved(void *refCon, IOReturn result, int
len);
virtual bool _massagePacket(int len);
static void _runCFRunLoop(USBJack* me);
- static void _intCFRunLoop(USBJack* me);
// static IOUSBDeviceInterface **_foundDevices[10];
// static int _deviceType[10];
@@ -115,7 +114,6 @@
SInt16 _firmwareType;
CFRunLoopRef _runLoop;
- CFRunLoopRef _intLoop;
UInt16 _channel;
IONotificationPortRef _notifyPort;
CFRunLoopSourceRef _runLoopSource;
Modified: branches/usb-drivers/Sources/Driver/USBJack/USBJack.mm
===================================================================
--- branches/usb-drivers/Sources/Driver/USBJack/USBJack.mm 2006-10-05
05:56:27 UTC (rev 200)
+++ branches/usb-drivers/Sources/Driver/USBJack/USBJack.mm 2006-10-06
12:50:10 UTC (rev 201)
@@ -109,11 +109,12 @@
{0x0411, 0x008b}, /* Nintendo */
{0x5a57, 0x0260}, /* Zinwell */
{0x0eb0, 0x9020}, /* Novatech */
+ {0x13b1, 0x0020}, /* WUSB54GC */
};
#define dIntersilDeviceCount 32
#define dZydasDeviceCount 1
-#define dRalinkDeviceCount 30
+#define dRalinkDeviceCount 31
#define dbgOutPutBuf(a) NSLog( @"0x%.4x 0x%.4x 0x%.4x 0x%.4x%.4x",
NSSwapLittleShortToHost(*((UInt16*)&(a) )),
NSSwapLittleShortToHost(*((UInt16*)&(a)+1)),
NSSwapLittleShortToHost(*((UInt16*)&(a)+2)),
NSSwapLittleShortToHost(*((UInt16*)&(a)+3)),
NSSwapLittleShortToHost(*((UInt16*)&(a)+4)) );
@@ -833,7 +834,6 @@
}
void USBJack::_addDevice(void *refCon, io_iterator_t iterator) {
- USBJack *me;
kern_return_t kr;
io_service_t usbDevice;
IOCFPlugInInterface **plugInInterface=NULL;
@@ -919,7 +919,7 @@
#pragma mark -
bool USBJack::stopRun() {
- if (_runLoop == NULL && _intLoop == NULL) return false;
+ if (_runLoop == NULL) return false;
_stayUp = false;
if (_notifyPort) {
IONotificationPortDestroy(_notifyPort);
@@ -927,10 +927,8 @@
}
if (_runLoop) CFRunLoopStop(_runLoop);
- if (_intLoop) CFRunLoopStop(_intLoop);
-
+
_runLoop = NULL;
- _intLoop = NULL;
return true;
}
@@ -946,18 +944,6 @@
}
}
-void USBJack::_intCFRunLoop(USBJack* me) {
-/* me->_intLoop = CFRunLoopGetCurrent();
- while(me->_stayUp) {
- CFRunLoopRun();
- };
- if (me->_intLoop) {
- CFRunLoopStop(me->_intLoop);
- me->_intLoop = NULL;
- }
- */
-}
-
bool USBJack::run() {
pthread_t pt;
@@ -965,10 +951,7 @@
if (_runLoop==NULL) {
pthread_create(&pt, NULL, (void*(*)(void*))_runCFRunLoop, this);
}
- /* if (_intLoop==NULL) {
- pthread_create(&pt, NULL, (void*(*)(void*))_intCFRunLoop, this);
- }
- */
+
return true;
}
@@ -1041,7 +1024,6 @@
_interface = NULL;
_runLoopSource = NULL;
_runLoop = NULL;
- _intLoop = NULL;
_channel = 3;
_frameSize = 0;
_notifyPort = NULL;
@@ -1053,7 +1035,7 @@
run();
- while (_runLoop==NULL /* || _intLoop==NULL*/)
+ while (_runLoop==NULL)
usleep(100);
}
Modified: branches/usb-drivers/Sources/WaveDrivers/WaveDriverUSBIntersil.mm
===================================================================
--- branches/usb-drivers/Sources/WaveDrivers/WaveDriverUSBIntersil.mm
2006-10-05 05:56:27 UTC (rev 200)
+++ branches/usb-drivers/Sources/WaveDrivers/WaveDriverUSBIntersil.mm
2006-10-06 12:50:10 UTC (rev 201)
@@ -48,11 +48,11 @@
switch(_driver->getDeviceType()){ //cast ourself to the approp type
case intersil:
- // delete(_driver);
+ delete(_driver);
_driver = new IntersilJack;
break;
case ralink:
- // delete(_driver);
+ delete(_driver);
_driver = new RalinkJack;
break;
case zydas:
@@ -69,23 +69,6 @@
return self;
}
-- (id)initAsMaster {
- int timeoutCount = 0;
- self=[super init];
- if(!self) return Nil;
-
- _driver = new USBJack;
- NSLog(@"Init Master USB driver.");
- //make start matching a class function so we can call it before we try to
make an instance
- _driver->startMatching();
-
-
- // _driver->_init();
- _errors = 0;
-
- return self;
-}
-
#pragma mark -
+ (enum WaveDriverType) type {
Other related posts:
- » [kismac] [binaervarianz] r201 - in branches/usb-drivers/Sources: Core Driver/USBJack WaveDrivers