+++ /dev/null
-//
-// common.h
-//
-// This file contains the OS dependant definition and function.
-// Every OS has this file individual.
-//
-#ifndef COMMON_DEF
-#define COMMON_DEF
-
-//#define DEBUG_ENABLED  1
-
-//==================================================================================================
-// Common function definition
-//==================================================================================================
-#define DEBUG_ENABLED
-#ifdef DEBUG_ENABLED
-#define WBDEBUG( _M )  printk _M
-#else
-#define WBDEBUG( _M )  0
-#endif
-
-#endif // COMMON_DEF
-
 
 
        pDes->TxRate = ctmp1;
        #ifdef _PE_TX_DUMP_
-       WBDEBUG(("Tx rate =%x\n", ctmp1));
+       printk("Tx rate =%x\n", ctmp1);
        #endif
 
        pT01->T01_modulation_type = (ctmp1%3) ? 0 : 1;
                FillIndex = pMds->TxFillIndex;
                if (pMds->TxOwner[FillIndex]) { // Is owned by software 0:Yes 1:No
 #ifdef _PE_TX_DUMP_
-                       WBDEBUG(("[Mds_Tx] Tx Owner is H/W.\n"));
+                       printk("[Mds_Tx] Tx Owner is H/W.\n");
 #endif
                        break;
                }
                        // For speed up Key setting
                        if (pTxDes->EapFix) {
 #ifdef _PE_TX_DUMP_
-                               WBDEBUG(("35: EPA 4th frame detected. Size = %d\n", PacketSize));
+                               printk("35: EPA 4th frame detected. Size = %d\n", PacketSize);
 #endif
                                pHwData->IsKeyPreSet = 1;
                        }
                                else
                                        pHwData->tx_retry_count[7] += RetryCount;
                                #ifdef _PE_STATE_DUMP_
-                               WBDEBUG(("dto_tx_retry_count =%d\n", pHwData->dto_tx_retry_count));
+                               printk("dto_tx_retry_count =%d\n", pHwData->dto_tx_retry_count);
                                #endif
                                MTO_SetTxCount(adapter, TxRate, RetryCount);
                        }
 
 void MTO_Init(MTO_FUNC_INPUT)
 {
     int i;
-       //WBDEBUG(("[MTO] -> MTO_Init()\n"));
        //[WKCHEN]pMTOcore_data = pcore_data;
 // 20040510 Turbo add for global variable
     MTO_TMR_CNT()       = 0;
 
                //Start to fill RF parameters, PLL_ON should be pulled low.
                Wb35Reg_WriteSync( pHwData, 0x03dc, 0x00000000 );
 #ifdef _PE_STATE_DUMP_
-               WBDEBUG(("* PLL_ON    low\n"));
+               printk("* PLL_ON    low\n");
 #endif
 
                number = sizeof(al7230_rf_data_24)/sizeof(al7230_rf_data_24[0]);
                        //pulled high
                        Wb35Reg_WriteSync( pHwData, 0x03dc, 0x00000080 );
                        #ifdef _PE_STATE_DUMP_
-                       WBDEBUG(("* PLL_ON    high\n"));
+                       printk("* PLL_ON    high\n");
                        #endif
 
                        //2.4GHz
                        //5GHz
                        Wb35Reg_WriteSync( pHwData, 0x03dc, 0x00000000 );
                        #ifdef _PE_STATE_DUMP_
-                       WBDEBUG(("* PLL_ON    low\n"));
+                       printk("* PLL_ON    low\n");
                        #endif
 
                        number = sizeof(al7230_rf_data_50)/sizeof(al7230_rf_data_50[0]);
 
                        Wb35Reg_WriteSync( pHwData, 0x03dc, 0x00000080 );
                        #ifdef _PE_STATE_DUMP_
-                       WBDEBUG(("* PLL_ON    high\n"));
+                       printk("* PLL_ON    high\n");
                        #endif
 
                        //ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x12BACF;
                        msleep(5);
 
                        //Wb35Reg_WriteSync( pHwData, 0x03dc, 0x00000080 );
-                       //WBDEBUG(("* PLL_ON    high\n"));
+                       //printk("* PLL_ON    high\n");
                        break;
 
                case RF_WB_242:
 
                        //Start to fill RF parameters, PLL_ON should be pulled low.
                        //Wb35Reg_Write( pHwData, 0x03dc, 0x00000000 );
-                       //WBDEBUG(("* PLL_ON    low\n"));
+                       //printk("* PLL_ON    low\n");
 
                        //Channel independent registers
                        if( Channel.band != pHwData->band)
                                // Write to register. number must less and equal than 16
                                Wb35Reg_BurstWrite( pHwData, 0x0864, pltmp, number, NO_INCREMENT );
                                #ifdef _PE_STATE_DUMP_
-                               WBDEBUG(("Band changed\n"));
+                               printk("Band changed\n");
                                #endif
                        }
 
        }
 
        #ifdef _PE_STATE_DUMP_
-       WBDEBUG((" TxVgaFor24 : \n"));
+       printk(" TxVgaFor24 : \n");
        DataDmp((u8 *)pHwData->TxVgaFor24, 14 ,0);
-       WBDEBUG((" TxVgaFor50 : \n"));
+       printk(" TxVgaFor50 : \n");
        DataDmp((u8 *)pHwData->TxVgaFor50, 70 ,0);
        #endif
 }
 
 
        if (ret < 0) {
                #ifdef _PE_REG_DUMP_
-               WBDEBUG(("EP0 Write register usb message sending error\n"));
+               printk("EP0 Write register usb message sending error\n");
                #endif
 
                pHwData->SurpriseRemove = 1; // 20060704.2
 
        if (ret < 0) {
                #ifdef _PE_REG_DUMP_
-               WBDEBUG(("EP0 Read register usb message sending error\n"));
+               printk("EP0 Read register usb message sending error\n");
                #endif
 
                pHwData->SurpriseRemove = 1; // 20060704.2
 
        if (ret < 0) {
 #ifdef _PE_REG_DUMP_
-               WBDEBUG(("EP0 Irp sending error\n"));
+               printk("EP0 Irp sending error\n");
 #endif
                goto cleanup;
        }
 
                if (reg->EP0VM_status) {
 #ifdef _PE_REG_DUMP_
-                       WBDEBUG(("EP0 IoCompleteRoutine return error\n"));
+                       printk("EP0 IoCompleteRoutine return error\n");
 #endif
                        reg->EP0vm_state = VM_STOP;
                        pHwData->SurpriseRemove = 1;
                        kfree(reg_queue);
                } else {
                        #ifdef _PE_REG_DUMP_
-                       WBDEBUG(("EP0 queue release error\n"));
+                       printk("EP0 queue release error\n");
                        #endif
                }
                spin_lock_irq( ®->EP0VM_spin_lock );
 
                        // Basic check for Rx length. Is length valid?
                        if (PacketSize > MAX_PACKET_SIZE) {
                                #ifdef _PE_RX_DUMP_
-                               WBDEBUG(("Serious ERROR : Rx data size too long, size =%d\n", PacketSize));
+                               printk("Serious ERROR : Rx data size too long, size =%d\n", PacketSize);
                                #endif
 
                                pWb35Rx->EP3vm_state = VM_STOP;
        // The URB is completed, check the result
        if (pWb35Rx->EP3VM_status != 0) {
                #ifdef _PE_USB_STATE_DUMP_
-               WBDEBUG(("EP3 IoCompleteRoutine return error\n"));
+               printk("EP3 IoCompleteRoutine return error\n");
                #endif
                pWb35Rx->EP3vm_state = VM_STOP;
                goto error;
        if (!pWb35Rx->RxOwner[RxBufferId]) {
                // It's impossible to run here.
                #ifdef _PE_RX_DUMP_
-               WBDEBUG(("Rx driver fifo unavailable\n"));
+               printk("Rx driver fifo unavailable\n");
                #endif
                goto error;
        }
        if (pWb35Rx->EP3vm_state == VM_RUNNING) {
                usb_unlink_urb( pWb35Rx->RxUrb ); // Only use unlink, let Wb35Rx_destroy to free them
                #ifdef _PE_RX_DUMP_
-               WBDEBUG(("EP3 Rx stop\n"));
+               printk("EP3 Rx stop\n");
                #endif
        }
 }
        if (pWb35Rx->RxUrb)
                usb_free_urb( pWb35Rx->RxUrb );
        #ifdef _PE_RX_DUMP_
-       WBDEBUG(("Wb35Rx_destroy OK\n"));
+       printk("Wb35Rx_destroy OK\n");
        #endif
 }
 
 
        if (pWb35Tx->EP2vm_state == VM_RUNNING)
                usb_unlink_urb( pWb35Tx->Tx2Urb ); // Only use unlink, let Wb35Tx_destrot to free them
        #ifdef _PE_TX_DUMP_
-       WBDEBUG(("EP2 Tx stop\n"));
+       printk("EP2 Tx stop\n");
        #endif
 
        // Trying to canceling the Irp of EP4
        if (pWb35Tx->EP4vm_state == VM_RUNNING)
                usb_unlink_urb( pWb35Tx->Tx4Urb ); // Only use unlink, let Wb35Tx_destrot to free them
        #ifdef _PE_TX_DUMP_
-       WBDEBUG(("EP4 Tx stop\n"));
+       printk("EP4 Tx stop\n");
        #endif
 }
 
                usb_free_urb( pWb35Tx->Tx2Urb );
 
        #ifdef _PE_TX_DUMP_
-       WBDEBUG(("Wb35Tx_destroy OK\n"));
+       printk("Wb35Tx_destroy OK\n");
        #endif
 }
 
 
        //The Urb is completed, check the result
        if (pWb35Tx->EP2VM_status != 0) {
-               WBDEBUG(("EP2 IoCompleteRoutine return error\n"));
+               printk("EP2 IoCompleteRoutine return error\n");
                pWb35Tx->EP2vm_state= VM_STOP;
                goto error;
        }
 
        if (retv < 0) {
                #ifdef _PE_TX_DUMP_
-               WBDEBUG(("EP2 Tx Irp sending error\n"));
+               printk("EP2 Tx Irp sending error\n");
                #endif
                goto error;
        }
 
        pHwData->Channel = channel.ChanNo;
        pHwData->band = channel.band;
        #ifdef _PE_STATE_DUMP_
-       WBDEBUG(("Set channel is %d, band =%d\n", pHwData->Channel, pHwData->band));
+       printk("Set channel is %d, band =%d\n", pHwData->Channel, pHwData->band);
        #endif
        reg->M28_MacControl &= ~0xff; // Clean channel information field
        reg->M28_MacControl |= channel.ChanNo;
 
 #include <linux/types.h>
 #include <linux/if_ether.h> /* for ETH_ALEN */
 
-#include "common.h"
-
 //[20040722 WK]
 #define HAL_LED_SET_MASK               0x001c  //20060901 Extend
 #define HAL_LED_SET_SHIFT              2
 
        //get current antenna
        priv->sLocalPara.bAntennaNo = hal_get_antenna_number(pHwData);
 #ifdef _PE_STATE_DUMP_
-       WBDEBUG(("Driver init, antenna no = %d\n", psLOCAL->bAntennaNo));
+       printk("Driver init, antenna no = %d\n", psLOCAL->bAntennaNo);
 #endif
        hal_get_hw_radio_off( pHwData );
 
        // Turn off Rx and Tx hardware ability
        hal_stop( &adapter->sHwData );
 #ifdef _PE_USB_INI_DUMP_
-       WBDEBUG(("[w35und] Hal_stop O.K.\n"));
+       printk("[w35und] Hal_stop O.K.\n");
 #endif
        msleep(100);// Waiting Irp completed