diff options
Diffstat (limited to 'drivers/staging/rtl8723au/include/rtw_mlme_ext.h')
-rw-r--r-- | drivers/staging/rtl8723au/include/rtw_mlme_ext.h | 192 |
1 files changed, 57 insertions, 135 deletions
diff --git a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h index 0aaf0d5d8aea..badbce09559d 100644 --- a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h @@ -89,7 +89,6 @@ #define _54M_RATE_ 11 -extern unsigned char RTW_WPA_OUI23A[]; extern unsigned char WMM_OUI23A[]; extern unsigned char WPS_OUI23A[]; extern unsigned char WFD_OUI23A[]; @@ -262,13 +261,13 @@ enum SCAN_STATE { struct mlme_handler { char *str; - unsigned int (*func)(struct rtw_adapter *padapter, struct recv_frame *precv_frame); + int (*func)(struct rtw_adapter *padapter, struct recv_frame *precv_frame); }; struct action_handler { unsigned int num; char* str; - unsigned int (*func)(struct rtw_adapter *padapter, struct recv_frame *precv_frame); + int (*func)(struct rtw_adapter *padapter, struct recv_frame *precv_frame); }; struct ss_res @@ -358,9 +357,7 @@ struct mlme_ext_info u8 turboMode_cts2self; u8 turboMode_rtsen; u8 SM_PS; - u8 agg_enable_bitmap; u8 ADDBA_retry_count; - u8 candidate_tid_bitmap; u8 dialogToken; /* Accept ADDBA Request */ bool bAcceptAddbaReq; @@ -474,10 +471,6 @@ void get_rate_set23a(struct rtw_adapter *padapter, unsigned char *pbssrate, void UpdateBrateTbl23a(struct rtw_adapter *padapter,u8 *mBratesOS); void Update23aTblForSoftAP(u8 *bssrateset, u32 bssratelen); -void Save_DM_Func_Flag23a(struct rtw_adapter *padapter); -void Restore_DM_Func_Flag23a(struct rtw_adapter *padapter); -void Switch_DM_Func23a(struct rtw_adapter *padapter, unsigned long mode, u8 enable); - void Set_MSR23a(struct rtw_adapter *padapter, u8 type); u8 rtw_get_oper_ch23a(struct rtw_adapter *adapter); @@ -490,61 +483,47 @@ void rtw_set_oper_ch23aoffset23a(struct rtw_adapter *adapter, u8 offset); void set_channel_bwmode23a(struct rtw_adapter *padapter, unsigned char channel, unsigned char channel_offset, unsigned short bwmode); void SelectChannel23a(struct rtw_adapter *padapter, unsigned char channel); -void SetBWMode23a(struct rtw_adapter *padapter, unsigned short bwmode, - unsigned char channel_offset); unsigned int decide_wait_for_beacon_timeout23a(unsigned int bcn_interval); -void write_cam23a(struct rtw_adapter *padapter, u8 entry, u16 ctrl, - u8 *mac, u8 *key); void clear_cam_entry23a(struct rtw_adapter *padapter, u8 entry); void invalidate_cam_all23a(struct rtw_adapter *padapter); -void CAM_empty_entry23a(struct rtw_adapter *Adapter, u8 ucIndex); int allocate_fw_sta_entry23a(struct rtw_adapter *padapter); void flush_all_cam_entry23a(struct rtw_adapter *padapter); bool IsLegal5GChannel(struct rtw_adapter *Adapter, u8 channel); -void site_survey23a(struct rtw_adapter *padapter); -u8 collect_bss_info23a(struct rtw_adapter *padapter, - struct recv_frame *precv_frame, - struct wlan_bssid_ex *bssid); +int collect_bss_info23a(struct rtw_adapter *padapter, + struct recv_frame *precv_frame, + struct wlan_bssid_ex *bssid); void update_network23a(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src, struct rtw_adapter *padapter, bool update_ie); -int get_bsstype23a(unsigned short capability); u8 *get_my_bssid23a(struct wlan_bssid_ex *pnetwork); u16 get_beacon_interval23a(struct wlan_bssid_ex *bss); -int is_client_associated_to_ap23a(struct rtw_adapter *padapter); -int is_client_associated_to_ibss23a(struct rtw_adapter *padapter); -int is_IBSS_empty23a(struct rtw_adapter *padapter); +bool is_client_associated_to_ap23a(struct rtw_adapter *padapter); +bool is_client_associated_to_ibss23a(struct rtw_adapter *padapter); +bool is_IBSS_empty23a(struct rtw_adapter *padapter); unsigned char check_assoc_AP23a(u8 *pframe, uint len); -int WMM_param_handler23a(struct rtw_adapter *padapter, - struct ndis_802_11_var_ies *pIE); -#ifdef CONFIG_8723AU_P2P -int WFD_info_handler(struct rtw_adapter *padapter, - struct ndis_802_11_var_ies *pIE); -#endif +int WMM_param_handler23a(struct rtw_adapter *padapter, u8 *p); void WMMOnAssocRsp23a(struct rtw_adapter *padapter); -void HT_caps_handler23a(struct rtw_adapter *padapter, - struct ndis_802_11_var_ies *pIE); -void HT_info_handler23a(struct rtw_adapter *padapter, - struct ndis_802_11_var_ies *pIE); +void HT_caps_handler23a(struct rtw_adapter *padapter, u8 *p); +void HT_info_handler23a(struct rtw_adapter *padapter, u8 *p); void HTOnAssocRsp23a(struct rtw_adapter *padapter); -void ERP_IE_handler23a(struct rtw_adapter *padapter, - struct ndis_802_11_var_ies *pIE); +void ERP_IE_handler23a(struct rtw_adapter *padapter, u8 *p); void VCS_update23a(struct rtw_adapter *padapter, struct sta_info *psta); void update_beacon23a_info(struct rtw_adapter *padapter, u8 *pframe, uint len, struct sta_info *psta); -int rtw_check_bcn_info23a(struct rtw_adapter *Adapter, u8 *pframe, u32 packet_len); +int rtw_check_bcn_info23a(struct rtw_adapter *Adapter, + struct ieee80211_mgmt *mgmt, u32 packet_len); void update_IOT_info23a(struct rtw_adapter *padapter); void update_capinfo23a(struct rtw_adapter *Adapter, u16 updateCap); void update_wireless_mode23a(struct rtw_adapter * padapter); @@ -561,15 +540,15 @@ unsigned int update_MSC_rate23a(struct HT_caps_element *pHT_caps); void Update_RA_Entry23a(struct rtw_adapter *padapter, struct sta_info *psta); void set_sta_rate23a(struct rtw_adapter *padapter, struct sta_info *psta); -unsigned int receive_disconnect23a(struct rtw_adapter *padapter, - unsigned char *MacAddr, unsigned short reason); +int receive_disconnect23a(struct rtw_adapter *padapter, + unsigned char *MacAddr, unsigned short reason); unsigned char get_highest_rate_idx23a(u32 mask); int support_short_GI23a(struct rtw_adapter *padapter, struct HT_caps_element *pHT_caps); -unsigned int is_ap_in_tkip23a(struct rtw_adapter *padapter); -unsigned int is_ap_in_wep23a(struct rtw_adapter *padapter); -unsigned int should_forbid_n_rate23a(struct rtw_adapter *padapter); +bool is_ap_in_tkip23a(struct rtw_adapter *padapter); +bool is_ap_in_wep23a(struct rtw_adapter *padapter); +bool should_forbid_n_rate23a(struct rtw_adapter *padapter); void report_join_res23a(struct rtw_adapter *padapter, int res); void report_survey_event23a(struct rtw_adapter *padapter, @@ -580,8 +559,7 @@ void report_del_sta_event23a(struct rtw_adapter *padapter, void report_add_sta_event23a(struct rtw_adapter *padapter, unsigned char *MacAddr, int cam_idx); -void beacon_timing_control23a(struct rtw_adapter *padapter); -u8 set_tx_beacon_cmd23a(struct rtw_adapter*padapter); +int set_tx_beacon_cmd23a(struct rtw_adapter*padapter); unsigned int setup_beacon_frame(struct rtw_adapter *padapter, unsigned char *beacon_frame); void update_mgnt_tx_rate23a(struct rtw_adapter *padapter, u8 rate); @@ -594,72 +572,20 @@ s32 dump_mgntframe23a_and_wait(struct rtw_adapter *padapter, s32 dump_mgntframe23a_and_wait_ack23a(struct rtw_adapter *padapter, struct xmit_frame *pmgntframe); -#ifdef CONFIG_8723AU_P2P -void issue_probersp23a_p2p23a(struct rtw_adapter *padapter, unsigned char *da); -void issue_p2p_provision_request23a(struct rtw_adapter *padapter, u8 *pssid, - u8 ussidlen, u8* pdev_raddr); -void issue_p2p_GO_request23a(struct rtw_adapter *padapter, u8* raddr); -void issue23a_probereq_p2p(struct rtw_adapter *padapter, u8 *da); -int issue23a_probereq_p2p_ex(struct rtw_adapter *adapter, u8 *da, int try_cnt, - int wait_ms); -void issue_p2p_invitation_response23a(struct rtw_adapter *padapter, u8* raddr, - u8 dialogToken, u8 success); -void issue_p2p_invitation_request23a(struct rtw_adapter *padapter, u8* raddr); -#endif /* CONFIG_8723AU_P2P */ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms); -void issue_probersp23a(struct rtw_adapter *padapter, unsigned char *da, - u8 is_valid_p2p_probereq); -void issue_assocreq23a(struct rtw_adapter *padapter); -void issue_asocrsp23a(struct rtw_adapter *padapter, unsigned short status, - struct sta_info *pstat, int pkt_type); -void issue_auth23a(struct rtw_adapter *padapter, struct sta_info *psta, - unsigned short status); -void issue_probereq23a(struct rtw_adapter *padapter, struct cfg80211_ssid *pssid, - u8 *da); -s32 issue_probereq23a_ex23a(struct rtw_adapter *padapter, struct cfg80211_ssid *pssid, - u8 *da, int try_cnt, int wait_ms); int issue_nulldata23a(struct rtw_adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms); int issue_qos_nulldata23a(struct rtw_adapter *padapter, unsigned char *da, u16 tid, int try_cnt, int wait_ms); int issue_deauth23a(struct rtw_adapter *padapter, unsigned char *da, unsigned short reason); -int issue_deauth23a_ex23a(struct rtw_adapter *padapter, u8 *da, unsigned short reason, - int try_cnt, int wait_ms); void issue_action_spct_ch_switch23a(struct rtw_adapter *padapter, u8 *ra, u8 new_ch, u8 ch_offset); -void issue_action_BA23a(struct rtw_adapter *padapter, unsigned char *raddr, - unsigned char action, unsigned short status); -unsigned int send_delba23a(struct rtw_adapter *padapter, u8 initiator, u8 *addr); -unsigned int send_beacon23a(struct rtw_adapter *padapter); - -void start_clnt_assoc23a(struct rtw_adapter *padapter); -void start_clnt_auth23a(struct rtw_adapter *padapter); -void start_clnt_join23a(struct rtw_adapter *padapter); -void start_create_ibss23a(struct rtw_adapter *padapter); - -unsigned int OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAssocRsp23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnProbeReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnProbeRsp23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int DoReserved23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnBeacon23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAtim23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnDisassoc23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAuth23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAuth23aClient23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnDeAuth23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAction23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); - -unsigned int on_action_spct23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAction23a_qos(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAction23a_dls(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAction23a_back23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int on_action_public23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAction23a_ht(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAction23a_wmm(struct rtw_adapter *padapter, struct recv_frame *precv_frame); -unsigned int OnAction23a_p2p(struct rtw_adapter *padapter, struct recv_frame *precv_frame); - +void issue_action_BA23a(struct rtw_adapter *padapter, + const unsigned char *raddr, + unsigned char action, unsigned short status); +int send_delba23a(struct rtw_adapter *padapter, u8 initiator, u8 *addr); +int send_beacon23a(struct rtw_adapter *padapter); void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter, int join_res); void mlmeext_sta_del_event_callback23a(struct rtw_adapter *padapter); @@ -668,11 +594,11 @@ void mlmeext_sta_add_event_callback23a(struct rtw_adapter *padapter, struct sta_ void linked_status_chk23a(struct rtw_adapter *padapter); #define set_survey_timer(mlmeext, ms) \ - /*DBG_8723A("%s set_survey_timer(%p, %d)\n", __FUNCTION__, (mlmeext), (ms));*/ \ + /*DBG_8723A("%s set_survey_timer(%p, %d)\n", __func__, (mlmeext), (ms));*/ \ mod_timer(&mlmeext->survey_timer, jiffies + msecs_to_jiffies(ms)); #define set_link_timer(mlmeext, ms) \ - /*DBG_8723A("%s set_link_timer(%p, %d)\n", __FUNCTION__, (mlmeext), (ms));*/ \ + /*DBG_8723A("%s set_link_timer(%p, %d)\n", __func__, (mlmeext), (ms));*/ \ mod_timer(&mlmeext->link_timer, jiffies + msecs_to_jiffies(ms)); int cckrates_included23a(unsigned char *rate, int ratelen); @@ -680,44 +606,43 @@ int cckratesonly_included23a(unsigned char *rate, int ratelen); void process_addba_req23a(struct rtw_adapter *padapter, u8 *paddba_req, u8 *addr); -void update_TSF23a(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len); void correct_TSF23a(struct rtw_adapter *padapter, struct mlme_ext_priv *pmlmeext); struct cmd_hdl { uint parmsize; - u8 (*h2cfuns)(struct rtw_adapter *padapter, u8 *pbuf); + int (*h2cfuns)(struct rtw_adapter *padapter, const u8 *pbuf); }; -u8 read_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); -u8 write_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); -u8 read_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); -u8 write_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); -u8 read_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); -u8 write_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); - - -u8 NULL_hdl23a(struct rtw_adapter *padapter, u8 *pbuf); -u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf); -u8 disconnect_hdl23a(struct rtw_adapter *padapter, u8 *pbuf); -u8 createbss_hdl23a(struct rtw_adapter *padapter, u8 *pbuf); -u8 setopmode_hdl23a(struct rtw_adapter *padapter, u8 *pbuf); -u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf); -u8 setauth_hdl23a(struct rtw_adapter *padapter, u8 *pbuf); -u8 setkey_hdl23a(struct rtw_adapter *padapter, u8 *pbuf); -u8 set_stakey_hdl23a(struct rtw_adapter *padapter, u8 *pbuf); -u8 set_assocsta_hdl(struct rtw_adapter *padapter, u8 *pbuf); -u8 del_assocsta_hdl(struct rtw_adapter *padapter, u8 *pbuf); -u8 add_ba_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf); - -u8 mlme_evt_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf); -u8 h2c_msg_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf); -u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf); -u8 set_ch_hdl23a(struct rtw_adapter *padapter, u8 *pbuf); -u8 set_chplan_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf); -u8 led_blink_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf); -u8 set_csa_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf); /* Kurt: Handling DFS channel switch announcement ie. */ -u8 tdls_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf); +int read_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); +int write_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); +int read_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); +int write_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); +int read_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); +int write_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); + + +int NULL_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int set_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf); +int del_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf); +int add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); + +int mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int h2c_msg_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int set_csa_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); /* Kurt: Handling DFS channel switch announcement ie. */ +int tdls_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); #define GEN_DRV_CMD_HANDLER(size, cmd) {size, &cmd ## _hdl23a}, #define GEN_MLME_EXT_HANDLER(size, cmd) {size, cmd}, @@ -744,9 +669,6 @@ struct C2HEvent_Header { unsigned int rsvd; }; -void rtw_dummy_event_callback23a(struct rtw_adapter *adapter , u8 *pbuf); -void rtw23a_fwdbg_event_callback(struct rtw_adapter *adapter , u8 *pbuf); - enum rtw_c2h_event { GEN_EVT_CODE(_Read_MACREG) = 0, /*0*/ GEN_EVT_CODE(_Read_BBREG), |