Commit 1ec8911b authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

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: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7271496b
...@@ -287,7 +287,7 @@ void rtw_free_cmd_obj23a(struct cmd_obj *pcmd) ...@@ -287,7 +287,7 @@ void rtw_free_cmd_obj23a(struct cmd_obj *pcmd)
static void rtw_cmd_work(struct work_struct *work) 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); void (*pcmd_callback)(struct rtw_adapter *dev, struct cmd_obj *pcmd);
struct cmd_priv *pcmdpriv; struct cmd_priv *pcmdpriv;
struct cmd_obj *pcmd = container_of(work, struct cmd_obj, work); struct cmd_obj *pcmd = container_of(work, struct cmd_obj, work);
...@@ -338,11 +338,11 @@ static void rtw_cmd_work(struct work_struct *work) ...@@ -338,11 +338,11 @@ static void rtw_cmd_work(struct work_struct *work)
} }
u8 rtw_sitesurvey_cmd23a(struct rtw_adapter *padapter, int rtw_sitesurvey_cmd23a(struct rtw_adapter *padapter,
struct cfg80211_ssid *ssid, int ssid_num, struct cfg80211_ssid *ssid, int ssid_num,
struct rtw_ieee80211_channel *ch, int ch_num) struct rtw_ieee80211_channel *ch, int ch_num)
{ {
u8 res = _FAIL; int res = _FAIL;
struct cmd_obj *ph2c; struct cmd_obj *ph2c;
struct sitesurvey_parm *psurveyPara; struct sitesurvey_parm *psurveyPara;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
...@@ -421,7 +421,7 @@ void rtw_getbbrfreg_cmdrsp_callback23a(struct rtw_adapter *padapter, ...@@ -421,7 +421,7 @@ void rtw_getbbrfreg_cmdrsp_callback23a(struct rtw_adapter *padapter,
kfree(pcmd); kfree(pcmd);
} }
u8 rtw_createbss_cmd23a(struct rtw_adapter *padapter) int rtw_createbss_cmd23a(struct rtw_adapter *padapter)
{ {
struct cmd_obj *pcmd; struct cmd_obj *pcmd;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
...@@ -464,10 +464,11 @@ u8 rtw_createbss_cmd23a(struct rtw_adapter *padapter) ...@@ -464,10 +464,11 @@ u8 rtw_createbss_cmd23a(struct rtw_adapter *padapter)
return res; return res;
} }
u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter, int rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
struct wlan_network *pnetwork) struct wlan_network *pnetwork)
{ {
u8 *auth, res = _SUCCESS; u8 *auth;
int res = _SUCCESS;
struct wlan_bssid_ex *psecnetwork; struct wlan_bssid_ex *psecnetwork;
struct cmd_obj *pcmd; struct cmd_obj *pcmd;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
...@@ -629,13 +630,13 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter, ...@@ -629,13 +630,13 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
return res; return res;
} }
u8 rtw_disassoc_cmd23a(struct rtw_adapter*padapter, u32 deauth_timeout_ms, int rtw_disassoc_cmd23a(struct rtw_adapter*padapter, u32 deauth_timeout_ms,
bool enqueue) bool enqueue)
{ {
struct cmd_obj *cmdobj = NULL; struct cmd_obj *cmdobj = NULL;
struct disconnect_parm *param = NULL; struct disconnect_parm *param = NULL;
struct cmd_priv *cmdpriv = &padapter->cmdpriv; struct cmd_priv *cmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS; int res = _SUCCESS;
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_,
("+rtw_disassoc_cmd23a\n")); ("+rtw_disassoc_cmd23a\n"));
...@@ -670,13 +671,13 @@ u8 rtw_disassoc_cmd23a(struct rtw_adapter*padapter, u32 deauth_timeout_ms, ...@@ -670,13 +671,13 @@ u8 rtw_disassoc_cmd23a(struct rtw_adapter*padapter, u32 deauth_timeout_ms,
return res; return res;
} }
u8 rtw_setopmode_cmd23a(struct rtw_adapter *padapter, int rtw_setopmode_cmd23a(struct rtw_adapter *padapter,
enum ndis_802_11_net_infra networktype) enum ndis_802_11_net_infra networktype)
{ {
struct cmd_obj *ph2c; struct cmd_obj *ph2c;
struct setopmode_parm *psetop; struct setopmode_parm *psetop;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS; int res = _SUCCESS;
ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
if (!ph2c) { if (!ph2c) {
...@@ -699,7 +700,7 @@ u8 rtw_setopmode_cmd23a(struct rtw_adapter *padapter, ...@@ -699,7 +700,7 @@ u8 rtw_setopmode_cmd23a(struct rtw_adapter *padapter,
return res; 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 cmd_obj *ph2c;
struct set_stakey_parm *psetstakey_para; struct set_stakey_parm *psetstakey_para;
...@@ -708,7 +709,7 @@ u8 rtw_setstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 unicast_key) ...@@ -708,7 +709,7 @@ u8 rtw_setstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 unicast_key)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct security_priv *psecuritypriv = &padapter->securitypriv; struct security_priv *psecuritypriv = &padapter->securitypriv;
struct sta_info *sta = (struct sta_info*)psta; struct sta_info *sta = (struct sta_info*)psta;
u8 res = _SUCCESS; int res = _SUCCESS;
ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
if (!ph2c) { if (!ph2c) {
...@@ -763,7 +764,7 @@ u8 rtw_setstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 unicast_key) ...@@ -763,7 +764,7 @@ u8 rtw_setstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 unicast_key)
return res; return res;
} }
u8 rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry, int rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry,
u8 enqueue) u8 enqueue)
{ {
struct cmd_obj *ph2c; struct cmd_obj *ph2c;
...@@ -771,7 +772,7 @@ u8 rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry, ...@@ -771,7 +772,7 @@ u8 rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry,
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct set_stakey_rsp *psetstakey_rsp = NULL; struct set_stakey_rsp *psetstakey_rsp = NULL;
struct sta_info *sta = (struct sta_info *)psta; struct sta_info *sta = (struct sta_info *)psta;
u8 res = _SUCCESS; int res = _SUCCESS;
if (!enqueue) { if (!enqueue) {
clear_cam_entry23a(padapter, entry); clear_cam_entry23a(padapter, entry);
...@@ -816,12 +817,12 @@ u8 rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry, ...@@ -816,12 +817,12 @@ u8 rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry,
return res; 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_priv *pcmdpriv = &padapter->cmdpriv;
struct cmd_obj *ph2c; struct cmd_obj *ph2c;
struct addBaReq_parm *paddbareq_parm; struct addBaReq_parm *paddbareq_parm;
u8 res = _SUCCESS; int res = _SUCCESS;
if (tid >= MAXTID) { if (tid >= MAXTID) {
res = _FAIL; res = _FAIL;
...@@ -852,12 +853,12 @@ u8 rtw_addbareq_cmd23a(struct rtw_adapter*padapter, u8 tid, u8 *addr) ...@@ -852,12 +853,12 @@ u8 rtw_addbareq_cmd23a(struct rtw_adapter*padapter, u8 tid, u8 *addr)
return res; 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 cmd_obj *ph2c;
struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct drvextra_cmd_parm *pdrvextra_cmd_parm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS; int res = _SUCCESS;
ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!ph2c) { if (!ph2c) {
...@@ -889,14 +890,13 @@ u8 rtw_dynamic_chk_wk_cmd23a(struct rtw_adapter*padapter) ...@@ -889,14 +890,13 @@ u8 rtw_dynamic_chk_wk_cmd23a(struct rtw_adapter*padapter)
* This is only ever called from on_action_spct23a_ch_switch () which isn't * This is only ever called from on_action_spct23a_ch_switch () which isn't
* called from anywhere itself * called from anywhere itself
*/ */
u8 rtw_set_ch_cmd23a(struct rtw_adapter*padapter, u8 ch, u8 bw, u8 ch_offset, int rtw_set_ch_cmd23a(struct rtw_adapter*padapter, u8 ch, u8 bw, u8 ch_offset,
u8 enqueue) u8 enqueue)
{ {
struct cmd_obj *pcmdobj; struct cmd_obj *pcmdobj;
struct set_ch_parm *set_ch_parm; struct set_ch_parm *set_ch_parm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
int res = _SUCCESS;
u8 res = _SUCCESS;
DBG_8723A("%s(%s): ch:%u, bw:%u, ch_offset:%u\n", __func__, DBG_8723A("%s(%s): ch:%u, bw:%u, ch_offset:%u\n", __func__,
padapter->pnetdev->name, ch, bw, ch_offset); 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) ...@@ -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, int rtw_lps_ctrl_wk_cmd23a(struct rtw_adapter *padapter,
u8 lps_ctrl_type, u8 enqueue) u8 lps_ctrl_type, u8 enqueue)
{ {
struct cmd_obj *ph2c; struct cmd_obj *ph2c;
struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct drvextra_cmd_parm *pdrvextra_cmd_parm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS; int res = _SUCCESS;
if (enqueue) { if (enqueue) {
ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); 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) ...@@ -1161,13 +1161,12 @@ static void power_saving_wk_hdl(struct rtw_adapter *padapter, u8 *pbuf, int sz)
rtw_ps_processor23a(padapter); 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 cmd_obj *ppscmd;
struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct drvextra_cmd_parm *pdrvextra_cmd_parm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
int res = _SUCCESS;
u8 res = _SUCCESS;
ppscmd = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); ppscmd = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!ppscmd) { if (!ppscmd) {
...@@ -1232,12 +1231,12 @@ static void rtw_chk_hi_queue_hdl(struct rtw_adapter *padapter) ...@@ -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 cmd_obj *ph2c;
struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct drvextra_cmd_parm *pdrvextra_cmd_parm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS; int res = _SUCCESS;
ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!ph2c) { if (!ph2c) {
...@@ -1267,12 +1266,12 @@ u8 rtw_chk_hi_queue_cmd23a(struct rtw_adapter*padapter) ...@@ -1267,12 +1266,12 @@ u8 rtw_chk_hi_queue_cmd23a(struct rtw_adapter*padapter)
} }
#endif #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 cmd_obj *ph2c;
struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct drvextra_cmd_parm *pdrvextra_cmd_parm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS; int res = _SUCCESS;
ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!ph2c) { if (!ph2c) {
...@@ -1360,7 +1359,7 @@ void rtw_evt_work(struct work_struct *work) ...@@ -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; const struct drvextra_cmd_parm *pdrvextra_cmd;
......
...@@ -5809,12 +5809,12 @@ void init_mlme_ext_timer23a(struct rtw_adapter *padapter) ...@@ -5809,12 +5809,12 @@ void init_mlme_ext_timer23a(struct rtw_adapter *padapter)
(unsigned long)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; 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; u8 type;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
...@@ -5839,7 +5839,7 @@ u8 setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -5839,7 +5839,7 @@ u8 setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
...@@ -5893,7 +5893,7 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -5893,7 +5893,7 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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 ndis_802_11_var_ies * pIE;
struct registry_priv *pregpriv = &padapter->registrypriv; struct registry_priv *pregpriv = &padapter->registrypriv;
...@@ -6014,7 +6014,7 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6014,7 +6014,7 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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; const struct disconnect_parm *param = (struct disconnect_parm *)pbuf;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
...@@ -6125,7 +6125,7 @@ rtw_scan_ch_decision(struct rtw_adapter *padapter, ...@@ -6125,7 +6125,7 @@ rtw_scan_ch_decision(struct rtw_adapter *padapter,
return j; 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; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
const struct sitesurvey_parm *pparm = (struct sitesurvey_parm *)pbuf; const struct sitesurvey_parm *pparm = (struct sitesurvey_parm *)pbuf;
...@@ -6207,7 +6207,7 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6207,7 +6207,7 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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; const struct setauth_parm *pparm = (struct setauth_parm *)pbuf;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
...@@ -6221,7 +6221,7 @@ u8 setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6221,7 +6221,7 @@ u8 setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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; unsigned short ctrl;
const struct setkey_parm *pparm = (struct setkey_parm *)pbuf; const struct setkey_parm *pparm = (struct setkey_parm *)pbuf;
...@@ -6246,7 +6246,7 @@ u8 setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6246,7 +6246,7 @@ u8 setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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; u16 ctrl = 0;
u8 cam_id;/* cam_entry */ u8 cam_id;/* cam_entry */
...@@ -6333,7 +6333,7 @@ u8 set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6333,7 +6333,7 @@ u8 set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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; const struct addBaReq_parm *pparm = (struct addBaReq_parm *)pbuf;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
...@@ -6357,7 +6357,7 @@ u8 add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6357,7 +6357,7 @@ u8 add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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 cmd_obj *ph2c;
struct Tx_Beacon_param *ptxBeacon_parm; struct Tx_Beacon_param *ptxBeacon_parm;
...@@ -6403,7 +6403,7 @@ u8 set_tx_beacon_cmd23a(struct rtw_adapter* padapter) ...@@ -6403,7 +6403,7 @@ u8 set_tx_beacon_cmd23a(struct rtw_adapter* padapter)
return res; 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; u8 evt_code, evt_seq;
u16 evt_sz; u16 evt_sz;
...@@ -6437,7 +6437,7 @@ u8 mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6437,7 +6437,7 @@ u8 mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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) if (!pbuf)
return H2C_PARAMETERS_ERROR; return H2C_PARAMETERS_ERROR;
...@@ -6445,7 +6445,7 @@ u8 h2c_msg_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6445,7 +6445,7 @@ u8 h2c_msg_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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) if (send_beacon23a(padapter) == _FAIL)
{ {
...@@ -6505,7 +6505,7 @@ u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6505,7 +6505,7 @@ u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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; const struct set_ch_parm *set_ch_parm;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
...@@ -6528,7 +6528,7 @@ u8 set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6528,7 +6528,7 @@ u8 set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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; const struct SetChannelPlan_param *setChannelPlan_param;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
...@@ -6544,7 +6544,7 @@ u8 set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6544,7 +6544,7 @@ u8 set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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; struct LedBlink_param *ledBlink_param;
...@@ -6556,7 +6556,7 @@ u8 led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6556,7 +6556,7 @@ u8 led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
return H2C_SUCCESS; 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; return H2C_REJECTED;
} }
...@@ -6574,7 +6574,7 @@ u8 set_csa_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) ...@@ -6574,7 +6574,7 @@ u8 set_csa_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
/* TDLS_CKALV_PH1 : check alive timer phase1 */ /* TDLS_CKALV_PH1 : check alive timer phase1 */
/* TDLS_CKALV_PH2 : check alive timer phase2 */ /* TDLS_CKALV_PH2 : check alive timer phase2 */
/* TDLS_FREE_STA : free tdls sta */ /* 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; return H2C_REJECTED;
} }
...@@ -35,9 +35,9 @@ struct cmd_obj { ...@@ -35,9 +35,9 @@ struct cmd_obj {
struct work_struct work; struct work_struct work;
struct rtw_adapter *padapter; struct rtw_adapter *padapter;
u16 cmdcode; u16 cmdcode;
u8 res; int res;
u8 *parmbuf;
u32 cmdsz; u32 cmdsz;
u8 *parmbuf;
u8 *rsp; u8 *rsp;
u32 rspsz; u32 rspsz;
}; };
...@@ -679,52 +679,52 @@ struct TDLSoption_param { ...@@ -679,52 +679,52 @@ struct TDLSoption_param {
#define H2C_CMD_OVERFLOW 0x06 #define H2C_CMD_OVERFLOW 0x06
#define H2C_RESERVED 0x07 #define H2C_RESERVED 0x07
u8 rtw_setassocsta_cmd(struct rtw_adapter *padapter, u8 *mac_addr); int rtw_setassocsta_cmd(struct rtw_adapter *padapter, u8 *mac_addr);
u8 rtw_setstandby_cmd(struct rtw_adapter *padapter, uint action); int 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); int 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); int rtw_createbss_cmd23a(struct rtw_adapter *padapter);
u8 rtw_createbss_cmd23a_ex(struct rtw_adapter *padapter, unsigned char *pbss, unsigned int sz); int 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); int rtw_setphy_cmd(struct rtw_adapter *padapter, u8 modem, u8 ch);
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);
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);
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 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);
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);
u8 rtw_setdatarate_cmd(struct rtw_adapter *padapter, u8 *rateset); int rtw_setdatarate_cmd(struct rtw_adapter *padapter, u8 *rateset);
u8 rtw_setbasicrate_cmd(struct rtw_adapter *padapter, u8 *rateset); int rtw_setbasicrate_cmd(struct rtw_adapter *padapter, u8 *rateset);
u8 rtw_setbbreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 val); int rtw_setbbreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 val);
u8 rtw_setrfreg_cmd(struct rtw_adapter * padapter, u8 offset, u32 val); int rtw_setrfreg_cmd(struct rtw_adapter * padapter, u8 offset, u32 val);
u8 rtw_getbbreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 * pval); int rtw_getbbreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 * pval);
u8 rtw_getrfreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 * pval); int rtw_getrfreg_cmd(struct rtw_adapter * padapter, u8 offset, u8 * pval);
u8 rtw_setrfintfs_cmd(struct rtw_adapter *padapter, u8 mode); int rtw_setrfintfs_cmd(struct rtw_adapter *padapter, u8 mode);
u8 rtw_setrttbl_cmd(struct rtw_adapter *padapter, struct setratable_parm *prate_table); int rtw_setrttbl_cmd(struct rtw_adapter *padapter, struct setratable_parm *prate_table);
u8 rtw_getrttbl_cmd(struct rtw_adapter *padapter, struct getratable_rsp *pval); int rtw_getrttbl_cmd(struct rtw_adapter *padapter, struct getratable_rsp *pval);
u8 rtw_gettssi_cmd(struct rtw_adapter *padapter, u8 offset,u8 *pval); int rtw_gettssi_cmd(struct rtw_adapter *padapter, u8 offset,u8 *pval);
u8 rtw_setfwdig_cmd(struct rtw_adapter*padapter, u8 type); int rtw_setfwdig_cmd(struct rtw_adapter*padapter, u8 type);
u8 rtw_setfwra_cmd(struct rtw_adapter*padapter, u8 type); int rtw_setfwra_cmd(struct rtw_adapter*padapter, u8 type);
u8 rtw_addbareq_cmd23a(struct rtw_adapter*padapter, u8 tid, u8 *addr); int rtw_addbareq_cmd23a(struct rtw_adapter*padapter, u8 tid, u8 *addr);
u8 rtw_dynamic_chk_wk_cmd23a(struct rtw_adapter *adapter); int 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); int 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_ps_cmd23a(struct rtw_adapter*padapter);
#ifdef CONFIG_8723AU_AP_MODE #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 #endif
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);
u8 rtw_set_chplan_cmd(struct rtw_adapter*padapter, u8 chplan, u8 enqueue); int 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); int 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); int 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_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_survey_cmd_callback23a(struct rtw_adapter *padapter, struct cmd_obj *pcmd);
void rtw_disassoc_cmd23a_callback(struct rtw_adapter *padapter, struct cmd_obj *pcmd); void rtw_disassoc_cmd23a_callback(struct rtw_adapter *padapter, struct cmd_obj *pcmd);
......
...@@ -567,7 +567,7 @@ void report_del_sta_event23a(struct rtw_adapter *padapter, ...@@ -567,7 +567,7 @@ void report_del_sta_event23a(struct rtw_adapter *padapter,
void report_add_sta_event23a(struct rtw_adapter *padapter, void report_add_sta_event23a(struct rtw_adapter *padapter,
unsigned char *MacAddr, int cam_idx); 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 int setup_beacon_frame(struct rtw_adapter *padapter,
unsigned char *beacon_frame); unsigned char *beacon_frame);
void update_mgnt_tx_rate23a(struct rtw_adapter *padapter, u8 rate); 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 ...@@ -637,39 +637,39 @@ void correct_TSF23a(struct rtw_adapter *padapter, struct mlme_ext_priv *pmlmeext
struct cmd_hdl { struct cmd_hdl {
uint parmsize; 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); int read_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
u8 write_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); int write_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
u8 read_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); int read_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
u8 write_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); int write_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
u8 read_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); int read_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
u8 write_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf); int write_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
u8 NULL_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int NULL_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 set_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf); int set_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf);
u8 del_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf); int del_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf);
u8 add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 h2c_msg_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int h2c_msg_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
u8 led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf); int 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. */ int 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 tdls_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
#define GEN_DRV_CMD_HANDLER(size, cmd) {size, &cmd ## _hdl23a}, #define GEN_DRV_CMD_HANDLER(size, cmd) {size, &cmd ## _hdl23a},
#define GEN_MLME_EXT_HANDLER(size, cmd) {size, cmd}, #define GEN_MLME_EXT_HANDLER(size, cmd) {size, cmd},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment