1 //===================================================================== 2 // Device related include 3 //===================================================================== 4 #include "wb35reg_f.h" 5 #include "wb35tx_f.h" 6 #include "wb35rx_f.h" 7 8 #include "core.h" 9 10 //==================================================================================== 11 // Function declaration 12 //==================================================================================== 13 void hal_remove_mapping_key( phw_data_t pHwData, u8 *pmac_addr ); 14 void hal_remove_default_key( phw_data_t pHwData, u32 index ); 15 unsigned char hal_set_mapping_key( phw_data_t adapter, u8 *pmac_addr, u8 null_key, u8 wep_on, u8 *ptx_tsc, u8 *prx_tsc, u8 key_type, u8 key_len, u8 *pkey_data ); 16 unsigned char hal_set_default_key( phw_data_t adapter, u8 index, u8 null_key, u8 wep_on, u8 *ptx_tsc, u8 *prx_tsc, u8 key_type, u8 key_len, u8 *pkey_data ); 17 void hal_clear_all_default_key( phw_data_t pHwData ); 18 void hal_clear_all_group_key( phw_data_t pHwData ); 19 void hal_clear_all_mapping_key( phw_data_t pHwData ); 20 void hal_clear_all_key( phw_data_t pHwData ); 21 void hal_get_ethernet_address( phw_data_t pHwData, u8 *current_address ); 22 void hal_set_ethernet_address( phw_data_t pHwData, u8 *current_address ); 23 void hal_get_permanent_address( phw_data_t pHwData, u8 *pethernet_address ); 24 u8 hal_init_hardware(struct ieee80211_hw *hw); 25 void hal_set_power_save_mode( phw_data_t pHwData, unsigned char power_save, unsigned char wakeup, unsigned char dtim ); 26 void hal_get_power_save_mode( phw_data_t pHwData, u8 *pin_pwr_save ); 27 void hal_set_slot_time( phw_data_t pHwData, u8 type ); 28 #define hal_set_atim_window( _A, _ATM ) 29 void hal_start_bss( phw_data_t pHwData, u8 mac_op_mode ); 30 void hal_join_request( phw_data_t pHwData, u8 bss_type ); // 0:BSS STA 1:IBSS STA// 31 void hal_stop_sync_bss( phw_data_t pHwData ); 32 void hal_resume_sync_bss( phw_data_t pHwData); 33 void hal_set_aid( phw_data_t pHwData, u16 aid ); 34 void hal_set_bssid( phw_data_t pHwData, u8 *pbssid ); 35 void hal_get_bssid( phw_data_t pHwData, u8 *pbssid ); 36 void hal_set_beacon_period( phw_data_t pHwData, u16 beacon_period ); 37 void hal_set_listen_interval( phw_data_t pHwData, u16 listen_interval ); 38 void hal_set_cap_info( phw_data_t pHwData, u16 capability_info ); 39 void hal_set_ssid( phw_data_t pHwData, u8 *pssid, u8 ssid_len ); 40 void hal_set_current_channel( phw_data_t pHwData, ChanInfo channel ); 41 void hal_set_accept_broadcast( phw_data_t pHwData, u8 enable ); 42 void hal_set_accept_multicast( phw_data_t pHwData, u8 enable ); 43 void hal_set_accept_beacon( phw_data_t pHwData, u8 enable ); 44 void hal_stop( phw_data_t pHwData ); 45 void hal_halt( phw_data_t pHwData, void *ppa_data ); 46 void hal_start_tx0( phw_data_t pHwData ); 47 void hal_set_phy_type( phw_data_t pHwData, u8 PhyType ); 48 #define hal_get_cwmin( _A ) ( (_A)->cwmin ) 49 void hal_set_cwmax( phw_data_t pHwData, u16 cwin_max ); 50 #define hal_get_cwmax( _A ) ( (_A)->cwmax ) 51 void hal_set_rsn_wpa( phw_data_t pHwData, u32 * RSN_IE_Bitmap , u32 * RSN_OUI_type , unsigned char bDesiredAuthMode); 52 void hal_set_connect_info( phw_data_t pHwData, unsigned char boConnect ); 53 u8 hal_get_est_sq3( phw_data_t pHwData, u8 Count ); 54 void hal_set_rf_power( phw_data_t pHwData, u8 PowerIndex ); // 20060621 Modify 55 void hal_set_radio_mode( phw_data_t pHwData, unsigned char boValue); 56 void hal_descriptor_indicate( phw_data_t pHwData, PDESCRIPTOR pDes ); 57 u8 hal_get_antenna_number( phw_data_t pHwData ); 58 u32 hal_get_bss_pk_cnt( phw_data_t pHwData ); 59 #define hal_get_region_from_EEPROM( _A ) ( (_A)->reg.EEPROMRegion ) 60 void hal_set_accept_promiscuous ( phw_data_t pHwData, u8 enable); 61 #define hal_get_tx_buffer( _A, _B ) Wb35Tx_get_tx_buffer( _A, _B ) 62 u8 hal_get_hw_radio_off ( phw_data_t pHwData ); 63 #define hal_software_set( _A ) (_A->SoftwareSet) 64 #define hal_driver_init_OK( _A ) (_A->IsInitOK) 65 #define hal_rssi_boundary_high( _A ) (_A->RSSI_high) 66 #define hal_rssi_boundary_low( _A ) (_A->RSSI_low) 67 #define hal_scan_interval( _A ) (_A->Scan_Interval) 68 69 #define PHY_DEBUG( msg, args... ) 70 71 unsigned char hal_get_dxx_reg( phw_data_t pHwData, u16 number, u32 * pValue ); 72 unsigned char hal_set_dxx_reg( phw_data_t pHwData, u16 number, u32 value ); 73 #define hal_get_time_count( _P ) (_P->time_count/10) // return 100ms count 74 #define hal_detect_error( _P ) (_P->WbUsb.DetectCount) 75 76 //------------------------------------------------------------------------- 77 // The follow function is unused for IS89C35 78 //------------------------------------------------------------------------- 79 #define hal_disable_interrupt(_A) 80 #define hal_enable_interrupt(_A) 81 #define hal_get_interrupt_type( _A) 82 #define hal_get_clear_interrupt(_A) 83 #define hal_ibss_disconnect(_A) hal_stop_sync_bss(_A) 84 #define hal_join_request_stop(_A) 85 unsigned char hal_idle( phw_data_t pHwData ); 86 #define hw_get_cxx_reg( _A, _B, _C ) 87 #define hw_set_cxx_reg( _A, _B, _C ) 88 #define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (u32 *)_C ) 89 #define hw_set_dxx_reg( _A, _B, _C ) hal_set_dxx_reg( _A, _B, (u32)_C ) 90 91 92