From: Jes Sorensen Date: Sat, 26 Apr 2014 16:55:05 +0000 (+0200) Subject: staging: rtl8723au: Make cmd handlers take a const u8 * as their data argument X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b25b7b32ecfd8eec83f3dcd6c0d0b9362964dd43;p=deliverable%2Flinux.git staging: rtl8723au: Make cmd handlers take a const u8 * as their data argument 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 50476fa40bd3..b9e38dc6a26c 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -337,7 +337,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, u8* pbuf); + u8 (*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); @@ -1444,7 +1444,7 @@ static void c2h_wk_callback(struct work_struct *work) evtpriv->c2h_wk_alive = false; } -u8 rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) +u8 rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct drvextra_cmd_parm *pdrvextra_cmd; diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index ff558808a456..4ac1821bd9a4 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -5834,12 +5834,12 @@ void init_mlme_ext_timer23a(struct rtw_adapter *padapter) (unsigned long)padapter); } -u8 NULL_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) +u8 NULL_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { return H2C_SUCCESS; } -u8 setopmode_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) +u8 setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { u8 type; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -5864,7 +5864,7 @@ u8 setopmode_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) return H2C_SUCCESS; } -u8 createbss_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) +u8 createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; @@ -5920,7 +5920,7 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) return H2C_SUCCESS; } -u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) +u8 join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct ndis_802_11_var_ies * pIE; struct registry_priv *pregpriv = &padapter->registrypriv; @@ -6043,7 +6043,7 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) return H2C_SUCCESS; } -u8 disconnect_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) +u8 disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct disconnect_parm *param = (struct disconnect_parm *)pbuf; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -6154,7 +6154,7 @@ static int rtw_scan_ch_decision(struct rtw_adapter *padapter, struct rtw_ieee802 return j; } -u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) +u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct sitesurvey_parm *pparm = (struct sitesurvey_parm *)pbuf; @@ -6236,7 +6236,7 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) return H2C_SUCCESS; } -u8 setauth_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) +u8 setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct setauth_parm *pparm = (struct setauth_parm *)pbuf; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -6250,7 +6250,7 @@ u8 setauth_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) return H2C_SUCCESS; } -u8 setkey_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) +u8 setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { unsigned short ctrl; struct setkey_parm *pparm = (struct setkey_parm *)pbuf; @@ -6275,7 +6275,7 @@ u8 setkey_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) return H2C_SUCCESS; } -u8 set_stakey_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) +u8 set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { u16 ctrl = 0; u8 cam_id;/* cam_entry */ @@ -6362,7 +6362,7 @@ u8 set_stakey_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) return H2C_SUCCESS; } -u8 add_ba_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) +u8 add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct addBaReq_parm *pparm = (struct addBaReq_parm *)pbuf; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -6432,7 +6432,7 @@ exit: return res; } -u8 mlme_evt_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) +u8 mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { u8 evt_code, evt_seq; u16 evt_sz; @@ -6475,7 +6475,7 @@ _abort_event_: return H2C_SUCCESS; } -u8 h2c_msg_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) +u8 h2c_msg_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { if (!pbuf) return H2C_PARAMETERS_ERROR; @@ -6483,7 +6483,7 @@ u8 h2c_msg_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) return H2C_SUCCESS; } -u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) +u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { if (send_beacon23a(padapter) == _FAIL) { @@ -6542,7 +6542,7 @@ u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) return H2C_SUCCESS; } -u8 set_ch_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) +u8 set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct set_ch_parm *set_ch_parm; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -6565,7 +6565,7 @@ u8 set_ch_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) return H2C_SUCCESS; } -u8 set_chplan_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) +u8 set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct SetChannelPlan_param *setChannelPlan_param; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -6581,7 +6581,7 @@ u8 set_chplan_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) return H2C_SUCCESS; } -u8 led_blink_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) +u8 led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { struct LedBlink_param *ledBlink_param; @@ -6593,7 +6593,7 @@ u8 led_blink_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) return H2C_SUCCESS; } -u8 set_csa_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf) +u8 set_csa_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { return H2C_REJECTED; } @@ -6611,7 +6611,7 @@ u8 set_csa_hdl23a(struct rtw_adapter *padapter, unsigned char *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, unsigned char *pbuf) +u8 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 b7b967fd441a..3ecb971c6e39 100644 --- a/drivers/staging/rtl8723au/include/rtw_cmd.h +++ b/drivers/staging/rtl8723au/include/rtw_cmd.h @@ -719,7 +719,7 @@ u8 rtw_tdls_cmd(struct rtw_adapter*padapter, u8 *addr, u8 option); u8 rtw_c2h_wk_cmd23a(struct rtw_adapter *padapter, u8 *c2h_evt); -u8 rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf); +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); 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 cbea64938c54..8a287c231034 100644 --- a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h @@ -639,7 +639,7 @@ 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); + u8 (*h2cfuns)(struct rtw_adapter *padapter, const u8 *pbuf); }; @@ -651,27 +651,27 @@ 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); +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); #define GEN_DRV_CMD_HANDLER(size, cmd) {size, &cmd ## _hdl23a}, #define GEN_MLME_EXT_HANDLER(size, cmd) {size, cmd},