From: Jes Sorensen Date: Fri, 16 May 2014 08:04:28 +0000 (+0200) Subject: staging: rtl8723au: Make cmd and event handlers return int instead of u8 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1ec8911b6d7d12757be89d6d8f0cbbd8aa4ba350;p=linux-beck.git staging: rtl8723au: Make cmd and event handlers return int instead of u8 This is needed so we can eventually start passing around proper error codes instead of the custom RTW ones. Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 356bfcc9744a..2f3fbb3d1bbb 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -287,7 +287,7 @@ void rtw_free_cmd_obj23a(struct cmd_obj *pcmd) static void rtw_cmd_work(struct work_struct *work) { - u8 (*cmd_hdl)(struct rtw_adapter *padapter, const u8 *pbuf); + int (*cmd_hdl)(struct rtw_adapter *padapter, const u8 *pbuf); void (*pcmd_callback)(struct rtw_adapter *dev, struct cmd_obj *pcmd); struct cmd_priv *pcmdpriv; struct cmd_obj *pcmd = container_of(work, struct cmd_obj, work); @@ -338,11 +338,11 @@ post_process: } -u8 rtw_sitesurvey_cmd23a(struct rtw_adapter *padapter, - struct cfg80211_ssid *ssid, int ssid_num, - struct rtw_ieee80211_channel *ch, int ch_num) +int rtw_sitesurvey_cmd23a(struct rtw_adapter *padapter, + struct cfg80211_ssid *ssid, int ssid_num, + struct rtw_ieee80211_channel *ch, int ch_num) { - u8 res = _FAIL; + int res = _FAIL; struct cmd_obj *ph2c; struct sitesurvey_parm *psurveyPara; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; @@ -421,7 +421,7 @@ void rtw_getbbrfreg_cmdrsp_callback23a(struct rtw_adapter *padapter, kfree(pcmd); } -u8 rtw_createbss_cmd23a(struct rtw_adapter *padapter) +int rtw_createbss_cmd23a(struct rtw_adapter *padapter) { struct cmd_obj *pcmd; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; @@ -464,10 +464,11 @@ exit: return res; } -u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter, - struct wlan_network *pnetwork) +int rtw_joinbss_cmd23a(struct rtw_adapter *padapter, + struct wlan_network *pnetwork) { - u8 *auth, res = _SUCCESS; + u8 *auth; + int res = _SUCCESS; struct wlan_bssid_ex *psecnetwork; struct cmd_obj *pcmd; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; @@ -629,13 +630,13 @@ exit: return res; } -u8 rtw_disassoc_cmd23a(struct rtw_adapter*padapter, u32 deauth_timeout_ms, - bool enqueue) +int rtw_disassoc_cmd23a(struct rtw_adapter*padapter, u32 deauth_timeout_ms, + bool enqueue) { struct cmd_obj *cmdobj = NULL; struct disconnect_parm *param = NULL; struct cmd_priv *cmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; + int res = _SUCCESS; RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_disassoc_cmd23a\n")); @@ -670,13 +671,13 @@ exit: return res; } -u8 rtw_setopmode_cmd23a(struct rtw_adapter *padapter, - enum ndis_802_11_net_infra networktype) +int rtw_setopmode_cmd23a(struct rtw_adapter *padapter, + enum ndis_802_11_net_infra networktype) { struct cmd_obj *ph2c; struct setopmode_parm *psetop; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; + int res = _SUCCESS; ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); if (!ph2c) { @@ -699,7 +700,7 @@ exit: return res; } -u8 rtw_setstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 unicast_key) +int rtw_setstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 unicast_key) { struct cmd_obj *ph2c; struct set_stakey_parm *psetstakey_para; @@ -708,7 +709,7 @@ u8 rtw_setstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 unicast_key) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; struct sta_info *sta = (struct sta_info*)psta; - u8 res = _SUCCESS; + int res = _SUCCESS; ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); if (!ph2c) { @@ -763,15 +764,15 @@ exit: return res; } -u8 rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry, - u8 enqueue) +int rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry, + u8 enqueue) { struct cmd_obj *ph2c; struct set_stakey_parm *psetstakey_para; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct set_stakey_rsp *psetstakey_rsp = NULL; struct sta_info *sta = (struct sta_info *)psta; - u8 res = _SUCCESS; + int res = _SUCCESS; if (!enqueue) { clear_cam_entry23a(padapter, entry); @@ -816,12 +817,12 @@ exit: return res; } -u8 rtw_addbareq_cmd23a(struct rtw_adapter*padapter, u8 tid, u8 *addr) +int rtw_addbareq_cmd23a(struct rtw_adapter*padapter, u8 tid, u8 *addr) { struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_obj *ph2c; struct addBaReq_parm *paddbareq_parm; - u8 res = _SUCCESS; + int res = _SUCCESS; if (tid >= MAXTID) { res = _FAIL; @@ -852,12 +853,12 @@ exit: return res; } -u8 rtw_dynamic_chk_wk_cmd23a(struct rtw_adapter*padapter) +int rtw_dynamic_chk_wk_cmd23a(struct rtw_adapter*padapter) { struct cmd_obj *ph2c; struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; + int res = _SUCCESS; ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!ph2c) { @@ -889,14 +890,13 @@ exit: * This is only ever called from on_action_spct23a_ch_switch () which isn't * called from anywhere itself */ -u8 rtw_set_ch_cmd23a(struct rtw_adapter*padapter, u8 ch, u8 bw, u8 ch_offset, - u8 enqueue) +int rtw_set_ch_cmd23a(struct rtw_adapter*padapter, u8 ch, u8 bw, u8 ch_offset, + u8 enqueue) { struct cmd_obj *pcmdobj; struct set_ch_parm *set_ch_parm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - - u8 res = _SUCCESS; + int res = _SUCCESS; DBG_8723A("%s(%s): ch:%u, bw:%u, ch_offset:%u\n", __func__, padapter->pnetdev->name, ch, bw, ch_offset); @@ -1118,13 +1118,13 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) } } -u8 rtw_lps_ctrl_wk_cmd23a(struct rtw_adapter *padapter, - u8 lps_ctrl_type, u8 enqueue) +int rtw_lps_ctrl_wk_cmd23a(struct rtw_adapter *padapter, + u8 lps_ctrl_type, u8 enqueue) { struct cmd_obj *ph2c; struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; + int res = _SUCCESS; if (enqueue) { ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); @@ -1161,13 +1161,12 @@ static void power_saving_wk_hdl(struct rtw_adapter *padapter, u8 *pbuf, int sz) rtw_ps_processor23a(padapter); } -u8 rtw_ps_cmd23a(struct rtw_adapter*padapter) +int rtw_ps_cmd23a(struct rtw_adapter*padapter) { struct cmd_obj *ppscmd; struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - - u8 res = _SUCCESS; + int res = _SUCCESS; ppscmd = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!ppscmd) { @@ -1232,12 +1231,12 @@ static void rtw_chk_hi_queue_hdl(struct rtw_adapter *padapter) } } -u8 rtw_chk_hi_queue_cmd23a(struct rtw_adapter*padapter) +int rtw_chk_hi_queue_cmd23a(struct rtw_adapter*padapter) { struct cmd_obj *ph2c; struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; + int res = _SUCCESS; ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!ph2c) { @@ -1267,12 +1266,12 @@ exit: } #endif -u8 rtw_c2h_wk_cmd23a(struct rtw_adapter *padapter, u8 *c2h_evt) +int rtw_c2h_wk_cmd23a(struct rtw_adapter *padapter, u8 *c2h_evt) { struct cmd_obj *ph2c; struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; + int res = _SUCCESS; ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!ph2c) { @@ -1360,7 +1359,7 @@ void rtw_evt_work(struct work_struct *work) } } -u8 rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { const struct drvextra_cmd_parm *pdrvextra_cmd; @@ -1409,7 +1408,7 @@ u8 rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) } void rtw_survey_cmd_callback23a(struct rtw_adapter *padapter, - struct cmd_obj *pcmd) + struct cmd_obj *pcmd) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index a769d92e4f00..91164036da73 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -5809,12 +5809,12 @@ void init_mlme_ext_timer23a(struct rtw_adapter *padapter) (unsigned long)padapter); } -u8 NULL_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int NULL_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { return H2C_SUCCESS; } -u8 setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { u8 type; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -5839,7 +5839,7 @@ u8 setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; @@ -5893,7 +5893,7 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct ndis_802_11_var_ies * pIE; struct registry_priv *pregpriv = &padapter->registrypriv; @@ -6014,7 +6014,7 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { const struct disconnect_parm *param = (struct disconnect_parm *)pbuf; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -6125,7 +6125,7 @@ rtw_scan_ch_decision(struct rtw_adapter *padapter, return j; } -u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; const struct sitesurvey_parm *pparm = (struct sitesurvey_parm *)pbuf; @@ -6207,7 +6207,7 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { const struct setauth_parm *pparm = (struct setauth_parm *)pbuf; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -6221,7 +6221,7 @@ u8 setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { unsigned short ctrl; const struct setkey_parm *pparm = (struct setkey_parm *)pbuf; @@ -6246,7 +6246,7 @@ u8 setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { u16 ctrl = 0; u8 cam_id;/* cam_entry */ @@ -6333,7 +6333,7 @@ u8 set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { const struct addBaReq_parm *pparm = (struct addBaReq_parm *)pbuf; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -6357,7 +6357,7 @@ u8 add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 set_tx_beacon_cmd23a(struct rtw_adapter* padapter) +int set_tx_beacon_cmd23a(struct rtw_adapter* padapter) { struct cmd_obj *ph2c; struct Tx_Beacon_param *ptxBeacon_parm; @@ -6403,7 +6403,7 @@ exit: return res; } -u8 mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { u8 evt_code, evt_seq; u16 evt_sz; @@ -6437,7 +6437,7 @@ _abort_event_: return H2C_SUCCESS; } -u8 h2c_msg_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int h2c_msg_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { if (!pbuf) return H2C_PARAMETERS_ERROR; @@ -6445,7 +6445,7 @@ u8 h2c_msg_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { if (send_beacon23a(padapter) == _FAIL) { @@ -6505,7 +6505,7 @@ u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { const struct set_ch_parm *set_ch_parm; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -6528,7 +6528,7 @@ u8 set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { const struct SetChannelPlan_param *setChannelPlan_param; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -6544,7 +6544,7 @@ u8 set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct LedBlink_param *ledBlink_param; @@ -6556,7 +6556,7 @@ u8 led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) return H2C_SUCCESS; } -u8 set_csa_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int set_csa_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { return H2C_REJECTED; } @@ -6574,7 +6574,7 @@ u8 set_csa_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) /* TDLS_CKALV_PH1 : check alive timer phase1 */ /* TDLS_CKALV_PH2 : check alive timer phase2 */ /* TDLS_FREE_STA : free tdls sta */ -u8 tdls_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) +int tdls_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { return H2C_REJECTED; } diff --git a/drivers/staging/rtl8723au/include/rtw_cmd.h b/drivers/staging/rtl8723au/include/rtw_cmd.h index 2cb9c085cc9d..427596e123d9 100644 --- a/drivers/staging/rtl8723au/include/rtw_cmd.h +++ b/drivers/staging/rtl8723au/include/rtw_cmd.h @@ -35,9 +35,9 @@ struct cmd_obj { struct work_struct work; struct rtw_adapter *padapter; u16 cmdcode; - u8 res; - u8 *parmbuf; + int res; u32 cmdsz; + u8 *parmbuf; u8 *rsp; u32 rspsz; }; @@ -679,52 +679,52 @@ Result: #define H2C_CMD_OVERFLOW 0x06 #define H2C_RESERVED 0x07 -u8 rtw_setassocsta_cmd(struct rtw_adapter *padapter, u8 *mac_addr); -u8 rtw_setstandby_cmd(struct rtw_adapter *padapter, uint action); -u8 rtw_sitesurvey_cmd23a(struct rtw_adapter *padapter, struct cfg80211_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num); -u8 rtw_createbss_cmd23a(struct rtw_adapter *padapter); -u8 rtw_createbss_cmd23a_ex(struct rtw_adapter *padapter, unsigned char *pbss, unsigned int sz); -u8 rtw_setphy_cmd(struct rtw_adapter *padapter, u8 modem, u8 ch); -u8 rtw_setstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 unicast_key); -u8 rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry, u8 enqueue); -u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter, struct wlan_network* pnetwork); -u8 rtw_disassoc_cmd23a(struct rtw_adapter *padapter, u32 deauth_timeout_ms, bool enqueue); -u8 rtw_setopmode_cmd23a(struct rtw_adapter *padapter, enum ndis_802_11_net_infra networktype); -u8 rtw_setdatarate_cmd(struct rtw_adapter *padapter, u8 *rateset); -u8 rtw_setbasicrate_cmd(struct rtw_adapter *padapter, u8 *rateset); -u8 rtw_setbbreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 val); -u8 rtw_setrfreg_cmd(struct rtw_adapter * padapter, u8 offset, u32 val); -u8 rtw_getbbreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 * pval); -u8 rtw_getrfreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 * pval); -u8 rtw_setrfintfs_cmd(struct rtw_adapter *padapter, u8 mode); -u8 rtw_setrttbl_cmd(struct rtw_adapter *padapter, struct setratable_parm *prate_table); -u8 rtw_getrttbl_cmd(struct rtw_adapter *padapter, struct getratable_rsp *pval); - -u8 rtw_gettssi_cmd(struct rtw_adapter *padapter, u8 offset,u8 *pval); -u8 rtw_setfwdig_cmd(struct rtw_adapter*padapter, u8 type); -u8 rtw_setfwra_cmd(struct rtw_adapter*padapter, u8 type); - -u8 rtw_addbareq_cmd23a(struct rtw_adapter*padapter, u8 tid, u8 *addr); - -u8 rtw_dynamic_chk_wk_cmd23a(struct rtw_adapter *adapter); - -u8 rtw_lps_ctrl_wk_cmd23a(struct rtw_adapter*padapter, u8 lps_ctrl_type, u8 enqueue); - -u8 rtw_ps_cmd23a(struct rtw_adapter*padapter); +int rtw_setassocsta_cmd(struct rtw_adapter *padapter, u8 *mac_addr); +int rtw_setstandby_cmd(struct rtw_adapter *padapter, uint action); +int rtw_sitesurvey_cmd23a(struct rtw_adapter *padapter, struct cfg80211_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num); +int rtw_createbss_cmd23a(struct rtw_adapter *padapter); +int rtw_createbss_cmd23a_ex(struct rtw_adapter *padapter, unsigned char *pbss, unsigned int sz); +int rtw_setphy_cmd(struct rtw_adapter *padapter, u8 modem, u8 ch); +int rtw_setstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 unicast_key); +int rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry, u8 enqueue); +int rtw_joinbss_cmd23a(struct rtw_adapter *padapter, struct wlan_network* pnetwork); +int rtw_disassoc_cmd23a(struct rtw_adapter *padapter, u32 deauth_timeout_ms, bool enqueue); +int rtw_setopmode_cmd23a(struct rtw_adapter *padapter, enum ndis_802_11_net_infra networktype); +int rtw_setdatarate_cmd(struct rtw_adapter *padapter, u8 *rateset); +int rtw_setbasicrate_cmd(struct rtw_adapter *padapter, u8 *rateset); +int rtw_setbbreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 val); +int rtw_setrfreg_cmd(struct rtw_adapter * padapter, u8 offset, u32 val); +int rtw_getbbreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 * pval); +int rtw_getrfreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 * pval); +int rtw_setrfintfs_cmd(struct rtw_adapter *padapter, u8 mode); +int rtw_setrttbl_cmd(struct rtw_adapter *padapter, struct setratable_parm *prate_table); +int rtw_getrttbl_cmd(struct rtw_adapter *padapter, struct getratable_rsp *pval); + +int rtw_gettssi_cmd(struct rtw_adapter *padapter, u8 offset,u8 *pval); +int rtw_setfwdig_cmd(struct rtw_adapter*padapter, u8 type); +int rtw_setfwra_cmd(struct rtw_adapter*padapter, u8 type); + +int rtw_addbareq_cmd23a(struct rtw_adapter*padapter, u8 tid, u8 *addr); + +int rtw_dynamic_chk_wk_cmd23a(struct rtw_adapter *adapter); + +int rtw_lps_ctrl_wk_cmd23a(struct rtw_adapter*padapter, u8 lps_ctrl_type, u8 enqueue); + +int rtw_ps_cmd23a(struct rtw_adapter*padapter); #ifdef CONFIG_8723AU_AP_MODE -u8 rtw_chk_hi_queue_cmd23a(struct rtw_adapter*padapter); +int rtw_chk_hi_queue_cmd23a(struct rtw_adapter*padapter); #endif -u8 rtw_set_ch_cmd23a(struct rtw_adapter*padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueue); -u8 rtw_set_chplan_cmd(struct rtw_adapter*padapter, u8 chplan, u8 enqueue); -u8 rtw_led_blink_cmd(struct rtw_adapter*padapter, struct led_8723a *pLed); -u8 rtw_set_csa_cmd(struct rtw_adapter*padapter, u8 new_ch_no); -u8 rtw_tdls_cmd(struct rtw_adapter*padapter, u8 *addr, u8 option); +int rtw_set_ch_cmd23a(struct rtw_adapter*padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueue); +int rtw_set_chplan_cmd(struct rtw_adapter*padapter, u8 chplan, u8 enqueue); +int rtw_led_blink_cmd(struct rtw_adapter*padapter, struct led_8723a *pLed); +int rtw_set_csa_cmd(struct rtw_adapter*padapter, u8 new_ch_no); +int rtw_tdls_cmd(struct rtw_adapter*padapter, u8 *addr, u8 option); -u8 rtw_c2h_wk_cmd23a(struct rtw_adapter *padapter, u8 *c2h_evt); +int rtw_c2h_wk_cmd23a(struct rtw_adapter *padapter, u8 *c2h_evt); -u8 rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); +int rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); void rtw_survey_cmd_callback23a(struct rtw_adapter *padapter, struct cmd_obj *pcmd); void rtw_disassoc_cmd23a_callback(struct rtw_adapter *padapter, struct cmd_obj *pcmd); diff --git a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h index b2036998b61e..0148311fb69d 100644 --- a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h @@ -567,7 +567,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); -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); @@ -637,39 +637,39 @@ void correct_TSF23a(struct rtw_adapter *padapter, struct mlme_ext_priv *pmlmeext struct cmd_hdl { uint parmsize; - u8 (*h2cfuns)(struct rtw_adapter *padapter, const 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, const u8 *pbuf); -u8 join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 set_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf); -u8 del_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf); -u8 add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); - -u8 mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 h2c_msg_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); -u8 set_csa_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); /* Kurt: Handling DFS channel switch announcement ie. */ -u8 tdls_hdl23a(struct rtw_adapter *padapter, const u8 *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},