diff options
Diffstat (limited to '')
-rw-r--r-- | drivers/staging/wilc1000/host_interface.h | 135 |
1 files changed, 63 insertions, 72 deletions
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 8faac27002e9..01f3222a4231 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -96,7 +96,7 @@ enum CURRENT_TXRATE { MBPS_54 = 54 }; -struct cfg_param_val { +struct cfg_param_attr { u32 flag; u8 ht_enable; u8 bss_type; @@ -144,8 +144,8 @@ enum cfg_param { }; struct found_net_info { - u8 au8bssid[6]; - s8 s8rssi; + u8 bssid[6]; + s8 rssi; }; enum scan_event { @@ -168,13 +168,13 @@ enum KEY_TYPE { PMKSA, }; -typedef void (*wilc_scan_result)(enum scan_event, tstrNetworkInfo *, - void *, void *); +typedef void (*wilc_scan_result)(enum scan_event, struct network_info *, + void *, void *); typedef void (*wilc_connect_result)(enum conn_event, - tstrConnectInfo *, + struct connect_info *, u8, - tstrDisconnectNotifInfo *, + struct disconnect_info *, void *); typedef void (*wilc_remain_on_chan_expired)(void *, u32); @@ -186,13 +186,13 @@ struct rcvd_net_info { }; struct hidden_net_info { - u8 *pu8ssid; - u8 u8ssidlen; + u8 *ssid; + u8 ssid_len; }; struct hidden_network { - struct hidden_net_info *pstrHiddenNetworkInfo; - u8 u8ssidnum; + struct hidden_net_info *net_info; + u8 n_ssids; }; struct user_scan_req { @@ -203,9 +203,9 @@ struct user_scan_req { }; struct user_conn_req { - u8 *pu8bssid; - u8 *pu8ssid; - u8 u8security; + u8 *bssid; + u8 *ssid; + u8 security; enum AUTHTYPE auth_type; size_t ssid_len; u8 *ies; @@ -217,6 +217,7 @@ struct user_conn_req { struct drv_handler { u32 handler; + u8 mac_idx; }; struct op_mode { @@ -240,7 +241,7 @@ struct ba_session_info { struct remain_ch { u16 ch; - u32 u32duration; + u32 duration; wilc_remain_on_chan_expired expired; wilc_remain_on_chan_ready ready; void *arg; @@ -271,14 +272,12 @@ struct host_if_drv { enum host_if_state hif_state; u8 assoc_bssid[ETH_ALEN]; - struct cfg_param_val cfg_values; + struct cfg_param_attr cfg_values; - struct semaphore sem_cfg_values; + struct mutex cfg_values_lock; struct semaphore sem_test_key_block; struct semaphore sem_test_disconn_block; struct semaphore sem_get_rssi; - struct semaphore sem_get_link_speed; - struct semaphore sem_get_chnl; struct semaphore sem_inactive_time; struct timer_list scan_timer; @@ -312,68 +311,60 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 *key, u8 len, u8 index); int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len, u8 index, u8 mode, enum AUTHTYPE auth_type); -s32 wilc_add_ptk(struct wilc_vif *vif, const u8 *pu8Ptk, u8 u8PtkKeylen, - const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, - u8 mode, u8 u8Ciphermode, u8 u8Idx); +int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len, + const u8 *mac_addr, const u8 *rx_mic, const u8 *tx_mic, + u8 mode, u8 cipher_mode, u8 index); s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac, u32 *pu32InactiveTime); -s32 wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *pu8RxGtk, u8 u8GtkKeylen, - u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC, - const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, - u8 u8Ciphermode); -s32 wilc_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen, - u8 *pu8TxGtk, u8 u8KeyIdx); -s32 wilc_set_pmkid_info(struct wilc_vif *vif, - struct host_if_pmkid_attr *pu8PmkidInfoArray); -s32 wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress); -s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress); -int wilc_wait_msg_queue_idle(void); -s32 wilc_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource); -s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid, - size_t ssidLen, const u8 *pu8IEs, size_t IEsLen, - wilc_connect_result pfConnectResult, void *pvUserArg, - u8 u8security, enum AUTHTYPE tenuAuth_type, - u8 u8channel, void *pJoinParams); -s32 wilc_flush_join_req(struct wilc_vif *vif); -s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode); +int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len, + u8 index, u32 key_rsc_len, const u8 *key_rsc, + const u8 *rx_mic, const u8 *tx_mic, u8 mode, + u8 cipher_mode); +int wilc_set_pmkid_info(struct wilc_vif *vif, + struct host_if_pmkid_attr *pmkid); +int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr); +int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, + size_t ssid_len, const u8 *ies, size_t ies_len, + wilc_connect_result connect_result, void *user_arg, + u8 security, enum AUTHTYPE auth_type, + u8 channel, void *join_params); +int wilc_disconnect(struct wilc_vif *vif, u16 reason_code); int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel); -s32 wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi); -s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType, - u8 *pu8ChnlFreqList, u8 u8ChnlListLen, const u8 *pu8IEs, - size_t IEsLen, wilc_scan_result ScanResult, void *pvUserArg, - struct hidden_network *pstrHiddenNetwork); -s32 wilc_hif_set_cfg(struct wilc_vif *vif, - struct cfg_param_val *pstrCfgParamVal); -s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv); -s32 wilc_deinit(struct wilc_vif *vif); -s32 wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, u32 u32DTIMPeriod, - u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail); +int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level); +int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, + u8 *ch_freq_list, u8 ch_list_len, const u8 *ies, + size_t ies_len, wilc_scan_result scan_result, void *user_arg, + struct hidden_network *hidden_network); +int wilc_hif_set_cfg(struct wilc_vif *vif, + struct cfg_param_attr *cfg_param); +int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler); +int wilc_deinit(struct wilc_vif *vif); +int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period, + u32 head_len, u8 *head, u32 tail_len, u8 *tail); int wilc_del_beacon(struct wilc_vif *vif); int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param); -s32 wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN]); +int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN]); int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr); -s32 wilc_edit_station(struct wilc_vif *vif, - struct add_sta_param *pstrStaParams); -s32 wilc_set_power_mgmt(struct wilc_vif *vif, bool bIsEnabled, u32 u32Timeout); -s32 wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled, - u32 u32count); -s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx); -s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID); -s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID, - u32 u32duration, u16 chan, - wilc_remain_on_chan_expired RemainOnChanExpired, - wilc_remain_on_chan_ready RemainOnChanReady, - void *pvUserArg); -s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID); -s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg); -int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index); +int wilc_edit_station(struct wilc_vif *vif, + struct add_sta_param *sta_param); +int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout); +int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled, + u32 count); +int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx); +int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id, + u32 duration, u16 chan, + wilc_remain_on_chan_expired expired, + wilc_remain_on_chan_ready ready, + void *user_arg); +int wilc_listen_state_expired(struct wilc_vif *vif, u32 session_id); +int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg); +int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index, u8 mac_idx); int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode); - -void wilc_free_join_params(void *pJoinParams); - -s32 wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics); +int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats); void wilc_resolve_disconnect_aberration(struct wilc_vif *vif); int wilc_get_vif_idx(struct wilc_vif *vif); +int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power); +int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power); extern bool wilc_optaining_ip; extern u8 wilc_connected_ssid[6]; |