Pavel Machek | 66101de | 2008-10-01 14:36:56 +0200 | [diff] [blame^] | 1 | //===================================================================== |
| 2 | // Device related include |
| 3 | //===================================================================== |
| 4 | #ifdef WB_LINUX |
| 5 | #include "linux/wbusb_f.h" |
| 6 | #include "linux/wb35reg_f.h" |
| 7 | #include "linux/wb35tx_f.h" |
| 8 | #include "linux/wb35rx_f.h" |
| 9 | #else |
| 10 | #include "wbusb_f.h" |
| 11 | #include "wb35reg_f.h" |
| 12 | #include "wb35tx_f.h" |
| 13 | #include "wb35rx_f.h" |
| 14 | #endif |
| 15 | |
| 16 | //==================================================================================== |
| 17 | // Function declaration |
| 18 | //==================================================================================== |
| 19 | void hal_remove_mapping_key( phw_data_t pHwData, PUCHAR pmac_addr ); |
| 20 | void hal_remove_default_key( phw_data_t pHwData, u32 index ); |
| 21 | unsigned char hal_set_mapping_key( phw_data_t Adapter, PUCHAR pmac_addr, u8 null_key, u8 wep_on, PUCHAR ptx_tsc, PUCHAR prx_tsc, u8 key_type, u8 key_len, PUCHAR pkey_data ); |
| 22 | unsigned char hal_set_default_key( phw_data_t Adapter, u8 index, u8 null_key, u8 wep_on, PUCHAR ptx_tsc, PUCHAR prx_tsc, u8 key_type, u8 key_len, PUCHAR pkey_data ); |
| 23 | void hal_clear_all_default_key( phw_data_t pHwData ); |
| 24 | void hal_clear_all_group_key( phw_data_t pHwData ); |
| 25 | void hal_clear_all_mapping_key( phw_data_t pHwData ); |
| 26 | void hal_clear_all_key( phw_data_t pHwData ); |
| 27 | void hal_get_ethernet_address( phw_data_t pHwData, PUCHAR current_address ); |
| 28 | void hal_set_ethernet_address( phw_data_t pHwData, PUCHAR current_address ); |
| 29 | void hal_get_permanent_address( phw_data_t pHwData, PUCHAR pethernet_address ); |
| 30 | unsigned char hal_init_hardware( phw_data_t pHwData, PADAPTER Adapter ); |
| 31 | void hal_set_power_save_mode( phw_data_t pHwData, unsigned char power_save, unsigned char wakeup, unsigned char dtim ); |
| 32 | void hal_get_power_save_mode( phw_data_t pHwData, PBOOLEAN pin_pwr_save ); |
| 33 | void hal_set_slot_time( phw_data_t pHwData, u8 type ); |
| 34 | #define hal_set_atim_window( _A, _ATM ) |
| 35 | void hal_set_rates( phw_data_t pHwData, PUCHAR pbss_rates, u8 length, unsigned char basic_rate_set ); |
| 36 | #define hal_set_basic_rates( _A, _R, _L ) hal_set_rates( _A, _R, _L, TRUE ) |
| 37 | #define hal_set_op_rates( _A, _R, _L ) hal_set_rates( _A, _R, _L, FALSE ) |
| 38 | void hal_start_bss( phw_data_t pHwData, u8 mac_op_mode ); |
| 39 | void hal_join_request( phw_data_t pHwData, u8 bss_type ); // 0:BSS STA 1:IBSS STA// |
| 40 | void hal_stop_sync_bss( phw_data_t pHwData ); |
| 41 | void hal_resume_sync_bss( phw_data_t pHwData); |
| 42 | void hal_set_aid( phw_data_t pHwData, u16 aid ); |
| 43 | void hal_set_bssid( phw_data_t pHwData, PUCHAR pbssid ); |
| 44 | void hal_get_bssid( phw_data_t pHwData, PUCHAR pbssid ); |
| 45 | void hal_set_beacon_period( phw_data_t pHwData, u16 beacon_period ); |
| 46 | void hal_set_listen_interval( phw_data_t pHwData, u16 listen_interval ); |
| 47 | void hal_set_cap_info( phw_data_t pHwData, u16 capability_info ); |
| 48 | void hal_set_ssid( phw_data_t pHwData, PUCHAR pssid, u8 ssid_len ); |
| 49 | void hal_set_current_channel( phw_data_t pHwData, ChanInfo channel ); |
| 50 | void hal_set_current_channel_ex( phw_data_t pHwData, ChanInfo channel ); |
| 51 | void hal_get_current_channel( phw_data_t pHwData, ChanInfo *channel ); |
| 52 | void hal_set_accept_broadcast( phw_data_t pHwData, u8 enable ); |
| 53 | void hal_set_accept_multicast( phw_data_t pHwData, u8 enable ); |
| 54 | void hal_set_accept_beacon( phw_data_t pHwData, u8 enable ); |
| 55 | void hal_set_multicast_address( phw_data_t pHwData, PUCHAR address, u8 number ); |
| 56 | u8 hal_get_accept_beacon( phw_data_t pHwData ); |
| 57 | void hal_stop( phw_data_t pHwData ); |
| 58 | void hal_halt( phw_data_t pHwData, void *ppa_data ); |
| 59 | void hal_start_tx0( phw_data_t pHwData ); |
| 60 | void hal_set_phy_type( phw_data_t pHwData, u8 PhyType ); |
| 61 | void hal_get_phy_type( phw_data_t pHwData, u8 *PhyType ); |
| 62 | unsigned char hal_reset_hardware( phw_data_t pHwData, void* ppa ); |
| 63 | void hal_set_cwmin( phw_data_t pHwData, u8 cwin_min ); |
| 64 | #define hal_get_cwmin( _A ) ( (_A)->cwmin ) |
| 65 | void hal_set_cwmax( phw_data_t pHwData, u16 cwin_max ); |
| 66 | #define hal_get_cwmax( _A ) ( (_A)->cwmax ) |
| 67 | void hal_set_rsn_wpa( phw_data_t pHwData, u32 * RSN_IE_Bitmap , u32 * RSN_OUI_type , unsigned char bDesiredAuthMode); |
| 68 | //s32 hal_get_rssi( phw_data_t pHwData, u32 HalRssi ); |
| 69 | s32 hal_get_rssi( phw_data_t pHwData, u32 *HalRssiArry, u8 Count ); |
| 70 | s32 hal_get_rssi_bss( phw_data_t pHwData, u16 idx, u8 Count ); |
| 71 | void hal_set_connect_info( phw_data_t pHwData, unsigned char boConnect ); |
| 72 | u8 hal_get_est_sq3( phw_data_t pHwData, u8 Count ); |
| 73 | void hal_led_control_1a( phw_data_t pHwData ); |
| 74 | void hal_led_control( void* S1, phw_data_t pHwData, void* S3, void* S4 ); |
| 75 | void hal_set_rf_power( phw_data_t pHwData, u8 PowerIndex ); // 20060621 Modify |
| 76 | void hal_reset_counter( phw_data_t pHwData ); |
| 77 | void hal_set_radio_mode( phw_data_t pHwData, unsigned char boValue); |
| 78 | void hal_descriptor_indicate( phw_data_t pHwData, PDESCRIPTOR pDes ); |
| 79 | u8 hal_get_antenna_number( phw_data_t pHwData ); |
| 80 | void hal_set_antenna_number( phw_data_t pHwData, u8 number ); |
| 81 | u32 hal_get_bss_pk_cnt( phw_data_t pHwData ); |
| 82 | #define hal_get_region_from_EEPROM( _A ) ( (_A)->Wb35Reg.EEPROMRegion ) |
| 83 | void hal_set_accept_promiscuous ( phw_data_t pHwData, u8 enable); |
| 84 | #define hal_get_tx_buffer( _A, _B ) Wb35Tx_get_tx_buffer( _A, _B ) |
| 85 | u8 hal_get_hw_radio_off ( phw_data_t pHwData ); |
| 86 | #define hal_software_set( _A ) (_A->SoftwareSet) |
| 87 | #define hal_driver_init_OK( _A ) (_A->IsInitOK) |
| 88 | #define hal_rssi_boundary_high( _A ) (_A->RSSI_high) |
| 89 | #define hal_rssi_boundary_low( _A ) (_A->RSSI_low) |
| 90 | #define hal_scan_interval( _A ) (_A->Scan_Interval) |
| 91 | void hal_scan_status_indicate( phw_data_t pHwData, u8 status); // 0: complete, 1: in progress |
| 92 | void hal_system_power_change( phw_data_t pHwData, u32 PowerState ); // 20051230 -=D0 1=D1 .. |
| 93 | void hal_surprise_remove( phw_data_t pHwData ); |
| 94 | |
| 95 | #define PHY_DEBUG( msg, args... ) |
| 96 | |
| 97 | |
| 98 | |
| 99 | void hal_rate_change( phw_data_t pHwData ); // Notify the HAL rate is changing 20060613.1 |
| 100 | unsigned char hal_get_dxx_reg( phw_data_t pHwData, u16 number, PULONG pValue ); |
| 101 | unsigned char hal_set_dxx_reg( phw_data_t pHwData, u16 number, u32 value ); |
| 102 | #define hal_get_time_count( _P ) (_P->time_count/10) // return 100ms count |
| 103 | #define hal_detect_error( _P ) (_P->WbUsb.DetectCount) |
| 104 | unsigned char hal_set_LED( phw_data_t pHwData, u32 Mode ); // 20061108 for WPS led control |
| 105 | |
| 106 | //------------------------------------------------------------------------- |
| 107 | // The follow function is unused for IS89C35 |
| 108 | //------------------------------------------------------------------------- |
| 109 | #define hal_disable_interrupt(_A) |
| 110 | #define hal_enable_interrupt(_A) |
| 111 | #define hal_get_interrupt_type( _A) |
| 112 | #define hal_get_clear_interrupt(_A) |
| 113 | #define hal_ibss_disconnect(_A) hal_stop_sync_bss(_A) |
| 114 | #define hal_join_request_stop(_A) |
| 115 | unsigned char hal_idle( phw_data_t pHwData ); |
| 116 | #define pa_stall_execution( _A ) //OS_SLEEP( 1 ) |
| 117 | #define hw_get_cxx_reg( _A, _B, _C ) |
| 118 | #define hw_set_cxx_reg( _A, _B, _C ) |
| 119 | #define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (PULONG)_C ) |
| 120 | #define hw_set_dxx_reg( _A, _B, _C ) hal_set_dxx_reg( _A, _B, (u32)_C ) |
| 121 | |
| 122 | |