[kismac] [binaervarianz] r208 - branches/usb-drivers/Sources/Driver/USBJack

  • From: svn@xxxxxxxxxxxxxxxx
  • To: kismac@xxxxxxxxxxxxx
  • Date: Mon, 16 Oct 2006 23:13:55 +0200

Author: gkruse
Date: 2006-10-16 23:13:50 +0200 (Mon, 16 Oct 2006)
New Revision: 208

Modified:
   branches/usb-drivers/Sources/Driver/USBJack/RT73.h
   branches/usb-drivers/Sources/Driver/USBJack/RT73Jack.h
   branches/usb-drivers/Sources/Driver/USBJack/RT73Jack.mm
   branches/usb-drivers/Sources/Driver/USBJack/RalinkJack.mm
   branches/usb-drivers/Sources/Driver/USBJack/rt2570.h
Log:
Temporary and messy fix for linking errors

Modified: branches/usb-drivers/Sources/Driver/USBJack/RT73.h
===================================================================
--- branches/usb-drivers/Sources/Driver/USBJack/RT73.h  2006-10-14 04:58:03 UTC 
(rev 207)
+++ branches/usb-drivers/Sources/Driver/USBJack/RT73.h  2006-10-16 21:13:50 UTC 
(rev 208)
@@ -548,7 +548,7 @@
 } MCU_INT_SOURCE_STRUC, *PMCU_INT_SOURCE_STRUC, MCU_INT_MASK_STRUC, 
*PMCU_INT_MASK_STRUC;
 #endif
 
-
+/*
 //
 // MCU_LEDCS: MCU LED Control Setting.
 //
@@ -589,7 +589,7 @@
        USHORT                  word;
 } MCU_LEDCS_STRUC, *PMCU_LEDCS_STRUC;
 #endif
-
+*/
 // 
=================================================================================
 // Register format
 // 
=================================================================================
@@ -1764,7 +1764,7 @@
        USHORT  word;
 }      EEPROM_LED_STRUC, *PEEPROM_LED_STRUC;
 #endif
-
+/*
 #ifdef __BIG_ENDIAN__
 typedef        union   _EEPROM_TXPOWER_DELTA_STRUC     {
        struct  {
@@ -1784,15 +1784,15 @@
        UCHAR   value;
 }      EEPROM_TXPOWER_DELTA_STRUC, *PEEPROM_TXPOWER_DELTA_STRUC;
 #endif
-
+*/
 
////////////////////////////////////////////////////////////////////////////////////////
-
+/*
 // structure to store channel TX power
 typedef struct _CHANNEL_TX_POWER {
        unsigned char   Channel;
        char    Power;
 }      CHANNEL_TX_POWER, *PCHANNEL_TX_POWER;
-
+*/
 /*
  //
  //    configuration and status
@@ -1992,6 +1992,7 @@
 //
 // Register set pair for initialzation register set definition
 //
+/*
 typedef struct _RTMP_RF_REGS
 {
        UCHAR   Channel;
@@ -2000,7 +2001,7 @@
        ULONG   R3;
        ULONG   R4;
 }      RTMP_RF_REGS, *PRTMP_RF_REGS;
-
+*/
 RTMP_RF_REGS RF2528RegTable[] = {
     //         ch       R1              R2              R3(TX0~4=0) R4
     {1,  0x94002c0c, 0x94000786, 0x94068255, 0x940fea0b},
@@ -2258,7 +2259,7 @@
 //
 // BBP register initialization set
 //
-BBP_REG_PAIR   BBPRegTable[] = {
+BBP_REG_PAIR   RT73BBPRegTable[] = {
        {3,     0x80},
        {15,    0x30},
        {17,    0x20},
@@ -2286,7 +2287,7 @@
        {102,   0x16},
        {107,   0x04},
 };
-#define        NUM_BBP_REG_PARMS       (sizeof(BBPRegTable) / 
sizeof(BBP_REG_PAIR))
+#define        NUM_BBP_REG_PARMS       (sizeof(RT73BBPRegTable) / 
sizeof(BBP_REG_PAIR))
 
 //
 // ASIC register initialization sets

Modified: branches/usb-drivers/Sources/Driver/USBJack/RT73Jack.h
===================================================================
--- branches/usb-drivers/Sources/Driver/USBJack/RT73Jack.h      2006-10-14 
04:58:03 UTC (rev 207)
+++ branches/usb-drivers/Sources/Driver/USBJack/RT73Jack.h      2006-10-16 
21:13:50 UTC (rev 208)
@@ -10,8 +10,90 @@
 
 #import <Cocoa/Cocoa.h>
 #import "USBJack.h"
-#include "RT73.h"
+//temporary to fix linking errors
+#define        NUM_EEPROM_BBP_PARMS            19
+#define        NUM_EEPROM_BBP_TUNING_PARMS     7
 
+#define USHORT unsigned short
+#define UCHAR unsigned char
+#ifdef __BIG_ENDIAN__
+typedef union  _MCU_LEDCS_STRUC {
+       struct  {
+               USHORT          PolarityRDY_A:1;
+               USHORT          PolarityRDY_G:1;
+               USHORT          PolarityACT:1;
+               USHORT          PolarityGPIO_4:1;
+               USHORT          PolarityGPIO_3:1;
+               USHORT          PolarityGPIO_2:1;
+               USHORT          PolarityGPIO_1:1;
+               USHORT          PolarityGPIO_0:1;
+               USHORT          LinkAStatus:1;
+               USHORT          LinkGStatus:1;
+               USHORT          RadioStatus:1;
+               USHORT          LedMode:5;              
+       } field;
+       USHORT                  word;
+} MCU_LEDCS_STRUC, *PMCU_LEDCS_STRUC;
+#else
+typedef union  _MCU_LEDCS_STRUC {
+       struct  {
+               USHORT          LedMode:5;
+               USHORT          RadioStatus:1;
+               USHORT          LinkGStatus:1;
+               USHORT          LinkAStatus:1;
+               USHORT          PolarityGPIO_0:1;
+               USHORT          PolarityGPIO_1:1;
+               USHORT          PolarityGPIO_2:1;
+               USHORT          PolarityGPIO_3:1;
+               USHORT          PolarityGPIO_4:1;
+               USHORT          PolarityACT:1;
+               USHORT          PolarityRDY_G:1;
+               USHORT          PolarityRDY_A:1;
+       } field;
+       USHORT                  word;
+} MCU_LEDCS_STRUC, *PMCU_LEDCS_STRUC;
+#endif
+
+#define ETH_LENGTH_OF_ADDRESS  6
+// structure to store channel TX power
+typedef struct _CHANNEL_TX_POWER {
+       unsigned char   Channel;
+       char    Power;
+}      CHANNEL_TX_POWER, *PCHANNEL_TX_POWER;
+
+#ifdef __BIG_ENDIAN__
+typedef        union   _EEPROM_TXPOWER_DELTA_STRUC     {
+       struct  {
+               UCHAR   TxPowerEnable:1;// Enable
+               UCHAR   Type:1;                 // 1: plus the delta value, 0: 
minus the delta value
+               UCHAR   DeltaValue:6;   // Tx Power dalta value (MAX=4)
+       }       field;
+       UCHAR   value;
+}      EEPROM_TXPOWER_DELTA_STRUC, *PEEPROM_TXPOWER_DELTA_STRUC;
+#else
+typedef        union   _EEPROM_TXPOWER_DELTA_STRUC     {
+       struct  {
+               UCHAR   DeltaValue:6;   // Tx Power dalta value (MAX=4)
+               UCHAR   Type:1;                 // 1: plus the delta value, 0: 
minus the delta value
+               UCHAR   TxPowerEnable:1;// Enable
+       }       field;
+       UCHAR   value;
+}      EEPROM_TXPOWER_DELTA_STRUC, *PEEPROM_TXPOWER_DELTA_STRUC;
+#endif
+
+typedef struct _RTMP_RF_REGS
+{
+       UCHAR   Channel;
+       ULONG   R1;
+       ULONG   R2;
+       ULONG   R3;
+       ULONG   R4;
+}      RTMP_RF_REGS, *PRTMP_RF_REGS;
+
+#define MAX_NUM_OF_CHANNELS            43      //1-14, 
36/40/44/48/52/56/60/64/100/104/108/112/116/120/124/ 
+                                                                       
//128/132/136/140/149/153/157/161/165/34/38/42/46 + 1 as NULL termination
+//end temp
+
 class RT73Jack: public USBJack
 {
 public:

Modified: branches/usb-drivers/Sources/Driver/USBJack/RT73Jack.mm
===================================================================
--- branches/usb-drivers/Sources/Driver/USBJack/RT73Jack.mm     2006-10-14 
04:58:03 UTC (rev 207)
+++ branches/usb-drivers/Sources/Driver/USBJack/RT73Jack.mm     2006-10-16 
21:13:50 UTC (rev 208)
@@ -7,7 +7,7 @@
  */
 
 #include "RT73Jack.h"
-//#include "RT73.h"
+#include "RT73.h"
 
 IOReturn RT73Jack::_init() {
     unsigned long      Index;
@@ -527,7 +527,7 @@
        // Initialize BBP register to default value
        for (Index = 0; Index < NUM_BBP_REG_PARMS; Index++)
        {
-               RTUSBWriteBBPRegister(BBPRegTable[Index].Register, 
BBPRegTable[Index].Value);
+               RTUSBWriteBBPRegister(RT73BBPRegTable[Index].Register, 
RT73BBPRegTable[Index].Value);
        }
 
        // Clear raw counters

Modified: branches/usb-drivers/Sources/Driver/USBJack/RalinkJack.mm
===================================================================
--- branches/usb-drivers/Sources/Driver/USBJack/RalinkJack.mm   2006-10-14 
04:58:03 UTC (rev 207)
+++ branches/usb-drivers/Sources/Driver/USBJack/RalinkJack.mm   2006-10-16 
21:13:50 UTC (rev 208)
@@ -141,7 +141,7 @@
                }
                while (i < RETRY_LIMIT);
                
-               RTUSBWriteMACRegister(PHY_CSR7, BBPRegTable[Index]);
+               RTUSBWriteMACRegister(PHY_CSR7, RT2570BBPRegTable[Index]);
     }
     
     

Modified: branches/usb-drivers/Sources/Driver/USBJack/rt2570.h
===================================================================
--- branches/usb-drivers/Sources/Driver/USBJack/rt2570.h        2006-10-14 
04:58:03 UTC (rev 207)
+++ branches/usb-drivers/Sources/Driver/USBJack/rt2570.h        2006-10-16 
21:13:50 UTC (rev 208)
@@ -222,7 +222,7 @@
 };
 #define        NUM_OF_5222_CHNL        (sizeof(RF5222RegTable) / 
sizeof(RTMP_RF_REGS))
 
-USHORT  BBPRegTable[] = {
+USHORT  RT2570BBPRegTable[] = {
        0x0302,  // R03
        0x0419,  // R04
        0x0E1C,  // R14
@@ -259,7 +259,7 @@
        0x4BFF,  // R75//by MAX
 };
 
-#define        NUM_BBP_REG_PARMS       (sizeof(BBPRegTable) / sizeof(USHORT))
+#define        NUM_BBP_REG_PARMS       (sizeof(RT2570BBPRegTable) / 
sizeof(USHORT))
 
 //
 // P802.11 Frame control field, 16 bit


Other related posts:

  • » [kismac] [binaervarianz] r208 - branches/usb-drivers/Sources/Driver/USBJack