ipw2100: Remove.
Long since superseded by the iprowifi2100 driver.
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
SubDir HAIKU_TOP src add-ons kernel drivers network wlan ;
|
SubDir HAIKU_TOP src add-ons kernel drivers network wlan ;
|
||||||
|
|
||||||
# Haiku-native drivers
|
|
||||||
SubInclude HAIKU_TOP src add-ons kernel drivers network wlan ipw2100 ;
|
|
||||||
|
|
||||||
# FreeBSD 9.2 drivers
|
# FreeBSD 9.2 drivers
|
||||||
SubInclude HAIKU_TOP src add-ons kernel drivers network wlan iprowifi2100 ;
|
SubInclude HAIKU_TOP src add-ons kernel drivers network wlan iprowifi2100 ;
|
||||||
SubInclude HAIKU_TOP src add-ons kernel drivers network wlan marvell88w8335 ;
|
SubInclude HAIKU_TOP src add-ons kernel drivers network wlan marvell88w8335 ;
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
SubDir HAIKU_TOP src add-ons kernel drivers network wlan ipw2100 ;
|
|
||||||
|
|
||||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
|
||||||
|
|
||||||
KernelAddon ipw2100 :
|
|
||||||
driver.cpp
|
|
||||||
ipw2100.cpp
|
|
||||||
kernel_cpp.c
|
|
||||||
;
|
|
||||||
|
|
||||||
# Note: Due to licensing restrictions, we can only distribute the archive.
|
|
||||||
# The end-user must extract and install it themselves.
|
|
||||||
HAIKU_WIFI_FIRMWARE_PACKAGE on ipw2100 = "" ;
|
|
||||||
HAIKU_WIFI_FIRMWARE_ARCHIVE on ipw2100 = ipw2100-fw-1.3.tgz ;
|
|
||||||
HAIKU_WIFI_FIRMWARE_DO_EXTRACT on ipw2100 = false ;
|
|
||||||
@@ -1,269 +0,0 @@
|
|||||||
/*
|
|
||||||
Driver for Intel(R) PRO/Wireless 2100 devices.
|
|
||||||
Copyright (C) 2006 Michael Lotz <[email protected]>
|
|
||||||
Released under the terms of the MIT license.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <Drivers.h>
|
|
||||||
#include <KernelExport.h>
|
|
||||||
#include <PCI.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "driver.h"
|
|
||||||
#include "ipw2100.h"
|
|
||||||
#include "kernel_cpp.h"
|
|
||||||
|
|
||||||
|
|
||||||
status_t ipw2100_open(const char *name, uint32 flags, void **cookie);
|
|
||||||
status_t ipw2100_close(void *cookie);
|
|
||||||
status_t ipw2100_free(void *cookie);
|
|
||||||
status_t ipw2100_control(void *cookie, uint32 op, void *args, size_t length);
|
|
||||||
status_t ipw2100_read(void *cookie, off_t position, void *buffer, size_t *numBytes);
|
|
||||||
status_t ipw2100_write(void *cookie, off_t position, const void *buffer, size_t *numBytes);
|
|
||||||
|
|
||||||
|
|
||||||
int32 api_version = B_CUR_DRIVER_API_VERSION;
|
|
||||||
|
|
||||||
|
|
||||||
pci_module_info *gPCIModule;
|
|
||||||
char *gDeviceNameList[MAX_INSTANCES + 1];
|
|
||||||
pci_info *gDeviceList[MAX_INSTANCES];
|
|
||||||
int32 gOpenMask = 0;
|
|
||||||
|
|
||||||
device_hooks gDeviceHooks = {
|
|
||||||
ipw2100_open,
|
|
||||||
ipw2100_close,
|
|
||||||
ipw2100_free,
|
|
||||||
ipw2100_control,
|
|
||||||
ipw2100_read,
|
|
||||||
ipw2100_write
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const char *
|
|
||||||
identify_device(const pci_info *info)
|
|
||||||
{
|
|
||||||
if (info->vendor_id != VENDOR_ID_INTEL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
switch (info->device_id) {
|
|
||||||
case 0x1043: return "Intel(R) PRO/Wireless 2100";
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
init_hardware()
|
|
||||||
{
|
|
||||||
#ifdef TRACE_IPW2100
|
|
||||||
set_dprintf_enabled(true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//TRACE((DRIVER_NAME": init hardware\n"));
|
|
||||||
|
|
||||||
pci_module_info *module;
|
|
||||||
status_t result = get_module(B_PCI_MODULE_NAME, (module_info **)&module);
|
|
||||||
if (result < B_OK)
|
|
||||||
return result;
|
|
||||||
|
|
||||||
int32 index = 0;
|
|
||||||
result = B_ERROR;
|
|
||||||
pci_info info;
|
|
||||||
while (module->get_nth_pci_info(index++, &info) == B_OK) {
|
|
||||||
const char *deviceName = identify_device(&info);
|
|
||||||
if (deviceName) {
|
|
||||||
TRACE((DRIVER_NAME": found device \"%s\"\n", deviceName));
|
|
||||||
result = B_OK;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
put_module(B_PCI_MODULE_NAME);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
init_driver()
|
|
||||||
{
|
|
||||||
TRACE((DRIVER_NAME": init driver\n"));
|
|
||||||
|
|
||||||
for (int32 i = 0; i < MAX_INSTANCES; i++)
|
|
||||||
gDeviceList[i] = NULL;
|
|
||||||
for (int32 i = 0; i < MAX_INSTANCES + 1; i++)
|
|
||||||
gDeviceNameList[i] = NULL;
|
|
||||||
|
|
||||||
pci_info *info = new pci_info;
|
|
||||||
if (!info)
|
|
||||||
return B_NO_MEMORY;
|
|
||||||
|
|
||||||
status_t result = get_module(B_PCI_MODULE_NAME, (module_info **)&gPCIModule);
|
|
||||||
if (result < B_OK) {
|
|
||||||
delete info;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32 index = 0;
|
|
||||||
int32 count = 0;
|
|
||||||
while (gPCIModule->get_nth_pci_info(index++, info) == B_OK
|
|
||||||
&& count < MAX_INSTANCES) {
|
|
||||||
const char *deviceName = identify_device(info);
|
|
||||||
if (!deviceName)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
char publishName[64];
|
|
||||||
sprintf(publishName, "net/ipw2100/%ld", count);
|
|
||||||
|
|
||||||
gDeviceList[count] = info;
|
|
||||||
gDeviceNameList[count] = strdup(publishName);
|
|
||||||
|
|
||||||
info = new pci_info;
|
|
||||||
if (!info)
|
|
||||||
goto error_out_of_memory;
|
|
||||||
|
|
||||||
dprintf(DRIVER_NAME": will publish an \"%s\" as device %ld to /dev/%s\n", deviceName, count, publishName);
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
delete info;
|
|
||||||
return B_OK;
|
|
||||||
|
|
||||||
error_out_of_memory:
|
|
||||||
for (int32 i = 0; i < MAX_INSTANCES; i++) {
|
|
||||||
free(gDeviceNameList[i]);
|
|
||||||
delete gDeviceList[i];
|
|
||||||
gDeviceNameList[i] = NULL;
|
|
||||||
gDeviceList[i] = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
put_module(B_PCI_MODULE_NAME);
|
|
||||||
return B_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
uninit_driver()
|
|
||||||
{
|
|
||||||
TRACE((DRIVER_NAME": uninit driver\n"));
|
|
||||||
for (int32 i = 0; i < MAX_INSTANCES; i++) {
|
|
||||||
free(gDeviceNameList[i]);
|
|
||||||
delete gDeviceList[i];
|
|
||||||
gDeviceNameList[i] = NULL;
|
|
||||||
gDeviceList[i] = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
put_module(B_PCI_MODULE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const char **
|
|
||||||
publish_devices(void)
|
|
||||||
{
|
|
||||||
//TRACE((DRIVER_NAME": publish devices\n"));
|
|
||||||
return (const char **)gDeviceNameList;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
device_hooks *
|
|
||||||
find_device(const char *name)
|
|
||||||
{
|
|
||||||
//TRACE((DRIVER_NAME": find device \"%s\"\n", name));
|
|
||||||
|
|
||||||
for (int32 i = 0; i < MAX_INSTANCES; i++) {
|
|
||||||
if (strcmp(gDeviceNameList[i], name) == 0)
|
|
||||||
return &gDeviceHooks;
|
|
||||||
}
|
|
||||||
|
|
||||||
TRACE_ALWAYS((DRIVER_NAME": couldn't find device \"%s\"\n", name));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//#pragma mark -
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
ipw2100_open(const char *name, uint32 flags, void **cookie)
|
|
||||||
{
|
|
||||||
//TRACE((DRIVER_NAME": open device\n"));
|
|
||||||
int32 deviceID = -1;
|
|
||||||
for (int32 i = 0; i < MAX_INSTANCES && gDeviceNameList[i]; i++) {
|
|
||||||
if (strcmp(gDeviceNameList[i], name) == 0) {
|
|
||||||
deviceID = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (deviceID < 0)
|
|
||||||
return B_ERROR;
|
|
||||||
|
|
||||||
// allow only one concurrent access
|
|
||||||
int32 mask = 1 << deviceID;
|
|
||||||
if (atomic_or(&gOpenMask, mask) & mask)
|
|
||||||
return B_BUSY;
|
|
||||||
|
|
||||||
IPW2100 *device = new IPW2100(deviceID, gDeviceList[deviceID], gPCIModule);
|
|
||||||
status_t result = device->InitCheck();
|
|
||||||
if (device->InitCheck() < B_OK) {
|
|
||||||
delete device;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
*cookie = (void *)device;
|
|
||||||
return device->Open(flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
ipw2100_close(void *cookie)
|
|
||||||
{
|
|
||||||
//TRACE((DRIVER_NAME": close device\n"));
|
|
||||||
IPW2100 *device = (IPW2100 *)cookie;
|
|
||||||
return device->Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
ipw2100_free(void *cookie)
|
|
||||||
{
|
|
||||||
//TRACE((DRIVER_NAME": free device\n"));
|
|
||||||
IPW2100 *device = (IPW2100 *)cookie;
|
|
||||||
|
|
||||||
int32 mask = 1 << device->DeviceID();
|
|
||||||
|
|
||||||
device->Free();
|
|
||||||
delete device;
|
|
||||||
|
|
||||||
atomic_and(&gOpenMask, ~mask);
|
|
||||||
return B_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
ipw2100_control(void *cookie, uint32 op, void *args, size_t length)
|
|
||||||
{
|
|
||||||
//TRACE((DRIVER_NAME": control device\n"));
|
|
||||||
IPW2100 *device = (IPW2100 *)cookie;
|
|
||||||
return device->Control(op, args, length);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
ipw2100_read(void *cookie, off_t position, void *buffer, size_t *numBytes)
|
|
||||||
{
|
|
||||||
//TRACE((DRIVER_NAME": read device\n"));
|
|
||||||
IPW2100 *device = (IPW2100 *)cookie;
|
|
||||||
return device->Read(position, buffer, numBytes);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
ipw2100_write(void *cookie, off_t position, const void *buffer, size_t *numBytes)
|
|
||||||
{
|
|
||||||
//TRACE((DRIVER_NAME": write device\n"));
|
|
||||||
IPW2100 *device = (IPW2100 *)cookie;
|
|
||||||
return device->Write(position, buffer, numBytes);
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Driver for Intel(R) PRO/Wireless 2100 devices.
|
|
||||||
Copyright (C) 2006 Michael Lotz <[email protected]>
|
|
||||||
Released under the terms of the MIT license.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _DRIVER_H_
|
|
||||||
#define _DRIVER_H_
|
|
||||||
|
|
||||||
#include <SupportDefs.h>
|
|
||||||
#include <KernelExport.h>
|
|
||||||
|
|
||||||
#define DRIVER_NAME "ipw2100"
|
|
||||||
#define DRIVER_VERSION 1.0.0
|
|
||||||
#define DRIVER_DESCRIPTION "Intel(R) PRO/Wireless 2100 Driver"
|
|
||||||
|
|
||||||
#define MAX_INSTANCES 3
|
|
||||||
#define VENDOR_ID_INTEL 0x8086
|
|
||||||
|
|
||||||
//#define TRACE_IPW2100
|
|
||||||
#ifdef TRACE_IPW2100
|
|
||||||
#define TRACE(x) dprintf x
|
|
||||||
#define TRACE_ALWAYS(x) dprintf x
|
|
||||||
#else
|
|
||||||
#define TRACE(x) /* nothing */
|
|
||||||
#define TRACE_ALWAYS(x) dprintf x
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _DRIVER_H_
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
#ifndef _ETHERNET_H_
|
|
||||||
#define _ETHERNET_H_
|
|
||||||
|
|
||||||
#include <Drivers.h>
|
|
||||||
|
|
||||||
enum {
|
|
||||||
ETHER_GETADDR = B_DEVICE_OP_CODES_END, /* get ethernet address */
|
|
||||||
ETHER_INIT, /* set irq and port */
|
|
||||||
ETHER_NONBLOCK, /* set/unset nonblocking mode */
|
|
||||||
ETHER_ADDMULTI, /* add multicast addr */
|
|
||||||
ETHER_REMMULTI, /* rem multicast addr */
|
|
||||||
ETHER_SETPROMISC, /* set promiscuous */
|
|
||||||
ETHER_GETFRAMESIZE, /* get frame size */
|
|
||||||
ETHER_ADDTIMESTAMP, /* (try to) add timestamps to packets (BONE ext) */
|
|
||||||
ETHER_HASIOVECS, /* does the driver implement writev ? (BONE ext) (bool *) */
|
|
||||||
ETHER_GETIFTYPE, /* get the IFT_ type of the interface (int *) */
|
|
||||||
ETHER_GETLINKSTATE /* get line speed, quality, duplex mode, etc. */
|
|
||||||
};
|
|
||||||
|
|
||||||
// ethernet data
|
|
||||||
#define ETHER_ADDRESS_SIZE 6
|
|
||||||
|
|
||||||
struct ethernet_header {
|
|
||||||
uint8 dest_address[ETHER_ADDRESS_SIZE];
|
|
||||||
uint8 source_address[ETHER_ADDRESS_SIZE];
|
|
||||||
uint16 ether_type;
|
|
||||||
uint8 data[0];
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
|
|
||||||
struct llc_header {
|
|
||||||
uint8 dsap;
|
|
||||||
uint8 ssap;
|
|
||||||
uint8 control;
|
|
||||||
uint8 org_code[3];
|
|
||||||
uint16 ether_type;
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
#define LLC_LSAP_SNAP 0xaa
|
|
||||||
#define LLC_CONTROL_UI 0x03
|
|
||||||
|
|
||||||
|
|
||||||
struct ieee80211_header {
|
|
||||||
uint8 frame_control[2];
|
|
||||||
uint8 duration[2];
|
|
||||||
uint8 address1[ETHER_ADDRESS_SIZE];
|
|
||||||
uint8 address2[ETHER_ADDRESS_SIZE];
|
|
||||||
uint8 address3[ETHER_ADDRESS_SIZE];
|
|
||||||
uint8 sequence[2];
|
|
||||||
uint8 data[0];
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
// flags for frame_control[0]
|
|
||||||
#define IEEE80211_DATA_FRAME 0x08
|
|
||||||
|
|
||||||
// flags for frame_control[1]
|
|
||||||
#define IEEE80211_WEP_ENCRYPTED 0x40
|
|
||||||
|
|
||||||
#endif // _ETHERNET_H_
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,159 +0,0 @@
|
|||||||
/*
|
|
||||||
Driver for Intel(R) PRO/Wireless 2100 devices.
|
|
||||||
Copyright (C) 2006 Michael Lotz <[email protected]>
|
|
||||||
Released under the terms of the MIT license.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _IPW2100_H_
|
|
||||||
#define _IPW2100_H_
|
|
||||||
|
|
||||||
#include "ipw2100_hw.h"
|
|
||||||
|
|
||||||
class IPW2100 {
|
|
||||||
public:
|
|
||||||
IPW2100(int32 deviceID, pci_info *info,
|
|
||||||
pci_module_info *module);
|
|
||||||
~IPW2100();
|
|
||||||
|
|
||||||
status_t InitCheck();
|
|
||||||
|
|
||||||
int32 DeviceID() { return fDeviceID; };
|
|
||||||
|
|
||||||
status_t Open(uint32 flags);
|
|
||||||
status_t Close();
|
|
||||||
status_t Free();
|
|
||||||
|
|
||||||
status_t Read(off_t position, void *buffer,
|
|
||||||
size_t *numBytes);
|
|
||||||
status_t Write(off_t position, const void *buffer,
|
|
||||||
size_t *numBytes);
|
|
||||||
status_t Control(uint32 op, void *args, size_t length);
|
|
||||||
|
|
||||||
private:
|
|
||||||
static int32 InterruptHandler(void *data);
|
|
||||||
int32 Interrupt();
|
|
||||||
|
|
||||||
void HandleTXInterrupt();
|
|
||||||
void HandleRXInterrupt();
|
|
||||||
|
|
||||||
uint32 ReadReg(uint32 offset);
|
|
||||||
void WriteReg(uint32 offset, uint32 value);
|
|
||||||
|
|
||||||
uint8 ReadMem8(uint32 address);
|
|
||||||
uint16 ReadMem16(uint32 address);
|
|
||||||
uint32 ReadMem32(uint32 address);
|
|
||||||
|
|
||||||
void WriteMem8(uint32 address, uint8 value);
|
|
||||||
void WriteMem16(uint32 address, uint16 value);
|
|
||||||
void WriteMem32(uint32 address, uint32 value);
|
|
||||||
|
|
||||||
status_t ReadOrdinal(uint32 index, uint8 *buffer,
|
|
||||||
size_t *size);
|
|
||||||
status_t WriteOrdinal(uint32 index, const uint8 *buffer,
|
|
||||||
size_t *size);
|
|
||||||
|
|
||||||
status_t SendCommand(uint32 commandId, const uint8 *buffer,
|
|
||||||
size_t length);
|
|
||||||
|
|
||||||
area_id MapPhysicalMemory(const char *name,
|
|
||||||
uint32 physicalAddress, void **logicalAddress,
|
|
||||||
size_t size);
|
|
||||||
area_id AllocateContiguous(const char *name,
|
|
||||||
void **logicalAddress, uint32 *physicalAddress,
|
|
||||||
size_t size);
|
|
||||||
|
|
||||||
void SetInterrupts(uint32 interrupts);
|
|
||||||
uint32 Interrupts();
|
|
||||||
|
|
||||||
status_t CheckAdapterAccess();
|
|
||||||
status_t SoftResetAdapter();
|
|
||||||
status_t ResetAdapter();
|
|
||||||
status_t StopMaster();
|
|
||||||
status_t SetupBuffers();
|
|
||||||
status_t ReadMACAddress();
|
|
||||||
status_t LoadMicrocodeAndFirmware();
|
|
||||||
status_t LoadMicrocode(const uint8 *buffer, uint32 size);
|
|
||||||
status_t LoadFirmware(const uint8 *buffer, uint32 size);
|
|
||||||
status_t ClearSharedMemory();
|
|
||||||
status_t StartFirmware();
|
|
||||||
status_t EtherInit();
|
|
||||||
status_t DisableAdapter();
|
|
||||||
status_t EnableAdapter();
|
|
||||||
status_t ScanForNetworks();
|
|
||||||
status_t DisableRadio();
|
|
||||||
status_t PowerDown();
|
|
||||||
|
|
||||||
status_t fStatus;
|
|
||||||
bool fClosing;
|
|
||||||
|
|
||||||
sem_id fFWInitDoneSem;
|
|
||||||
sem_id fAdapterDisabledSem;
|
|
||||||
sem_id fTXTransferSem;
|
|
||||||
sem_id fRXTransferSem;
|
|
||||||
sem_id fCommandDoneSem;
|
|
||||||
|
|
||||||
int32 fDeviceID;
|
|
||||||
pci_info *fPCIInfo;
|
|
||||||
pci_module_info *fPCIModule;
|
|
||||||
|
|
||||||
uint32 fRegisterBase;
|
|
||||||
uint8 *fRegisters;
|
|
||||||
area_id fRegistersArea;
|
|
||||||
|
|
||||||
area_id fTXRingArea;
|
|
||||||
ipw_bd *fTXRingLog;
|
|
||||||
uint32 fTXRingPhy;
|
|
||||||
|
|
||||||
area_id fTXPacketsArea;
|
|
||||||
ipw_tx *fTXPacketsLog;
|
|
||||||
uint32 fTXPacketsPhy;
|
|
||||||
|
|
||||||
area_id fRXRingArea;
|
|
||||||
ipw_bd *fRXRingLog;
|
|
||||||
uint32 fRXRingPhy;
|
|
||||||
|
|
||||||
area_id fRXPacketsArea;
|
|
||||||
ipw_rx *fRXPacketsLog;
|
|
||||||
uint32 fRXPacketsPhy;
|
|
||||||
|
|
||||||
area_id fStatusRingArea;
|
|
||||||
ipw_status *fStatusRingLog;
|
|
||||||
uint32 fStatusRingPhy;
|
|
||||||
|
|
||||||
area_id fCommandArea;
|
|
||||||
ipw_command *fCommandLog;
|
|
||||||
uint32 fCommandPhy;
|
|
||||||
|
|
||||||
uint32 fInterruptMask;
|
|
||||||
uint32 fTXPosition;
|
|
||||||
uint32 fRXPosition;
|
|
||||||
bool fAssociated;
|
|
||||||
|
|
||||||
uint32 fReadIndex;
|
|
||||||
bool *fReadQueue;
|
|
||||||
|
|
||||||
uint32 fOrdinalTable1Base;
|
|
||||||
uint32 fOrdinalTable2Base;
|
|
||||||
uint32 fOrdinalTable1Length;
|
|
||||||
uint32 fOrdinalTable2Length;
|
|
||||||
|
|
||||||
// settings
|
|
||||||
int32 fInterruptLine;
|
|
||||||
uint8 fMACAddress[6];
|
|
||||||
uint32 fMode;
|
|
||||||
uint32 fChannel;
|
|
||||||
uint32 fTXRates;
|
|
||||||
uint32 fPowerMode;
|
|
||||||
uint32 fRTSThreshold;
|
|
||||||
uint32 fScanOptions;
|
|
||||||
uint8 fAuthMode;
|
|
||||||
uint32 fCiphers;
|
|
||||||
char *fESSID;
|
|
||||||
ipw_wep_key fWEPKeys[4];
|
|
||||||
uint32 fWEPKeyIndex;
|
|
||||||
uint32 fWEPFlags;
|
|
||||||
bool fDumpTXPackets;
|
|
||||||
bool fDumpRXPackets;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // _IPW2100_H_
|
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
#
|
|
||||||
# This is the configuration file for the ipw2100 wireless network driver.
|
|
||||||
# It should be located at "/boot/home/config/settings/kernel/drivers" and named "ipw2100".
|
|
||||||
#
|
|
||||||
|
|
||||||
# -----
|
|
||||||
# Network setup
|
|
||||||
# -----
|
|
||||||
|
|
||||||
#
|
|
||||||
# mode
|
|
||||||
# -----
|
|
||||||
# This setting specifies the operation mode of the driver and hardware:
|
|
||||||
#
|
|
||||||
# 0=IBSS In IBSS mode network devices communicate directly with eachother. No
|
|
||||||
# access point required. This mode is also called ad-hoc or peer-to-peer mode.
|
|
||||||
# 1=BSS The BSS mode (also called infrastructure mode) requires each network device
|
|
||||||
# to connect to a central access point. All traffic (also between two wireless
|
|
||||||
# devices) is routed through the access point.
|
|
||||||
# 2=Monitor Monitoring is only really useful when you're debugging a network (if you need
|
|
||||||
# to check for other, possibly overlapping, wireless networks for example). In
|
|
||||||
# monitoring mode you are not activly scanning or connecting to a network, you
|
|
||||||
# rather passivly capture every packet that is sent through the air. Note that
|
|
||||||
# for this to be useful you should enable packet dumping (below) too.
|
|
||||||
#
|
|
||||||
# Valid modes range from 0 to 2, the default is 1 (BSS).
|
|
||||||
#
|
|
||||||
mode 1
|
|
||||||
|
|
||||||
#
|
|
||||||
# channel
|
|
||||||
# -----
|
|
||||||
# Selects the channel to operate on. The channel should be the same as set on the other wireless
|
|
||||||
# devices (access point in BSS mode or other computers in IBSS mode).
|
|
||||||
#
|
|
||||||
# Valid channels range from 1 to 14, the default is 1.
|
|
||||||
#
|
|
||||||
channel 1
|
|
||||||
|
|
||||||
#
|
|
||||||
# essid
|
|
||||||
# -----
|
|
||||||
# Specifies which network to connect to ("the network name"). If you don't specify the ESSID the next
|
|
||||||
# best network will be used to connect.
|
|
||||||
#
|
|
||||||
# Valid are strings of up to 32 characters, the default is "unset".
|
|
||||||
#
|
|
||||||
essid unset
|
|
||||||
|
|
||||||
#
|
|
||||||
# privacy
|
|
||||||
# -----
|
|
||||||
# Selects the encryption to be used for the network:
|
|
||||||
#
|
|
||||||
# 0=None Don't use encryption at all.
|
|
||||||
# 1=WEP64 Use WEP with 64 bit strength (40 bit keys + 16 bit initialisation vector)
|
|
||||||
# 2=WEP128 Use WEP with 128 bit strength (104 bit keys + 16 bit initialisation vector)
|
|
||||||
#
|
|
||||||
# Valid privacy settings range from 0 to 2, the default is 0.
|
|
||||||
#
|
|
||||||
privacy 0
|
|
||||||
|
|
||||||
#
|
|
||||||
# authmode
|
|
||||||
# -----
|
|
||||||
# Selects the authentication mode to be used for joining a network:
|
|
||||||
#
|
|
||||||
# 0=Open Use Open System Authentication.
|
|
||||||
# 1=Shared Use Shared Key Authentication.
|
|
||||||
#
|
|
||||||
# Valid authmode settings range from 0 to 1, the default is 0.
|
|
||||||
#
|
|
||||||
authmode 0
|
|
||||||
|
|
||||||
#
|
|
||||||
# keyindex
|
|
||||||
# -----
|
|
||||||
# Selects the key to be used for encryption out of the four keys specified below.
|
|
||||||
#
|
|
||||||
# Valid index settings range from 0 to 3, default is 0.
|
|
||||||
#
|
|
||||||
keyindex 0
|
|
||||||
|
|
||||||
#
|
|
||||||
# keyX
|
|
||||||
# -----
|
|
||||||
# These four entries are used to specify the WEP keys. Only one of them will be used at any one time
|
|
||||||
# though (selected by the keyindex setting above). They need to be at the same index that is
|
|
||||||
# configured at the access point or on other wireless devices.
|
|
||||||
# The keys can be either specified in ASCII format, where strings of 5 or 13 characters are valid, or in
|
|
||||||
# hex format, where hex strings of 10 or 26 digits are valid. Note that you need to enclose ASCII
|
|
||||||
# strings in quotes (") when they contain spaces. Unused keys can be left blank or commented out by
|
|
||||||
# adding a # at the beginning of the line.
|
|
||||||
#
|
|
||||||
# Example of a ASCII key for WEP with 64 bits (5 characters required):
|
|
||||||
# key0 SOMEK
|
|
||||||
#
|
|
||||||
# Example of a hex key for WEP with 128 bits (26 digits required):
|
|
||||||
# key1 a8d9fec82387d7912fdaa86820
|
|
||||||
#
|
|
||||||
key0 00000000000000000000000000
|
|
||||||
key1 00000000000000000000000000
|
|
||||||
key2 00000000000000000000000000
|
|
||||||
key3 00000000000000000000000000
|
|
||||||
|
|
||||||
|
|
||||||
# -----
|
|
||||||
# Device settings
|
|
||||||
# -----
|
|
||||||
|
|
||||||
#
|
|
||||||
# interrupt
|
|
||||||
# -----
|
|
||||||
# If you have configured your network settings and tried to enable the interface but didn't get
|
|
||||||
# connected this can have a few causes. One of them beeing that the interrupt line reported to the
|
|
||||||
# driver is not the interrupt line where interrupts actually arrive. If you enable syslog debug output in
|
|
||||||
# the kernel settings and then examine the syslog in "/var/log" you might see a lot of messages like
|
|
||||||
# this:
|
|
||||||
#
|
|
||||||
# KERN 'idle thread 1'[1]: disable irq 5
|
|
||||||
# KERN 'idle thread 1'[1]: irq 5 reenabled (handled by 0x600e4f60)
|
|
||||||
#
|
|
||||||
# This indicates that the interrupts were sent to the interrupt line 5, while there was no handler for
|
|
||||||
# them. In this case you can use the following setting to force the driver into using a specific interrupt
|
|
||||||
# line. Change the default value of -1 to the desired interrupt line.
|
|
||||||
#
|
|
||||||
# Note though that there are other factors that may cause the driver / hardware not to function
|
|
||||||
# properly. One of which might be the RF kill switch. This switch that needs to be present on all
|
|
||||||
# wireless equipment provides the function of explicitly disabling the radio wave emitting device.
|
|
||||||
# You should see a line like the following in the syslog if an RF kill switch is enabled:
|
|
||||||
#
|
|
||||||
# KERN 'ifconfig'[2000]: IPW2100: rf kill switch enabled
|
|
||||||
#
|
|
||||||
# In this case you should try to toggle the switch / key that is present somewhere on your device.
|
|
||||||
# If the problem persists, it means that you need a special driver to handle your RF kill switch. This
|
|
||||||
# is very unfortunate, because there is no way for this driver to override this. You will need to find
|
|
||||||
# a driver for the specific switch.
|
|
||||||
#
|
|
||||||
# Valid settings are any valid interrupt line number, the default is -1 (use the pci provided value).
|
|
||||||
#
|
|
||||||
interrupt -1
|
|
||||||
|
|
||||||
#
|
|
||||||
# dump_x
|
|
||||||
# -----
|
|
||||||
# Enables packet dumping. The dumptx setting sets whether outgoing packets should be dumped
|
|
||||||
# before they are sent out, the dumprx setting specifies if incoming packets should be dumped
|
|
||||||
# before being handed over to the network stack. Packets will be written to a temporary folder
|
|
||||||
# called "ipwlog" under "/var/tmp". The files are prefixed with either "ipwtx-" or "ipwrx-" depending on
|
|
||||||
# their direction. They are also numbered continiously. Note that when the driver resets, the counter
|
|
||||||
# will start at 0 again, possibly overwriting a packet of a previous session. Also note that the
|
|
||||||
# temporary folders are emptied on startup. You should therefore copy out any data that is of
|
|
||||||
# interest to you.
|
|
||||||
#
|
|
||||||
# Valid settings are 0 (disabled) and 1 (enabled), the default is 0.
|
|
||||||
#
|
|
||||||
dumptx 0
|
|
||||||
dumprx 0
|
|
||||||
@@ -1,343 +0,0 @@
|
|||||||
/*
|
|
||||||
Driver for Intel(R) PRO/Wireless 2100 devices.
|
|
||||||
Copyright (C) 2006 Michael Lotz <[email protected]>
|
|
||||||
Released under the terms of the MIT license.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _IPW2100_HW_H_
|
|
||||||
#define _IPW2100_HW_H_
|
|
||||||
|
|
||||||
// buffer descriptor
|
|
||||||
struct ipw_bd {
|
|
||||||
uint32 physical_address;
|
|
||||||
uint32 length;
|
|
||||||
uint8 flags;
|
|
||||||
uint8 fragment_count;
|
|
||||||
uint8 reserved[6];
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
#define IPW_BD_FLAG_TYPE_802_3 0x00
|
|
||||||
#define IPW_BD_FLAG_NOT_LAST_FRAGMENT 0x01
|
|
||||||
#define IPW_BD_FLAG_COMMAND 0x02
|
|
||||||
#define IPW_BD_FLAG_TYPE_802_11 0x04
|
|
||||||
#define IPW_BD_FLAG_INTERRUPT 0x08
|
|
||||||
|
|
||||||
// status descriptor
|
|
||||||
struct ipw_status {
|
|
||||||
uint32 length;
|
|
||||||
uint16 code;
|
|
||||||
uint8 flags;
|
|
||||||
uint8 rssi; // received signal strength indicator
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
#define IPW_STATUS_CODE_COMMAND 0
|
|
||||||
#define IPW_STATUS_CODE_STATUS 1
|
|
||||||
#define IPW_STATUS_CODE_DATA_802_11 2
|
|
||||||
#define IPW_STATUS_CODE_DATA_802_3 3
|
|
||||||
#define IPW_STATUS_CODE_NOTIFICATION 4
|
|
||||||
#define IPW_STATUS_CODE_MASK 0x0f
|
|
||||||
|
|
||||||
#define IPW_STATUS_FLAG_DECRYPTED 0x01
|
|
||||||
#define IPW_STATUS_FLAG_WEP_ENCRYPTED 0x02
|
|
||||||
|
|
||||||
// adapter states
|
|
||||||
#define IPW_STATE_INITIALIZED 0x00000001
|
|
||||||
#define IPW_STATE_COUNTRY_FOUND 0x00000002
|
|
||||||
#define IPW_STATE_ASSOCIATED 0x00000004
|
|
||||||
#define IPW_STATE_ASSOCIATION_LOST 0x00000008
|
|
||||||
#define IPW_STATE_ASSOCIATION_CHANGED 0x00000010
|
|
||||||
#define IPW_STATE_SCAN_COMPLETE 0x00000020
|
|
||||||
#define IPW_STATE_PSP_ENTERED 0x00000040
|
|
||||||
#define IPW_STATE_PSP_LEFT 0x00000080
|
|
||||||
#define IPW_STATE_RF_KILL 0x00000100
|
|
||||||
#define IPW_STATE_DISABLED 0x00000200
|
|
||||||
#define IPW_STATE_POWER_DOWN 0x00000400
|
|
||||||
#define IPW_STATE_SCANNING 0x00000800
|
|
||||||
|
|
||||||
// data descriptor
|
|
||||||
struct ipw_data {
|
|
||||||
uint32 command;
|
|
||||||
uint32 unused;
|
|
||||||
uint8 encrypted;
|
|
||||||
uint8 needs_encryption;
|
|
||||||
uint8 key_index;
|
|
||||||
uint8 key_size;
|
|
||||||
uint8 key[16];
|
|
||||||
uint8 reserved[10];
|
|
||||||
uint8 source_address[6];
|
|
||||||
uint8 dest_address[6];
|
|
||||||
uint16 fragment_size;
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
// data holders
|
|
||||||
struct ipw_tx {
|
|
||||||
uint8 data[2500];
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
struct ipw_rx {
|
|
||||||
uint8 data[2500];
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
// command descriptor
|
|
||||||
struct ipw_command {
|
|
||||||
uint32 command;
|
|
||||||
uint64 unused;
|
|
||||||
uint32 length;
|
|
||||||
uint8 data[400];
|
|
||||||
uint32 status;
|
|
||||||
uint8 reserved[68];
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
#define IPW_COMMAND_ENABLE 2
|
|
||||||
#define IPW_COMMAND_SET_CONFIGURATION 6
|
|
||||||
#define IPW_COMMAND_SET_ESSID 8
|
|
||||||
#define IPW_COMMAND_SET_MANDATORY_BSSID 9
|
|
||||||
#define IPW_COMMAND_SET_MAC_ADDRESS 11
|
|
||||||
#define IPW_COMMAND_SET_MODE 12
|
|
||||||
#define IPW_COMMAND_SET_CHANNEL 14
|
|
||||||
#define IPW_COMMAND_SET_RTS_THRESHOLD 15
|
|
||||||
#define IPW_COMMAND_SET_FRAG_THRESHOLD 16
|
|
||||||
#define IPW_COMMAND_SET_POWER_MODE 17
|
|
||||||
#define IPW_COMMAND_SET_TX_RATES 18
|
|
||||||
#define IPW_COMMAND_SET_BASIC_TX_RATES 19
|
|
||||||
#define IPW_COMMAND_SET_WEP_KEY 20
|
|
||||||
#define IPW_COMMAND_SET_WEP_KEY_INDEX 25
|
|
||||||
#define IPW_COMMAND_SET_WEP_FLAGS 26
|
|
||||||
#define IPW_COMMAND_ADD_MULTICAST 27
|
|
||||||
#define IPW_COMMAND_SET_BEACON_INTERVAL 29
|
|
||||||
#define IPW_COMMAND_SEND_DATA 33
|
|
||||||
#define IPW_COMMAND_SET_TX_POWER_INDEX 36
|
|
||||||
#define IPW_COMMAND_BROADCAST_SCAN 43
|
|
||||||
#define IPW_COMMAND_DISABLE 44
|
|
||||||
#define IPW_COMMAND_SET_DESIRED_BSSID 45
|
|
||||||
#define IPW_COMMAND_SET_SCAN_OPTIONS 46
|
|
||||||
#define IPW_COMMAND_PREPARE_POWER_DOWN 58
|
|
||||||
#define IPW_COMMAND_DISABLE_PHY 61
|
|
||||||
#define IPW_COMMAND_SET_MSDU_TX_RATES 62
|
|
||||||
#define IPW_COMMAND_SET_SECURITY_INFO 67
|
|
||||||
#define IPW_COMMAND_SET_WPA_IE 69
|
|
||||||
|
|
||||||
// values for IPW_COMMAND_SET_POWER_MODE
|
|
||||||
#define IPW_POWER_MODE_CAM 0
|
|
||||||
#define IPW_POWER_MODE_AUTOMATIC 6
|
|
||||||
|
|
||||||
// values for IPW_COMMAND_SET_MODE
|
|
||||||
#define IPW_MODE_BSS 1
|
|
||||||
#define IPW_MODE_MONITOR 2
|
|
||||||
#define IPW_MODE_IBSS 3
|
|
||||||
|
|
||||||
// values for IPW_COMMAND_SET_WEP_FLAGS
|
|
||||||
#define IPW_WEP_FLAGS_HW_DECRYPT 0x00000001
|
|
||||||
#define IPW_WEP_FLAGS_HW_ENCRYPT 0x00000008
|
|
||||||
|
|
||||||
// structure for IPW_COMMAND_SET_WEP_KEY
|
|
||||||
struct ipw_wep_key {
|
|
||||||
uint8 index;
|
|
||||||
uint8 length;
|
|
||||||
uint8 key[13];
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
// structure for IPW_COMMAND_SET_SECURITY_INFO
|
|
||||||
struct ipw_security {
|
|
||||||
uint32 ciphers;
|
|
||||||
uint16 reserved1;
|
|
||||||
uint8 auth_mode;
|
|
||||||
uint16 reserved2;
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
#define IPW_CIPHER_NONE 0x00000001
|
|
||||||
#define IPW_CIPHER_WEP40 0x00000002
|
|
||||||
#define IPW_CIPHER_TKIP 0x00000004
|
|
||||||
#define IPW_CIPHER_CCMP 0x00000010
|
|
||||||
#define IPW_CIPHER_WEP104 0x00000020
|
|
||||||
#define IPW_CIPHER_CKIP 0x00000040
|
|
||||||
|
|
||||||
#define IPW_AUTH_MODE_OPEN 0
|
|
||||||
#define IPW_AUTH_MODE_SHARED 1
|
|
||||||
|
|
||||||
// structure for IPW_COMMAND_SET_SCAN_OPTIONS
|
|
||||||
struct ipw_scan_options {
|
|
||||||
uint32 flags;
|
|
||||||
uint32 channels;
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
#define IPW_SCAN_DO_NOT_ASSOCIATE 0x00000001
|
|
||||||
#define IPW_SCAN_MIXED_CELL 0x00000002
|
|
||||||
#define IPW_SCAN_PASSIVE 0x00000008
|
|
||||||
|
|
||||||
// structure for IPW_COMMAND_SET_CONFIGURATION
|
|
||||||
struct ipw_configuration {
|
|
||||||
uint32 flags;
|
|
||||||
uint32 bss_channel_mask;
|
|
||||||
uint32 ibss_channel_mask;
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
#define IPW_CONFIG_PROMISCUOUS 0x00000004
|
|
||||||
#define IPW_CONFIG_PREAMBLE_AUTO 0x00000010
|
|
||||||
#define IPW_CONFIG_IBSS_AUTO_START 0x00000020
|
|
||||||
#define IPW_CONFIG_802_1X_ENABLE 0x00004000
|
|
||||||
#define IPW_CONFIG_BSS_MASK 0x00008000
|
|
||||||
#define IPW_CONFIG_IBSS_MASK 0x00010000
|
|
||||||
|
|
||||||
// default values
|
|
||||||
#define IPW_BSS_CHANNEL_MASK 0x000003fff
|
|
||||||
#define IPW_IBSS_CHANNEL_MASK 0x0000087ff
|
|
||||||
#define IPW_DEFAULT_BEACON_INTERVAL 100
|
|
||||||
#define IPW_DEFAULT_TX_POWER 32
|
|
||||||
|
|
||||||
// structure for IPW_COMMAND_SET_WPA_IE
|
|
||||||
struct wpa_ie {
|
|
||||||
uint8 id;
|
|
||||||
uint8 length;
|
|
||||||
uint8 oui[3];
|
|
||||||
uint8 oui_type;
|
|
||||||
uint16 version;
|
|
||||||
uint32 multicast_cipher;
|
|
||||||
uint16 unicast_cipher_count;
|
|
||||||
uint32 unicast_ciphers[8];
|
|
||||||
uint16 auth_selector_count;
|
|
||||||
uint32 auth_selectors[8];
|
|
||||||
uint16 capabilities;
|
|
||||||
uint16 pmkid_count;
|
|
||||||
uint16 pmkids[8];
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
struct ipw_wpa_ie {
|
|
||||||
uint16 mask;
|
|
||||||
uint16 capability_info;
|
|
||||||
uint16 lintval;
|
|
||||||
uint8 bssid[6];
|
|
||||||
uint32 length;
|
|
||||||
wpa_ie wpa;
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
// bitmask for IPW_COMMAND_SET_[BASIC|MSDU]_TX_RATES
|
|
||||||
#define IPW_TX_RATE_1_MBIT 0x00000001
|
|
||||||
#define IPW_TX_RATE_2_MBIT 0x00000002
|
|
||||||
#define IPW_TX_RATE_5_5_MBIT 0x00000004
|
|
||||||
#define IPW_TX_RATE_11_MBIT 0x00000008
|
|
||||||
#define IPW_TX_RATE_ALL 0x0000000f
|
|
||||||
|
|
||||||
// values for IPW_COMMAND_SET_RTS_THRESHOLD
|
|
||||||
#define IPW_RTS_THRESHOLD_MIN 1
|
|
||||||
#define IPW_RTS_THRESHOLD_MAX 2304
|
|
||||||
#define IPW_RTS_THRESHOLD_DEFAULT 1000
|
|
||||||
|
|
||||||
// buffers
|
|
||||||
#define IPW_TX_BUFFER_COUNT 128
|
|
||||||
#define IPW_TX_BUFFER_SIZE (IPW_TX_BUFFER_COUNT * sizeof(ipw_bd))
|
|
||||||
#define IPW_TX_PACKET_SIZE (IPW_TX_BUFFER_COUNT * sizeof(ipw_tx))
|
|
||||||
#define IPW_RX_BUFFER_COUNT 128
|
|
||||||
#define IPW_RX_BUFFER_SIZE (IPW_RX_BUFFER_COUNT * sizeof(ipw_bd))
|
|
||||||
#define IPW_RX_PACKET_SIZE (IPW_RX_BUFFER_COUNT * sizeof(ipw_rx))
|
|
||||||
#define IPW_STATUS_BUFFER_COUNT IPW_RX_BUFFER_COUNT
|
|
||||||
#define IPW_STATUS_BUFFER_SIZE (IPW_STATUS_BUFFER_COUNT * sizeof(ipw_status))
|
|
||||||
|
|
||||||
// registers
|
|
||||||
#define IPW_REG_INTERRUPT 0x0008
|
|
||||||
#define IPW_REG_INTERRUPT_MASK 0x000c
|
|
||||||
#define IPW_REG_INDIRECT_ADDRESS 0x0010
|
|
||||||
#define IPW_REG_INDIRECT_DATA 0x0014
|
|
||||||
#define IPW_REG_RESET 0x0020
|
|
||||||
#define IPW_REG_CONTROL 0x0024
|
|
||||||
#define IPW_REG_IO 0x0030
|
|
||||||
#define IPW_REG_DEBUG 0x0090
|
|
||||||
#define IPW_REG_TX_BASE 0x0200
|
|
||||||
#define IPW_REG_TX_SIZE 0x0204
|
|
||||||
#define IPW_REG_TX_READ 0x0280
|
|
||||||
#define IPW_REG_TX_WRITE 0x0f80
|
|
||||||
#define IPW_REG_RX_BASE 0x0240
|
|
||||||
#define IPW_REG_RX_SIZE 0x0248
|
|
||||||
#define IPW_REG_RX_READ 0x02a0
|
|
||||||
#define IPW_REG_RX_WRITE 0x0fa0
|
|
||||||
#define IPW_REG_STATUS_BASE 0x0244
|
|
||||||
|
|
||||||
#define IPW_INDIRECT_ADDRESS_MASK 0x00fffffc
|
|
||||||
|
|
||||||
// flags for IPW_REG_INTERRUPT(_MASK)
|
|
||||||
#define IPW_INTERRUPT_TX_TRANSFER 0x00000001
|
|
||||||
#define IPW_INTERRUPT_RX_TRANSFER 0x00000002
|
|
||||||
#define IPW_INTERRUPT_STATUS_CHANGE 0x00000010
|
|
||||||
#define IPW_INTERRUPT_COMMAND_DONE 0x00010000
|
|
||||||
#define IPW_INTERRUPT_FW_INIT_DONE 0x01000000
|
|
||||||
#define IPW_INTERRUPT_FATAL_ERROR 0x40000000
|
|
||||||
#define IPW_INTERRUPT_PARITY_ERROR 0x80000000
|
|
||||||
|
|
||||||
// flags for IPW_REG_RESET
|
|
||||||
#define IPW_RESET_PRINCETON_RESET 0x00000001
|
|
||||||
#define IPW_RESET_SW_RESET 0x00000080
|
|
||||||
#define IPW_RESET_MASTER_DISABLED 0x00000100
|
|
||||||
#define IPW_RESET_STOP_MASTER 0x00000200
|
|
||||||
|
|
||||||
// flags for IPW_REG_CONTROL
|
|
||||||
#define IPW_CONTROL_CLOCK_READY 0x00000001
|
|
||||||
#define IPW_CONTROL_ALLOW_STANDBY 0x00000002
|
|
||||||
#define IPW_CONTROL_INIT_COMPLETE 0x00000004
|
|
||||||
|
|
||||||
// flags for IPW_REG_IO
|
|
||||||
#define IPW_IO_GPIO1_ENABLE 0x00000008
|
|
||||||
#define IPW_IO_GPIO1_MASK 0x0000000c
|
|
||||||
#define IPW_IO_GPIO3_MASK 0x000000c0
|
|
||||||
#define IPW_IO_LED_OFF 0x00002000
|
|
||||||
#define IPW_IO_RADIO_DISABLED 0x00010000
|
|
||||||
|
|
||||||
// the value at the debug register base is always
|
|
||||||
// the magic data value. used to verify register access.
|
|
||||||
#define IPW_DEBUG_DATA 0xd55555d5
|
|
||||||
|
|
||||||
// shared memory
|
|
||||||
#define IPW_SHARED_MEMORY_BASE_0 0x0002f200
|
|
||||||
#define IPW_SHARED_MEMORY_LENGTH_0 784
|
|
||||||
#define IPW_SHARED_MEMORY_BASE_1 0x0002f610
|
|
||||||
#define IPW_SHARED_MEMORY_LENGTH_1 32
|
|
||||||
#define IPW_SHARED_MEMORY_BASE_2 0x0002fa00
|
|
||||||
#define IPW_SHARED_MEMORY_LENGTH_2 32
|
|
||||||
#define IPW_SHARED_MEMORY_BASE_3 0x0002fc00
|
|
||||||
#define IPW_SHARED_MEMORY_LENGTH_3 16
|
|
||||||
#define IPW_INTERRUPT_MEMORY_BASE 0x0002ff80
|
|
||||||
#define IPW_INTERRUPT_MEMORY_LENGTH 128
|
|
||||||
|
|
||||||
// ordinal tables
|
|
||||||
#define IPW_ORDINAL_TABLE_1_ADDRESS 0x00000380
|
|
||||||
#define IPW_ORDINAL_TABLE_2_ADDRESS 0x00000384
|
|
||||||
#define IPW_ORDINAL_TABLE_1_START 1
|
|
||||||
#define IPW_ORDINAL_TABLE_2_START 1000
|
|
||||||
|
|
||||||
enum ipw_ordinal_table_1 {
|
|
||||||
IPW_ORD_FIRMWARE_DB_LOCK = 120,
|
|
||||||
IPW_ORD_CARD_DISABLED = 157,
|
|
||||||
IPW_ORD_GET_AP_BSSID = 1014,
|
|
||||||
};
|
|
||||||
|
|
||||||
// firmware db lock
|
|
||||||
#define IPW_FIRMWARE_LOCK_NONE 0
|
|
||||||
#define IPW_FIRMWARE_LOCK_DRIVER 1
|
|
||||||
#define IPW_FIRMWARE_LOCK_FIRMWARE 2
|
|
||||||
|
|
||||||
// firmware binary image header
|
|
||||||
struct ipw_firmware_header {
|
|
||||||
uint16 version;
|
|
||||||
uint16 mode;
|
|
||||||
uint32 main_size;
|
|
||||||
uint32 ucode_size;
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
// symbol alive response to check microcode
|
|
||||||
struct symbol_alive_response {
|
|
||||||
uint8 command_id;
|
|
||||||
uint8 sequence_number;
|
|
||||||
uint8 microcode_revision;
|
|
||||||
uint8 eeprom_valid;
|
|
||||||
uint16 valid_flags;
|
|
||||||
uint8 ieee_address[6];
|
|
||||||
uint16 flags;
|
|
||||||
uint16 pcb_revision;
|
|
||||||
uint16 clock_settle_time;
|
|
||||||
uint16 powerup_settle_time;
|
|
||||||
uint16 hop_settle_time;
|
|
||||||
uint8 date[3];
|
|
||||||
uint8 time[2];
|
|
||||||
uint8 microcode_valid;
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
#endif // _IPW2100_HW_H_
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
void
|
|
||||||
__throw()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#ifndef _KERNEL_CPP_H_
|
|
||||||
#define _KERNEL_CPP_H_
|
|
||||||
|
|
||||||
#include <malloc.h>
|
|
||||||
|
|
||||||
inline void *
|
|
||||||
operator new(size_t size)
|
|
||||||
{
|
|
||||||
return malloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline void *
|
|
||||||
operator new[](size_t size)
|
|
||||||
{
|
|
||||||
return malloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline void
|
|
||||||
operator delete(void *pointer)
|
|
||||||
{
|
|
||||||
free(pointer);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline void
|
|
||||||
operator delete[](void *pointer)
|
|
||||||
{
|
|
||||||
free(pointer);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline void
|
|
||||||
terminate(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // _KERNEL_CPP_H_
|
|
||||||
Reference in New Issue
Block a user