diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index ca78a0f..8f382a0 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -171,15 +171,6 @@ sint _rtw_init_evt_priv(struct evt_priv *pevtpriv) pevtpriv->c2h_mem = pevtpriv->allocated_c2h_mem + 4\ - ((u32)(pevtpriv->allocated_c2h_mem) & 3); -#ifdef PLATFORM_OS_XP - pevtpriv->pc2h_mdl = IoAllocateMdl((u8 *)pevtpriv->c2h_mem, C2H_MEM_SZ , FALSE, FALSE, NULL); - - if (pevtpriv->pc2h_mdl == NULL) { - res = _FAIL; - goto exit; - } - MmBuildMdlForNonPagedPool(pevtpriv->pc2h_mdl); -#endif #endif /* end of CONFIG_SDIO_HCI */ _rtw_init_queue(&(pevtpriv->evt_queue)); diff --git a/core/rtw_mp.c b/core/rtw_mp.c index 2e41ccb..c60f48d 100644 --- a/core/rtw_mp.c +++ b/core/rtw_mp.c @@ -19,10 +19,6 @@ ******************************************************************************/ #define _RTW_MP_C_ #include -#ifdef PLATFORM_FREEBSD - #include /* for RFHIGHPID */ -#endif - #include "../hal/phydm/phydm_precomp.h" #if defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8821A) #include @@ -1766,17 +1762,6 @@ void SetPacketTx(PADAPTER padapter) if (IS_ERR(pmp_priv->tx.PktTxThread)) RTW_INFO("Create PktTx Thread Fail !!!!!\n"); #endif -#ifdef PLATFORM_FREEBSD - { - struct proc *p; - struct thread *td; - pmp_priv->tx.PktTxThread = kproc_kthread_add(mp_xmit_packet_thread, pmp_priv, - &p, &td, RFHIGHPID, 0, "MPXmitThread", "MPXmitThread"); - - if (pmp_priv->tx.PktTxThread < 0) - RTW_INFO("Create PktTx Thread Fail !!!!!\n"); - } -#endif Rtw_MPSetMacTxEDCA(padapter); exit: diff --git a/core/rtw_mp_ioctl.c b/core/rtw_mp_ioctl.c index ffeea1c..c9f564d 100644 --- a/core/rtw_mp_ioctl.c +++ b/core/rtw_mp_ioctl.c @@ -47,9 +47,6 @@ NDIS_STATUS oid_rt_wireless_mode_hdl(struct oid_par_priv *poid_par_priv) /* **************** oid_rtl_seg_81_87_80 section start **************** */ NDIS_STATUS oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif struct bb_reg_param *pbbreg; u16 offset; u32 value; @@ -83,9 +80,6 @@ NDIS_STATUS oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif struct bb_reg_param *pbbreg; u16 offset; u32 value; @@ -119,9 +113,6 @@ NDIS_STATUS oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif struct rf_reg_param *pbbreg; u8 path; u8 offset; @@ -161,9 +152,6 @@ NDIS_STATUS oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif struct rf_reg_param *pbbreg; u8 path; u8 offset; @@ -208,9 +196,6 @@ NDIS_STATUS oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv) * ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 ratevalue;/* 4 */ NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -239,9 +224,6 @@ NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 mode; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -276,9 +258,6 @@ exit: /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -298,9 +277,6 @@ NDIS_STATUS oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 Channel; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -333,9 +309,6 @@ NDIS_STATUS oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_set_bandwidth_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u16 bandwidth; u16 channel_offset; NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -368,9 +341,6 @@ NDIS_STATUS oid_rt_set_bandwidth_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 antenna; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -400,9 +370,6 @@ NDIS_STATUS oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_tx_power_control_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 tx_pwr_idx; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -535,9 +502,6 @@ NDIS_STATUS oid_rt_pro_reset_rx_packet_received_hdl(struct oid_par_priv *poid_pa /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -557,9 +521,6 @@ NDIS_STATUS oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv *poid_par_p /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -584,9 +545,6 @@ NDIS_STATUS oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv *poid_par_ /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -612,9 +570,6 @@ NDIS_STATUS oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_p /* **************** oid_rtl_seg_81_80_20 section end **************** */ NDIS_STATUS oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 bStartTest; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -647,9 +602,6 @@ NDIS_STATUS oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 bStartTest; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -682,9 +634,6 @@ NDIS_STATUS oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_p NDIS_STATUS oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 bStartTest; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -717,9 +666,6 @@ NDIS_STATUS oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *poid_ NDIS_STATUS oid_rt_pro_set_single_tone_tx_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 bStartTest; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -748,9 +694,6 @@ NDIS_STATUS oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv) { PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; if (poid_par_priv->type_of_oid != SET_OID) @@ -770,9 +713,6 @@ NDIS_STATUS oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; PNDIS_802_11_SSID pssid; @@ -806,9 +746,6 @@ NDIS_STATUS oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif pRW_Reg RegRWStruct; u32 offset, width; NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -851,9 +788,6 @@ NDIS_STATUS oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif pRW_Reg RegRWStruct; u32 offset, width, value; NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -907,9 +841,6 @@ NDIS_STATUS oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_burst_read_register_hdl(struct oid_par_priv *poid_par_priv) { #if 0 -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif pBurst_RW_Reg pBstRwReg; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -938,9 +869,6 @@ NDIS_STATUS oid_rt_pro_burst_read_register_hdl(struct oid_par_priv *poid_par_pri NDIS_STATUS oid_rt_pro_burst_write_register_hdl(struct oid_par_priv *poid_par_priv) { #if 0 -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif pBurst_RW_Reg pBstRwReg; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -971,10 +899,6 @@ NDIS_STATUS oid_rt_pro_write_txcmd_hdl(struct oid_par_priv *poid_par_priv) PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif - TX_CMD_Desc *TxCmd_Info; @@ -1004,9 +928,6 @@ NDIS_STATUS oid_rt_pro_write_txcmd_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_read16_eeprom_hdl(struct oid_par_priv *poid_par_priv) { #if 0 -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif pEEPROM_RWParam pEEPROM; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -1036,9 +957,6 @@ NDIS_STATUS oid_rt_pro_read16_eeprom_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_write16_eeprom_hdl(struct oid_par_priv *poid_par_priv) { #if 0 -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif pEEPROM_RWParam pEEPROM; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -1131,9 +1049,6 @@ NDIS_STATUS oid_rt_rd_attrib_mem_hdl(struct oid_par_priv *poid_par_priv) struct io_queue *pio_queue = (struct io_queue *)Adapter->pio_queue; struct intf_hdl *pintfhdl = &pio_queue->intf; -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; #ifdef CONFIG_SDIO_HCI @@ -1171,9 +1086,6 @@ NDIS_STATUS oid_rt_wr_attrib_mem_hdl(struct oid_par_priv *poid_par_priv) struct io_queue *pio_queue = (struct io_queue *)Adapter->pio_queue; struct intf_hdl *pintfhdl = &pio_queue->intf; -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; #ifdef CONFIG_SDIO_HCI @@ -1207,9 +1119,6 @@ NDIS_STATUS oid_rt_pro_set_rf_intfs_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -1292,9 +1201,6 @@ NDIS_STATUS oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv) { PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -1315,9 +1221,6 @@ NDIS_STATUS oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv) /* ----------------------------------------------------------------------------- */ NDIS_STATUS oid_rt_get_thermal_meter_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; u8 thermal = 0; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -1346,9 +1249,6 @@ NDIS_STATUS oid_rt_pro_read_tssi_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -1385,9 +1285,6 @@ NDIS_STATUS oid_rt_pro_read_tssi_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -1417,9 +1314,6 @@ NDIS_STATUS oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv *poid_par_priv NDIS_STATUS oid_rt_pro_set_basic_rate_hdl(struct oid_par_priv *poid_par_priv) { #if 0 -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 ratevalue; u8 datarates[NumRates]; int i; @@ -1518,9 +1412,6 @@ NDIS_STATUS oid_rt_pro_h2c_set_rate_table_hdl(struct oid_par_priv *poid_par_priv #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; struct setratable_parm *prate_table; @@ -1692,9 +1583,6 @@ NDIS_STATUS oid_rt_pro_add_sta_info_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; struct sta_info *psta = NULL; @@ -1736,9 +1624,6 @@ NDIS_STATUS oid_rt_pro_dele_sta_info_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; struct sta_info *psta = NULL; @@ -1871,9 +1756,6 @@ NDIS_STATUS oid_rt_pro_query_dr_variable_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; DR_VARIABLE_STRUCT *pdrv_var; @@ -1935,9 +1817,6 @@ NDIS_STATUS oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif PEFUSE_ACCESS_STRUCT pefuse; u8 *data; u16 addr = 0, cnts = 0, max_available_size = 0; @@ -1976,9 +1855,6 @@ NDIS_STATUS oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif PEFUSE_ACCESS_STRUCT pefuse; u8 *data; u16 addr = 0, cnts = 0, max_available_size = 0; @@ -2013,9 +1889,6 @@ NDIS_STATUS oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif PPGPKT_STRUCT ppgpkt; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -2058,9 +1931,6 @@ NDIS_STATUS oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_get_efuse_current_size_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u16 size; u8 ret; NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -2124,9 +1994,6 @@ NDIS_STATUS oid_rt_pro_efuse_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u8 *data; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -2175,9 +2042,6 @@ NDIS_STATUS oid_rt_set_crystal_cap_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u32 crystal_cap = 0; @@ -2205,9 +2069,6 @@ NDIS_STATUS oid_rt_set_crystal_cap_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_set_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u8 rx_pkt_type; /* u32 rcr_val32; */ NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -2287,9 +2148,6 @@ NDIS_STATUS oid_rt_pro_set_tx_agc_offset_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif NDIS_STATUS status = NDIS_STATUS_SUCCESS; u32 txagc; @@ -2465,9 +2323,6 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv) /* ------------------------------------------------------------------------------ */ NDIS_STATUS oid_rt_set_power_down_hdl(struct oid_par_priv *poid_par_priv) { -#ifdef PLATFORM_OS_XP - _irqL oldirql; -#endif u8 bpwrup; NDIS_STATUS status = NDIS_STATUS_SUCCESS; #ifdef PLATFORM_LINUX @@ -2506,9 +2361,6 @@ NDIS_STATUS oid_rt_get_power_mode_hdl(struct oid_par_priv *poid_par_priv) #if 0 NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); - /* #ifdef PLATFORM_OS_XP */ - /* _irqL oldirql; - * #endif */ if (poid_par_priv->type_of_oid != QUERY_OID) { diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 6e59bc5..246afbb 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -2376,21 +2376,6 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe) /* ptr -= 16; */ /* _rtw_memcpy(ptr, get_rxmem(precvframe), 16); */ } else { -#ifdef PLATFORM_OS_XP - NDIS_PACKET_8021Q_INFO VlanPriInfo; - UINT32 UserPriority = precvframe->u.hdr.attrib.priority; - UINT32 VlanID = (pvlan != NULL ? get_vlan_id(pvlan) : 0); - - VlanPriInfo.Value = /* Get current value. */ - NDIS_PER_PACKET_INFO_FROM_PACKET(precvframe->u.hdr.pkt, Ieee8021QInfo); - - VlanPriInfo.TagHeader.UserPriority = UserPriority; - VlanPriInfo.TagHeader.VlanId = VlanID ; - - VlanPriInfo.TagHeader.CanonicalFormatId = 0; /* Should be zero. */ - VlanPriInfo.TagHeader.Reserved = 0; /* Should be zero. */ - NDIS_PER_PACKET_INFO_FROM_PACKET(precvframe->u.hdr.pkt, Ieee8021QInfo) = VlanPriInfo.Value; -#endif } if (eth_type == 0x8712) { /* append rx status for mp test packets */ diff --git a/core/rtw_security.c b/core/rtw_security.c index b413893..0d80e65 100644 --- a/core/rtw_security.c +++ b/core/rtw_security.c @@ -987,13 +987,11 @@ static void next_key(u8 *key, sint round); static void byte_sub(u8 *in, u8 *out); static void shift_row(u8 *in, u8 *out); static void mix_column(u8 *in, u8 *out); -#ifndef PLATFORM_FREEBSD static void add_round_key(u8 *shiftrow_in, u8 *mcol_in, u8 *block_in, sint round, u8 *out); -#endif /* PLATFORM_FREEBSD */ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext); @@ -2133,7 +2131,6 @@ BIP_exit: } #endif /* CONFIG_IEEE80211W */ -#ifndef PLATFORM_FREEBSD /* compress 512-bits */ static int sha256_compress(struct sha256_state *md, unsigned char *buf) { @@ -2403,7 +2400,7 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem, _len[1] = 32; sha256_vector(2, _addr, _len, mac); } -#endif /* PLATFORM_FREEBSD */ + /** * sha256_prf - SHA256-based Pseudo-Random Function (IEEE 802.11r, 8.5.1.5.2) * @key: Key for PRF @@ -2417,7 +2414,6 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem, * This function is used to derive new, cryptographically separate keys from a * given key. */ -#ifndef PLATFORM_FREEBSD /* Baron */ static void sha256_prf(u8 *key, size_t key_len, char *label, u8 *data, size_t data_len, u8 *buf, size_t buf_len) { @@ -2454,7 +2450,6 @@ static void sha256_prf(u8 *key, size_t key_len, char *label, counter++; } } -#endif /* PLATFORM_FREEBSD Baron */ /* AES tables*/ const u32 Te0[256] = { @@ -2633,7 +2628,6 @@ const u8 rcons[] = { * * @return the number of rounds for the given cipher key size. */ -#ifndef PLATFORM_FREEBSD /* Baron */ static void rijndaelKeySetupEnc(u32 rk[/*44*/], const u8 cipherKey[]) { int i; @@ -2850,7 +2844,6 @@ int omac1_aes_128(u8 *key, u8 *data, size_t data_len, u8 *mac) { return omac1_aes_128_vector(key, 1, &data, &data_len, mac); } -#endif /* PLATFORM_FREEBSD Baron */ #ifdef CONFIG_TDLS void wpa_tdls_generate_tpk(_adapter *padapter, PVOID sta) diff --git a/include/basic_types.h b/include/basic_types.h index 2cb1a0d..f13207d 100644 --- a/include/basic_types.h +++ b/include/basic_types.h @@ -74,50 +74,6 @@ #endif -#ifdef PLATFORM_FREEBSD - - typedef signed char s8; - typedef unsigned char u8; - - typedef signed short s16; - typedef unsigned short u16; - - typedef signed int s32; - typedef unsigned int u32; - - typedef unsigned int uint; - typedef signed int sint; - typedef long atomic_t; - - typedef signed long long s64; - typedef unsigned long long u64; - #define IN - #define OUT - #define VOID void - #define NDIS_OID uint - #define NDIS_STATUS uint - - #ifndef PVOID - typedef void *PVOID; - /* #define PVOID (void *) */ - #endif - typedef u32 dma_addr_t; - #define UCHAR u8 - #define USHORT u16 - #define UINT u32 - #define ULONG u32 - - typedef void (*proc_t)(void *); - - typedef unsigned int __kernel_size_t; - typedef int __kernel_ssize_t; - - typedef __kernel_size_t SIZE_T; - typedef __kernel_ssize_t SSIZE_T; - #define FIELD_OFFSET(s, field) ((SSIZE_T)&((s *)(0))->field) - -#endif - #define MEM_ALIGNMENT_OFFSET (sizeof (SIZE_T)) #define MEM_ALIGNMENT_PADDING (sizeof(SIZE_T) - 1) diff --git a/include/byteorder/generic.h b/include/byteorder/generic.h index 0b82bdf..0bdc44c 100644 --- a/include/byteorder/generic.h +++ b/include/byteorder/generic.h @@ -169,15 +169,11 @@ extern __u32 ntohl(__u32); extern __u32 htonl(__u32); #else /* defined(PLATFORM_LINUX) || (defined (__GLIBC__) && __GLIBC__ >= 2) */ - #ifndef PLATFORM_FREEBSD - extern unsigned long int ntohl(unsigned long int); - extern unsigned long int htonl(unsigned long int); - #endif + extern unsigned long int ntohl(unsigned long int); + extern unsigned long int htonl(unsigned long int); #endif -#ifndef PLATFORM_FREEBSD extern unsigned short int ntohs(unsigned short int); extern unsigned short int htons(unsigned short int); -#endif #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) || defined(PLATFORM_MPIXEL) diff --git a/include/byteorder/swab.h b/include/byteorder/swab.h index 90e8ebc..354e347 100644 --- a/include/byteorder/swab.h +++ b/include/byteorder/swab.h @@ -109,19 +109,11 @@ __inline static __u64 __arch__swab64(__u64 x) #define __swab64(x) __fswab64(x) #endif /* __swab16 */ -#ifdef PLATFORM_FREEBSD - __inline static __u16 __fswab16(__u16 x) -#else - __inline static const __u16 __fswab16(__u16 x) -#endif /* PLATFORM_FREEBSD */ +__inline static const __u16 __fswab16(__u16 x) { return __arch__swab16(x); } -#ifdef PLATFORM_FREEBSD - __inline static __u32 __fswab32(__u32 x) -#else - __inline static const __u32 __fswab32(__u32 x) -#endif /* PLATFORM_FREEBSD */ +__inline static const __u32 __fswab32(__u32 x) { return __arch__swab32(x); } diff --git a/include/custom_gpio.h b/include/custom_gpio.h index 5691d9a..5cada97 100644 --- a/include/custom_gpio.h +++ b/include/custom_gpio.h @@ -4,14 +4,6 @@ #include #include -#ifdef PLATFORM_OS_XP - #include -#endif - -#ifdef PLATFORM_OS_CE - #include -#endif - #ifdef PLATFORM_LINUX #include #endif diff --git a/include/drv_types.h b/include/drv_types.h index 5b81f35..3467b91 100644 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -39,14 +39,6 @@ #include #endif -#ifdef PLATFORM_OS_XP - #include -#endif - -#ifdef PLATFORM_OS_CE - #include -#endif - #ifdef PLATFORM_LINUX #include #endif @@ -981,11 +973,6 @@ struct dvobj_priv { struct usb_device *pusbdev; #endif/* PLATFORM_LINUX */ -#ifdef PLATFORM_FREEBSD - struct usb_interface *pusbintf; - struct usb_device *pusbdev; -#endif/* PLATFORM_FREEBSD */ - #endif/* CONFIG_USB_HCI */ /*-------- below is for PCIE INTERFACE --------*/ @@ -1323,11 +1310,6 @@ struct _ADAPTER { #endif /* PLATFORM_LINUX */ -#ifdef PLATFORM_FREEBSD - _nic_hdl pifp; - int bup; - _lock glock; -#endif /* PLATFORM_FREEBSD */ u8 mac_addr[ETH_ALEN]; int net_closed; diff --git a/include/drv_types_sdio.h b/include/drv_types_sdio.h index b3e8b47..1595701 100644 --- a/include/drv_types_sdio.h +++ b/include/drv_types_sdio.h @@ -33,16 +33,6 @@ #endif /* CONFIG_PLATFORM_SPRD */ #endif -#ifdef PLATFORM_OS_XP - #include - #include -#endif - -#ifdef PLATFORM_OS_CE - #include -#endif - - typedef struct sdio_data { u8 func_number; @@ -56,22 +46,6 @@ typedef struct sdio_data { unsigned int clock; #endif -#ifdef PLATFORM_OS_XP - PDEVICE_OBJECT pphysdevobj; - PDEVICE_OBJECT pfuncdevobj; - PDEVICE_OBJECT pnextdevobj; - SDBUS_INTERFACE_STANDARD sdbusinft; - u8 nextdevstacksz; -#endif - -#ifdef PLATFORM_OS_CE - SD_DEVICE_HANDLE hDevice; - SD_CARD_RCA sd_rca; - SD_CARD_INTERFACE card_intf; - BOOLEAN enableIsarWithStatus; - WCHAR active_path[MAX_ACTIVE_REG_PATH]; - SD_HOST_BLOCK_CAPABILITY sd_host_blk_cap; -#endif } SDIO_DATA, *PSDIO_DATA; #define dvobj_to_sdio_func(d) ((d)->intf_data.func) diff --git a/include/gspi_osintf.h b/include/gspi_osintf.h index e51d2e4..8b13789 100644 --- a/include/gspi_osintf.h +++ b/include/gspi_osintf.h @@ -1,30 +1 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - ******************************************************************************/ -#ifndef __SDIO_OSINTF_H__ -#define __SDIO_OSINTF_H__ - -#ifdef PLATFORM_OS_CE - extern NDIS_STATUS ce_sd_get_dev_hdl(PADAPTER padapter); - SD_API_STATUS ce_sd_int_callback(SD_DEVICE_HANDLE hDevice, PADAPTER padapter); - extern void sd_setup_irs(PADAPTER padapter); -#endif - -#endif diff --git a/include/ieee80211.h b/include/ieee80211.h index 131840e..d75066e 100644 --- a/include/ieee80211.h +++ b/include/ieee80211.h @@ -21,15 +21,6 @@ #define __IEEE80211_H -#ifndef CONFIG_RTL8711FW - - #if defined PLATFORM_OS_XP - #include - #endif -#else - -#endif - #define MGMT_QUEUE_NUM 5 #define ETH_ALEN 6 @@ -342,7 +333,7 @@ struct ieee_ibss_seq { _list list; }; -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) || defined(PLATFORM_FREEBSD) +#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) struct rtw_ieee80211_hdr { u16 frame_ctl; @@ -503,7 +494,7 @@ enum eap_type { #define P80211_OUI_LEN 3 -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) || defined(PLATFORM_FREEBSD) +#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) struct ieee80211_snap_hdr { @@ -974,7 +965,6 @@ struct ieee80211_frag_entry { u8 dst_addr[ETH_ALEN]; }; -#ifndef PLATFORM_FREEBSD /* Baron BSD has already defined */ struct ieee80211_stats { uint tx_unicast_frames; uint tx_multicast_frames; @@ -998,7 +988,7 @@ struct ieee80211_stats { uint rx_message_in_msg_fragments; uint rx_message_in_bad_msg_fragments; }; -#endif /* PLATFORM_FREEBSD */ + struct ieee80211_softmac_stats { uint rx_ass_ok; uint rx_ass_err; @@ -1271,8 +1261,6 @@ join_res: > 0: TID */ -#ifndef PLATFORM_FREEBSD /* Baron BSD has already defined */ - enum ieee80211_state { /* the card is not linked at all */ @@ -1311,7 +1299,6 @@ enum ieee80211_state { IEEE80211_LINKED_SCANNING, }; -#endif /* PLATFORM_FREEBSD */ #define DEFAULT_MAX_SCAN_AGE (15 * HZ) #define DEFAULT_FTS 2346 @@ -1324,12 +1311,6 @@ enum ieee80211_state { #define PORT_FMT "%u" #define PORT_ARG(x) ntohs(*((__be16 *)(x))) -#ifdef PLATFORM_FREEBSD /* Baron change func to macro */ -#define is_multicast_mac_addr(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff)) -#define is_broadcast_mac_addr(Addr) ((((Addr[0]) & 0xff) == 0xff) && (((Addr[1]) & 0xff) == 0xff) && \ - (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ - (((Addr[5]) & 0xff) == 0xff)) -#else extern __inline int is_multicast_mac_addr(const u8 *addr) { return (addr[0] != 0xff) && (0x01 & addr[0]); @@ -1346,7 +1327,6 @@ extern __inline int is_zero_mac_addr(const u8 *addr) return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00)); } -#endif /* PLATFORM_FREEBSD */ #define CFG_IEEE80211_RESERVE_FCS (1<<0) #define CFG_IEEE80211_COMPUTE_FCS (1<<1) @@ -1506,9 +1486,7 @@ enum rtw_ieee80211_ft_actioncode { #define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs) * 00:50:F2 */ -#ifndef PLATFORM_FREEBSD /* Baron BSD has defined */ - #define WME_OUI_TYPE 2 -#endif /* PLATFORM_FREEBSD */ +#define WME_OUI_TYPE 2 #define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0 #define WME_OUI_SUBTYPE_PARAMETER_ELEMENT 1 #define WME_OUI_SUBTYPE_TSPEC_ELEMENT 2 diff --git a/include/osdep_intf.h b/include/osdep_intf.h index b1e18d4..54ba03d 100644 --- a/include/osdep_intf.h +++ b/include/osdep_intf.h @@ -61,27 +61,6 @@ struct intf_priv { u8 bio_timer_cancel; #endif #endif - -#ifdef PLATFORM_OS_XP -#ifdef CONFIG_SDIO_HCI - /* below is for io_rwmem... */ - PMDL pmdl; - PSDBUS_REQUEST_PACKET sdrp; - PSDBUS_REQUEST_PACKET recv_sdrp; - PSDBUS_REQUEST_PACKET xmit_sdrp; - - PIRP piorw_irp; - -#endif -#ifdef CONFIG_USB_HCI - PURB piorw_urb; - PIRP piorw_irp; - u8 io_irp_cnt; - u8 bio_irp_pending; - _sema io_retevt; -#endif -#endif - }; @@ -136,11 +115,6 @@ void rtw_ndev_notifier_unregister(void); #endif /* PLATFORM_LINUX */ - -#ifdef PLATFORM_FREEBSD -extern int rtw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); -#endif - void rtw_ips_dev_unload(_adapter *padapter); #ifdef CONFIG_IPS diff --git a/include/osdep_service.h b/include/osdep_service.h index f464218..b5bc245 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -33,22 +33,10 @@ #define _FALSE 0 -#ifdef PLATFORM_FREEBSD - #include -#endif - #ifdef PLATFORM_LINUX #include #endif -#ifdef PLATFORM_OS_XP - #include -#endif - -#ifdef PLATFORM_OS_CE - #include -#endif - #define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl #define RTW_DECLARE_TIMER_HDL(name) void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS) @@ -289,9 +277,7 @@ extern void _rtw_init_listhead(_list *list); extern u32 rtw_is_list_empty(_list *phead); extern void rtw_list_insert_head(_list *plist, _list *phead); extern void rtw_list_insert_tail(_list *plist, _list *phead); -#ifndef PLATFORM_FREEBSD extern void rtw_list_delete(_list *plist); -#endif /* PLATFORM_FREEBSD */ extern void _rtw_init_sema(_sema *sema, int init_val); extern void _rtw_free_sema(_sema *sema); @@ -299,9 +285,7 @@ extern void _rtw_up_sema(_sema *sema); extern u32 _rtw_down_sema(_sema *sema); extern void _rtw_mutex_init(_mutex *pmutex); extern void _rtw_mutex_free(_mutex *pmutex); -#ifndef PLATFORM_FREEBSD extern void _rtw_spinlock_init(_lock *plock); -#endif /* PLATFORM_FREEBSD */ extern void _rtw_spinlock_free(_lock *plock); extern void _rtw_spinlock(_lock *plock); extern void _rtw_spinunlock(_lock *plock); @@ -347,10 +331,6 @@ __inline static unsigned char _cancel_timer_ex(_timer *ptimer) #ifdef PLATFORM_LINUX return del_timer_sync(ptimer); #endif -#ifdef PLATFORM_FREEBSD - _cancel_timer(ptimer, 0); - return 0; -#endif } static __inline void thread_enter(char *name) @@ -361,9 +341,6 @@ static __inline void thread_enter(char *name) #endif allow_signal(SIGTERM); #endif -#ifdef PLATFORM_FREEBSD - printf("%s", "RTKTHREAD_enter"); -#endif } __inline static void flush_signals_thread(void) @@ -377,7 +354,7 @@ __inline static void flush_signals_thread(void) __inline static _OS_STATUS res_to_status(sint res) { -#if defined(PLATFORM_LINUX) || defined (PLATFORM_MPIXEL) || defined (PLATFORM_FREEBSD) +#if defined(PLATFORM_LINUX) || defined (PLATFORM_MPIXEL) return res; #endif } @@ -526,11 +503,7 @@ extern int rtw_is_file_readable(const char *path); extern int rtw_is_file_readable_with_size(const char *path, u32 *sz); extern int rtw_retrieve_from_file(const char *path, u8 *buf, u32 sz); extern int rtw_store_to_file(const char *path, u8 *buf, u32 sz); - - -#ifndef PLATFORM_FREEBSD extern void rtw_free_netdev(struct net_device *netdev); -#endif /* PLATFORM_FREEBSD */ extern u64 rtw_modular64(u64 x, u64 y); diff --git a/include/osdep_service_bsd.h b/include/osdep_service_bsd.h index b56ccbb..612fbdb 100644 --- a/include/osdep_service_bsd.h +++ b/include/osdep_service_bsd.h @@ -381,11 +381,7 @@ static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len) } static inline unsigned char *skb_pull(struct sk_buff *skb, unsigned int len) { - #ifdef PLATFORM_FREEBSD - return __skb_pull(skb, len); - #else return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len); - #endif //PLATFORM_FREEBSD } static inline u32 skb_queue_len(const struct sk_buff_head *list_) { diff --git a/include/rtl8188e_recv.h b/include/rtl8188e_recv.h index 2f574a8..d1ccb7b 100644 --- a/include/rtl8188e_recv.h +++ b/include/rtl8188e_recv.h @@ -27,22 +27,18 @@ #if defined(CONFIG_USB_HCI) #ifndef MAX_RECVBUF_SZ - #ifdef PLATFORM_OS_CE - #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */ - #else - #ifndef CONFIG_MINIMAL_MEMORY_USAGE - /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ - /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */ - /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ - #ifdef CONFIG_PLATFORM_MSTAR - #define MAX_RECVBUF_SZ (8192) /* 8K */ - #else - #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ - #endif - /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #ifndef CONFIG_MINIMAL_MEMORY_USAGE + /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ + /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */ + /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ + #ifdef CONFIG_PLATFORM_MSTAR + #define MAX_RECVBUF_SZ (8192) /* 8K */ #else - #define MAX_RECVBUF_SZ (4000) /* about 4K */ + #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ #endif + /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #else + #define MAX_RECVBUF_SZ (4000) /* about 4K */ #endif #endif /* !MAX_RECVBUF_SZ */ diff --git a/include/rtl8188f_recv.h b/include/rtl8188f_recv.h index a5bfb54..8321ee2 100644 --- a/include/rtl8188f_recv.h +++ b/include/rtl8188f_recv.h @@ -22,24 +22,20 @@ #if defined(CONFIG_USB_HCI) #ifndef MAX_RECVBUF_SZ - #ifdef PLATFORM_OS_CE - #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */ + #ifdef CONFIG_MINIMAL_MEMORY_USAGE + #define MAX_RECVBUF_SZ (4000) /* about 4K */ #else - #ifdef CONFIG_MINIMAL_MEMORY_USAGE - #define MAX_RECVBUF_SZ (4000) /* about 4K */ + #ifdef CONFIG_PLATFORM_MSTAR + #define MAX_RECVBUF_SZ (8192) /* 8K */ + #elif defined(CONFIG_PLATFORM_HISILICON) + #define MAX_RECVBUF_SZ (16384) /* 16k */ #else - #ifdef CONFIG_PLATFORM_MSTAR - #define MAX_RECVBUF_SZ (8192) /* 8K */ - #elif defined(CONFIG_PLATFORM_HISILICON) - #define MAX_RECVBUF_SZ (16384) /* 16k */ - #else - #define MAX_RECVBUF_SZ (32768) /* 32k */ - #endif - /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ - /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ - /* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */ - /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #define MAX_RECVBUF_SZ (32768) /* 32k */ #endif + /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ + /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ + /* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */ + /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ #endif #endif /* !MAX_RECVBUF_SZ */ #elif defined(CONFIG_PCI_HCI) diff --git a/include/rtl8192e_recv.h b/include/rtl8192e_recv.h index 34f081c..2d157ab 100644 --- a/include/rtl8192e_recv.h +++ b/include/rtl8192e_recv.h @@ -23,24 +23,20 @@ #if defined(CONFIG_USB_HCI) #ifndef MAX_RECVBUF_SZ - #ifdef PLATFORM_OS_CE - #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */ + #ifdef CONFIG_MINIMAL_MEMORY_USAGE + #define MAX_RECVBUF_SZ (4000) /* about 4K */ #else - #ifdef CONFIG_MINIMAL_MEMORY_USAGE - #define MAX_RECVBUF_SZ (4000) /* about 4K */ + #ifdef CONFIG_PREALLOC_RX_SKB_BUFFER + #define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/ + #elif defined(CONFIG_PLATFORM_HISILICON) + #define MAX_RECVBUF_SZ (16384) /* 16k */ #else - #ifdef CONFIG_PREALLOC_RX_SKB_BUFFER - #define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/ - #elif defined(CONFIG_PLATFORM_HISILICON) - #define MAX_RECVBUF_SZ (16384) /* 16k */ - #else - #define MAX_RECVBUF_SZ (32768) /* 32k */ - #endif - /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ - /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ - /* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */ - /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #define MAX_RECVBUF_SZ (32768) /* 32k */ #endif + /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ + /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ + /* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */ + /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ #endif #endif /* !MAX_RECVBUF_SZ */ diff --git a/include/rtl8703b_recv.h b/include/rtl8703b_recv.h index 4c82652..c233fe1 100644 --- a/include/rtl8703b_recv.h +++ b/include/rtl8703b_recv.h @@ -27,22 +27,18 @@ #if defined(CONFIG_USB_HCI) #ifndef MAX_RECVBUF_SZ - #ifdef PLATFORM_OS_CE - #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */ - #else - #ifndef CONFIG_MINIMAL_MEMORY_USAGE - /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ - /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */ - /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ - #ifdef CONFIG_PLATFORM_MSTAR - #define MAX_RECVBUF_SZ (8192) /* 8K */ - #else - #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ - #endif - /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #ifndef CONFIG_MINIMAL_MEMORY_USAGE + /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ + /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */ + /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ + #ifdef CONFIG_PLATFORM_MSTAR + #define MAX_RECVBUF_SZ (8192) /* 8K */ #else - #define MAX_RECVBUF_SZ (4000) /* about 4K */ + #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ #endif + /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #else + #define MAX_RECVBUF_SZ (4000) /* about 4K */ #endif #endif /* !MAX_RECVBUF_SZ */ diff --git a/include/rtl8723b_recv.h b/include/rtl8723b_recv.h index fd9faef..bd93368 100644 --- a/include/rtl8723b_recv.h +++ b/include/rtl8723b_recv.h @@ -27,22 +27,18 @@ #if defined(CONFIG_USB_HCI) #ifndef MAX_RECVBUF_SZ - #ifdef PLATFORM_OS_CE - #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */ - #else - #ifndef CONFIG_MINIMAL_MEMORY_USAGE - /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ - /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */ - /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ - #ifdef CONFIG_PLATFORM_MSTAR - #define MAX_RECVBUF_SZ (8192) /* 8K */ - #else - #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ - #endif - /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #ifndef CONFIG_MINIMAL_MEMORY_USAGE + /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ + /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */ + /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ + #ifdef CONFIG_PLATFORM_MSTAR + #define MAX_RECVBUF_SZ (8192) /* 8K */ #else - #define MAX_RECVBUF_SZ (4000) /* about 4K */ + #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ #endif + /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #else + #define MAX_RECVBUF_SZ (4000) /* about 4K */ #endif #endif /* !MAX_RECVBUF_SZ */ diff --git a/include/rtl8723d_recv.h b/include/rtl8723d_recv.h index 6343ec8..713b89a 100644 --- a/include/rtl8723d_recv.h +++ b/include/rtl8723d_recv.h @@ -27,22 +27,18 @@ #if defined(CONFIG_USB_HCI) #ifndef MAX_RECVBUF_SZ - #ifdef PLATFORM_OS_CE - #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */ - #else - #ifndef CONFIG_MINIMAL_MEMORY_USAGE - /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ - /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */ - /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ - #ifdef CONFIG_PLATFORM_MSTAR - #define MAX_RECVBUF_SZ (8192) /* 8K */ - #else - #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ - #endif - /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #ifndef CONFIG_MINIMAL_MEMORY_USAGE + /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ + /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */ + /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ + #ifdef CONFIG_PLATFORM_MSTAR + #define MAX_RECVBUF_SZ (8192) /* 8K */ #else - #define MAX_RECVBUF_SZ (4000) /* about 4K */ + #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ #endif + /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #else + #define MAX_RECVBUF_SZ (4000) /* about 4K */ #endif #endif /* !MAX_RECVBUF_SZ */ diff --git a/include/rtl8812a_recv.h b/include/rtl8812a_recv.h index 4e7b4ed..0c5ca00 100644 --- a/include/rtl8812a_recv.h +++ b/include/rtl8812a_recv.h @@ -23,27 +23,23 @@ #if defined(CONFIG_USB_HCI) #ifndef MAX_RECVBUF_SZ - #ifdef PLATFORM_OS_CE - #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */ - #else - #ifndef CONFIG_MINIMAL_MEMORY_USAGE - #ifdef CONFIG_PREALLOC_RX_SKB_BUFFER - #define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/ - #else - #define MAX_RECVBUF_SZ (32768) /*32k*/ - #endif - /* #define MAX_RECVBUF_SZ (24576) */ /* 24k */ - /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ - /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ - /* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */ - /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ - #ifdef CONFIG_PLATFORM_NOVATEK_NT72668 - #undef MAX_RECVBUF_SZ - #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ - #endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */ + #ifndef CONFIG_MINIMAL_MEMORY_USAGE + #ifdef CONFIG_PREALLOC_RX_SKB_BUFFER + #define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/ #else - #define MAX_RECVBUF_SZ (4000) /* about 4K */ + #define MAX_RECVBUF_SZ (32768) /*32k*/ #endif + /* #define MAX_RECVBUF_SZ (24576) */ /* 24k */ + /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ + /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ + /* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */ + /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #ifdef CONFIG_PLATFORM_NOVATEK_NT72668 + #undef MAX_RECVBUF_SZ + #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ + #endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */ + #else + #define MAX_RECVBUF_SZ (4000) /* about 4K */ #endif #endif /* !MAX_RECVBUF_SZ */ diff --git a/include/rtl8814a_recv.h b/include/rtl8814a_recv.h index e9626f3..710b1b2 100644 --- a/include/rtl8814a_recv.h +++ b/include/rtl8814a_recv.h @@ -23,23 +23,19 @@ #if defined(CONFIG_USB_HCI) #ifndef MAX_RECVBUF_SZ - #ifdef PLATFORM_OS_CE - #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */ - #else - #ifndef CONFIG_MINIMAL_MEMORY_USAGE - #ifdef CONFIG_PLATFORM_MSTAR - #define MAX_RECVBUF_SZ (8192) /* 8K */ - #else - #define MAX_RECVBUF_SZ (32768) /* 32k */ - #endif - /* #define MAX_RECVBUF_SZ (24576) */ /* 24k */ - /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ - /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ - /* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */ - /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #ifndef CONFIG_MINIMAL_MEMORY_USAGE + #ifdef CONFIG_PLATFORM_MSTAR + #define MAX_RECVBUF_SZ (8192) /* 8K */ #else - #define MAX_RECVBUF_SZ (4000) /* about 4K */ + #define MAX_RECVBUF_SZ (32768) /* 32k */ #endif + /* #define MAX_RECVBUF_SZ (24576) */ /* 24k */ + /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ + /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ + /* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */ + /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ + #else + #define MAX_RECVBUF_SZ (4000) /* about 4K */ #endif #endif /* !MAX_RECVBUF_SZ */ diff --git a/include/rtl8822bu_hal.h b/include/rtl8822bu_hal.h index 495b391..cd71a16 100644 --- a/include/rtl8822bu_hal.h +++ b/include/rtl8822bu_hal.h @@ -34,15 +34,11 @@ /* recv_buffer must be large than usb agg size */ #ifndef MAX_RECVBUF_SZ - #ifdef PLATFORM_OS_CE - #define MAX_RECVBUF_SZ (8192+1024) - #else /* !PLATFORM_OS_CE */ - #ifndef CONFIG_MINIMAL_MEMORY_USAGE - #define MAX_RECVBUF_SZ (32768) - #else - #define MAX_RECVBUF_SZ (4000) - #endif - #endif /* PLATFORM_OS_CE */ + #ifndef CONFIG_MINIMAL_MEMORY_USAGE + #define MAX_RECVBUF_SZ (32768) + #else + #define MAX_RECVBUF_SZ (4000) + #endif #endif /* !MAX_RECVBUF_SZ */ /* rtl8822bu_ops.c */ diff --git a/include/rtw_cmd.h b/include/rtw_cmd.h index eef01da..1cd6aee 100644 --- a/include/rtw_cmd.h +++ b/include/rtw_cmd.h @@ -31,11 +31,7 @@ #define MAX_RSPSZ 512 #define MAX_EVTSZ 1024 -#ifdef PLATFORM_OS_CE - #define CMDBUFF_ALIGN_SZ 4 -#else - #define CMDBUFF_ALIGN_SZ 512 -#endif +#define CMDBUFF_ALIGN_SZ 512 struct cmd_obj { _adapter *padapter; @@ -118,9 +114,6 @@ struct evt_priv { #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) u8 *c2h_mem; u8 *allocated_c2h_mem; -#ifdef PLATFORM_OS_XP - PMDL pc2h_mdl; -#endif #endif }; diff --git a/include/rtw_debug.h b/include/rtw_debug.h index a06d43b..83b2cdd 100644 --- a/include/rtw_debug.h +++ b/include/rtw_debug.h @@ -66,9 +66,6 @@ enum { #if defined PLATFORM_LINUX #define _dbgdump printk #define _seqdump seq_printf -#elif defined PLATFORM_FREEBSD - #define _dbgdump printf - #define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg) #endif #ifdef CONFIG_RTW_DEBUG diff --git a/include/rtw_io.h b/include/rtw_io.h index fbcbe65..3cf55bb 100644 --- a/include/rtw_io.h +++ b/include/rtw_io.h @@ -143,27 +143,8 @@ struct io_req { u8 *pbuf; _sema sema; -#ifdef PLATFORM_OS_CE -#ifdef CONFIG_USB_HCI - /* URB handler for rtw_write_mem */ - USB_TRANSFER usb_transfer_write_mem; -#endif -#endif - void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt); u8 *cnxt; - -#ifdef PLATFORM_OS_XP - PMDL pmdl; - PIRP pirp; - -#ifdef CONFIG_SDIO_HCI - PSDBUS_REQUEST_PACKET sdrp; -#endif - -#endif - - }; struct intf_hdl { diff --git a/include/rtw_ioctl_set.h b/include/rtw_ioctl_set.h index 12a7cc7..91f51a8 100644 --- a/include/rtw_ioctl_set.h +++ b/include/rtw_ioctl_set.h @@ -29,14 +29,6 @@ typedef struct _BSSIDInfo { } BSSIDInfo, *PBSSIDInfo; -#ifdef PLATFORM_OS_XP -typedef struct _NDIS_802_11_PMKID { - u32 Length; - u32 BSSIDInfoCount; - BSSIDInfo BSSIDInfo[1]; -} NDIS_802_11_PMKID, *PNDIS_802_11_PMKID; -#endif - u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key); u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, NDIS_802_11_AUTHENTICATION_MODE authmode); u8 rtw_set_802_11_bssid(_adapter *padapter, u8 *bssid); diff --git a/include/rtw_mp.h b/include/rtw_mp.h index 4fd158b..524ec70 100644 --- a/include/rtw_mp.h +++ b/include/rtw_mp.h @@ -44,14 +44,9 @@ struct mp_xmit_frame { u8 *mem_addr; u32 sz[8]; -#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) +#if defined(PLATFORM_LINUX) PURB pxmit_urb[8]; #endif - -#ifdef PLATFORM_OS_XP - PIRP pxmit_irp[8]; -#endif - u8 bpending[8]; sint ac_tag[8]; sint last[8]; diff --git a/include/rtw_mp_ioctl.h b/include/rtw_mp_ioctl.h index e6a9a23..6208f1d 100644 --- a/include/rtw_mp_ioctl.h +++ b/include/rtw_mp_ioctl.h @@ -78,24 +78,7 @@ typedef struct _DR_VARIABLE_STRUCT_ { /* int mp_start_joinbss(_adapter *padapter, NDIS_802_11_SSID *pssid); */ /* void _irqlevel_changed_(_irqL *irqlevel, BOOLEANunsigned char bLower); */ -#ifdef PLATFORM_OS_XP -static void _irqlevel_changed_(_irqL *irqlevel, u8 bLower) -{ - - if (bLower == LOWER) { - *irqlevel = KeGetCurrentIrql(); - - if (*irqlevel > PASSIVE_LEVEL) - KeLowerIrql(PASSIVE_LEVEL); - } else { - if (KeGetCurrentIrql() == PASSIVE_LEVEL) - KeRaiseIrql(DISPATCH_LEVEL, irqlevel); - } - -} -#else #define _irqlevel_changed_(a, b) -#endif /* oid_rtl_seg_81_80_00 */ NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv); diff --git a/include/rtw_recv.h b/include/rtw_recv.h index 716216a..a49b9d5 100644 --- a/include/rtw_recv.h +++ b/include/rtw_recv.h @@ -20,40 +20,25 @@ #ifndef _RTW_RECV_H_ #define _RTW_RECV_H_ -#ifdef PLATFORM_OS_XP - #ifdef CONFIG_SDIO_HCI - #define NR_RECVBUFF 1024/* 512 */ /* 128 */ +#ifdef CONFIG_SINGLE_RECV_BUF + #define NR_RECVBUFF (1) +#else + #if defined(CONFIG_GSPI_HCI) + #define NR_RECVBUFF (32) + #elif defined(CONFIG_SDIO_HCI) + #define NR_RECVBUFF (8) #else - #define NR_RECVBUFF (16) + #define NR_RECVBUFF (8) #endif -#elif defined(PLATFORM_OS_CE) - #ifdef CONFIG_SDIO_HCI - #define NR_RECVBUFF (128) - #else - #define NR_RECVBUFF (4) - #endif -#else /* PLATFORM_LINUX /PLATFORM_BSD */ +#endif /* CONFIG_SINGLE_RECV_BUF */ +#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER + #define NR_PREALLOC_RECV_SKB (rtw_rtkm_get_nr_recv_skb()>>1) +#else /*!CONFIG_PREALLOC_RX_SKB_BUFFER */ + #define NR_PREALLOC_RECV_SKB 8 +#endif /* CONFIG_PREALLOC_RX_SKB_BUFFER */ - #ifdef CONFIG_SINGLE_RECV_BUF - #define NR_RECVBUFF (1) - #else - #if defined(CONFIG_GSPI_HCI) - #define NR_RECVBUFF (32) - #elif defined(CONFIG_SDIO_HCI) - #define NR_RECVBUFF (8) - #else - #define NR_RECVBUFF (8) - #endif - #endif /* CONFIG_SINGLE_RECV_BUF */ - #ifdef CONFIG_PREALLOC_RX_SKB_BUFFER - #define NR_PREALLOC_RECV_SKB (rtw_rtkm_get_nr_recv_skb()>>1) - #else /*!CONFIG_PREALLOC_RX_SKB_BUFFER */ - #define NR_PREALLOC_RECV_SKB 8 - #endif /* CONFIG_PREALLOC_RX_SKB_BUFFER */ - - #ifdef CONFIG_RTW_NAPI - #define RTL_NAPI_WEIGHT (32) - #endif +#ifdef CONFIG_RTW_NAPI + #define RTL_NAPI_WEIGHT (32) #endif #define NR_RECVFRAME 256 @@ -413,14 +398,9 @@ struct recv_priv { #endif /* CONFIG_USB_INTERRUPT_IN_PIPE */ #endif -#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) -#ifdef PLATFORM_FREEBSD - struct task irq_prepare_beacon_tasklet; - struct task recv_tasklet; -#else /* PLATFORM_FREEBSD */ +#if defined(PLATFORM_LINUX) struct tasklet_struct irq_prepare_beacon_tasklet; struct tasklet_struct recv_tasklet; -#endif /* PLATFORM_FREEBSD */ struct sk_buff_head free_recv_skb_queue; struct sk_buff_head rx_skb_queue; #ifdef CONFIG_RTW_NAPI @@ -431,7 +411,7 @@ struct recv_priv { struct ifqueue rx_indicate_queue; #endif /* CONFIG_RX_INDICATE_QUEUE */ -#endif /* defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) */ +#endif /* defined(PLATFORM_LINUX) */ u8 *pallocated_recv_buf; u8 *precv_buf; /* 4 alignment */ @@ -520,20 +500,12 @@ struct recv_buf { #ifdef CONFIG_USB_HCI -#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) +#if defined(PLATFORM_LINUX) PURB purb; dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */ u32 alloc_sz; #endif -#ifdef PLATFORM_OS_XP - PIRP pirp; -#endif - -#ifdef PLATFORM_OS_CE - USB_TRANSFER usb_transfer_read_port; -#endif - u8 irp_pending; int transfer_len; @@ -542,9 +514,6 @@ struct recv_buf { #ifdef PLATFORM_LINUX _pkt *pskb; #endif -#ifdef PLATFORM_FREEBSD /* skb solution */ - struct sk_buff *pskb; -#endif /* PLATFORM_FREEBSD */ /* skb solution */ }; diff --git a/include/rtw_xmit.h b/include/rtw_xmit.h index 7ae57e1..2f27e4b 100644 --- a/include/rtw_xmit.h +++ b/include/rtw_xmit.h @@ -61,17 +61,13 @@ #define NR_XMITBUFF (128) #endif -#ifdef PLATFORM_OS_CE +#ifdef CONFIG_PCI_HCI #define XMITBUF_ALIGN_SZ 4 #else - #ifdef CONFIG_PCI_HCI - #define XMITBUF_ALIGN_SZ 4 + #ifdef USB_XMITBUF_ALIGN_SZ + #define XMITBUF_ALIGN_SZ (USB_XMITBUF_ALIGN_SZ) #else - #ifdef USB_XMITBUF_ALIGN_SZ - #define XMITBUF_ALIGN_SZ (USB_XMITBUF_ALIGN_SZ) - #else - #define XMITBUF_ALIGN_SZ 512 - #endif + #define XMITBUF_ALIGN_SZ 512 #endif #endif @@ -533,19 +529,11 @@ struct xmit_buf { u8 bulkout_id; /* for halmac */ #endif /* RTW_HALMAC */ -#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) +#if defined(PLATFORM_LINUX) PURB pxmit_urb[8]; dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */ #endif -#ifdef PLATFORM_OS_XP - PIRP pxmit_irp[8]; -#endif - -#ifdef PLATFORM_OS_CE - USB_TRANSFER usb_transfer_write_port; -#endif - u8 bpending[8]; sint last[8]; @@ -560,11 +548,6 @@ struct xmit_buf { u32 ff_hwaddr; u8 pg_num; u8 agg_num; -#ifdef PLATFORM_OS_XP - PMDL pxmitbuf_mdl; - PIRP pxmitbuf_irp; - PSDBUS_REQUEST_PACKET pxmitbuf_sdrp; -#endif #endif #ifdef CONFIG_PCI_HCI @@ -732,15 +715,8 @@ struct xmit_priv { _sema tx_retevt;/* all tx return event; */ u8 txirp_cnt; -#ifdef PLATFORM_OS_CE - USB_TRANSFER usb_transfer_write_port; - /* USB_TRANSFER usb_transfer_write_mem; */ -#endif #ifdef PLATFORM_LINUX struct tasklet_struct xmit_tasklet; -#endif -#ifdef PLATFORM_FREEBSD - struct task xmit_tasklet; #endif /* per AC pending irp */ int beq_cnt; diff --git a/include/sdio_ops_ce.h b/include/sdio_ops_ce.h index 59ca381..8b13789 100644 --- a/include/sdio_ops_ce.h +++ b/include/sdio_ops_ce.h @@ -1,54 +1 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - ******************************************************************************/ -#ifndef _SDIO_OPS_WINCE_H_ -#define _SDIO_OPS_WINCE_H_ -#include -#include -#include -#include - - -#ifdef PLATFORM_OS_CE - - -extern u8 sdbus_cmd52r_ce(struct intf_priv *pintfpriv, u32 addr); - - -extern void sdbus_cmd52w_ce(struct intf_priv *pintfpriv, u32 addr, u8 val8); - - -uint sdbus_read_blocks_to_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); - -extern uint sdbus_read_bytes_to_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); - - -extern uint sdbus_write_blocks_from_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf, u8 async); - -extern uint sdbus_write_bytes_from_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); -extern u8 sdbus_func1cmd52r_ce(struct intf_priv *pintfpriv, u32 addr); -extern void sdbus_func1cmd52w_ce(struct intf_priv *pintfpriv, u32 addr, u8 val8); -extern uint sdbus_read_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata); -extern uint sdbus_write_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata); -extern void sdio_read_int(_adapter *padapter, u32 addr, u8 sz, void *pdata); - -#endif - -#endif diff --git a/include/sdio_ops_xp.h b/include/sdio_ops_xp.h index 5020365..8b13789 100644 --- a/include/sdio_ops_xp.h +++ b/include/sdio_ops_xp.h @@ -1,54 +1 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - ******************************************************************************/ -#ifndef _SDIO_OPS_XP_H_ -#define _SDIO_OPS_XP_H_ -#include -#include -#include -#include - - -#ifdef PLATFORM_OS_XP - - -extern u8 sdbus_cmd52r_xp(struct intf_priv *pintfpriv, u32 addr); - - -extern void sdbus_cmd52w_xp(struct intf_priv *pintfpriv, u32 addr, u8 val8); - - -uint sdbus_read_blocks_to_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); - -extern uint sdbus_read_bytes_to_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); - - -extern uint sdbus_write_blocks_from_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf, u8 async); - -extern uint sdbus_write_bytes_from_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); -extern u8 sdbus_func1cmd52r_xp(struct intf_priv *pintfpriv, u32 addr); -extern void sdbus_func1cmd52w_xp(struct intf_priv *pintfpriv, u32 addr, u8 val8); -extern uint sdbus_read_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata); -extern uint sdbus_write_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata); -extern void sdio_read_int(_adapter *padapter, u32 addr, u8 sz, void *pdata); - -#endif - -#endif diff --git a/include/sdio_osintf.h b/include/sdio_osintf.h index d2906bd..8b13789 100644 --- a/include/sdio_osintf.h +++ b/include/sdio_osintf.h @@ -1,30 +1 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - ******************************************************************************/ -#ifndef __SDIO_OSINTF_H__ -#define __SDIO_OSINTF_H__ - -#ifdef PLATFORM_OS_CE -extern NDIS_STATUS ce_sd_get_dev_hdl(PADAPTER padapter); -SD_API_STATUS ce_sd_int_callback(SD_DEVICE_HANDLE hDevice, PADAPTER padapter); -extern void sd_setup_irs(PADAPTER padapter); -#endif - -#endif diff --git a/include/wifi.h b/include/wifi.h index 244767e..9a53060 100644 --- a/include/wifi.h +++ b/include/wifi.h @@ -785,7 +785,7 @@ struct rtw_ieee80211_bar { #define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004 -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW) || defined(PLATFORM_FREEBSD) +#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW) diff --git a/include/wlan_bssdef.h b/include/wlan_bssdef.h index 042966e..d8d1f5d 100644 --- a/include/wlan_bssdef.h +++ b/include/wlan_bssdef.h @@ -273,251 +273,6 @@ typedef struct _NDIS_802_11_TEST { #endif /* end of #ifdef PLATFORM_LINUX */ -#ifdef PLATFORM_FREEBSD - -#define NDIS_802_11_LENGTH_SSID 32 -#define NDIS_802_11_LENGTH_RATES 8 -#define NDIS_802_11_LENGTH_RATES_EX 16 - -typedef unsigned char NDIS_802_11_MAC_ADDRESS[6]; -typedef long NDIS_802_11_RSSI; /* in dBm */ -typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */ -typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */ - - -typedef ULONG NDIS_802_11_KEY_INDEX; -typedef unsigned long long NDIS_802_11_KEY_RSC; - - -typedef struct _NDIS_802_11_SSID { - ULONG SsidLength; - UCHAR Ssid[32]; -} NDIS_802_11_SSID, *PNDIS_802_11_SSID; - -typedef enum _NDIS_802_11_NETWORK_TYPE { - Ndis802_11FH, - Ndis802_11DS, - Ndis802_11OFDM5, - Ndis802_11OFDM24, - Ndis802_11NetworkTypeMax /* not a real type, defined as an upper bound */ -} NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE; - -typedef struct _NDIS_802_11_CONFIGURATION_FH { - ULONG Length; /* Length of structure */ - ULONG HopPattern; /* As defined by 802.11, MSB set */ - ULONG HopSet; /* to one if non-802.11 */ - ULONG DwellTime; /* units are Kusec */ -} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH; - - -/* - FW will only save the channel number in DSConfig. - ODI Handler will convert the channel number to freq. number. -*/ -typedef struct _NDIS_802_11_CONFIGURATION { - ULONG Length; /* Length of structure */ - ULONG BeaconPeriod; /* units are Kusec */ - ULONG ATIMWindow; /* units are Kusec */ - ULONG DSConfig; /* channel number */ - NDIS_802_11_CONFIGURATION_FH FHConfig; -} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION; - - - -typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE { - Ndis802_11IBSS, - Ndis802_11Infrastructure, - Ndis802_11AutoUnknown, - Ndis802_11InfrastructureMax, /* Not a real value, defined as upper bound */ - Ndis802_11APMode -} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE; - - - - - -typedef struct _NDIS_802_11_FIXED_IEs { - UCHAR Timestamp[8]; - USHORT BeaconInterval; - USHORT Capabilities; -} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs; - - - -typedef struct _NDIS_802_11_VARIABLE_IEs { - UCHAR ElementID; - UCHAR Length; - UCHAR data[1]; -} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs; - - - -/* - - - -Length is the 4 bytes multiples of the sume of - sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG) -+ sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION) -+ sizeof (NDIS_802_11_RATES_EX) + IELength - -Except the IELength, all other fields are fixed length. Therefore, we can define a marco to present the -partial sum. - -*/ -#if 0 -typedef struct _NDIS_WLAN_BSSID_EX { - ULONG Length; - NDIS_802_11_MAC_ADDRESS MacAddress; - UCHAR Reserved[2];/* [0]: IS beacon frame, [1]:optimum_antenna=>For antenna diversity; */ - NDIS_802_11_SSID Ssid; - ULONG Privacy; - NDIS_802_11_RSSI Rssi; - NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; - NDIS_802_11_CONFIGURATION Configuration; - NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; - NDIS_802_11_RATES_EX SupportedRates; - ULONG IELength; - UCHAR IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */ -} NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX; - - -typedef struct _NDIS_802_11_BSSID_LIST_EX { - ULONG NumberOfItems; - NDIS_WLAN_BSSID_EX Bssid[1]; -} NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX; -#endif - -typedef enum _NDIS_802_11_AUTHENTICATION_MODE { - Ndis802_11AuthModeOpen, - Ndis802_11AuthModeShared, - Ndis802_11AuthModeAutoSwitch, - Ndis802_11AuthModeWPA, - Ndis802_11AuthModeWPAPSK, - Ndis802_11AuthModeWPANone, - Ndis802_11AuthModeMax /* Not a real mode, defined as upper bound */ -} NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE; - -typedef enum _NDIS_802_11_WEP_STATUS { - Ndis802_11WEPEnabled, - Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled, - Ndis802_11WEPDisabled, - Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled, - Ndis802_11WEPKeyAbsent, - Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent, - Ndis802_11WEPNotSupported, - Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported, - Ndis802_11Encryption2Enabled, - Ndis802_11Encryption2KeyAbsent, - Ndis802_11Encryption3Enabled, - Ndis802_11Encryption3KeyAbsent -} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS, -NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS; - - -#define NDIS_802_11_AI_REQFI_CAPABILITIES 1 -#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2 -#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4 - -#define NDIS_802_11_AI_RESFI_CAPABILITIES 1 -#define NDIS_802_11_AI_RESFI_STATUSCODE 2 -#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4 - -typedef struct _NDIS_802_11_AI_REQFI { - USHORT Capabilities; - USHORT ListenInterval; - NDIS_802_11_MAC_ADDRESS CurrentAPAddress; -} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI; - -typedef struct _NDIS_802_11_AI_RESFI { - USHORT Capabilities; - USHORT StatusCode; - USHORT AssociationId; -} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI; - -typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION { - ULONG Length; - USHORT AvailableRequestFixedIEs; - NDIS_802_11_AI_REQFI RequestFixedIEs; - ULONG RequestIELength; - ULONG OffsetRequestIEs; - USHORT AvailableResponseFixedIEs; - NDIS_802_11_AI_RESFI ResponseFixedIEs; - ULONG ResponseIELength; - ULONG OffsetResponseIEs; -} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION; - -typedef enum _NDIS_802_11_RELOAD_DEFAULTS { - Ndis802_11ReloadWEPKeys -} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS; - - -/* Key mapping keys require a BSSID */ -typedef struct _NDIS_802_11_KEY { - ULONG Length; /* Length of this structure */ - ULONG KeyIndex; - ULONG KeyLength; /* length of key in bytes */ - NDIS_802_11_MAC_ADDRESS BSSID; - NDIS_802_11_KEY_RSC KeyRSC; - UCHAR KeyMaterial[32]; /* variable length depending on above field */ -} NDIS_802_11_KEY, *PNDIS_802_11_KEY; - -typedef struct _NDIS_802_11_REMOVE_KEY { - ULONG Length; /* Length of this structure */ - ULONG KeyIndex; - NDIS_802_11_MAC_ADDRESS BSSID; -} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY; - -typedef struct _NDIS_802_11_WEP { - ULONG Length; /* Length of this structure */ - ULONG KeyIndex; /* 0 is the per-client key, 1-N are the global keys */ - ULONG KeyLength; /* length of key in bytes */ - UCHAR KeyMaterial[16];/* variable length depending on above field */ -} NDIS_802_11_WEP, *PNDIS_802_11_WEP; - -typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST { - ULONG Length; /* Length of structure */ - NDIS_802_11_MAC_ADDRESS Bssid; - ULONG Flags; -} NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST; - -typedef enum _NDIS_802_11_STATUS_TYPE { - Ndis802_11StatusType_Authentication, - Ndis802_11StatusType_MediaStreamMode, - Ndis802_11StatusType_PMKID_CandidateList, - Ndis802_11StatusTypeMax /* not a real type, defined as an upper bound */ -} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE; - -typedef struct _NDIS_802_11_STATUS_INDICATION { - NDIS_802_11_STATUS_TYPE StatusType; -} NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION; - -/* mask for authentication/integrity fields */ -#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f -#define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01 -#define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02 -#define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06 -#define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E - -/* MIC check time, 60 seconds. */ -#define MIC_CHECK_TIME 60000000 - -typedef struct _NDIS_802_11_AUTHENTICATION_EVENT { - NDIS_802_11_STATUS_INDICATION Status; - NDIS_802_11_AUTHENTICATION_REQUEST Request[1]; -} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT; - -typedef struct _NDIS_802_11_TEST { - ULONG Length; - ULONG Type; - union { - NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent; - NDIS_802_11_RSSI RssiTrigger; - } tt; -} NDIS_802_11_TEST, *PNDIS_802_11_TEST; - - -#endif /* PLATFORM_FREEBSD */ #ifndef Ndis802_11APMode #define Ndis802_11APMode (Ndis802_11InfrastructureMax+1) #endif @@ -644,7 +399,6 @@ enum UAPSD_MAX_SP { * WPA2 */ -#ifndef PLATFORM_OS_CE typedef struct _PMKID_CANDIDATE { NDIS_802_11_MAC_ADDRESS BSSID; ULONG Flags; @@ -671,7 +425,6 @@ typedef struct _NDIS_802_11_CAPABILITY { NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1]; } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY; -#endif #endif /* #ifndef WLAN_BSSDEF_H_ */ diff --git a/include/xmit_osdep.h b/include/xmit_osdep.h index 21515b2..7f18186 100644 --- a/include/xmit_osdep.h +++ b/include/xmit_osdep.h @@ -30,12 +30,6 @@ struct pkt_file { SIZE_T buf_len; }; -#ifdef PLATFORM_FREEBSD -#define NR_XMITFRAME 256 -extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); -extern void rtw_xmit_entry_wrap(struct ifnet *pifp); -#endif /* PLATFORM_FREEBSD */ - #ifdef PLATFORM_LINUX #define NR_XMITFRAME 256 diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index d885f1b..4fa1031 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -84,9 +84,6 @@ inline u8 *_rtw_vmalloc(u32 sz) #ifdef PLATFORM_LINUX pbuf = vmalloc(sz); #endif -#ifdef PLATFORM_FREEBSD - pbuf = malloc(sz, M_DEVBUF, M_NOWAIT); -#endif #ifdef DBG_MEMORY_LEAK #ifdef PLATFORM_LINUX @@ -107,9 +104,6 @@ inline u8 *_rtw_zvmalloc(u32 sz) pbuf = _rtw_vmalloc(sz); if (pbuf != NULL) memset(pbuf, 0, sz); -#endif -#ifdef PLATFORM_FREEBSD - pbuf = malloc(sz, M_DEVBUF, M_ZERO | M_NOWAIT); #endif return pbuf; } @@ -119,9 +113,6 @@ inline void _rtw_vmfree(u8 *pbuf, u32 sz) #ifdef PLATFORM_LINUX vfree(pbuf); #endif -#ifdef PLATFORM_FREEBSD - free(pbuf, M_DEVBUF); -#endif #ifdef DBG_MEMORY_LEAK #ifdef PLATFORM_LINUX atomic_dec(&_malloc_cnt); @@ -144,9 +135,6 @@ u8 *_rtw_malloc(u32 sz) pbuf = kmalloc(sz, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); #endif -#ifdef PLATFORM_FREEBSD - pbuf = malloc(sz, M_DEVBUF, M_NOWAIT); -#endif #ifdef DBG_MEMORY_LEAK #ifdef PLATFORM_LINUX if (pbuf != NULL) { @@ -163,9 +151,6 @@ u8 *_rtw_malloc(u32 sz) u8 *_rtw_zmalloc(u32 sz) { -#ifdef PLATFORM_FREEBSD - return malloc(sz, M_DEVBUF, M_ZERO | M_NOWAIT); -#else /* PLATFORM_FREEBSD */ u8 *pbuf = _rtw_malloc(sz); if (pbuf != NULL) { @@ -176,7 +161,6 @@ u8 *_rtw_zmalloc(u32 sz) } return pbuf; -#endif /* PLATFORM_FREEBSD */ } void _rtw_mfree(u8 *pbuf, u32 sz) @@ -191,9 +175,6 @@ void _rtw_mfree(u8 *pbuf, u32 sz) kfree(pbuf); #endif -#ifdef PLATFORM_FREEBSD - free(pbuf, M_DEVBUF); -#endif #ifdef DBG_MEMORY_LEAK #ifdef PLATFORM_LINUX atomic_dec(&_malloc_cnt); @@ -203,62 +184,11 @@ void _rtw_mfree(u8 *pbuf, u32 sz) } -#ifdef PLATFORM_FREEBSD -/* review again */ -struct sk_buff *dev_alloc_skb(unsigned int size) -{ - struct sk_buff *skb = NULL; - u8 *data = NULL; - - /* skb = (struct sk_buff *)_rtw_zmalloc(sizeof(struct sk_buff)); */ /* for skb->len, etc. */ - skb = (struct sk_buff *)_rtw_malloc(sizeof(struct sk_buff)); - if (!skb) - goto out; - data = _rtw_malloc(size); - if (!data) - goto nodata; - - skb->head = (unsigned char *)data; - skb->data = (unsigned char *)data; - skb->tail = (unsigned char *)data; - skb->end = (unsigned char *)data + size; - skb->len = 0; - /* printf("%s()-%d: skb=%p, skb->head = %p\n", __FUNCTION__, __LINE__, skb, skb->head); */ - -out: - return skb; -nodata: - _rtw_mfree((u8 *)skb, sizeof(struct sk_buff)); - skb = NULL; - goto out; - -} - -void dev_kfree_skb_any(struct sk_buff *skb) -{ - /* printf("%s()-%d: skb->head = %p\n", __FUNCTION__, __LINE__, skb->head); */ - if (skb->head) - _rtw_mfree(skb->head, 0); - /* printf("%s()-%d: skb = %p\n", __FUNCTION__, __LINE__, skb); */ - if (skb) - _rtw_mfree((u8 *)skb, 0); -} -struct sk_buff *skb_clone(const struct sk_buff *skb) -{ - return NULL; -} - -#endif /* PLATFORM_FREEBSD */ - inline struct sk_buff *_rtw_skb_alloc(u32 sz) { #ifdef PLATFORM_LINUX return __dev_alloc_skb(sz, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); #endif /* PLATFORM_LINUX */ - -#ifdef PLATFORM_FREEBSD - return dev_alloc_skb(sz); -#endif /* PLATFORM_FREEBSD */ } inline void _rtw_skb_free(struct sk_buff *skb) @@ -271,10 +201,6 @@ inline struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb) #ifdef PLATFORM_LINUX return skb_copy(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); #endif /* PLATFORM_LINUX */ - -#ifdef PLATFORM_FREEBSD - return NULL; -#endif /* PLATFORM_FREEBSD */ } inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb) @@ -282,10 +208,6 @@ inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb) #ifdef PLATFORM_LINUX return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); #endif /* PLATFORM_LINUX */ - -#ifdef PLATFORM_FREEBSD - return skb_clone(skb); -#endif /* PLATFORM_FREEBSD */ } inline struct sk_buff *_rtw_pskb_copy(struct sk_buff *skb) { @@ -296,10 +218,6 @@ inline struct sk_buff *_rtw_pskb_copy(struct sk_buff *skb) return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); #endif #endif /* PLATFORM_LINUX */ - -#ifdef PLATFORM_FREEBSD - return NULL; -#endif /* PLATFORM_FREEBSD */ } inline int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb) @@ -307,11 +225,6 @@ inline int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb) #if defined(PLATFORM_LINUX) skb->dev = ndev; return netif_rx(skb); -#elif defined(PLATFORM_FREEBSD) - return (*ndev->if_input)(ndev, skb); -#else - rtw_warn_on(1); - return -1; #endif } @@ -359,10 +272,6 @@ inline void *_rtw_usb_buffer_alloc(struct usb_device *dev, size_t size, dma_addr #endif #endif /* PLATFORM_LINUX */ -#ifdef PLATFORM_FREEBSD - return malloc(size, M_USBDEV, M_NOWAIT | M_ZERO); -#endif /* PLATFORM_FREEBSD */ -} inline void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_addr_t dma) { #ifdef PLATFORM_LINUX @@ -372,10 +281,6 @@ inline void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr usb_buffer_free(dev, size, addr, dma); #endif #endif /* PLATFORM_LINUX */ - -#ifdef PLATFORM_FREEBSD - free(addr, M_USBDEV); -#endif /* PLATFORM_FREEBSD */ } #endif /* CONFIG_USB_HCI */ @@ -856,7 +761,7 @@ void rtw_mfree2d(void *pbuf, int h, int w, int size) void _rtw_memcpy(void *dst, const void *src, u32 sz) { -#if defined(PLATFORM_LINUX) || defined (PLATFORM_FREEBSD) +#if defined(PLATFORM_LINUX) memcpy(dst, src, sz); @@ -875,7 +780,7 @@ inline void _rtw_memmove(void *dst, const void *src, u32 sz) int _rtw_memcmp(const void *dst, const void *src, u32 sz) { -#if defined(PLATFORM_LINUX) || defined (PLATFORM_FREEBSD) +#if defined(PLATFORM_LINUX) /* under Linux/GNU/GLibc, the return value of memcmp for two same mem. chunk is 0 */ if (!(memcmp(dst, src, sz))) @@ -888,24 +793,13 @@ int _rtw_memcmp(const void *dst, const void *src, u32 sz) void _rtw_memset(void *pbuf, int c, u32 sz) { -#if defined(PLATFORM_LINUX) || defined (PLATFORM_FREEBSD) +#if defined(PLATFORM_LINUX) memset(pbuf, c, sz); #endif } -#ifdef PLATFORM_FREEBSD -static inline void __list_add(_list *pnew, _list *pprev, _list *pnext) -{ - pnext->prev = pnew; - pnew->next = pnext; - pnew->prev = pprev; - pprev->next = pnew; -} -#endif /* PLATFORM_FREEBSD */ - - void _rtw_init_listhead(_list *list) { @@ -914,14 +808,8 @@ void _rtw_init_listhead(_list *list) INIT_LIST_HEAD(list); #endif - -#ifdef PLATFORM_FREEBSD - list->next = list; - list->prev = list; -#endif } - /* For the following list_xxx operations, caller must guarantee the atomic context. @@ -937,14 +825,6 @@ u32 rtw_is_list_empty(_list *phead) else return _FALSE; -#endif -#ifdef PLATFORM_FREEBSD - - if (phead->next == phead) - return _TRUE; - else - return _FALSE; - #endif } @@ -954,10 +834,6 @@ void rtw_list_insert_head(_list *plist, _list *phead) #ifdef PLATFORM_LINUX list_add(plist, phead); #endif - -#ifdef PLATFORM_FREEBSD - __list_add(plist, phead, phead->next); -#endif } void rtw_list_insert_tail(_list *plist, _list *phead) @@ -967,11 +843,6 @@ void rtw_list_insert_tail(_list *plist, _list *phead) list_add_tail(plist, phead); -#endif -#ifdef PLATFORM_FREEBSD - - __list_add(plist, phead->prev, phead); - #endif } @@ -982,9 +853,6 @@ void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc) #ifdef PLATFORM_LINUX _init_timer(ptimer, adapter->pnetdev, pfunc, adapter); #endif -#ifdef PLATFORM_FREEBSD - _init_timer(ptimer, adapter->pifp, pfunc, adapter->mlmepriv.nic_hdl); -#endif } /* @@ -1002,31 +870,10 @@ void _rtw_init_sema(_sema *sema, int init_val) sema_init(sema, init_val); #endif -#ifdef PLATFORM_FREEBSD - sema_init(sema, init_val, "rtw_drv"); -#endif -#ifdef PLATFORM_OS_XP - - KeInitializeSemaphore(sema, init_val, SEMA_UPBND); /* count=0; */ - -#endif - -#ifdef PLATFORM_OS_CE - if (*sema == NULL) - *sema = CreateSemaphore(NULL, init_val, SEMA_UPBND, NULL); -#endif - } void _rtw_free_sema(_sema *sema) { -#ifdef PLATFORM_FREEBSD - sema_destroy(sema); -#endif -#ifdef PLATFORM_OS_CE - CloseHandle(*sema); -#endif - } void _rtw_up_sema(_sema *sema) @@ -1037,18 +884,6 @@ void _rtw_up_sema(_sema *sema) up(sema); #endif -#ifdef PLATFORM_FREEBSD - sema_post(sema); -#endif -#ifdef PLATFORM_OS_XP - - KeReleaseSemaphore(sema, IO_NETWORK_INCREMENT, 1, FALSE); - -#endif - -#ifdef PLATFORM_OS_CE - ReleaseSemaphore(*sema, 1, NULL); -#endif } u32 _rtw_down_sema(_sema *sema) @@ -1062,24 +897,6 @@ u32 _rtw_down_sema(_sema *sema) return _SUCCESS; #endif -#ifdef PLATFORM_FREEBSD - sema_wait(sema); - return _SUCCESS; -#endif -#ifdef PLATFORM_OS_XP - - if (STATUS_SUCCESS == KeWaitForSingleObject(sema, Executive, KernelMode, TRUE, NULL)) - return _SUCCESS; - else - return _FAIL; -#endif - -#ifdef PLATFORM_OS_CE - if (WAIT_OBJECT_0 == WaitForSingleObject(*sema, INFINITE)) - return _SUCCESS; - else - return _FAIL; -#endif } @@ -1094,18 +911,6 @@ void _rtw_mutex_init(_mutex *pmutex) init_MUTEX(pmutex); #endif -#endif -#ifdef PLATFORM_FREEBSD - mtx_init(pmutex, "", NULL, MTX_DEF | MTX_RECURSE); -#endif -#ifdef PLATFORM_OS_XP - - KeInitializeMutex(pmutex, 0); - -#endif - -#ifdef PLATFORM_OS_CE - *pmutex = CreateMutex(NULL, _FALSE, NULL); #endif } @@ -1116,21 +921,8 @@ void _rtw_mutex_free(_mutex *pmutex) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) mutex_destroy(pmutex); -#else #endif -#ifdef PLATFORM_FREEBSD - sema_destroy(pmutex); -#endif - -#endif - -#ifdef PLATFORM_OS_XP - -#endif - -#ifdef PLATFORM_OS_CE - #endif } @@ -1142,37 +934,11 @@ void _rtw_spinlock_init(_lock *plock) spin_lock_init(plock); #endif -#ifdef PLATFORM_FREEBSD - mtx_init(plock, "", NULL, MTX_DEF | MTX_RECURSE); -#endif } void _rtw_spinlock_free(_lock *plock) { -#ifdef PLATFORM_FREEBSD - mtx_destroy(plock); -#endif } -#ifdef PLATFORM_FREEBSD -extern PADAPTER prtw_lock; - -void rtw_mtx_lock(_lock *plock) -{ - if (prtw_lock) - mtx_lock(&prtw_lock->glock); - else - printf("%s prtw_lock==NULL", __FUNCTION__); -} -void rtw_mtx_unlock(_lock *plock) -{ - if (prtw_lock) - mtx_unlock(&prtw_lock->glock); - else - printf("%s prtw_lock==NULL", __FUNCTION__); - -} -#endif /* PLATFORM_FREEBSD */ - void _rtw_spinlock(_lock *plock) { @@ -1182,9 +948,6 @@ void _rtw_spinlock(_lock *plock) spin_lock(plock); #endif -#ifdef PLATFORM_FREEBSD - mtx_lock(plock); -#endif } void _rtw_spinunlock(_lock *plock) @@ -1195,12 +958,8 @@ void _rtw_spinunlock(_lock *plock) spin_unlock(plock); #endif -#ifdef PLATFORM_FREEBSD - mtx_unlock(plock); -#endif } - void _rtw_spinlock_ex(_lock *plock) { @@ -1209,9 +968,6 @@ void _rtw_spinlock_ex(_lock *plock) spin_lock(plock); #endif -#ifdef PLATFORM_FREEBSD - mtx_lock(plock); -#endif } void _rtw_spinunlock_ex(_lock *plock) @@ -1222,9 +978,6 @@ void _rtw_spinunlock_ex(_lock *plock) spin_unlock(plock); #endif -#ifdef PLATFORM_FREEBSD - mtx_unlock(plock); -#endif } void _rtw_init_queue(_queue *pqueue) @@ -1259,11 +1012,6 @@ u32 rtw_get_current_time(void) #ifdef PLATFORM_LINUX return jiffies; #endif -#ifdef PLATFORM_FREEBSD - struct timeval tvp; - getmicrotime(&tvp); - return tvp.tv_sec; -#endif } inline u32 rtw_systime_to_ms(u32 systime) @@ -1271,9 +1019,6 @@ inline u32 rtw_systime_to_ms(u32 systime) #ifdef PLATFORM_LINUX return systime * 1000 / HZ; #endif -#ifdef PLATFORM_FREEBSD - return systime * 1000; -#endif } inline u32 rtw_ms_to_systime(u32 ms) @@ -1281,9 +1026,6 @@ inline u32 rtw_ms_to_systime(u32 ms) #ifdef PLATFORM_LINUX return ms * HZ / 1000; #endif -#ifdef PLATFORM_FREEBSD - return ms / 1000; -#endif } /* the input parameter start use the same unit as returned by rtw_get_current_time */ @@ -1292,9 +1034,6 @@ inline s32 rtw_get_passing_time_ms(u32 start) #ifdef PLATFORM_LINUX return rtw_systime_to_ms(jiffies - start); #endif -#ifdef PLATFORM_FREEBSD - return rtw_systime_to_ms(rtw_get_current_time()); -#endif } inline s32 rtw_get_time_interval_ms(u32 start, u32 end) @@ -1302,9 +1041,6 @@ inline s32 rtw_get_time_interval_ms(u32 start, u32 end) #ifdef PLATFORM_LINUX return rtw_systime_to_ms(end - start); #endif -#ifdef PLATFORM_FREEBSD - return rtw_systime_to_ms(rtw_get_current_time()); -#endif } void rtw_sleep_schedulable(int ms) @@ -1324,10 +1060,6 @@ void rtw_sleep_schedulable(int ms) return; #endif -#ifdef PLATFORM_FREEBSD - DELAY(ms * 1000); - return ; -#endif } @@ -1344,11 +1076,6 @@ void rtw_msleep_os(int ms) msleep((unsigned int)ms); #endif -#ifdef PLATFORM_FREEBSD - /* Delay for delay microseconds */ - DELAY(ms * 1000); - return ; -#endif } void rtw_usleep_os(int us) { @@ -1364,13 +1091,6 @@ void rtw_usleep_os(int us) msleep((us / 1000) + 1); #endif #endif - -#ifdef PLATFORM_FREEBSD - /* Delay for delay microseconds */ - DELAY(us); - - return ; -#endif } #ifdef DBG_DELAY_OS @@ -1417,10 +1137,6 @@ void rtw_mdelay_os(int ms) mdelay((unsigned long)ms); #endif -#ifdef PLATFORM_FREEBSD - DELAY(ms * 1000); - return ; -#endif } void rtw_udelay_os(int us) { @@ -1430,11 +1146,6 @@ void rtw_udelay_os(int us) udelay((unsigned long)us); #endif -#ifdef PLATFORM_FREEBSD - /* Delay for delay microseconds */ - DELAY(us); - return ; -#endif } #endif @@ -1443,9 +1154,6 @@ void rtw_yield_os(void) #ifdef PLATFORM_LINUX yield(); #endif -#ifdef PLATFORM_FREEBSD - yield(); -#endif } #define RTW_SUSPEND_LOCK_NAME "rtw_wifi" @@ -1626,8 +1334,6 @@ inline void ATOMIC_SET(ATOMIC_T *v, int i) { #ifdef PLATFORM_LINUX atomic_set(v, i); -#elif defined(PLATFORM_FREEBSD) - atomic_set_int(v, i); #endif } @@ -1635,8 +1341,6 @@ inline int ATOMIC_READ(ATOMIC_T *v) { #ifdef PLATFORM_LINUX return atomic_read(v); -#elif defined(PLATFORM_FREEBSD) - return atomic_load_acq_32(v); #endif } @@ -1644,16 +1348,12 @@ inline void ATOMIC_ADD(ATOMIC_T *v, int i) { #ifdef PLATFORM_LINUX atomic_add(i, v); -#elif defined(PLATFORM_FREEBSD) - atomic_add_int(v, i); #endif } inline void ATOMIC_SUB(ATOMIC_T *v, int i) { #ifdef PLATFORM_LINUX atomic_sub(i, v); -#elif defined(PLATFORM_FREEBSD) - atomic_subtract_int(v, i); #endif } @@ -1661,8 +1361,6 @@ inline void ATOMIC_INC(ATOMIC_T *v) { #ifdef PLATFORM_LINUX atomic_inc(v); -#elif defined(PLATFORM_FREEBSD) - atomic_add_int(v, 1); #endif } @@ -1670,8 +1368,6 @@ inline void ATOMIC_DEC(ATOMIC_T *v) { #ifdef PLATFORM_LINUX atomic_dec(v); -#elif defined(PLATFORM_FREEBSD) - atomic_subtract_int(v, 1); #endif } @@ -1679,9 +1375,6 @@ inline int ATOMIC_ADD_RETURN(ATOMIC_T *v, int i) { #ifdef PLATFORM_LINUX return atomic_add_return(i, v); -#elif defined(PLATFORM_FREEBSD) - atomic_add_int(v, i); - return atomic_load_acq_32(v); #endif } @@ -1689,9 +1382,6 @@ inline int ATOMIC_SUB_RETURN(ATOMIC_T *v, int i) { #ifdef PLATFORM_LINUX return atomic_sub_return(i, v); -#elif defined(PLATFORM_FREEBSD) - atomic_subtract_int(v, i); - return atomic_load_acq_32(v); #endif } @@ -1699,9 +1389,6 @@ inline int ATOMIC_INC_RETURN(ATOMIC_T *v) { #ifdef PLATFORM_LINUX return atomic_inc_return(v); -#elif defined(PLATFORM_FREEBSD) - atomic_add_int(v, 1); - return atomic_load_acq_32(v); #endif } @@ -1709,9 +1396,6 @@ inline int ATOMIC_DEC_RETURN(ATOMIC_T *v) { #ifdef PLATFORM_LINUX return atomic_dec_return(v); -#elif defined(PLATFORM_FREEBSD) - atomic_subtract_int(v, 1); - return atomic_load_acq_32(v); #endif } @@ -2114,76 +1798,6 @@ error: } #endif -#ifdef PLATFORM_FREEBSD -/* - * Copy a buffer from userspace and write into kernel address - * space. - * - * This emulation just calls the FreeBSD copyin function (to - * copy data from user space buffer into a kernel space buffer) - * and is designed to be used with the above io_write_wrapper. - * - * This function should return the number of bytes not copied. - * I.e. success results in a zero value. - * Negative error values are not returned. - */ -unsigned long -copy_from_user(void *to, const void *from, unsigned long n) -{ - if (copyin(from, to, n) != 0) { - /* Any errors will be treated as a failure - to copy any of the requested bytes */ - return n; - } - - return 0; -} - -unsigned long -copy_to_user(void *to, const void *from, unsigned long n) -{ - if (copyout(from, to, n) != 0) { - /* Any errors will be treated as a failure - to copy any of the requested bytes */ - return n; - } - - return 0; -} - - -/* - * The usb_register and usb_deregister functions are used to register - * usb drivers with the usb subsystem. In this compatibility layer - * emulation a list of drivers (struct usb_driver) is maintained - * and is used for probing/attaching etc. - * - * usb_register and usb_deregister simply call these functions. - */ -int -usb_register(struct usb_driver *driver) -{ - rtw_usb_linux_register(driver); - return 0; -} - - -int -usb_deregister(struct usb_driver *driver) -{ - rtw_usb_linux_deregister(driver); - return 0; -} - -void module_init_exit_wrapper(void *arg) -{ - int (*func)(void) = arg; - func(); - return; -} - -#endif /* PLATFORM_FREEBSD */ - #ifdef CONFIG_PLATFORM_SPRD #ifdef do_div #undef do_div @@ -2195,8 +1809,6 @@ u64 rtw_modular64(u64 x, u64 y) { #ifdef PLATFORM_LINUX return do_div(x, y); -#elif defined(PLATFORM_FREEBSD) - return x % y; #endif } @@ -2205,8 +1817,6 @@ u64 rtw_division64(u64 x, u64 y) #ifdef PLATFORM_LINUX do_div(x, y); return x; -#elif defined(PLATFORM_FREEBSD) - return x / y; #endif } @@ -2222,8 +1832,6 @@ inline u32 rtw_random32(void) #else return random32(); #endif -#elif defined(PLATFORM_FREEBSD) -#error "to be implemented\n" #endif }