From 91d29ee1a82fedcd7d1bbf24007b31a49c47e90a Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 29 Oct 2010 07:51:47 -0700 Subject: [PATCH] beceem: remove ifdef's There were a lot of ifdef's for driver options which have no configuration options. Choose the current value and remove the ifdef. Signed-off-by: Stephen Hemminger --- drivers/staging/bcm/Bcmchar.c | 6 - drivers/staging/bcm/Bcmnet.c | 22 -- drivers/staging/bcm/DDRInit.c | 2 - drivers/staging/bcm/Debug.h | 13 - drivers/staging/bcm/InterfaceDld.c | 2 - drivers/staging/bcm/InterfaceInit.h | 4 - drivers/staging/bcm/InterfaceIsr.c | 2 - drivers/staging/bcm/InterfaceMisc.c | 2 - drivers/staging/bcm/InterfaceTx.c | 2 - drivers/staging/bcm/Macros.h | 5 - drivers/staging/bcm/Misc.c | 198 -------------- drivers/staging/bcm/Prototypes.h | 5 - drivers/staging/bcm/Transmit.c | 116 -------- .../staging/bcm/cntrl_SignalingInterface.h | 249 ------------------ drivers/staging/bcm/headers.h | 28 -- drivers/staging/bcm/led_control.c | 7 - drivers/staging/bcm/nvm.c | 18 -- drivers/staging/bcm/nvm.h | 9 - 18 files changed, 690 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 77fdfe24d999..01f961d9c70c 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -329,9 +329,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) } if( -#if !defined(BCM_SHM_INTERFACE) (((ULONG)sRdmBuffer.Register & 0x0F000000) != 0x0F000000) || -#endif ((ULONG)sRdmBuffer.Register & 0x3) ) { @@ -385,10 +383,8 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) break; } if( -#if !defined(BCM_SHM_INTERFACE) (((ULONG)sWrmBuffer.Register & 0x0F000000) != 0x0F000000) || -#endif ((ULONG)sWrmBuffer.Register & 0x3) ) { @@ -823,7 +819,6 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) bcm_kfree(pvBuffer); break; } -#ifndef BCM_SHM_INTERFACE case IOCTL_BCM_BUFFER_DOWNLOAD_START: { INT NVMAccess = down_trylock(&Adapter->NVMRdmWrmLock) ; @@ -999,7 +994,6 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) up(&Adapter->NVMRdmWrmLock); break; } -#endif case IOCTL_BE_BUCKET_SIZE: Adapter->BEBucketSize = *(PULONG)arg; Status = STATUS_SUCCESS; diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c index 4d7d8cd4bf43..3262aff8dd4a 100644 --- a/drivers/staging/bcm/Bcmnet.c +++ b/drivers/staging/bcm/Bcmnet.c @@ -50,9 +50,6 @@ static struct notifier_block bcm_notifier_block = struct net_device *gblpnetdev; /***************************************************************************************/ /* proto-type of lower function */ -#ifdef BCM_SHM_INTERFACE -const char *bcmVirtDeviceName="bcmeth"; -#endif static INT bcm_open(struct net_device *dev) { @@ -155,7 +152,6 @@ int register_networkdev(PMINI_ADAPTER Adapter) Adapter->dev->hard_header_len = ETH_HLEN + LEADER_SIZE; #endif -#ifndef BCM_SHM_INTERFACE Adapter->dev->mtu = MTU_SIZE; /* 1400 Bytes */ /* Read the MAC Address from EEPROM */ ReadMacAddressFromNVM(Adapter); @@ -176,24 +172,6 @@ int register_networkdev(PMINI_ADAPTER Adapter) Adapter->bNetdeviceNotifierRegistered = TRUE; } -#else - - Adapter->dev->mtu = CPE_MTU_SIZE; - -#if 0 - //for CPE - harcode the virtual mac address - Adapter->dev->dev_addr[0] = MII_WIMAX_MACADDRESS[0]; - Adapter->dev->dev_addr[1] = MII_WIMAX_MACADDRESS[1]; - Adapter->dev->dev_addr[2] = MII_WIMAX_MACADDRESS[2]; - Adapter->dev->dev_addr[3] = MII_WIMAX_MACADDRESS[3]; - Adapter->dev->dev_addr[4] = MII_WIMAX_MACADDRESS[4]; - Adapter->dev->dev_addr[5] = MII_WIMAX_MACADDRESS[5]; -#else - ReadMacAddressFromNVM(Adapter); -#endif - strcpy(Adapter->dev->name, bcmVirtDeviceName); //Copy the device name - -#endif result = register_netdev(Adapter->dev); if (!result) diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c index 8907e211d483..454eb8d8992b 100644 --- a/drivers/staging/bcm/DDRInit.c +++ b/drivers/staging/bcm/DDRInit.c @@ -1,6 +1,5 @@ #include "headers.h" -#ifndef BCM_SHM_INTERFACE #define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00 @@ -1298,5 +1297,4 @@ int download_ddr_settings(PMINI_ADAPTER Adapter) return retval; } -#endif diff --git a/drivers/staging/bcm/Debug.h b/drivers/staging/bcm/Debug.h index 3d788b59ab57..b384115cab3a 100644 --- a/drivers/staging/bcm/Debug.h +++ b/drivers/staging/bcm/Debug.h @@ -21,19 +21,6 @@ typedef enum _BASE_TYPE int bcm_print_buffer( UINT debug_level, const char *function_name, char *file_name, int line_number, unsigned char *buffer, int bufferlen, BASE_TYPE base); -#ifdef BCM_SHM_INTERFACE -#define CPE_VIRTUAL_ERROR_CODE_BASE_ADDR (0xBFC02E00 + 0x4C) -// ERROR codes for debugging -extern unsigned char u32ErrorCounter ; -#define ERROR_DEVICE_REMOVED 0x1 -#define ERROR_LEADER_LENGTH_ZERO 0x2 -#define ERROR_LEADER_LENGTH_CORRUPTED 0x3 -#define ERROR_NO_SKBUFF 0x4 - -#define ERROR_DL_MODULE 0xaa000000 -extern void CPE_ERROR_LOG(unsigned int module,unsigned int code); - -#endif diff --git a/drivers/staging/bcm/InterfaceDld.c b/drivers/staging/bcm/InterfaceDld.c index 60c0f29f3eef..62770e042e51 100644 --- a/drivers/staging/bcm/InterfaceDld.c +++ b/drivers/staging/bcm/InterfaceDld.c @@ -1,6 +1,5 @@ #include "headers.h" -#ifndef BCM_SHM_INTERFACE int InterfaceFileDownload( PVOID arg, struct file *flp, @@ -506,5 +505,4 @@ error: return status; } -#endif diff --git a/drivers/staging/bcm/InterfaceInit.h b/drivers/staging/bcm/InterfaceInit.h index e7a96e5c5c50..a11af81d74d9 100644 --- a/drivers/staging/bcm/InterfaceInit.h +++ b/drivers/staging/bcm/InterfaceInit.h @@ -19,16 +19,12 @@ INT InterfaceInitialize(void); INT InterfaceExit(void); -#ifndef BCM_SHM_INTERFACE INT InterfaceAdapterInit(PS_INTERFACE_ADAPTER Adapter); INT usbbcm_worker_thread(PS_INTERFACE_ADAPTER psIntfAdapter); VOID InterfaceAdapterFree(PS_INTERFACE_ADAPTER psIntfAdapter); -#else -INT InterfaceAdapterInit(PMINI_ADAPTER Adapter); -#endif #if 0 diff --git a/drivers/staging/bcm/InterfaceIsr.c b/drivers/staging/bcm/InterfaceIsr.c index f928fe4d564d..c1f8e7aa05f7 100644 --- a/drivers/staging/bcm/InterfaceIsr.c +++ b/drivers/staging/bcm/InterfaceIsr.c @@ -1,6 +1,5 @@ #include "headers.h" -#ifndef BCM_SHM_INTERFACE static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/) { @@ -199,5 +198,4 @@ void InterfaceDisableInterrupt(PMINI_ADAPTER Adapter) } -#endif diff --git a/drivers/staging/bcm/InterfaceMisc.c b/drivers/staging/bcm/InterfaceMisc.c index 8fc893b37fe4..2d98b7e846c2 100644 --- a/drivers/staging/bcm/InterfaceMisc.c +++ b/drivers/staging/bcm/InterfaceMisc.c @@ -1,6 +1,5 @@ #include "headers.h" -#ifndef BCM_SHM_INTERFACE PS_INTERFACE_ADAPTER InterfaceAdapterGet(PMINI_ADAPTER psAdapter) @@ -287,4 +286,3 @@ VOID putUsbSuspend(struct work_struct *work) } -#endif diff --git a/drivers/staging/bcm/InterfaceTx.c b/drivers/staging/bcm/InterfaceTx.c index 771f7b34d2ec..826ed93c9b56 100644 --- a/drivers/staging/bcm/InterfaceTx.c +++ b/drivers/staging/bcm/InterfaceTx.c @@ -1,6 +1,5 @@ #include "headers.h" -#ifndef BCM_SHM_INTERFACE /* Function: InterfaceTxDataPacket @@ -255,5 +254,4 @@ int InterfaceTransmitPacket(PVOID arg, PVOID data, UINT len) return TransmitTcb(psIntfAdapter, pTcb, data, len); } -#endif diff --git a/drivers/staging/bcm/Macros.h b/drivers/staging/bcm/Macros.h index 0241234605f1..5485f574b917 100644 --- a/drivers/staging/bcm/Macros.h +++ b/drivers/staging/bcm/Macros.h @@ -300,12 +300,7 @@ typedef enum _E_PHS_DSC_ACTION /* Idle Mode Related Registers */ #define DEBUG_INTERRUPT_GENERATOR_REGISTOR 0x0F00007C -#ifdef BCM_SHM_INTERFACE -#define SW_ABORT_IDLEMODE_LOC 0xbfc02f9c -#define CPE_VIRTUAL_MAILBOX_REG 0xBFC02E58 -#else #define SW_ABORT_IDLEMODE_LOC 0x0FF01FFC -#endif #define SW_ABORT_IDLEMODE_PATTERN 0xd0ea1d1e #define DEVICE_INT_OUT_EP_REG0 0x0F011870 diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index 22550f745917..cedeb8c3723e 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c @@ -157,9 +157,7 @@ VOID AdapterFree(PMINI_ADAPTER Adapter) //Free the PHS Interface PhsCleanup(&Adapter->stBCMPhsContext); -#ifndef BCM_SHM_INTERFACE BcmDeAllocFlashCSStructure(Adapter); -#endif bcm_kfree (Adapter); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "<========\n"); @@ -489,9 +487,6 @@ INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter,/**index_wr_txcntrlpkt); BCM_DEBUG_PRINT( Adapter,DBG_TYPE_TX, TX_CONTROL,DBG_LVL_ALL, "Calling transmit_packets"); atomic_set(&Adapter->TxPktAvail, 1); -#ifdef BCM_SHM_INTERFACE - virtual_mail_box_interrupt(); -#endif wake_up(&Adapter->tx_packet_wait_queue); } else @@ -787,12 +782,10 @@ void SendIdleModeResponse(PMINI_ADAPTER Adapter) down(&Adapter->rdmwrmsync); Adapter->bPreparingForLowPowerMode = TRUE; up(&Adapter->rdmwrmsync); -#ifndef BCM_SHM_INTERFACE //Killing all URBS. if(Adapter->bDoSuspend == TRUE) Bcm_kill_all_URBs((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter)); -#endif } else { @@ -811,9 +804,7 @@ void SendIdleModeResponse(PMINI_ADAPTER Adapter) { BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"fail to send the Idle mode Request \n"); Adapter->bPreparingForLowPowerMode = FALSE; -#ifndef BCM_SHM_INTERFACE StartInterruptUrb((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter)); -#endif } do_gettimeofday(&tv); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "IdleMode Msg submitter to Q :%ld ms", tv.tv_sec *1000 + tv.tv_usec /1000); @@ -985,7 +976,6 @@ __inline int reset_card_proc(PMINI_ADAPTER ps_adapter) { int retval = STATUS_SUCCESS; -#ifndef BCM_SHM_INTERFACE PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); PS_INTERFACE_ADAPTER psIntfAdapter = NULL; unsigned int value = 0, uiResetValue = 0; @@ -1006,11 +996,9 @@ __inline int reset_card_proc(PMINI_ADAPTER ps_adapter) wrmalt(ps_adapter, SYS_CFG, &value, sizeof(value)); } -#ifndef BCM_SHM_INTERFACE //killing all submitted URBs. psIntfAdapter->psAdapter->StopAllXaction = TRUE ; Bcm_kill_all_URBs(psIntfAdapter); -#endif /* Reset the UMA-B Device */ if(ps_adapter->chip_id >= T3LPB) { @@ -1111,7 +1099,6 @@ __inline int reset_card_proc(PMINI_ADAPTER ps_adapter) err_exit : psIntfAdapter->psAdapter->StopAllXaction = FALSE ; -#endif return retval; } @@ -1148,9 +1135,6 @@ int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter) UINT status = STATUS_SUCCESS; UINT value = 0; -#ifdef BCM_SHM_INTERFACE - unsigned char *pConfigFileAddr = (unsigned char *)CPE_MACXVI_CFG_ADDR; -#endif /* * Create the threads first and then download the * Firm/DDR Settings.. @@ -1169,7 +1153,6 @@ int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter) return status; } -#ifndef BCM_SHM_INTERFACE if(ps_adapter->chip_id >= T3LPB) { rdmalt(ps_adapter, SYS_CFG, &value, sizeof (value)); @@ -1299,61 +1282,12 @@ OUT: wake_up(&ps_adapter->LEDInfo.notify_led_event); } -#else - - ps_adapter->bDDRInitDone = TRUE; - //Initializing the NVM. - BcmInitNVM(ps_adapter); - - //Propagating the cal param from Flash to DDR - value = 0; - wrmalt(ps_adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 4, &value, sizeof(value)); - wrmalt(ps_adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 8, &value, sizeof(value)); - - if(ps_adapter->eNVMType == NVM_FLASH) - { - status = PropagateCalParamsFromFlashToMemory(ps_adapter); - if(status) - { - printk("\nPropogation of Cal param from flash to DDR failed ..\n" ); - } - } - - //Copy config file param to DDR. - memcpy(pConfigFileAddr,ps_adapter->pstargetparams, sizeof(STARGETPARAMS)); - - if(register_networkdev(ps_adapter)) - { - BCM_DEBUG_PRINT(ps_adapter,DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Register Netdevice failed. Cleanup needs to be performed."); - return -EIO; - } - - - status = InitLedSettings (ps_adapter); - if(status) - { - BCM_DEBUG_PRINT(ps_adapter,DBG_TYPE_PRINTK, 0, 0,"INIT LED FAILED\n"); - return status; - } - - - if(register_control_device_interface(ps_adapter) < 0) - { - BCM_DEBUG_PRINT(ps_adapter,DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Register Control Device failed. Cleanup needs to be performed."); - return -EIO; - } - - ps_adapter->fw_download_done = TRUE; -#endif return status; } int bcm_parse_target_params(PMINI_ADAPTER Adapter) { -#ifdef BCM_SHM_INTERFACE - extern void read_cfg_file(PMINI_ADAPTER Adapter); -#endif struct file *flp=NULL; mm_segment_t oldfs={0}; char *buff = NULL; @@ -1401,10 +1335,6 @@ int bcm_parse_target_params(PMINI_ADAPTER Adapter) memcpy(Adapter->pstargetparams, buff, sizeof(STARGETPARAMS)); bcm_kfree (buff); beceem_parse_target_struct(Adapter); -#ifdef BCM_SHM_INTERFACE - read_cfg_file(Adapter); - -#endif return STATUS_SUCCESS; } @@ -1640,81 +1570,21 @@ int rdm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize) { INT uiRetVal =0; -#ifndef BCM_SHM_INTERFACE uiRetVal = Adapter->interface_rdm(Adapter->pvInterfaceAdapter, uiAddress, pucBuff, sSize); if(uiRetVal < 0) return uiRetVal; -#else - int indx; - uiRetVal = STATUS_SUCCESS; - if(uiAddress & 0x10000000) { - // DDR Memory Access - uiAddress |= CACHE_ADDRESS_MASK; - memcpy(pucBuff,(unsigned char *)uiAddress ,sSize); - } - else { - // Register, SPRAM, Flash - uiAddress |= UNCACHE_ADDRESS_MASK; - if ((uiAddress & FLASH_ADDR_MASK) == (FLASH_CONTIGIOUS_START_ADDR_BCS350 & FLASH_ADDR_MASK)) - { - #if defined(FLASH_DIRECT_ACCESS) - memcpy(pucBuff,(unsigned char *)uiAddress ,sSize); - #else - printk("\nInvalid GSPI ACCESS :Addr :%#X", uiAddress); - uiRetVal = STATUS_FAILURE; - #endif - } - else if(((unsigned int )uiAddress & 0x3) || - ((unsigned int )pucBuff & 0x3) || - ((unsigned int )sSize & 0x3)) { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"rdmalt :unalligned register access uiAddress = %x,pucBuff = %x size = %x\n",(unsigned int )uiAddress,(unsigned int )pucBuff,(unsigned int )sSize); - uiRetVal = STATUS_FAILURE; - } - else { - for (indx=0;indxinterface_wrm(Adapter->pvInterfaceAdapter, uiAddress, pucBuff, sSize); -#else - int indx; - if(uiAddress & 0x10000000) { - // DDR Memory Access - uiAddress |= CACHE_ADDRESS_MASK; - memcpy((unsigned char *)(uiAddress),pucBuff,sSize); - } - else { - // Register, SPRAM, Flash - uiAddress |= UNCACHE_ADDRESS_MASK; - - if(((unsigned int )uiAddress & 0x3) || - ((unsigned int )pucBuff & 0x3) || - ((unsigned int )sSize & 0x3)) { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"wrmalt: unalligned register access uiAddress = %x,pucBuff = %x size = %x\n",(unsigned int )uiAddress,(unsigned int )pucBuff,(unsigned int )sSize); - iRetVal = STATUS_FAILURE; - } - else { - for (indx=0;indxbPreparingForLowPowerMode = TRUE; up(&Adapter->rdmwrmsync); //Killing all URBS. -#ifndef BCM_SHM_INTERFACE if(Adapter->bDoSuspend == TRUE) Bcm_kill_all_URBs((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter)); -#endif } else { @@ -1943,9 +1811,7 @@ static VOID SendShutModeResponse(PMINI_ADAPTER Adapter) BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL,"fail to send the Idle mode Request \n"); Adapter->bPreparingForLowPowerMode = FALSE; -#ifndef BCM_SHM_INTERFACE StartInterruptUrb((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter)); -#endif } } @@ -2077,11 +1943,7 @@ void update_per_sf_desc_cnts( PMINI_ADAPTER Adapter) if(!atomic_read (&Adapter->uiMBupdate)) return; -#ifdef BCM_SHM_INTERFACE - if(rdmalt(Adapter, TARGET_SFID_TXDESC_MAP_LOC, (PUINT)uibuff, sizeof(UINT) * MAX_TARGET_DSX_BUFFERS)<0) -#else if(rdmaltWithLock(Adapter, TARGET_SFID_TXDESC_MAP_LOC, (PUINT)uibuff, sizeof(UINT) * MAX_TARGET_DSX_BUFFERS)<0) -#endif { BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "rdm failed\n"); return; @@ -2179,65 +2041,5 @@ void beceem_protocol_reset (PMINI_ADAPTER Adapter) -#ifdef BCM_SHM_INTERFACE - - -#define GET_GTB_DIFF(start, end) \ -( (start) < (end) )? ( (end) - (start) ) : ( ~0x0 - ( (start) - (end)) +1 ) - -void usdelay ( unsigned int a) { - unsigned int start= *(unsigned int *)0xaf8051b4; - unsigned int end = start+1; - unsigned int diff = 0; - - while(1) { - end = *(unsigned int *)0xaf8051b4; - diff = (GET_GTB_DIFF(start,end))/80; - if (diff >= a) - break; - } -} -void read_cfg_file(PMINI_ADAPTER Adapter) { - - - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Config File Version = 0x%x \n",Adapter->pstargetparams->m_u32CfgVersion ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Center Frequency = 0x%x \n",Adapter->pstargetparams->m_u32CenterFrequency ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Band A Scan = 0x%x \n",Adapter->pstargetparams->m_u32BandAScan ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Band B Scan = 0x%x \n",Adapter->pstargetparams->m_u32BandBScan ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Band C Scan = 0x%x \n",Adapter->pstargetparams->m_u32BandCScan ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"ERTPS Options = 0x%x \n",Adapter->pstargetparams->m_u32ErtpsOptions ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"PHS Enable = 0x%x \n",Adapter->pstargetparams->m_u32PHSEnable ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Handoff Enable = 0x%x \n",Adapter->pstargetparams->m_u32HoEnable ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"HO Reserved1 = 0x%x \n",Adapter->pstargetparams->m_u32HoReserved1 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"HO Reserved2 = 0x%x \n",Adapter->pstargetparams->m_u32HoReserved2 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"MIMO Enable = 0x%x \n",Adapter->pstargetparams->m_u32MimoEnable ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"PKMv2 Enable = 0x%x \n",Adapter->pstargetparams->m_u32SecurityEnable ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Powersaving Modes Enable = 0x%x \n",Adapter->pstargetparams->m_u32PowerSavingModesEnable ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Power Saving Mode Options = 0x%x \n",Adapter->pstargetparams->m_u32PowerSavingModeOptions ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"ARQ Enable = 0x%x \n",Adapter->pstargetparams->m_u32ArqEnable ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Harq Enable = 0x%x \n",Adapter->pstargetparams->m_u32HarqEnable ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"EEPROM Flag = 0x%x \n",Adapter->pstargetparams->m_u32EEPROMFlag ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Customize = 0x%x \n",Adapter->pstargetparams->m_u32Customize ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Bandwidth = 0x%x \n",Adapter->pstargetparams->m_u32ConfigBW ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"ShutDown Timer Value = 0x%x \n",Adapter->pstargetparams->m_u32ShutDownInitThresholdTimer ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"RadioParameter = 0x%x \n",Adapter->pstargetparams->m_u32RadioParameter ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"PhyParameter1 = 0x%x \n",Adapter->pstargetparams->m_u32PhyParameter1 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"PhyParameter2 = 0x%x \n",Adapter->pstargetparams->m_u32PhyParameter2 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"PhyParameter3 = 0x%x \n",Adapter->pstargetparams->m_u32PhyParameter3 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"m_u32TestOptions = 0x%x \n",Adapter->pstargetparams->m_u32TestOptions ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"MaxMACDataperDLFrame = 0x%x \n",Adapter->pstargetparams->m_u32MaxMACDataperDLFrame ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"MaxMACDataperULFrame = 0x%x \n",Adapter->pstargetparams->m_u32MaxMACDataperULFrame ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Corr2MacFlags = 0x%x \n",Adapter->pstargetparams->m_u32Corr2MacFlags ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"HostDrvrConfig1 = 0x%x \n",Adapter->pstargetparams->HostDrvrConfig1 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"HostDrvrConfig2 = 0x%x \n",Adapter->pstargetparams->HostDrvrConfig2 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"HostDrvrConfig3 = 0x%x \n",Adapter->pstargetparams->HostDrvrConfig3 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"HostDrvrConfig4 = 0x%x \n",Adapter->pstargetparams->HostDrvrConfig4 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"HostDrvrConfig5 = 0x%x \n",Adapter->pstargetparams->HostDrvrConfig5 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"HostDrvrConfig6 = 0x%x \n",Adapter->pstargetparams->HostDrvrConfig6 ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Segmented PUSC Enable = 0x%x \n",Adapter->pstargetparams->m_u32SegmentedPUSCenable ); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"BamcEnable = 0x%x \n",Adapter->pstargetparams->m_u32BandAMCEnable ); -} - -#endif diff --git a/drivers/staging/bcm/Prototypes.h b/drivers/staging/bcm/Prototypes.h index 70ec8bcafd1e..82738be3ed48 100644 --- a/drivers/staging/bcm/Prototypes.h +++ b/drivers/staging/bcm/Prototypes.h @@ -309,11 +309,6 @@ INT buffDnldVerify(PMINI_ADAPTER Adapter, unsigned char *mappedbuffer, unsigned VOID putUsbSuspend(struct work_struct *work); BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios); -#ifdef BCM_SHM_INTERFACE -INT beceem_virtual_device_init(void); -VOID virtual_mail_box_interrupt(void); -INT beceem_virtual_device_exit(void); -#endif #endif diff --git a/drivers/staging/bcm/Transmit.c b/drivers/staging/bcm/Transmit.c index 12f9e13457db..597786a06785 100644 --- a/drivers/staging/bcm/Transmit.c +++ b/drivers/staging/bcm/Transmit.c @@ -146,18 +146,6 @@ INT bcm_transmit(struct sk_buff *skb, /**< skb */ BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_OSAL_DBG, DBG_LVL_ALL, "Pkt Len = %d, sec: %ld, usec: %ld\n", (skb->len-ETH_HLEN), tv.tv_sec, tv.tv_usec); -#ifdef BCM_SHM_INTERFACE - spin_lock(&Adapter->txtransmitlock); - if(Adapter->txtransmit_running == 0) - { - Adapter->txtransmit_running = 1; - calltransmit = 1; - } - else - calltransmit = 0; - - spin_unlock(&Adapter->txtransmitlock); -#endif if(calltransmit == 1) transmit_packets(Adapter); else @@ -165,9 +153,6 @@ INT bcm_transmit(struct sk_buff *skb, /**< skb */ if(!atomic_read(&Adapter->TxPktAvail)) { atomic_set(&Adapter->TxPktAvail, 1); -#ifdef BCM_SHM_INTERFACE - virtual_mail_box_interrupt(); -#endif wake_up(&Adapter->tx_packet_wait_queue); } } @@ -224,44 +209,8 @@ INT SendControlPacket(PMINI_ADAPTER Adapter, /**PLength); if(Adapter->device_removed) return 0; -#ifndef BCM_SHM_INTERFACE Adapter->interface_transmit(Adapter->pvInterfaceAdapter, pControlPacket, (PLeader->PLength + LEADER_SIZE)); -#else - tx_pkts_to_firmware(pControlPacket,(PLeader->PLength + LEADER_SIZE),1); - - if(PLeader->Status==IDLE_MESSAGE) - { - if(((CONTROL_MESSAGE*)PLeader)->szData[0] == GO_TO_IDLE_MODE_PAYLOAD && - ((CONTROL_MESSAGE*)PLeader)->szData[1] == TARGET_CAN_GO_TO_IDLE_MODE) - { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Idle Mode Ack Sent to the Device\n"); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Host Entering into Idle Mode\n"); - do_gettimeofday(&tv); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "IdleMode Msg sent to f/w at time :%ld ms", tv.tv_sec *1000 + tv.tv_usec /1000); - if(Adapter->bDoSuspend != TRUE) - { - Adapter->IdleMode = TRUE; - Adapter->bPreparingForLowPowerMode = FALSE ; - } - } - } - if((PLeader->Status == LINK_UP_CONTROL_REQ) && - ((PUCHAR)pControlPacket)[sizeof(LEADER)] == LINK_UP_ACK && - ((PUCHAR)pControlPacket)[sizeof(LEADER)+1] == - LINK_SHUTDOWN_REQ_FROM_FIRMWARE && - ((PUCHAR)pControlPacket)[sizeof(LEADER)+2] == SHUTDOWN_ACK_FROM_DRIVER) - { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Shut Down ACK Sent and Host entering Shut State \n"); - if(Adapter->bDoSuspend != TRUE) - { - Adapter->bShutStatus = TRUE; - Adapter->bPreparingForLowPowerMode = FALSE; - Adapter->bTriedToWakeUpFromlowPowerMode = FALSE; - } - - } -#endif ((PLINUX_DEP_DATA)Adapter->pvOsDepData)->netstats.tx_packets++; ((PLINUX_DEP_DATA)Adapter->pvOsDepData)->netstats.tx_bytes+= @@ -282,9 +231,6 @@ INT SetupNextSend(PMINI_ADAPTER Adapter, /**len = %d", Packet->len); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Vcid = %d", Vcid); -#ifndef BCM_SHM_INTERFACE status = Adapter->interface_transmit(Adapter->pvInterfaceAdapter, Packet->data, (Leader.PLength + LEADER_SIZE)); -#else - status = tx_pkts_to_firmware(Packet,Packet->len,0); -#endif if(status) { BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Tx Failed..\n"); @@ -376,9 +318,6 @@ INT SetupNextSend(PMINI_ADAPTER Adapter, /**PackInfo[QueueIndex].uiTotalTxBytes += Leader.PLength; atomic_add(Leader.PLength, &Adapter->GoodTxByteCount); atomic_inc(&Adapter->TxTotalPacketCount); -#ifdef GDMA_INTERFACE - dontfree = 1; -#endif } atomic_dec(&Adapter->CurrNumFreeTxDesc); @@ -393,23 +332,11 @@ errExit: Adapter->PackInfo[QueueIndex].NumOfPacketsSent++; atomic_dec(&Adapter->PackInfo[QueueIndex].uiPerSFTxResourceCount); -#ifdef BCM_SHM_INTERFACE - if(atomic_read(&Adapter->PackInfo[QueueIndex].uiPerSFTxResourceCount) < 0) - { - atomic_set(&Adapter->PackInfo[QueueIndex].uiPerSFTxResourceCount, 0); - } -#endif Adapter->PackInfo[QueueIndex].uiThisPeriodSentBytes += Leader.PLength; } -#ifdef GDMA_INTERFACE - if(!dontfree){ bcm_kfree_skb(Packet); - } -#else - bcm_kfree_skb(Packet); -#endif return status; } @@ -420,9 +347,7 @@ Transmit thread int tx_pkt_handler(PMINI_ADAPTER Adapter /**< pointer to adapter object*/ ) { -#ifndef BCM_SHM_INTERFACE int status = 0; -#endif UINT calltransmit = 1; BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Entring to wait for signal from the interrupt service thread!Adapter = %p",Adapter); @@ -437,9 +362,7 @@ int tx_pkt_handler(PMINI_ADAPTER Adapter /**< pointer to adapter object*/ atomic_read(&Adapter->CurrNumFreeTxDesc)) && (Adapter->device_removed == FALSE))) || (1 == Adapter->downloadDDR) || kthread_should_stop() -#ifndef BCM_SHM_INTERFACE || (TRUE == Adapter->bEndPointHalted) -#endif , msecs_to_jiffies(10)); } else{ @@ -449,9 +372,7 @@ int tx_pkt_handler(PMINI_ADAPTER Adapter /**< pointer to adapter object*/ atomic_read(&Adapter->CurrNumFreeTxDesc)) && (Adapter->device_removed == FALSE))) || (1 == Adapter->downloadDDR) || kthread_should_stop() -#ifndef BCM_SHM_INTERFACE || (TRUE == Adapter->bEndPointHalted) -#endif ); } @@ -462,7 +383,6 @@ int tx_pkt_handler(PMINI_ADAPTER Adapter /**< pointer to adapter object*/ return 0; } -#ifndef BCM_SHM_INTERFACE if(Adapter->downloadDDR == 1) { @@ -489,7 +409,6 @@ int tx_pkt_handler(PMINI_ADAPTER Adapter /**< pointer to adapter object*/ update_per_sf_desc_cnts(Adapter); } } -#endif if( atomic_read(&Adapter->CurrNumFreeTxDesc) && Adapter->LinkStatus == SYNC_UP_REQUEST && @@ -507,17 +426,6 @@ int tx_pkt_handler(PMINI_ADAPTER Adapter /**< pointer to adapter object*/ wake_up(&Adapter->process_rx_cntrlpkt); } -#ifdef BCM_SHM_INTERFACE - spin_lock_bh(&Adapter->txtransmitlock); - if(Adapter->txtransmit_running == 0) - { - Adapter->txtransmit_running = 1; - calltransmit = 1; - } - else - calltransmit = 0; - spin_unlock_bh(&Adapter->txtransmitlock); -#endif if(calltransmit) transmit_packets(Adapter); @@ -527,29 +435,5 @@ int tx_pkt_handler(PMINI_ADAPTER Adapter /**< pointer to adapter object*/ return 0; } -#ifdef BCM_SHM_INTERFACE -extern PMINI_ADAPTER psAdaptertest; -void virtual_mail_box_interrupt(void) -{ - -#ifndef GDMA_INTERFACE - PUINT ptr = (PUINT)CPE_VIRTUAL_MAILBOX_REG; - UINT intval = (UINT)((*ptr & 0xFF00) >> 8); - if (intval != 0) - { - atomic_set(&psAdaptertest->CurrNumFreeTxDesc, intval); - atomic_set (&psAdaptertest->uiMBupdate, TRUE); - - //make it to 0 - *ptr = *ptr & 0xffff00ff; - } -#endif -} -unsigned int total_tx_pkts_pending(void) -{ - return atomic_read(&psAdaptertest->TotalPacketCount); -} - -#endif diff --git a/drivers/staging/bcm/cntrl_SignalingInterface.h b/drivers/staging/bcm/cntrl_SignalingInterface.h index 4cbe30022248..7c47af7729f6 100644 --- a/drivers/staging/bcm/cntrl_SignalingInterface.h +++ b/drivers/staging/bcm/cntrl_SignalingInterface.h @@ -2,19 +2,6 @@ #define CNTRL_SIGNALING_INTERFACE_ -#ifdef BECEEM_TARGET - -#include -#include -#include -#include -#include -using namespace Beceem; -#ifdef ENABLE_CORRIGENDUM2_UPDATE -extern B_UINT32 g_u32Corr2MacFlags; -#endif - -#else #define DSA_REQ 11 @@ -28,7 +15,6 @@ extern B_UINT32 g_u32Corr2MacFlags; #define DSD_ACK 19 #define MAX_CLASSIFIERS_IN_SF 4 -#endif #define MAX_STRING_LEN 20 #define MAX_PHS_LENGTHS 255 @@ -57,37 +43,7 @@ extern B_UINT32 g_u32Corr2MacFlags; ////////////////////////structure Definitions/////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// \brief class cCPacketClassificationRule -#ifdef BECEEM_TARGET -class CCPacketClassificationRuleSI{ - public: - /// \brief Constructor for the class - CCPacketClassificationRuleSI(): - u8ClassifierRulePriority(mClassifierRulePriority), - u8IPTypeOfServiceLength(mIPTypeOfService), - u8Protocol(mProtocol), - u8IPMaskedSourceAddressLength(0), - u8IPDestinationAddressLength(0), - u8ProtocolSourcePortRangeLength(0), - u8ProtocolDestPortRangeLength(0), - u8EthernetDestMacAddressLength(0), - u8EthernetSourceMACAddressLength(0), - u8EthertypeLength(0), - u16UserPriority(mUserPriority), - u16VLANID(mVLANID), - u8AssociatedPHSI(mAssociatedPHSI), - u16PacketClassificationRuleIndex(mPacketClassifierRuleIndex), - u8VendorSpecificClassifierParamLength(mVendorSpecificClassifierParamLength), - u8IPv6FlowLableLength(mIPv6FlowLableLength), - u8ClassifierActionRule(mClassifierActionRule) - - {} - void Reset() - { - CCPacketClassificationRuleSI(); - } -#else struct _stCPacketClassificationRuleSI{ -#endif /** 16bit UserPriority Of The Service Flow*/ B_UINT16 u16UserPriority; @@ -145,29 +101,10 @@ struct _stCPacketClassificationRuleSI{ B_UINT8 u8ClassifierActionRule; B_UINT16 u16ValidityBitMap; }; -#ifndef BECEEM_TARGET typedef struct _stCPacketClassificationRuleSI CCPacketClassificationRuleSI,stCPacketClassificationRuleSI, *pstCPacketClassificationRuleSI; -#endif /// \brief class CPhsRuleSI -#ifdef BECEEM_TARGET -class CPhsRuleSI{ - public: - /// \brief Constructor for the class - CPhsRuleSI(): - u8PHSI(mPHSI), - u8PHSFLength(0), - u8PHSMLength(0), - u8PHSS(mPHSS), - u8PHSV(mPHSV), - u8VendorSpecificPHSParamsLength(mVendorSpecificPHSParamLength){} - void Reset() - { - CPhsRuleSI(); - } -#else typedef struct _stPhsRuleSI { -#endif /** 8bit PHS Index Of The Service Flow*/ B_UINT8 u8PHSI; /** PHSF Length Of The Service Flow*/ @@ -188,31 +125,11 @@ typedef struct _stPhsRuleSI { B_UINT8 u8VendorSpecificPHSParams[VENDOR_PHS_PARAM_LENGTH]; B_UINT8 u8Padding[2]; -#ifdef BECEEM_TARGET -}; -#else }stPhsRuleSI,*pstPhsRuleSI; typedef stPhsRuleSI CPhsRuleSI; -#endif /// \brief structure cConvergenceSLTypes -#ifdef BECEEM_TARGET -class CConvergenceSLTypes{ - public: - /// \brief Constructor for the class - CConvergenceSLTypes(): - u8ClassfierDSCAction(mClassifierDSCAction), - u8PhsDSCAction (mPhsDSCAction) - {} - void Reset() - { - CConvergenceSLTypes(); - cCPacketClassificationRule.Reset(); - cPhsRule.Reset(); - } -#else struct _stConvergenceSLTypes{ -#endif /** 8bit Phs Classfier Action Of The Service Flow*/ B_UINT8 u8ClassfierDSCAction; /** 8bit Phs DSC Action Of The Service Flow*/ @@ -220,111 +137,15 @@ struct _stConvergenceSLTypes{ /** 16bit Padding */ B_UINT8 u8Padding[2]; /// \brief class cCPacketClassificationRule -#ifdef BECEEM_TARGET - CCPacketClassificationRuleSI cCPacketClassificationRule; -#else stCPacketClassificationRuleSI cCPacketClassificationRule; -#endif /// \brief class CPhsRuleSI -#ifdef BECEEM_TARGET - CPhsRuleSI cPhsRule; -#else struct _stPhsRuleSI cPhsRule; -#endif }; -#ifndef BECEEM_TARGET typedef struct _stConvergenceSLTypes stConvergenceSLTypes,CConvergenceSLTypes, *pstConvergenceSLTypes; -#endif /// \brief structure CServiceFlowParamSI -#ifdef BECEEM_TARGET -class CServiceFlowParamSI{ - public: - /// \brief Constructor for the class - CServiceFlowParamSI(): - u32SFID(mSFid), - u16CID(mCid), - u8ServiceClassNameLength(mServiceClassNameLength), - u8MBSService(mMBSService), - u8QosParamSet(mQosParamSetType), - u8TrafficPriority(mTrafficPriority), - u32MaxSustainedTrafficRate(mMaximumSustainedTrafficRate), - u32MaxTrafficBurst(mMaximumTrafficBurst), - u32MinReservedTrafficRate(mMinimumReservedTrafficRate), - u8ServiceFlowSchedulingType(mServiceFlowSchedulingType), - u8RequesttransmissionPolicy(mRequestTransmissionPolicy), - u32ToleratedJitter(mToleratedJitter), - u32MaximumLatency(mMaximumLatency), - u8FixedLengthVSVariableLengthSDUIndicator - (mFixedLengthVSVariableLength), - u8SDUSize(mSDUSize), - u16TargetSAID(mTargetSAID), - u8ARQEnable(mARQEnable), - u16ARQWindowSize(mARQWindowSize), - u16ARQBlockLifeTime(mARQBlockLifeTime), - u16ARQSyncLossTimeOut(mARQSyncLossTimeOut), - u8ARQDeliverInOrder(mARQDeliverInOrder), - u16ARQRxPurgeTimeOut(mARQRXPurgeTimeOut), - //Add ARQ BLOCK SIZE, ARQ TX and RX delay initializations here - //after we move to only CORR2 - u8RxARQAckProcessingTime(mRxARQAckProcessingTime), - u8CSSpecification(mCSSpecification), - u8TypeOfDataDeliveryService(mTypeOfDataDeliveryService), - u16SDUInterArrivalTime(mSDUInterArrivalTime), - u16TimeBase(mTimeBase), - u8PagingPreference(mPagingPreference), - u8MBSZoneIdentifierassignment(mMBSZoneIdentifierassignmentLength), - u8TrafficIndicationPreference(mTrafficIndicationPreference), - u8GlobalServicesClassNameLength(mGlobalServicesClassNameLength), - u8SNFeedbackEnabled(mSNFeedbackEnabled), - u8FSNSize(mFSNSize), - u8CIDAllocation4activeBSsLength(mCIDAllocation4activeBSsLength), - u16UnsolicitedGrantInterval(mUnsolicitedGrantInterval), - u16UnsolicitedPollingInterval(mUnsolicitedPollingInterval), - u8PDUSNExtendedSubheader4HarqReordering(mPDUSNExtendedSubheader4HarqReordering), - u8MBSContentsIDLength(mMBSContentsIDLength), - u8HARQServiceFlows(mHARQServiceFlows), - u8AuthTokenLength(mAuthTokenLength), - u8HarqChannelMappingLength(mHarqChannelMappingLength), - u8VendorSpecificQoSParamLength(mVendorSpecificQoSParamLength), - bValid(FALSE), - u8TotalClassifiers() -{ -//Remove the bolck after we move to Corr2 only code -#ifdef ENABLE_CORRIGENDUM2_UPDATE - if((g_u32Corr2MacFlags & CORR_2_DSX) || (g_u32Corr2MacFlags & CORR_2_ARQ)) - { - /* IEEE Comment #627 / MTG Comment #426 */ - u16ARQBlockSize = mARQBlockSize; - if(g_u32Corr2MacFlags & CORR_2_ARQ) { - u16ARQRetryTxTimeOut = mARQRetryTimeOutTxDelay; - if(g_u32VENDOR_TYPE == VENDOR_ALCATEL) { - u16ARQRetryRxTimeOut = mARQRetryTimeOutRxDelay_ALU; - } else { - u16ARQRetryRxTimeOut = mARQRetryTimeOutRxDelay; - } - } - else - { - u16ARQRetryTxTimeOut = mARQRetryTimeOutTxDelayCorr1; - u16ARQRetryRxTimeOut = mARQRetryTimeOutRxDelayCorr1; - } - } - else -#endif - { - u16ARQBlockSize = mARQBlockSizeCorr1; - u16ARQRetryTxTimeOut = mARQRetryTimeOutTxDelayCorr1; - u16ARQRetryRxTimeOut = mARQRetryTimeOutRxDelayCorr1; - } -} - - void ComputeMacOverhead(B_UINT8 u8SecOvrhead); - B_UINT16 GetMacOverhead() { return u16MacOverhead; } -#else typedef struct _stServiceFlowParamSI{ -#endif //end of ifdef BECEEM_TARGET /** 32bitSFID Of The Service Flow*/ B_UINT32 u32SFID; @@ -496,35 +317,18 @@ typedef struct _stServiceFlowParamSI{ B_UINT8 bValid; /**< Validity flag */ B_UINT8 u8Padding; /**< Padding byte*/ -#ifdef BECEEM_TARGET -/** -Structure for Convergence SubLayer Types with a maximum of 4 classifiers -*/ - CConvergenceSLTypes cConvergenceSLTypes[MAX_CLASSIFIERS_IN_SF]; -#else /** Structure for Convergence SubLayer Types with a maximum of 4 classifiers */ stConvergenceSLTypes cConvergenceSLTypes[MAX_CLASSIFIERS_IN_SF]; -#endif -#ifdef BECEEM_TARGET -}; -#else } stServiceFlowParamSI, *pstServiceFlowParamSI; typedef stServiceFlowParamSI CServiceFlowParamSI; -#endif /** structure stLocalSFAddRequest */ typedef struct _stLocalSFAddRequest{ -#ifdef BECEEM_TARGET - _stLocalSFAddRequest( ) : - u8Type(0x00), eConnectionDir(0x00), - u16TID(0x0000), u16CID(0x0000), u16VCID(0x0000) - {} -#endif B_UINT8 u8Type; /**< Type*/ B_UINT8 eConnectionDir; /**< Connection direction*/ @@ -535,19 +339,9 @@ typedef struct _stLocalSFAddRequest{ /// \brief 16bitVCID B_UINT16 u16VCID; /**< 16bit VCID*/ /// \brief structure ParameterSet -#ifdef BECEEM_SIGNALLING_INTERFACE_API - CServiceFlowParamSI sfParameterSet; -#endif -#ifdef BECEEM_TARGET - CServiceFlowParamSI *psfParameterSet; -#else stServiceFlowParamSI *psfParameterSet; /**< structure ParameterSet*/ -#endif -#ifdef USING_VXWORKS - USE_DATA_MEMORY_MANAGER(); -#endif }stLocalSFAddRequest, *pstLocalSFAddRequest; @@ -555,12 +349,6 @@ typedef struct _stLocalSFAddRequest{ structure stLocalSFAddIndication */ typedef struct _stLocalSFAddIndication{ -#ifdef BECEEM_TARGET - _stLocalSFAddIndication( ) : - u8Type(0x00), eConnectionDir(0x00), - u16TID(0x0000), u16CID(0x0000), u16VCID(0x0000) - {} -#endif B_UINT8 u8Type; /**< Type*/ B_UINT8 eConnectionDir; /**< Connection Direction*/ @@ -571,37 +359,19 @@ typedef struct _stLocalSFAddIndication{ /// \brief 16bitVCID B_UINT16 u16VCID; /**< 16bitVCID*/ -#ifdef BECEEM_SIGNALLING_INTERFACE_API - CServiceFlowParamSI sfAuthorizedSet; - /// \brief structure AdmittedSet - CServiceFlowParamSI sfAdmittedSet; - /// \brief structure ActiveSet - CServiceFlowParamSI sfActiveSet; -#endif /// \brief structure AuthorizedSet -#ifdef BECEEM_TARGET - CServiceFlowParamSI *psfAuthorizedSet; - /// \brief structure AdmittedSet - CServiceFlowParamSI *psfAdmittedSet; - /// \brief structure ActiveSet - CServiceFlowParamSI *psfActiveSet; -#else /// \brief structure AuthorizedSet stServiceFlowParamSI *psfAuthorizedSet; /**< AuthorizedSet of type stServiceFlowParamSI*/ /// \brief structure AdmittedSet stServiceFlowParamSI *psfAdmittedSet; /**< AdmittedSet of type stServiceFlowParamSI*/ /// \brief structure ActiveSet stServiceFlowParamSI *psfActiveSet; /**< sfActiveSet of type stServiceFlowParamSI*/ -#endif B_UINT8 u8CC; /**< Confirmation Code*/ B_UINT8 u8Padd; /**< 8-bit Padding */ B_UINT16 u16Padd; /**< 16 bit Padding */ -#ifdef USING_VXWORKS - USE_DATA_MEMORY_MANAGER(); -#endif }stLocalSFAddIndication; @@ -619,33 +389,17 @@ typedef struct _stLocalSFAddIndication stLocalSFChangeIndication, *pstLocalSFCha structure stLocalSFDeleteRequest */ typedef struct _stLocalSFDeleteRequest{ -#ifdef BECEEM_TARGET - _stLocalSFDeleteRequest( ) : - u8Type(0x00), u8Padding(0x00), - u16TID(0x0000), u32SFID (0x00000000) - {} -#endif B_UINT8 u8Type; /**< Type*/ B_UINT8 u8Padding; /**< Padding byte*/ B_UINT16 u16TID; /**< TID*/ /// \brief 32bitSFID B_UINT32 u32SFID; /**< SFID*/ -#ifdef USING_VXWORKS - USE_DATA_MEMORY_MANAGER(); -#endif }stLocalSFDeleteRequest, *pstLocalSFDeleteRequest; /** structure stLocalSFDeleteIndication */ typedef struct stLocalSFDeleteIndication{ -#ifdef BECEEM_TARGET - stLocalSFDeleteIndication( ) : - u8Type(0x00), u8Padding(0x00), - u16TID(0x0000), u16CID(0x0000), - u16VCID(0x0000),u32SFID (0x00000000) - {} -#endif B_UINT8 u8Type; /**< Type */ B_UINT8 u8Padding; /**< Padding */ B_UINT16 u16TID; /**< TID */ @@ -658,9 +412,6 @@ typedef struct stLocalSFDeleteIndication{ /// \brief 8bit Confirmation code B_UINT8 u8ConfirmationCode; /**< Confirmation code */ B_UINT8 u8Padding1[3]; /**< 3 byte Padding */ -#ifdef USING_VXWORKS - USE_DATA_MEMORY_MANAGER(); -#endif }stLocalSFDeleteIndication; typedef struct _stIM_SFHostNotify diff --git a/drivers/staging/bcm/headers.h b/drivers/staging/bcm/headers.h index 9d4e3aca1b34..5867db5d0074 100644 --- a/drivers/staging/bcm/headers.h +++ b/drivers/staging/bcm/headers.h @@ -41,21 +41,7 @@ #endif #include #include -#ifndef BCM_SHM_INTERFACE #include -#endif -#ifdef BECEEM_TARGET - -#include -#include -#include -#include -#include -using namespace Beceem; -#ifdef ENABLE_CORRIGENDUM2_UPDATE -extern B_UINT32 g_u32Corr2MacFlags; -#endif -#endif #include "Typedefs.h" #include "Version.h" @@ -80,7 +66,6 @@ extern B_UINT32 g_u32Corr2MacFlags; #include "Queue.h" #include "vendorspecificextn.h" -#ifndef BCM_SHM_INTERFACE #include "InterfaceMacros.h" #include "InterfaceAdapter.h" @@ -89,21 +74,8 @@ extern B_UINT32 g_u32Corr2MacFlags; #include "InterfaceMisc.h" #include "InterfaceRx.h" #include "InterfaceTx.h" -#endif #include "InterfaceIdleMode.h" #include "InterfaceInit.h" -#ifdef BCM_SHM_INTERFACE -#include - -#ifdef GDMA_INTERFACE -#include "GdmaInterface.h" -#include "symphony.h" -#else -#include "virtual_interface.h" - -#endif - -#endif #endif diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c index 97adaae7dfc0..f2b6939f5178 100644 --- a/drivers/staging/bcm/led_control.c +++ b/drivers/staging/bcm/led_control.c @@ -497,12 +497,10 @@ static int ReadConfigFileStructure(PMINI_ADAPTER Adapter, BOOLEAN *bEnableThread { int Status = STATUS_SUCCESS; UCHAR GPIO_Array[NUM_OF_LEDS+1]; /*Array to store GPIO numbers from EEPROM*/ -#ifndef BCM_SHM_INTERFACE UINT uiIndex = 0; UINT uiNum_of_LED_Type = 0; PUCHAR puCFGData = NULL; UCHAR bData = 0; -#endif memset(GPIO_Array, DISABLE_GPIO_NUM, NUM_OF_LEDS+1); if(!Adapter->pstargetparams || IS_ERR(Adapter->pstargetparams)) @@ -524,10 +522,6 @@ static int ReadConfigFileStructure(PMINI_ADAPTER Adapter, BOOLEAN *bEnableThread *bEnableThread = FALSE; return Status; } -#ifdef BCM_SHM_INTERFACE - *bEnableThread = FALSE; - return Status ; -#else /* * CONFIG file read successfully. Deallocate the memory of * uiFileNameBufferSize @@ -578,7 +572,6 @@ static int ReadConfigFileStructure(PMINI_ADAPTER Adapter, BOOLEAN *bEnableThread } if(uiNum_of_LED_Type >= NUM_OF_LEDS) *bEnableThread = FALSE; -#endif #if 0 for(uiIndex=0; uiIndexeNVMType = NVM_FLASH; -#else BcmValidateNvmType(ps_adapter); BcmInitEEPROMQueues(ps_adapter); -#endif if(ps_adapter->eNVMType == NVM_AUTODETECT) { @@ -3070,7 +3058,6 @@ INT BcmGetFlashCSInfo(PMINI_ADAPTER Adapter) memset(Adapter->psFlashCSInfo, 0 ,sizeof(FLASH_CS_INFO)); memset(Adapter->psFlash2xCSInfo, 0 ,sizeof(FLASH2X_CS_INFO)); -#ifndef BCM_SHM_INTERFACE if(!Adapter->bDDRInitDone) { { @@ -3079,7 +3066,6 @@ INT BcmGetFlashCSInfo(PMINI_ADAPTER Adapter) } } -#endif // Reading first 8 Bytes to get the Flash Layout // MagicNumber(4 bytes) +FlashLayoutMinorVersion(2 Bytes) +FlashLayoutMajorVersion(2 Bytes) @@ -3147,9 +3133,7 @@ INT BcmGetFlashCSInfo(PMINI_ADAPTER Adapter) return STATUS_FAILURE; } ConvertEndianOf2XCSStructure(Adapter->psFlash2xCSInfo); -#ifndef BCM_SHM_INTERFACE BcmDumpFlash2XCSStructure(Adapter->psFlash2xCSInfo,Adapter); -#endif if((FLASH_CONTROL_STRUCT_SIGNATURE == Adapter->psFlash2xCSInfo->MagicNumber) && (SCSI_FIRMWARE_MINOR_VERSION <= MINOR_VERSION(Adapter->psFlash2xCSInfo->SCSIFirmwareVersion)) && (FLASH_SECTOR_SIZE_SIG == Adapter->psFlash2xCSInfo->FlashSectorSizeSig) && @@ -3181,9 +3165,7 @@ INT BcmGetFlashCSInfo(PMINI_ADAPTER Adapter) Concerns: what if CS sector size does not match with this sector size ??? what is the indication of AccessBitMap in CS in flash 2.x ???? */ -#ifndef BCM_SHM_INTERFACE Adapter->ulFlashID = BcmReadFlashRDID(Adapter); -#endif Adapter->uiFlashLayoutMajorVersion = uiFlashLayoutMajorVersion; diff --git a/drivers/staging/bcm/nvm.h b/drivers/staging/bcm/nvm.h index 6ec6ca85b501..88e394520b71 100644 --- a/drivers/staging/bcm/nvm.h +++ b/drivers/staging/bcm/nvm.h @@ -323,15 +323,6 @@ typedef struct _ISO_HEADER -#ifdef BCM_SHM_INTERFACE - -#define FLASH_ADDR_MASK 0x1F000000 -extern int bcmflash_raw_read(unsigned int flash_id, unsigned int offset, unsigned char *inbuf, unsigned int len); -extern int bcmflash_raw_write(unsigned int flash_id, unsigned int offset, unsigned char *outbuf, unsigned int len); -extern int bcmflash_raw_writenoerase(unsigned int flash_id, unsigned int offset, unsigned char *outbuf, unsigned int len); - - -#endif #define FLASH_CONTIGIOUS_START_ADDR_AFTER_INIT 0x1C000000 #define FLASH_CONTIGIOUS_START_ADDR_BEFORE_INIT 0x1F000000