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

staging: rtl8723au: Make event callbacks take a const u8 *

This avoids an ugly cast in mlme_evt_hdl23a()
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0f6df02a
......@@ -626,14 +626,14 @@ static int rtw_is_desired_network(struct rtw_adapter *adapter,
}
/* TODO: Perry : For Power Management */
void rtw_atimdone_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf)
void rtw_atimdone_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
{
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("receive atimdone_evet\n"));
return;
}
void rtw_survey_event_cb23a(struct rtw_adapter *adapter, u8 *pbuf)
void rtw_survey_event_cb23a(struct rtw_adapter *adapter, const u8 *pbuf)
{
u32 len;
struct wlan_bssid_ex *pnetwork;
......@@ -693,7 +693,8 @@ void rtw_survey_event_cb23a(struct rtw_adapter *adapter, u8 *pbuf)
return;
}
void rtw_surveydone_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf)
void
rtw_surveydone_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
{
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
......@@ -814,11 +815,11 @@ void rtw_surveydone_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf)
rtw_cfg80211_surveydone_event_callback(adapter);
}
void rtw_dummy_event_callback23a(struct rtw_adapter *adapter , u8 *pbuf)
void rtw_dummy_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
{
}
void rtw23a_fwdbg_event_callback(struct rtw_adapter *adapter , u8 *pbuf)
void rtw23a_fwdbg_event_callback(struct rtw_adapter *adapter, const u8 *pbuf)
{
}
......@@ -1335,7 +1336,7 @@ void rtw_joinbss_event_prehandle23a(struct rtw_adapter *adapter, u8 *pbuf)
spin_unlock_bh(&pmlmepriv->lock);
}
void rtw23a_joinbss_event_cb(struct rtw_adapter *adapter, u8 *pbuf)
void rtw23a_joinbss_event_cb(struct rtw_adapter *adapter, const u8 *pbuf)
{
struct wlan_network *pnetwork = (struct wlan_network *)pbuf;
......@@ -1344,7 +1345,7 @@ void rtw23a_joinbss_event_cb(struct rtw_adapter *adapter, u8 *pbuf)
rtw_os_xmit_schedule23a(adapter);
}
void rtw_stassoc_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf)
void rtw_stassoc_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
{
struct sta_info *psta;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
......@@ -1422,7 +1423,7 @@ void rtw_stassoc_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf)
mlmeext_sta_add_event_callback23a(adapter, psta);
}
void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf)
void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
{
int mac_id;
struct sta_info *psta;
......@@ -1531,7 +1532,7 @@ void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf)
spin_unlock_bh(&pmlmepriv->lock);
}
void rtw_cpwm_event_callback23a(struct rtw_adapter *padapter, u8 *pbuf)
void rtw_cpwm_event_callback23a(struct rtw_adapter *padapter, const u8 *pbuf)
{
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
("+rtw_cpwm_event_callback23a !!!\n"));
......
......@@ -6417,7 +6417,7 @@ u8 mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
u8 evt_code, evt_seq;
u16 evt_sz;
const struct C2HEvent_Header *c2h;
void (*event_callback)(struct rtw_adapter *dev, u8 *pbuf);
void (*event_callback)(struct rtw_adapter *dev, const u8 *pbuf);
c2h = (struct C2HEvent_Header *)pbuf;
evt_sz = c2h->len;
......@@ -6439,7 +6439,7 @@ u8 mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
}
event_callback = wlanevents[evt_code].event_callback;
event_callback(padapter, (u8 *)pbuf + sizeof(struct C2HEvent_Header));
event_callback(padapter, pbuf + sizeof(struct C2HEvent_Header));
_abort_event_:
......
......@@ -81,7 +81,7 @@ struct addba_event
struct fwevent {
u32 parmsize;
void (*event_callback)(struct rtw_adapter *dev, u8 *pbuf);
void (*event_callback)(struct rtw_adapter *dev, const u8 *pbuf);
};
......
......@@ -333,13 +333,13 @@ void hostapd_mode_unload(struct rtw_adapter *padapter);
#endif
void rtw_joinbss_event_prehandle23a(struct rtw_adapter *adapter, u8 *pbuf);
void rtw_survey_event_cb23a(struct rtw_adapter *adapter, u8 *pbuf);
void rtw_surveydone_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf);
void rtw23a_joinbss_event_cb(struct rtw_adapter *adapter, u8 *pbuf);
void rtw_stassoc_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf);
void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf);
void rtw_atimdone_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf);
void rtw_cpwm_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf);
void rtw_survey_event_cb23a(struct rtw_adapter *adapter, const u8 *pbuf);
void rtw_surveydone_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf);
void rtw23a_joinbss_event_cb(struct rtw_adapter *adapter, const u8 *pbuf);
void rtw_stassoc_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf);
void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf);
void rtw_atimdone_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf);
void rtw_cpwm_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf);
int event_thread(void *context);
......
......@@ -699,8 +699,8 @@ 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);
void rtw_dummy_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf);
void rtw23a_fwdbg_event_callback(struct rtw_adapter *adapter, const u8 *pbuf);
enum rtw_c2h_event {
GEN_EVT_CODE(_Read_MACREG) = 0, /*0*/
......
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