[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1316128857-9781-2-git-send-email-kilroyd@googlemail.com>
Date: Fri, 16 Sep 2011 00:20:45 +0100
From: David Kilroy <kilroyd@...glemail.com>
To: linux-kernel@...r.kernel.org, greg@...ah.com
Cc: pe1dnn@...at.org, David Kilroy <kilroyd@...glemail.com>
Subject: [PATCH 01/13] staging: wlags49_h2: Remove non-linux configurations
For now just remove from hcfcfg.h, we will slowly remove the unused
configurations as we go
Signed-off-by: David Kilroy <kilroyd@...glemail.com>
---
drivers/staging/wlags49_h2/hcfcfg.h | 1524 -----------------------------------
1 files changed, 0 insertions(+), 1524 deletions(-)
diff --git a/drivers/staging/wlags49_h2/hcfcfg.h b/drivers/staging/wlags49_h2/hcfcfg.h
index 83475b1..32db381 100644
--- a/drivers/staging/wlags49_h2/hcfcfg.h
+++ b/drivers/staging/wlags49_h2/hcfcfg.h
@@ -300,493 +300,6 @@ typedef unsigned long hcf_32;
#define HCF_TALLIES_HCF 0x0002 // HCF Tallies accumulated in IFB
#define HCF_TALLIES_RESET 0x8000 // Tallies in IFB are reset when reported via hcf_get_info
-
-/************************************************************************************************/
-/****************************** M I N I P O R T N D I S *************************************/
-/************************************************************************************************/
-
-#if defined WVLAN_41 || defined WVLAN_48 || defined WVLAN_52 || defined _WIN32_WCE
-
-#ifndef WVLAN_46
-#define HCF_EXT (HCF_EXT_INFO_LOG | HCF_EXT_MB | HCF_EXT_NIC_ACCESS )
-#else
-#define HCF_EXT ( HCF_EXT_TX_CONT | HCF_EXT_INFO_LOG | HCF_EXT_MB | HCF_EXT_NIC_ACCESS )
-#endif
-#define HCF_DLV 1 //H-I legacy, superfluous for H-II
-
-#ifdef _WIN32_WCE
-#define HCF_IO HCF_IO_MEM
-#define HCF_DMA 0 // To enable DMA
-#endif
-
-#if _VARIANT == 7
-#define HCF_SLEEP HCF_CDS
-#endif // _VARIANT == 7
-
-#if _VARIANT == 5 || _VARIANT == 6
-#define _WARP
-#define _AES
-#define HCF_SLEEP HCF_CDS
-#if _VARIANT == 6
-//! #define _RSN
-#endif // _VARIANT == 6
-#ifndef _WIN32_WCE
-#define HCF_IO HCF_IO_32BITS
-#define HCF_DMA 1 // To enable DMA
-#endif
-#endif // _VARIANT == 5 || _VARIANT == 6
-
-
-//HWi for migration purposes I defined a define which will be TRUE for ALL drivers
-//Meaning that _CCX defined code which we think will get a all driver OK flag can be defined from _CCX to _CCX_OK
-#if defined WVLAN_48 // && !defined _WIN32_WCE
-#if _VARIANT == 4 || _VARIANT == 6
-#define _CCX_OK 1
-#endif // _VARIANT == 4 || _VARIANT == 6
-#endif // WVLAN_48
-
-//#if !defined WVLAN_46
-#if defined WVLAN_48
-#if _VARIANT == 4 || _VARIANT == 6
-#define _CCX
-#define HCF_MAX_MSG_CKIP_PADDING 86 //, use 86 for rx fragmentation. 28 is enuf for MIC+PPK encapsulation
-#define HCF_MAX_MSG ( 1514 + HCF_MAX_MSG_CKIP_PADDING ) // need extra padding for CKIP (need to subtract 28 for NDIS)
-#endif // _VARIANT == 4 || _VARIANT == 6
-#endif // WVLAN_48
-//#endif // WVLAN_46
-
-#if !defined WVLAN_46
-#define _PEEK
-#endif
-
-#ifndef _WIN32_WCE
-// ASSERT already used by WinCE...
-#ifdef ASSERT
-#undef ASSERT
-#define ASSERT(x) ASSERTDEBUGMSG((x), (TEXT("SIMULATE ASSERT:")))
-#endif
-#endif
-
-
-#if defined WVLAN_41
-#define MSF_COMPONENT_ID COMP_ID_MINIPORT_NDIS_31
-#endif // WVLAN_41
-#if defined WVLAN_48 && !defined _WIN32_WCE
-#define MSF_COMPONENT_ID COMP_ID_MINIPORT_NDIS_50
-#endif // WVLAN_48 / _WIN32_WCE
-#if defined WVLAN_52 && !defined _WIN32_WCE
-#define MSF_COMPONENT_ID COMP_ID_MINIPORT_NDIS_40
-#endif // WVLAN_52 / _WIN32_WCE
-#if defined WVLAN_46
-#define MSF_COMPONENT_ID COMP_ID_WIN_CE
-#endif // _WIN32_WCE
-
-#define MSF_COMPONENT_VAR _VARIANT
-
-#define T1__HCF_TYPE (HCF_TYPE_NONE)
-
-#define T2__HCF_TYPE (T1__HCF_TYPE)
-
-#ifdef _WARP
-#define T3__HCF_TYPE (T2__HCF_TYPE | HCF_TYPE_HII5 | HCF_TYPE_WARP )
-#else
-#if _VARIANT == 7
-#define T3__HCF_TYPE (T2__HCF_TYPE | HCF_TYPE_HII5)
-#else // _VARIANT == 7
-#define T3__HCF_TYPE (T2__HCF_TYPE)
-#endif // _VARIANT == 7
-#endif // _WARP
-
-#ifdef _CCX_OK
-#define T4__HCF_TYPE (T3__HCF_TYPE | HCF_TYPE_CCX)
-#else
-#define T4__HCF_TYPE (T3__HCF_TYPE)
-#endif // _CCX_OK
-
-//not suitable for H-II #define HCF_CFG_STA_1_BOTTOM 16
-
-// Default WPA in ON for all drivers except for WARP driver
-#ifdef _WARP
-#define T5__HCF_TYPE (T4__HCF_TYPE)
-#else // _WARP
-#define T5__HCF_TYPE (T4__HCF_TYPE | HCF_TYPE_WPA)
-#endif // _WARP
-
-#define HCF_TYPE (T5__HCF_TYPE)
-
-// This is needed to get aux_ctrl() from the HCF for WlFreezeAndDump()
-#if (defined DBG && DBG != 0)
-#ifndef STATIC
-#define STATIC
-#endif
-#endif
-
-#if !defined SOFTRONICS_CODE && !defined _APIDLL && !defined _WIN32_WCE
-#include <ndis.h>
-#endif // SOFTRONICS_CODE / _APIDLL / _WIN32_WCE
-#if defined _WIN32_WCE
-#include <windows.h>
-#include <winnt.h>
-#endif // _WIN32_WCE
-#include "version.h"
-
-#define MSF_COMPONENT_MAJOR_VER TPI_MAJOR_VERSION
-#define MSF_COMPONENT_MINOR_VER TPI_MINOR_VERSION
-
-#if !defined _APIDLL && !defined _WIN32_WCE
-
-__inline UCHAR NDIS_IN_BYTE( ULONG port )
-{
- UCHAR value;
- NdisRawReadPortUchar(port , &value);
- return (value);
-}
-
-__inline ULONG NDIS_IN_LONG( ULONG port )
-{
- ULONG value;
- NdisRawReadPortUlong(port , &value);
- return (value);
-}
-__inline USHORT NDIS_IN_WORD( ULONG port )
-{
- USHORT value;
- NdisRawReadPortUshort(port , &value);
- return (value);
-}
-
-#define IN_PORT_DWORD(port) NDIS_IN_LONG( (ULONG) (port) )
-#define IN_PORT_WORD(port) NDIS_IN_WORD( (ULONG) (port) )
-#define OUT_PORT_DWORD(port, value) NdisRawWritePortUlong((ULONG) (port) , value)
-#define OUT_PORT_WORD(port, value) NdisRawWritePortUshort((ULONG) (port) , (USHORT) (value))
-
-#define IN_PORT_STRING_8_16(port, addr, len) IN_PORT_STRING_16(port, addr, len)
-#define OUT_PORT_STRING_8_16(port, addr, len) OUT_PORT_STRING_16(port, addr, len)
-
-#define IN_PORT_STRING_32(port, addr, len) { \
- NdisRawReadPortBufferUlong(port, addr, (len)); \
-}
-
-#define OUT_PORT_STRING_32(port, addr, len) { \
- NdisRawWritePortBufferUlong(port, addr, (len)); \
-}
-
-#define IN_PORT_STRING_16(port, addr, len) NdisRawReadPortBufferUshort(port, addr, (len));
-#define OUT_PORT_STRING_16(port, addr, len) NdisRawWritePortBufferUshort(port, addr, (len));
-
-#endif // _APIDLL / _WIN32_WCE
-
-#if defined _WIN32_WCE
-
-#define HCF_ALIGN 2
-#define HCF_MEM_IO 1 // overrule standard Port I/O with Memory mapped I/O
-#define HCF_PROT_TIME 49
-
-#define IN_PORT_BYTE CE_IN_PORT_BYTE
-#define OUT_PORT_BYTE CE_OUT_PORT_BYTE
-#define IN_PORT_WORD CE_IN_PORT_WORD
-#define OUT_PORT_WORD CE_OUT_PORT_WORD
-#define IN_PORT_STRING_16 CE_IN_PORT_STRING
-#define OUT_PORT_STRING_16 CE_OUT_PORT_STRING
-
-extern hcf_8 CE_IN_PORT_BYTE(hcf_32 port);
-extern void CE_OUT_PORT_BYTE(hcf_32 port, hcf_8 value);
-extern hcf_16 CE_IN_PORT_WORD(hcf_32 port);
-extern void CE_OUT_PORT_WORD(hcf_32 port, hcf_16 value);
-extern void CE_IN_PORT_STRING(hcf_32 port, void *addr, hcf_16 len);
-extern void CE_OUT_PORT_STRING(hcf_32 port, void *addr, hcf_16 len);
-
-
-#endif
-
-#if defined _DEBUG || (defined DBG && DBG != 0)
-#define HCF_ASSERT ( HCF_ASSERT_LNK_MSF_RTN | HCF_ASSERT_RT_MSF_RTN | HCF_ASSERT_PRINTF ) //0xC001
-//#define HCF_ASSERT ( HCF_ASSERT_LNK_MSF_RTN | HCF_ASSERT_RT_MSF_RTN | HCF_ASSERT_PRINTF | HCF_ASSERT_MB ) //just to test
-#endif // _DEBUG || DBG
-
-#if defined DEBUG || defined _DEBUG || (defined DBG && DBG != 0)
-#ifdef _WIN32_WCE
-#define DBGA2W(DBGSTR) CeConvertAnsiToUnicodeLen((char*)DBGSTR)
-#define OUTPUTDEBUGMSG(dprintf_exp) ((void)((! ZONE_DEBUG) ? 0:ce_debug_out dprintf_exp))
-#define ASSERTDEBUGMSG(cond, dprintf_exp) ((void)((cond) ? 0:ce_debug_out dprintf_exp))
-
-#define ZONE_ERROR DEBUGZONE(0)
-#define ZONE_WARN DEBUGZONE(1)
-#define ZONE_FUNCTION DEBUGZONE(2)
-#define ZONE_INIT DEBUGZONE(3)
-#define ZONE_INTR DEBUGZONE(4)
-#define ZONE_RCV DEBUGZONE(5)
-#define ZONE_XMIT DEBUGZONE(6)
-#define ZONE_ASSERT DEBUGZONE(7)
-#define ZONE_DEBUG DEBUGZONE(8)
-#define ZONE_OEM DEBUGZONE(9)
-#define ZONE_HCF DEBUGZONE(10)
-#define ZONE_PORTIO DEBUGZONE(11)
-#define ZONE_LOGTOFILE DEBUGZONE(15)
-
-#else // !(_WIN32_WCE)
-
-#define OUTPUTDEBUGMSG(dprintf_exp) ((void) (DbgPrint dprintf_exp))
-// the assertdebugmsg macro will print filename, line followed by a caller-defined text, when cond == 0
-#define ASSERTDEBUGMSG(cond, print) ((void)((cond) ? 0: (DbgPrint("%s %s:%d - ", print, __FILE__, __LINE__))))
-
-#define ZONE_ERROR 1
-#define ZONE_WARN 1
-#define ZONE_FUNCTION 1
-#define ZONE_INIT 1
-#define ZONE_INTR 1
-#define ZONE_RCV 1
-#define ZONE_XMIT 1
-#define ZONE_ASSERT 1
-#define ZONE_DEBUG 1
-#define ZONE_OEM 1
-#define ZONE_HCF 1
-#define ZONE_PORTIO 1
-#define ZONE_LOGTOFILE 1
-
-#endif // _WIN32_WCE
-#ifndef DBGA2W
-#define DBGA2W
-#endif // DBGA2W
-
-#else // !(defined DEBUG || defined _DEBUG || (defined DBG && DBG != 0) )
-#define OUTPUTDEBUGMSG(dprintf_exp)
-#define ASSERTDEBUGMSG(cond, dprintf_exp)
-#endif // DEBUG / DBG
-
-#if !defined HCF_MAX_MSG_CKIP_PADDING
-#define HCF_MAX_MSG_CKIP_PADDING 0
-#endif // HCF_MAX_MSG_CKIP_PADDING
-
-#if !defined HCF_MAX_MSG
-#define HCF_MAX_MSG 1514
-#endif // HCF_MAX_MSG
-
-#define HCF_LEGACY 1 //;?nv je moet wat
-
-#endif //WVLAN_41 / WVLAN_48 / WVLAN_52 / _WIN32_WCE
-
-
-/************************************************************************************************/
-/**************************** P A C K E T D R I V E R ***************************************/
-/********************************** D O S O D I *********************************************/
-/************************************************************************************************/
-
-#if defined WVLAN_42 || defined WVLAN_43
-
-#pragma warning ( disable: 4001 )
-#define FAR __far //segmented 16 bits mode
-#define BASED __based(__segname("_CODE")) //force all the "const" structures in the CODE segment
-
-//#define HCF_IO 0 //no DMA, no 32 bits
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To ease testing the different options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-#define HCF_EXT HCF_EXT_MB
-#define HCF_PROT_TIME 49 //49*10240 microseconds H/W failure protection timer
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To ease testing the different options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-/******************************** CONFIGURATION MANAGEMENT *****************************************/
-#ifdef WVLAN_42
-#define MSF_COMPONENT_ID COMP_ID_PACKET
-#define MSF_COMPONENT_VAR 1
-#define MSF_COMPONENT_MAJOR_VER 6
-#define MSF_COMPONENT_MINOR_VER 12
-#endif // WVLAN_42
-
-#ifdef WVLAN_43
-#define MSF_COMPONENT_ID COMP_ID_ODI_16
-#define MSF_COMPONENT_VAR 1
-#define MSF_COMPONENT_MAJOR_VER 6
-#define MSF_COMPONENT_MINOR_VER 10
-#endif // WVLAN_43
-
-/************************************** INPUT / OUTPUT **********************************************/
-#ifndef H_2_INC
-#include <stdio.h>
-#include <conio.h>
-#if 1 //temorary use functions defined in hcf.c
-#ifndef _DEBUG
-#pragma intrinsic( _inp, _inpw, _outp, _outpw )
-#endif // _DEBUG
-
-#define IN_PORT_WORD(port) ((hcf_16)_inpw( (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value) ((void)_outpw( (hcf_io)(port), value ))
-
-#if 1 // C implementation which let the processor handle the word-at-byte-boundary problem
-#define IN_PORT_STRING_8_16( port, addr, n) while (n--) \
- { *(hcf_16 FAR*)addr = IN_PORT_WORD( port ); ((hcf_8 FAR*)addr)+=2; }
-#define OUT_PORT_STRING_8_16( port, addr, n) while (n--) \
- { OUT_PORT_WORD( port, *(hcf_16 FAR*)addr ) ; ((hcf_8 FAR*)addr)+=2; }
-#elif 0 // C implementation which handles the word-at-byte-boundary problem
-#define IN_PORT_STRING_8_16( port, addr, n) while ( n-- ) \
- { hcf_16 i = IN_PORT_WORD(port); *((hcf_8 FAR*)addr)++ = (hcf_8)i; *((hcf_8 FAR*)addr)++ = (hcf_8)(i>>8);}
-#define OUT_PORT_STRING_8_16( port, addr, n) while ( n-- ) \
- { OUT_PORT_WORD( port, *((hcf_8 FAR*)addr) | *(((hcf_8 FAR*)addr)+1)<<8 ); (hcf_8 FAR*)addr+=2; }
-#else // Assembler implementation
-#define IN_PORT_STRING_8_16( port, addr, n) __asm \
-{ \
- __asm push di \
- __asm push es \
- __asm mov cx,n \
- __asm les di,addr \
- __asm mov dx,port \
- __asm rep insw \
- __asm pop es \
- __asm pop di \
-}
-
-#define OUT_PORT_STRING_8_16( port, addr, n) __asm \
-{ \
- __asm push si \
- __asm push ds \
- __asm mov cx,n \
- __asm lds si,addr \
- __asm mov dx,port \
- __asm rep outsw \
- __asm pop ds \
- __asm pop si \
-}
-
-#endif // Asm or C implementation
-#define IN_PORT_STRING_32( port, addr, n) { int n2 = 2*n; IN_PORT_STRING_8_16(port, addr, n2) }
-#define OUT_PORT_STRING_32( port, addr, n) { int n2 = 2*n; OUT_PORT_STRING_8_16(port, addr, n2) }
-#endif // 0 //temorary use functions defined in hcf.c
-#endif // H_2_INC
-
-#endif // WVLAN_42 / WVLAN_43
-
-
-
-/************************************************************************************************/
-/**************************** D O S H - I / II L O A D E R **********************************/
-/************************************************************************************************/
-
-#if defined H0_LDR || defined H1_LDR || defined H2_LDR || defined H5_LDR
-
-#if defined H0_LDR //implies H-I
-#define HCF_DLV 0 //H-I legacy, meaningless under H-II
-#define HCF_DLNV 1 //H-I legacy, meaningless under H-II
-#endif // H0_LDR
-
-#if defined H1_LDR //implies H-I
-#define HCF_DLV 1 //H-I legacy, meaningless under H-II
-#define HCF_DLNV 0 //H-I legacy, meaningless under H-II
-#endif // H1_LDR / H2_LDR
-
-//#if defined H2_LDR : not needed, H-II defaults are O.K for H2_LDR
-
-#ifdef H5_LDR
-#define HCF_TYPE (HCF_TYPE_HII5 | HCF_TYPE_WARP )
-//;? why does only this subset of the H_LDRs need HCF_TYPE to be defined here
-#endif
-
-#define HCF_ASSERT HCF_ASSERT_LNK_MSF_RTN //support dynamic linking of msf_assert routine
-#define HCF_ENCAP 0
-#define HCF_INT_ON 0
-#define HCF_TALLIES 0
-
-#define MSF_COMPONENT_ID COMP_ID_ODI_16 //;?By lack of any better
-#define MSF_COMPONENT_VAR 1
-#define MSF_COMPONENT_MAJOR_VER 0
-#define MSF_COMPONENT_MINOR_VER 0
-
-#include <stdio.h>
-#include <conio.h>
-#if defined NDEBUG
-#pragma intrinsic( _inp, _inpw, _outp, _outpw )
-#endif // NDEBUG
-
-#if 0 //use 0 to replace I/O Macros with logging facility
-#define IN_PORT_WORD(port) ((hcf_16)_inpw( (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value) ((void)_outpw( (hcf_io)(port), value ))
-#define IN_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { *(hcf_16 FAR*)addr = IN_PORT_WORD( port ); (cast)addr += 2; }
-#define OUT_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { OUT_PORT_WORD( port, *(hcf_16 FAR*)addr ) ; (cast)addr += 2; }
-#endif //use 0 to replace I/O Macros with logging facility
-
-#endif // H0_LDR / H1_LDR / H2_LDR
-
-
-
-/************************************************************************************************/
-/**************************** H C F D E M O P R O G R A M ***********************************/
-/************************************************************************************************/
-
-#if defined HCF_DEMO
-
-#define HCF_DLV 1 //;?should become the default !defaults to 1 anyway for H-II
-//#define HCF_DLNV 0 //defaults to 0 anyway for H-II
-
-#define HCF_ASSERT HCF_ASSERT_LNK_MSF_RTN //support dynamic linking of msf_assert routine
-
-#define HCF_ENCAP 0
-#define HCF_INT_ON 0
-#define HCF_TALLIES ( HCF_TALLIES_NIC | HCF_TALLIES_HCF )
-
-//#define MSF_COMPONENT_ID NO configuration management
-
-#include <stdio.h>
-#include <conio.h>
-#if defined NDEBUG
-#pragma intrinsic( _inp, _inpw, _outp, _outpw )
-#endif // NDEBUG
-
-#if 0 //use 0 to replace I/O Macros with logging facility
-#define IN_PORT_WORD(port) ((hcf_16)_inpw( (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value) ((void)_outpw( (hcf_io)(port), value ))
-#define IN_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { *(hcf_16 FAR*)addr = IN_PORT_WORD( port ); (cast)addr += 2; }
-#define OUT_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { OUT_PORT_WORD( port, *(hcf_16 FAR*)addr ) ; (cast)addr += 2; }
-#endif //use 0 to replace I/O Macros with logging facility
-
-#endif // HCF_DEMO
-
-
-
-/************************************************************************************************/
-/*********************************** M A C O S **********************************************/
-/************************************************************************************************/
-
-#if defined WVLAN_45
-
-#include "Version.h"
-
-#define MSF_COMPONENT_ID COMP_ID_MAC_OS
-#define MSF_COMPONENT_VAR VARIANT
-#define MSF_COMPONENT_MAJOR_VER VERSION_MAJOR
-#define MSF_COMPONENT_MINOR_VER VERSION_MINOR
-
-#define MAC_OS 1
-
-#define HCF_BIG_ENDIAN 1 // selects Big Endian (a.k.a. Motorola), most significant byte first
-
-#if defined DEBUG
-#define HCF_ASSERT HCF_ASSERT_MB // logging via Mailbox
-#endif // DEBUG
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-extern volatile unsigned char *MacIOaddr;
-extern hcf_16 IN_PORT_WORD(hcf_16 port);
-extern void OUT_PORT_WORD(hcf_16 port, hcf_16 value);
-extern void IN_PORT_STRING_16(hcf_16 port, void *addr, hcf_16 len);
-extern void OUT_PORT_STRING_16(hcf_16 port, void *addr, hcf_16 len);
-
-#define SwapBytes(t) (((t) >> 8) + (((t) & 0xff) << 8))
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-#endif // WVLAN_45
-
-
-
/************************************************************************************************/
/****************************************** L I N U X *****************************************/
/************************************************************************************************/
@@ -951,1043 +464,6 @@ extern void OUT_PORT_STRING_16(hcf_16 port, void *addr, hcf_16 len);
#define HCF_MAX_MSG 1600 //get going ;?
#endif // WVLAN_49
-
-
-/************************************************************************************************/
-/********************************************* Q N X ******************************************/
-/************************************************************************************************/
-
-#if defined __QNX__ || defined WVLAN_50
-
-#define MSF_COMPONENT_ID 0 //Although there is no DUI support, we need this to get ...
-#define MSF_COMPONENT_VAR 0 //...compatibilty check to function
-#define MSF_COMPONENT_MAJOR_VER 0 //...;?this is worth looking into to make this a more
-#define MSF_COMPONENT_MINOR_VER 0 //..."defined" I/F so OEMers can figure out what to do
-
-#include <conio.h>
-
-#define IN_PORT_WORD(port) ((hcf_16)inpw( (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value) (outpw( (hcf_io)(port), (hcf_16) (value) ))
-/*
-#define IN_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { *(hcf_16*)addr = IN_PORT_WORD( port ); (cast)addr += 2; }
-#define OUT_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { OUT_PORT_WORD( port, *(hcf_16*)addr ) ; (cast)addr += 2; }
-*/
-
-#endif // QNX / WVLAN_50
-
-
-
-/************************************************************************************************/
-/********************************************* B E O S ****************************************/
-/************************************************************************************************/
-
-#if defined __BEOS__
-
-#define MSF_COMPONENT_ID 0 //Although there is no DUI support, we need this to get ...
-#define MSF_COMPONENT_VAR 0 //...compatibilty check to function
-#define MSF_COMPONENT_MAJOR_VER 0 //...;?this is worth looking into to make this a more
-#define MSF_COMPONENT_MINOR_VER 0 //..."defined" I/F so OEMers can figure out what to do
-
-#include <drivers/Drivers.h>
-#include <drivers/KernelExport.h>
-
-uint8 read_io_8 (int);
-void write_io_8 (int, uint8);
-uint16 read_io_16 (int);
-void write_io_16 (int, uint16);
-
-#define IN_PORT_WORD(port) ((hcf_16)read_io_16( (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value) (write_io_16( (hcf_io)(port), (hcf_16) (value) ))
-/*
-#define IN_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { *(hcf_16*)addr = IN_PORT_WORD( port ); (cast)addr += 2; }
-#define OUT_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { OUT_PORT_WORD( port, *(hcf_16*)addr ) ; (cast)addr += 2; }
-*/
-#endif // __BEOS__
-
-
-
-/************************************************************************************************/
-/******************************** U S B D O N G L E *****************************************/
-/************************************************************************************************/
-
-#if defined USB
-#include "gpif.h"
-
-#define MSF_COMPONENT_MAJOR_VER 0
-#define MSF_COMPONENT_MINOR_VER 1
-
-#define IN_PORT_WORD(port) (Hermes_IO_Read( (hcf_8)(port)))
-#define OUT_PORT_WORD(port, value) (Hermes_IO_Write( (hcf_8)port, /*(hcf_16)*/(value) ) )
-/* !!!! NOTE USB supports only 16-bits I/O and no 8-bits I/O
- * as a consequence the IN_/OUT_PORT_STRING_16 macros use hcf_16* rather than hcf_8 pointers
- * to get more optimal code
- * therefore the pointers are incremented by 1 (which means two "bytes") rather than by 2
- */
-//#define IN_PORT_STRING_16( port, addr, n) while ( n-- ) { *((hcf_16*)addr)++ = IN_PORT_WORD( port ); }
-//#define OUT_PORT_STRING_16( port, addr, n) while ( n-- ) { OUT_PORT_WORD( port, *((hcf_16*)addr)++ ); }
-#define IN_PORT_STRING_16( port, dst, n) while ( n-- ) { *dst++ = IN_PORT_WORD( port ); }
-#define OUT_PORT_STRING_16( port, src, n) while ( n-- ) { OUT_PORT_WORD( port, *src++ ); }
-
-//#define HCF_TYPE ( HCF_TYPE_AP | HCF_TYPE_WPA )
-#define HCF_TYPE HCF_TYPE_WPA
-
-#endif // USB
-
-
-/************************************************************************************************/
-/****************************************** FreeBSD *******************************************/
-/************************************************************************************************/
-
-#if defined __FREE_BSD__
-
-#define MSF_COMPONENT_ID COMP_ID_FreeBSD
-#define MSF_COMPONENT_VAR 1
-#define MSF_COMPONENT_MAJOR_VER 1
-#define MSF_COMPONENT_MINOR_VER 0
-
-#define HCF_IO HCF_IO_MEM // overrule standard Port I/O with Memory mapped I/O
-
-#include <machine/cpufunc.h>
-
-#define IN_PORT_WORD(port) ((hcf_16)inw( (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value) (outw((hcf_io)(port), (hcf_16)(value)))
-
-/*
-#define IN_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { *(hcf_16*)addr = IN_PORT_WORD( port ); (cast)addr += 2; }
-#define OUT_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { OUT_PORT_WORD( port, *(hcf_16*)addr ) ; (cast)addr += 2; }
-*/
-#endif // __FREE_BSD__
-
-
-
-/************************************************************************************************/
-/********************************* W A V E P O I N T ******************************************/
-/************************************************************************************************/
-
-#if defined WVLAN_81 /* BORLANDC */
-
-#define EXTERN_C extern // needed because DHF uses this instead of 'extern'
-
-#define MSF_COMPONENT_ID COMP_ID_AP1
-#define MSF_COMPONENT_VAR 1
-#define MSF_COMPONENT_MAJOR_VER 4
-#define MSF_COMPONENT_MINOR_VER 0
-
-#define HCF_PROT_TIME 49 //49*10240 microseconds H/W failure protection timer
-
-//#define HCF_ASSERT HCF_ASSERT_MB // logging via Mailbox /* debug build only */
-
-#if !defined FAR
-#define FAR far // segmented 16 bits mode
-#endif // FAR
-
-#define IN_PORT_WORD(port) (inport( (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value) (outport( (hcf_io)(port), value ))
-
-#define IN_PORT_STRING_16(port, addr, len) \
- asm { push di; push es; mov cx,len; les di,addr; mov dx,port; rep insw; pop es; pop di }
-
-#define OUT_PORT_STRING_16(port, addr, len) \
- asm { push si; push ds; mov cx,len; lds si,addr; mov dx,port; rep outsw; pop ds; pop si }
-
-#endif // WVLAN_81
-
-
-/************************************************************************************************/
-/******************************** W A V E L A U N C H *****************************************/
-/************************************************************************************************/
-
-#if defined WVLAUNCH
-
-#include "DriverX.h"
-extern HWDEVICE* g_pDevice;
-
-//#define MSF_COMPONENT_ID 0 //;? to get around browser problem
-
-#define IN_PORT_WORD(port) HwInpw( g_pDevice, port )
-#define OUT_PORT_WORD(port, value) HwOutpw( g_pDevice, port, value )
-
-
-// C implementation which let the processor handle the word-at-byte-boundary problem
-/*
-#define IN_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { *(hcf_16 FAR*)addr = IN_PORT_WORD( port ); (cast)addr += 2; }
-#define OUT_PORT_STRING_16( port, addr, n) \
- while ( n-- ) { OUT_PORT_WORD( port, *(hcf_16 FAR*)addr ) ; (cast)addr += 2; }
-*/
-#endif // WVLAUNCH
-
-
-
-/************************************************************************************************/
-/************************************* W C I T S T *********************************************/
-/************************************************************************************************/
-
-#if defined WCITST
-#define MSF_COMPONENT_ID 0 //Although there is no DUI support, we need this to get ...
-#define MSF_COMPONENT_VAR 0 //...compatibilty check to function
-#define MSF_COMPONENT_MAJOR_VER 0 //...;?this is worth looking into to make this a more
-#define MSF_COMPONENT_MINOR_VER 0 //..."defined" I/F so OEMers can figure out what to do
-
-//#define HCF_ENCAP HCF_ENC_NONE //to get going
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To ease testing the different options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#define HCF_TYPE (HCF_TYPE_WPA | HCF_TYPE_PRELOADED) // Hermes-I for HCF6, II for HCF7
-#define HCF_DMA 1
-//#define LLB //!!!!MIC Debug Only
-#if defined LLB && !((HCF_TYPE) & HCF_TYPE_WPA)
-err: no LLB unless SSN;
-#endif // LLB / HCF_TYPE_WPA
-//#define HCF_ALIGN 2
-#define HCF_DLV 1 //just to change memory layout ????;?
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To ease testing the different options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-#define HCF_ASSERT HCF_ASSERT_SW_SUP // logging via Hermes support registerr
-//#define HCF_ASSERT HCF_ASSERT_MB // logging via Mailbox
-
-#if defined __GNUC__
-#include "stdio.h"
-//#include "unistd.h" //ioperm libc5
-#include "sys/io.h" //ioperm glibc
-#define extern //see IO Port Programming mini-HOWTO
-//#include "asm/io.h" //
-#define IN_PORT_WORD(port) inw( (hcf_io)(port) )
-#define IN_PORT_DWORD(port) inl( (hcf_io)(port) )
-#define OUT_PORT_WORD(port, value) outw( (hcf_io)(port), (hcf_16)(value) )
-#define OUT_PORT_DWORD(port, value) outl( (hcf_io)(port), (hcf_16)(value) )
-#else
-#pragma warning ( disable: 4001 )
-#define FAR __far // segmented 16 bits mode
-
-#include <stdio.h>
-#include <conio.h>
-#ifndef _DEBUG
-#pragma intrinsic( _inp, _inpw, _outp, _outpw )
-#endif // _DEBUG
-
-#ifdef LOG
-extern FILE* utm_logfile;
-hcf_16 ipw( hcf_16 port );
-hcf_8 ipb( hcf_16 port );
-void opw( hcf_16 port, hcf_16 value );
-void opb( hcf_16 port, hcf_8 value );
-
-#define IN_PORT_WORD(port) ipw( (hcf_io)(port) )
-#define OUT_PORT_WORD(port, value) opw( (hcf_io)(port), (hcf_16)(value) )
-#else // LOG
-#define IN_PORT_WORD(port) ((hcf_16)_inpw( (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value) ((void)_outpw( (hcf_io)(port), value ))
-#endif // LOG
-
-#if 1 //ASM example
-#define IN_PORT_STRING_16( port, addr, len) __asm \
-{ \
- __asm push di \
- __asm push es \
- __asm mov cx,len \
- __asm les di,addr \
- __asm mov dx,port \
- __asm rep insw \
- __asm pop es \
- __asm pop di \
-}
-
-#define OUT_PORT_STRING_16( port, addr, len) __asm \
-{ \
- __asm push si \
- __asm push ds \
- __asm mov cx,len \
- __asm lds si,addr \
- __asm mov dx,port \
- __asm rep outsw \
- __asm pop ds \
- __asm pop si \
-}
-
-#endif // asm example
-
-#endif // __GCC__
-
-#if ! defined IN_PORT_STRING_16
-#define IN_PORT_STRING_16( port, addr, n) while (n--) \
- { *(hcf_16 FAR*)addr = IN_PORT_WORD( port ); ((hcf_16 FAR*)addr)++; }
-#define OUT_PORT_STRING_16( port, addr, n) while (n--) \
- { OUT_PORT_WORD( port, *(hcf_16 FAR*)addr ); ((hcf_16 FAR*)addr)++; }
-#endif // IN_PORT_STRING_16
-
-#endif // WCITST
-
-
-/************************************************************************************************/
-/******************************* Motorola Power PC 800 family *********************************/
-/************************************************************************************************/
-/* known users: LH@I
- */
-
-#if defined I_MPC8XX
-
-#define MSF_COMPONENT_VAR 0
-#define MSF_COMPONENT_ID 0
-#define MSF_COMPONENT_MAJOR_VER 1
-#define MSF_COMPONENT_MINOR_VER 0
-
-#define HCF_HSI_VAR 1
-
-#define HCF_BIG_ENDIAN 1
-#define HCF_IO HCF_IO_MEM // overrule standard Port I/O with Memory mapped I/O
-
-#include "o_portbl.h"
-#include "ipcmcia.h"
-typedef o_uint8_t hcf_8;
-typedef o_uint16_t hcf_16;
-typedef o_uint32_t hcf_32;
-
-/***************************************************************************/
-
-
-#ifdef _lint
-#else
-asm hcf_16 IN_PORT_WORD(int port)
-{
-% reg port
- lhbrx r3,r0,port
- eieio
-}
-#endif // _lint
-
-
-#ifdef _lint
-#else
-asm void OUT_PORT_WORD(int port, hcf_16 value)
-{
-% reg port, value
- sthbrx value,r0,port
- eieio
-}
-#endif // _lint
-
-/***************************************************************************/
-
-#define IN_PORT_STRING_16(port, addr, len) \
- { \
- unsigned l = (len); \
- hcf_16 *d = (volatile hcf_16 *)(addr); \
- while (l--) \
- { \
- *d++ = *(volatile hcf_16 *)(port); \
- EIEIO(); \
- } \
- }
-
-#define OUT_PORT_STRING_16(port, addr, len) \
- { \
- unsigned l = (len); \
- hcf_16 *s = (volatile hcf_16 *)(addr); \
- while (l--) \
- { \
- *(volatile hcf_16 *)(port) = *s++; \
- EIEIO(); \
- } \
- }
-
-#endif // I_MPC8XX
-
-
-
-/************************************************************************************************/
-/********************************** Diab or High C 29K **************************************/
-/************************************************************************************************/
-/* known users: GK@C
- */
-
-#if defined _AM29K
-
-#define MSF_COMPONENT_VAR 0
-#define MSF_COMPONENT_ID COMP_ID_AP1
-#define MSF_COMPONENT_MAJOR_VER 1
-#define MSF_COMPONENT_MINOR_VER 0
-
-#define HCF_BIG_ENDIAN 1
-#define HCF_IO HCF_IO_MEM // overrule standard Port I/O with Memory mapped I/O
-
-#define SwapBytes(t) /*lint -e572*/(((t) >> 8) + (((t) & 0xff) << 8))/*lint +e572*/
-
-#if defined __ppc
- #ifndef __GNUC__
- #define __asm__ asm
- #endif
-
- #if ! defined _lint
- #define EIEIO() __asm__(" eieio")
- #else
- #define EIEIO()
- #endif
-
- static hcf_16 IN_PORT_WORD(int port) {
- hcf_16 value = *(volatile hcf_16 *)(port); EIEIO();
- value = SwapBytes(value);
- return value;
- }
-
- #define OUT_PORT_WORD(port, value) \
- { *(volatile hcf_16 *)(port) = SwapBytes(value); EIEIO(); }
-#else
- #define IN_PORT_WORD(port) (*(volatile hcf_16 *)(port))
- #define OUT_PORT_WORD(port, value) (*(volatile hcf_16 *)(port) = (value))
-#endif // __ppc
-
-/***************************************************************************/
-
-#define IN_PORT_STRING_16( port, addr, len) { \
- unsigned l = (len); \
- hcf_16 t, *d = (volatile hcf_16 *)(addr); \
- while (l--) { \
- t = IN_PORT_WORD(port); \
- *d++ = SwapBytes(t); \
- } \
- }
-
-#define OUT_PORT_STRING_16( port, addr, len) { \
- unsigned l = (len); \
- hcf_16 t, *s = (volatile hcf_16 *)(addr); \
- while (l--) { \
- t = *s++; \
- OUT_PORT_WORD(port, SwapBytes(t)); \
- } \
- }
-
-#if PRODUCT == 9150
- #define HCF_ASSERT HCF_ASSERT_MB // logging via Mailbox
- #undef MSF_COMPONENT_ID
-#endif // 9150
-
-#endif // _AM29K
-
-
-
-/************************************************************************************************/
-/***************************************** MPC860 **********************************************/
-/************************************************************************************************/
-/* known users: RR
- */
-
-#if defined CPU
-#if CPU == PPC860
-
-#define MSF_COMPONENT_VAR 0
-#define MSF_COMPONENT_ID 0
-#define MSF_COMPONENT_MAJOR_VER 1
-#define MSF_COMPONENT_MINOR_VER 0
-
-#define HCF_BIG_ENDIAN 1
-#define HCF_IO HCF_IO_MEM // overrule standard Port I/O with Memory mapped I/O
-
-#define SwapBytes(t) /*lint -e572*/(((t) >> 8) + (((t) & 0xff) << 8))/*lint +e572*/
-
-#ifndef __GNUC__
- #define __asm__ asm
-#endif
-
-#if ! defined _lint
- #define EIEIO() __asm__(" eieio")
-#else
- #define EIEIO()
-#endif
-
-static hcf_16 IN_PORT_WORD(int port) {
- hcf_16 value = *(volatile hcf_16 *)(port); EIEIO();
- value = SwapBytes(value);
- return value;
- #ifdef __GNUC__
- /* the following serves to avoid the compiler warnings that
- * IN_PORT_WORD() is not used in some files */
- (void)IN_PORT_WORD;
- #endif
-}
-
-#define OUT_PORT_WORD(port, value) \
- { *(volatile hcf_16 *)(port) = SwapBytes(value); EIEIO(); }
-
-/***************************************************************************/
-
-#define IN_PORT_STRING_16( port, addr, len) { \
- unsigned l = (len); \
- hcf_16 t; \
- volatile hcf_16 *d = (volatile hcf_16 *)(addr); \
- while (l--) { \
- t = IN_PORT_WORD(port); \
- *d++ = SwapBytes(t); \
- } \
- }
-
-#define OUT_PORT_STRING_16( port, addr, len) { \
- unsigned l = (len); \
- hcf_16 t; \
- volatile hcf_16 *s = (volatile hcf_16 *)(addr); \
- while (l--) { \
- t = *s++; \
- OUT_PORT_WORD(port, SwapBytes(t)); \
- } \
- }
-
-#if PRODUCT == 9150
- #define HCF_ASSERT HCF_ASSERT_MB // logging via Mailbox
- #undef MSF_COMPONENT_ID
-#endif
-
-#endif /* PPC860 */
-#endif /* CPU */
-
-
-
-/************************************************************************************************/
-/**************************** Microtec Research 80X86 Compiler *********************************/
-/************************************************************************************************/
-
-#if 0
-
-//#undef HCF_TYPE // Hermes-I Station F/W without SSN support
-
-#define MSF_COMPONENT_VAR 0
-#define MSF_COMPONENT_ID 0
-#define MSF_COMPONENT_MAJOR_VER 1
-#define MSF_COMPONENT_MINOR_VER 0
-
-extern int far inp( int );
-extern void far outp( int, int );
-extern int far inpw( int );
-extern void far outpw( int, int );
-
-#define IN_PORT_WORD(port) ((hcf_16)inpw( (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value) ((void)outpw( (hcf_io)(port), value ))
-
-#define IN_PORT_STRING_16( port, addr, len) { \
- unsigned l = (len); \
- hcf_16 *d = (hcf_16 *)(addr); \
- while (l--) *d++ = IN_PORT_WORD(port); \
- }
-
-#define OUT_PORT_STRING_16( port, addr, len) { \
- unsigned l = (len); \
- hcf_16 *s = (hcf_16 *)(addr); \
- while (l--) OUT_PORT_WORD(port, *s++); \
- }
-#endif /* Microtec 80X86 C Compiler */
-
-
-
-/************************************************************************************************/
-/****************************** W A V E L A N E C ********************************************/
-/************************************************************************************************/
-/* known users: KM
- */
-
-#ifdef mc68302
-
-#define MSF_COMPONENT_ID COMP_ID_EC
-
-#include <version.h>
-
-#define MSF_COMPONENT_VAR 1
-#define MSF_COMPONENT_MAJOR_VER MAJOR_VERSION
-#define MSF_COMPONENT_MINOR_VER MINOR_VERSION
-
-#define HCF_BIG_ENDIAN 1
-#define HCF_IO HCF_IO_MEM // overrule standard Port I/O with Memory mapped I/O
-
-#define SwapBytes(t) /*lint -e572*/(((t) >> 8) + (((t) & 0xff) << 8))/*lint +e572*/
-
-#define PCMCIA_ADDRESS 0xc80000UL
-
-#define IN_PORT_2BYTES(port) (*(hcf_16 *)(port))
-#if 0
-static hcf_16 IN_PORT_WORD(hcf_32 port) // should be hcf_io, not hcf_32
-{
- hcf_16 word = IN_PORT_2BYTES(port);
- return SwapBytes(word);
-}
-#else
-static hcf_16 swap_var;
-#define IN_PORT_WORD(port) \
- (((swap_var = IN_PORT_2BYTES(port)) >> 8) + (((swap_var) & 0xff) << 8))
-#endif
-#define OUT_PORT_2BYTES(port, value) (*(hcf_16 *)(port) = (hcf_16)(value))
-#define OUT_PORT_WORD(port, value) OUT_PORT_2BYTES(port, SwapBytes(value))
-
-/*
-#define IN_PORT_STRING_16(port, addr, len) \
- while ((len)--) {*(hcf_16 *)(addr) = IN_PORT_2BYTES(port); ((cast)addr) += 2; }
-#define OUT_PORT_STRING_16(port, addr, len) \
- while ((len)--) {OUT_PORT_2BYTES((port), *(hcf_16 *)(addr)) ; ((cast)addr) += 2; }
-*/
-
-#endif /* mc68302 */
-
-
-
-/************************************************************************************************/
-/********************************* NGAP ***************************************/
-/************************************************************************************************/
-
-#if defined __VX_WORKS__ /* VxWorks */
-
-#if defined WLC_STATION
-//#undef HCF_TYPE /* Hermes-I Station F/W without SSN support */
-#define MSF_COMPONENT_ID COMP_ID_VX_WORKS_ENDSTA
-#else
-#define MSF_COMPONENT_ID COMP_ID_VX_WORKS_ENDAP
-#endif // WLC_STATION
-
-#define HCF_YIELD (taskDelay(0) == 0)
-
-#define MSF_COMPONENT_VAR 1
-#define MSF_COMPONENT_MAJOR_VER 1
-#define MSF_COMPONENT_MINOR_VER 0
-
-// #define HCF_ASSERT HCF_ASSERT_MB // logging via Mailbox
-
-#if defined PC486BSP
-
-#define IN_PORT_WORD(port) (sysInWord ((hcf_io)(port)))
-#define OUT_PORT_WORD(port, value) (sysOutWord ((hcf_io)(port), (hcf_16) (value)))
-#define IN_PORT_STRING_16(port, addr, n) (sysInWordString ((hcf_io)(port), addr, n))
-#define OUT_PORT_STRING_16(port, addr, n) (sysOutWordString ((hcf_io)(port), addr, n))
-
-#elif defined AS2000BSP
-
-#define HCF_IO HCF_IO_MEM // overrule standard Port I/O with Memory mapped I/O
-
-/* Define PCI stuff here. */
-unsigned short sysRead16( unsigned short *port );
-void sysWrite16( unsigned short *port, unsigned short value );
-
-#define PCI_IN_BYTE( port ) \
- *(unsigned char *)( port )
-
-#define PCI_IN_WORD( port ) \
- sysRead16( (unsigned short *)( port ) )
-
-#define PCI_OUT_BYTE( port, value ) \
- *(unsigned char *)( port ) = (unsigned char)( value )
-
-#define PCI_OUT_WORD( port, value ) \
- sysWrite16( (unsigned short *)( port ), (unsigned short)( value ) )
-
-#define IN_PORT_WORD( port ) \
- PCI_IN_WORD( port )
-
-#define OUT_PORT_WORD( port, value ) \
- PCI_OUT_WORD( port, value )
-
-#define IN_PORT_STRING_16( port, buf, len ) \
- do { \
- hcf_16 *p; \
- \
- for ( p = (hcf_16 *)(buf); p < &( (hcf_16 *)(buf) )[ (int)len ]; p++ ) { \
- *p = PCI_IN_WORD( port ); \
- } \
- } while ( 0 )
-
-#define OUT_PORT_STRING_16( port, buf, len ) \
- do { \
- const hcf_16 *p; \
- \
- for ( p = (const hcf_16 *)( buf ); p < &( (const hcf_16 *)(buf) )[ (int)len ]; p++ ) { \
- PCI_OUT_WORD( port, *p ); \
- } \
- } while ( 0 )
-
-#elif defined FADS860BSP /* elif defined AS2000BSP */
-
-#define HCF_BIG_ENDIAN 1
-
-#define HCF_IO HCF_IO_MEM // overrule standard Port I/O with Memory mapped I/O
-
-#ifndef __GNUC__
- #define __asm__ asm
-#endif
-
-#if ! defined _lint
- #define EIEIO() __asm__(" eieio")
-#else
- #define EIEIO()
-#endif
-
-static hcf_16 IN_PORT_WORD(int port) {
- hcf_16 value = *(volatile hcf_16 *)(port); EIEIO();
- value = ((value & 0xff00) >> 8) + ((value & 0x00ff) << 8);
-/* value = CNV_LITTLE_TO_SHORT(value); */
- return value;
- #ifdef __GNUC__
- /* the following serves to avoid the compiler warnings that
- * IN_PORT_WORD() is not used in some files */
- (void)IN_PORT_WORD;
- #endif
-}
-
-#define OUT_PORT_WORD(port, value) \
- { *(volatile hcf_16 *)(port) = CNV_SHORT_TO_LITTLE(value); EIEIO(); }
-
-/***********************************************************************/
-
-#define IN_PORT_STRING_16( port, addr, len) { \
- unsigned l = (len); \
- volatile hcf_16 *d = (volatile hcf_16 *)(addr); \
- while (l--) { \
- *d++ = *(volatile hcf_16 *)(port); \
- EIEIO(); \
- } \
- }
-
-#define OUT_PORT_STRING_16( port, addr, len) { \
- unsigned l = (len); \
- volatile hcf_16 *s = (volatile hcf_16 *)(addr); \
- while (l--) { \
- *(volatile hcf_16 *)(port) = *s++; \
- EIEIO(); \
- } \
- }
-
-#elif defined DAYTONABSP
-
-#define HCF_BIG_ENDIAN 1
-
-#define HCF_IO HCF_IO_MEM // overrule standard Port I/O with Memory mapped I/O
-
-#ifndef __GNUC__
- #define __asm__ asm
-#endif
-
-#define IN_PORT_WORD(port) (sysOrinocoInWord((unsigned long)(port)))
-#define OUT_PORT_WORD(port,value) (sysOrinocoOutWord((unsigned long)(port), (unsigned short)(value)))
-
-#define IN_PORT_STRING_16(port,addr,len) (sysOrinocoInString((port), (addr), (len)))
-#define OUT_PORT_STRING_16(port,addr,len) (sysOrinocoOutString((port), (addr), (len)))
-
-extern unsigned char sysOrinocoInByte (unsigned long port);
-extern unsigned short sysOrinocoInWord (unsigned long port);
-extern void sysOrinocoInString (unsigned long port, void *addr, unsigned short len);
-
-extern void sysOrinocoOutByte (unsigned long port, unsigned char value);
-extern void sysOrinocoOutWord (unsigned long port, unsigned short value);
-extern void sysOrinocoOutString (unsigned long port, void *addr, unsigned short len);
-
-#elif defined ALPHA_BSP
-
-#define HCF_BIG_ENDIAN 1
-
-#define HCF_IO HCF_IO_MEM // overrule standard Port I/O with Memory mapped I/O
-
-#ifndef __GNUC__
- #define __asm__ asm
-#endif
-
-#define IN_PORT_WORD(port) (sysOrinocoInWord((unsigned long)(port)))
-#define OUT_PORT_WORD(port,value) (sysOrinocoOutWord((unsigned long)(port), (unsigned short)(value)))
-
-#define IN_PORT_STRING_16(port,addr,len) (sysOrinocoInString((port), (addr), (len)))
-#define OUT_PORT_STRING_16(port,addr,len) (sysOrinocoOutString((port), (addr), (len)))
-
-extern unsigned char sysOrinocoInByte (unsigned long port);
-extern unsigned short sysOrinocoInWord (unsigned long port);
-extern void sysOrinocoInString (unsigned long port, void *addr, unsigned short len);
-
-extern void sysOrinocoOutByte (unsigned long port, unsigned char value);
-extern void sysOrinocoOutWord (unsigned long port, unsigned short value);
-extern void sysOrinocoOutString (unsigned long port, void *addr, unsigned short len);
-
-#else
-
-err: /* commented here */ /* "BSP is not defined..." */
-
-#endif /* else PC486BSP */
-
-#endif // __VX_WORKS__
-
-
-
-/************************************************************************************************/
-/****************************** VXWORKS. Motorola Sandpoint PowerPC 824X ***********************/
-/************************************************************************************************/
-#ifdef __VX_WORKS_SANDPOINT_824X__
-
-#include <vxWorks.h>
-#include <sysLib.h>
-#include <taskLib.h>
-
-#ifdef WVLAN_53
-#define MSF_COMPONENT_ID COMP_ID_VX_WORKS_ENDSTA
-#endif /* WVLAN_53 */
-
-#ifdef WVLAN_54
-#define MSF_COMPONENT_ID COMP_ID_VX_WORKS_ENDAP
-#endif /* WVLAN_54 */
-
-#ifdef WVLAN_56
-#define MSF_COMPONENT_ID COMP_ID_VX_WORKS_END
-#endif /* WVLAN_56 */
-
-#if !defined MSF_COMPONENT_ID
-#error "you must define an MSF component ID: WVLAN_53, WVLAN_54, WVLAN_56"
-#endif
-
-#define MSF_COMPONENT_VAR 1
-
-#define HCF_EXT HCF_EXT_INFO_LOG
-#define HCF_SLEEP ( HCF_CDS | HCF_DDS )
-//#define HCF_SLEEP ( HCF_DDS )
-
-#ifndef HCF_ACT_WAKEUP
-#define HCF_ACT_WAKEUP 0x1D
-#endif // HCF_ACT_WAKEUP
-
-#if defined FATNIC | defined BEAGLE_H253
-#define T1__HCF_TYPE HCF_TYPE_STA
-#else
-#define T1__HCF_TYPE HCF_TYPE_AP | HCF_TYPE_STA
-#endif
-
-#ifdef HERMES_USB
-#define T2__HCF_TYPE (T1__HCF_TYPE | HCF_TYPE_USB)
-#else // HERMES_USB
-#define T2__HCF_TYPE (T1__HCF_TYPE)
-#endif // HERMES_USB
-
-#ifdef _WARP
-#define T3__HCF_TYPE (T2__HCF_TYPE | HCF_TYPE_HII5)
-#else // _WARP
-#define T3__HCF_TYPE (T2__HCF_TYPE | HCF_TYPE_WPA | HCF_TYPE_HII)
-#endif // WARP
-
-#ifdef _CCX
-#define T4__HCF_TYPE (T3__HCF_TYPE | HCF_TYPE_CCX)
-#else // _WARP
-#define T4__HCF_TYPE (T3__HCF_TYPE)
-#endif // _CCX
-
-#define T5__HCF_TYPE (T4__HCF_TYPE)
-
-// Default to TYPE_AP + SSN!
-#define HCF_TYPE (T5__HCF_TYPE )
-
-
-
-#define MSF_COMPONENT_MAJOR_VER 2
-#define MSF_COMPONENT_MINOR_VER 0
-
-#define HCF_IO HCF_IO_MEM
-#define HCF_DMA 0
-#define HCF_MEM_IO 1
-#define HCF_BIG_ENDIAN 1
-
-//#define support_32bits 1
-
-#define IN_PORT_WORD(port) (sysInWord( (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value) (sysOutWord( (hcf_io)(port), (hcf_16)(value) ))
-#define IN_PORT_DWORD(port) (sysInLong( (hcf_io)(port) ))
-#define OUT_PORT_DWORD(port, value) (sysOutLong( (hcf_io)(port), (hcf_16)(value) ))
-#define IN_PORT_STRING_16(port, dst, n) (sysInWordString((hcf_io)(port), (hcf_16 *)dst, n))
-#define OUT_PORT_STRING_16(port, src, n) (sysOutWordString((hcf_io)(port), (hcf_16 *)src, n))
-
-#ifdef WVLAN_DEBUG
-#define DBG 1
-#define _DEBUG 1
-#endif
-
-/* we'll need to add these prints someday */
-#define OUTPUTDEBUGMSG(dprintf_exp)
-#define ASSERTDEBUGMSG(cond, dprintf_exp)
-
-#define HCF_INTERFACE_CONNECT(ifbp)
-#define HCF_INTERFACE_DISCONNECT(ifbp)
-#define HCF_ENTER_INTERFACE_FUNCT(ibfb)
-#define HCF_LEAVE_INTERFACE_FUNCT(ifbp)
-
-#define CNV_END_INT(w) ( ((hcf_16)(w) & 0x00FF) << 8 | ((hcf_16)(w) & 0xFF00) >> 8 )
-#define CNV_LITTLE_TO_INT(w) CNV_END_INT(w)
-#define CNV_INT_TO_LITTLE(w) CNV_LITTLE_TO_INT(w)
-
-#endif /* __VX_WORKS_SANDPOINT_824X__ */
-
-/************************************************************************************************/
-/************************************* VXWORKS. ARM T8300 IPPhone *****************************/
-/************************************************************************************************/
-#if defined( IPT_T8300 ) || defined( IPT_T8307 )
-
-#include <vxWorks.h>
-#include <sysLib.h>
-#include <taskLib.h>
-
-#define HCF_ALIGN 4 /* default to 4 byte alignment */
-
-#define BEAGLE_H253 /* Hermes 2.5.3 build, better to be in the project file */
-#define OOR_DDS /* Hermes 2.5.3 build, better to be in the project file */
-#define FATNIC
-
-
-#ifdef WVLAN_53
-#define MSF_COMPONENT_ID COMP_ID_VX_WORKS_ENDSTA
-#endif /* WVLAN_53 */
-
-#ifdef WVLAN_54
-#define MSF_COMPONENT_ID COMP_ID_VX_WORKS_ENDAP
-#endif /* WVLAN_54 */
-
-#ifdef WVLAN_56
-#define MSF_COMPONENT_ID COMP_ID_VX_WORKS_END
-#endif /* WVLAN_56 */
-
-#if !defined MSF_COMPONENT_ID
-#error "you must define an MSF component ID: WVLAN_53, WVLAN_54, WVLAN_56"
-#endif
-
-#define MSF_COMPONENT_VAR 1
-
-#define HCF_EXT HCF_EXT_INFO_LOG
-//#define HCF_EXT HCF_EXT_INFO_LOG | HCF_EXT_MB
-#define HCF_SLEEP ( HCF_CDS | HCF_DDS )
-//#define HCF_SLEEP ( HCF_DDS )
-
-#ifndef HCF_ACT_WAKEUP
-#define HCF_ACT_WAKEUP 0x1D
-#endif // HCF_ACT_WAKEUP
-
-#if defined FATNIC || defined BEAGLE_H253
-#define T1__HCF_TYPE HCF_TYPE_STA
-#else
-//#define T1__HCF_TYPE HCF_TYPE_AP | HCF_TYPE_STA
-#define T1__HCF_TYPE HCF_TYPE_STA /* dz, Station code only */
-#endif
-
-#ifdef HERMES_USB
-#define T2__HCF_TYPE (T1__HCF_TYPE | HCF_TYPE_USB)
-#else // HERMES_USB
-#define T2__HCF_TYPE (T1__HCF_TYPE)
-#endif // HERMES_USB
-
-#ifdef _WARP
-#define T3__HCF_TYPE (T2__HCF_TYPE | HCF_TYPE_HII5)
-#else // _WARP
-#define T3__HCF_TYPE (T2__HCF_TYPE | HCF_TYPE_WPA | HCF_TYPE_HII)
-//#define T3__HCF_TYPE (T2__HCF_TYPE | HCF_TYPE_HII) /* dz. no WPA support at this time, test code */
-#endif // WARP
-
-#ifdef _CCX
-#define T4__HCF_TYPE (T3__HCF_TYPE | HCF_TYPE_CCX)
-#else // _WARP
-#define T4__HCF_TYPE (T3__HCF_TYPE)
-#endif // _CCX
-
-#define T5__HCF_TYPE (T4__HCF_TYPE)
-
-// Default to TYPE_AP + SSN!
-#define HCF_TYPE (T5__HCF_TYPE )
-
-
-#define MSF_COMPONENT_MAJOR_VER 2
-#define MSF_COMPONENT_MINOR_VER 0
-
-#define HCF_IO HCF_IO_MEM
-#define HCF_DMA 0
-#define HCF_MEM_IO 1
-
-
-/* Endian is determined by vxWorks project compile option */
-#if (_BYTE_ORDER == _BIG_ENDIAN)
-#undef HCF_LITTLE_ENDIAN
-#define HCF_BIG_ENDIAN 1
-#endif
-
-
-#define CNV_END(w) ( ((hcf_16)(w) & 0x00FF) << 8 | ((hcf_16)(w) & 0xFF00) >> 8 )
-#if defined HCF_BIG_ENDIAN
-//******************************************** B I G E N D I A N *******************************************
-#define CNV_LITTLE_TO_INT(w) CNV_END(w) // endianess conversion needed
-#define CNV_BIG_TO_INT(w) (w) // no endianess conversion needed
-#else
-//****************************************** L I T T L E E N D I A N ****************************************
-#define CNV_LITTLE_TO_INT(w) (w) // no endianess conversion needed
-#define CNV_BIG_TO_INT(w) CNV_END(w) // endianess conversion needed
-#endif // HCF_BIG_ENDIAN
-
-// conversion macros which can be expressed in other macros
-#define CNV_INT_TO_LITTLE(w) CNV_LITTLE_TO_INT(w)
-#define CNV_INT_TO_BIG(w) CNV_BIG_TO_INT(w)
-
-
-
-#define IN_PORT_WORD( port ) *((volatile hcf_16 *)( port ))
-#define OUT_PORT_WORD( port, value ) *((volatile hcf_16 *)( port )) = ((hcf_16)( value ))
-//#define IN_PORT_BYTE( port ) *((volatile hcf_8 *)( port ))
-
-#define IN_PORT_STRING( port, addr, len) { \
- unsigned l = len; \
- hcf_16 *d = (hcf_16 *)(addr); \
- hcf_16 t; \
- while (l--) { \
- t = IN_PORT_WORD(port); \
- *d++ = CNV_LITTLE_TO_INT(t); \
- } \
-} // IN_PORT_STRING
-
-#define OUT_PORT_STRING( port, addr, len) { \
- unsigned l = (len); \
- hcf_16 *s = (hcf_16 *)(addr); \
- hcf_16 t; \
- while (l--) { \
- t = *s++; \
- t = CNV_LITTLE_TO_INT(t); \
- OUT_PORT_WORD(port, t); \
- } \
-} // OUT_PORT_STRING
-
-#define IN_PORT_STRING_16(port, dst, n) { \
- unsigned l = (n); \
- hcf_16 *d = (hcf_16 *)(dst); \
- while (l--) { \
- *d++ = IN_PORT_WORD(port); \
- } \
-} // IN_PORT_STRING_16
-
-#define OUT_PORT_STRING_16(port, src, n) { \
- hcf_16 t; \
- int l = (n); \
- hcf_16 *s = (hcf_16 *)(src); \
- while (l--) { \
- t = *s++; \
- OUT_PORT_WORD(port, t); \
- } \
-} // OUT_PORT_STRING_16
-
-/* #define HCF_YIELD (taskDelay(0) == 0) */
-
-
-
-#ifdef WVLAN_DEBUG
-#define DBG 1
-#define _DEBUG 1
-#endif
-
-/* we'll need to add these prints someday */
-#define OUTPUTDEBUGMSG(dprintf_exp)
-#define ASSERTDEBUGMSG(cond, dprintf_exp)
-
-#define HCF_INTERFACE_CONNECT(ifbp)
-#define HCF_INTERFACE_DISCONNECT(ifbp)
-#define HCF_ENTER_INTERFACE_FUNCT(ibfb)
-#define HCF_LEAVE_INTERFACE_FUNCT(ifbp)
-
-#define sysInWord(offsetAddr) IN_PORT_WORD(offsetAddr)
-#define sysInByte(offsetAddr) IN_PORT_BYTE(offsetAddr)
-#define sysOutWord(addr, value) OUT_PORT_WORD(addr, value)
-
-#endif /*IPT_T8300 */
-
/************************************************************************************************************/
/*********************************** **************************************/
/************************************************************************************************************/
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists