staging: rtl8188eu: use __func__ in rtw_mlme.c
Use __func__ instead of hardcoded function names. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
18bd05bb9c
commit
1d9416d6d5
@ -230,8 +230,9 @@ int rtw_if_up(struct adapter *padapter)
|
|||||||
if (padapter->bDriverStopped || padapter->bSurpriseRemoved ||
|
if (padapter->bDriverStopped || padapter->bSurpriseRemoved ||
|
||||||
!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) {
|
!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) {
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
||||||
("rtw_if_up:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
|
("%s:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
|
||||||
padapter->bDriverStopped, padapter->bSurpriseRemoved));
|
__func__, padapter->bDriverStopped,
|
||||||
|
padapter->bSurpriseRemoved));
|
||||||
res = false;
|
res = false;
|
||||||
} else {
|
} else {
|
||||||
res = true;
|
res = true;
|
||||||
@ -555,11 +556,13 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||||||
|
|
||||||
pnetwork = (struct wlan_bssid_ex *)pbuf;
|
pnetwork = (struct wlan_bssid_ex *)pbuf;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_survey_event_callback, ssid=%s\n", pnetwork->Ssid.Ssid));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
||||||
|
("%s, ssid=%s\n", __func__, pnetwork->Ssid.Ssid));
|
||||||
|
|
||||||
len = get_wlan_bssid_ex_sz(pnetwork);
|
len = get_wlan_bssid_ex_sz(pnetwork);
|
||||||
if (len > (sizeof(struct wlan_bssid_ex))) {
|
if (len > (sizeof(struct wlan_bssid_ex))) {
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n****rtw_survey_event_callback: return a wrong bss ***\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
||||||
|
("\n****%s: return a wrong bss ***\n", __func__));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
@ -606,7 +609,8 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||||||
pmlmepriv->wps_probe_req_ie = NULL;
|
pmlmepriv->wps_probe_req_ie = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_surveydone_event_callback: fw_state:%x\n\n", get_fwstate(pmlmepriv)));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
||||||
|
("%s: fw_state:%x\n\n", __func__, get_fwstate(pmlmepriv)));
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
|
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
|
||||||
del_timer_sync(&pmlmepriv->scan_to_timer);
|
del_timer_sync(&pmlmepriv->scan_to_timer);
|
||||||
@ -695,7 +699,7 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
|||||||
struct __queue *scan_queue = &pmlmepriv->scanned_queue;
|
struct __queue *scan_queue = &pmlmepriv->scanned_queue;
|
||||||
struct list_head *plist, *phead, *ptemp;
|
struct list_head *plist, *phead, *ptemp;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+free_scanqueue\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+%s\n", __func__));
|
||||||
spin_lock_bh(&scan_queue->lock);
|
spin_lock_bh(&scan_queue->lock);
|
||||||
spin_lock_bh(&free_queue->lock);
|
spin_lock_bh(&free_queue->lock);
|
||||||
|
|
||||||
@ -808,7 +812,7 @@ void rtw_indicate_disconnect(struct adapter *padapter)
|
|||||||
{
|
{
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+rtw_indicate_disconnect\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+%s\n", __func__));
|
||||||
|
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING | WIFI_UNDER_WPS);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING | WIFI_UNDER_WPS);
|
||||||
|
|
||||||
@ -1159,12 +1163,15 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||||||
psta = rtw_get_stainfo(&adapter->stapriv, pstassoc->macaddr);
|
psta = rtw_get_stainfo(&adapter->stapriv, pstassoc->macaddr);
|
||||||
if (psta) {
|
if (psta) {
|
||||||
/* the sta have been in sta_info_queue => do nothing */
|
/* the sta have been in sta_info_queue => do nothing */
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Error: rtw_stassoc_event_callback: sta has been in sta_hash_queue\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
||||||
|
("Error: %s: sta has been in sta_hash_queue\n",
|
||||||
|
__func__));
|
||||||
return; /* between drv has received this event before and fw have not yet to set key to CAM_ENTRY) */
|
return; /* between drv has received this event before and fw have not yet to set key to CAM_ENTRY) */
|
||||||
}
|
}
|
||||||
psta = rtw_alloc_stainfo(&adapter->stapriv, pstassoc->macaddr);
|
psta = rtw_alloc_stainfo(&adapter->stapriv, pstassoc->macaddr);
|
||||||
if (!psta) {
|
if (!psta) {
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't alloc sta_info when rtw_stassoc_event_callback\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
||||||
|
("Can't alloc sta_info when %s\n", __func__));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* to do: init sta_info variable */
|
/* to do: init sta_info variable */
|
||||||
@ -1293,7 +1300,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||||||
|
|
||||||
void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
|
void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+rtw_cpwm_event_callback !!!\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+%s !!!\n", __func__));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1574,22 +1581,23 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in
|
|||||||
if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) {
|
if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) {
|
||||||
psetkeyparm->algorithm = (unsigned char)psecuritypriv->dot118021XGrpPrivacy;
|
psetkeyparm->algorithm = (unsigned char)psecuritypriv->dot118021XGrpPrivacy;
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
||||||
("\n rtw_set_key: psetkeyparm->algorithm=(unsigned char)psecuritypriv->dot118021XGrpPrivacy=%d\n",
|
("\n %s: psetkeyparm->algorithm=(unsigned char)psecuritypriv->dot118021XGrpPrivacy=%d\n",
|
||||||
psetkeyparm->algorithm));
|
__func__, psetkeyparm->algorithm));
|
||||||
} else {
|
} else {
|
||||||
psetkeyparm->algorithm = (u8)psecuritypriv->dot11PrivacyAlgrthm;
|
psetkeyparm->algorithm = (u8)psecuritypriv->dot11PrivacyAlgrthm;
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
||||||
("\n rtw_set_key: psetkeyparm->algorithm=(u8)psecuritypriv->dot11PrivacyAlgrthm=%d\n",
|
("\n %s: psetkeyparm->algorithm=(u8)psecuritypriv->dot11PrivacyAlgrthm=%d\n",
|
||||||
psetkeyparm->algorithm));
|
__func__, psetkeyparm->algorithm));
|
||||||
}
|
}
|
||||||
psetkeyparm->keyid = (u8)keyid;/* 0~3 */
|
psetkeyparm->keyid = (u8)keyid;/* 0~3 */
|
||||||
psetkeyparm->set_tx = set_tx;
|
psetkeyparm->set_tx = set_tx;
|
||||||
pmlmepriv->key_mask |= BIT(psetkeyparm->keyid);
|
pmlmepriv->key_mask |= BIT(psetkeyparm->keyid);
|
||||||
DBG_88E("==> rtw_set_key algorithm(%x), keyid(%x), key_mask(%x)\n",
|
DBG_88E("==> %s algorithm(%x), keyid(%x), key_mask(%x)\n",
|
||||||
psetkeyparm->algorithm, psetkeyparm->keyid, pmlmepriv->key_mask);
|
__func__, psetkeyparm->algorithm, psetkeyparm->keyid,
|
||||||
|
pmlmepriv->key_mask);
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
||||||
("\n rtw_set_key: psetkeyparm->algorithm=%d psetkeyparm->keyid=(u8)keyid=%d\n",
|
("\n %s: psetkeyparm->algorithm=%d psetkeyparm->keyid=(u8)keyid=%d\n",
|
||||||
psetkeyparm->algorithm, keyid));
|
__func__, psetkeyparm->algorithm, keyid));
|
||||||
|
|
||||||
switch (psetkeyparm->algorithm) {
|
switch (psetkeyparm->algorithm) {
|
||||||
case _WEP40_:
|
case _WEP40_:
|
||||||
@ -1614,8 +1622,8 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
||||||
("\n rtw_set_key:psecuritypriv->dot11PrivacyAlgrthm=%x (must be 1 or 2 or 4 or 5)\n",
|
("\n %s:psecuritypriv->dot11PrivacyAlgrthm=%x (must be 1 or 2 or 4 or 5)\n",
|
||||||
psecuritypriv->dot11PrivacyAlgrthm));
|
__func__, psecuritypriv->dot11PrivacyAlgrthm));
|
||||||
res = _FAIL;
|
res = _FAIL;
|
||||||
goto err_free_parm;
|
goto err_free_parm;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user