mirror of https://gitee.com/openkylin/linux.git
staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_mlme.c
Remove all RT_TRACE calls from core/rtw_mlme.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Also remove rtw_atimdone_event_callback and rtw_cpwm_event_callback functions and their associated header declarations/usages, as all they do is call RT_TRACE and nothing else. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625000756.6313-10-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8040692730
commit
9b7f6d9fd4
|
@ -117,8 +117,6 @@ struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
|
||||||
|
|
||||||
list_del_init(&pnetwork->list);
|
list_del_init(&pnetwork->list);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
|
||||||
("rtw_alloc_network: ptr=%p\n", &pnetwork->list));
|
|
||||||
pnetwork->network_type = 0;
|
pnetwork->network_type = 0;
|
||||||
pnetwork->fixed = false;
|
pnetwork->fixed = false;
|
||||||
pnetwork->last_scanned = jiffies;
|
pnetwork->last_scanned = jiffies;
|
||||||
|
@ -218,15 +216,10 @@ int rtw_if_up(struct adapter *padapter)
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
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_,
|
|
||||||
("%s:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
|
|
||||||
__func__, padapter->bDriverStopped,
|
|
||||||
padapter->bSurpriseRemoved));
|
|
||||||
res = false;
|
res = false;
|
||||||
} else {
|
else
|
||||||
res = true;
|
res = true;
|
||||||
}
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,11 +419,8 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
|
||||||
|
|
||||||
pnetwork = rtw_alloc_network(pmlmepriv); /* will update scan_time */
|
pnetwork = rtw_alloc_network(pmlmepriv); /* will update scan_time */
|
||||||
|
|
||||||
if (!pnetwork) {
|
if (!pnetwork)
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
|
||||||
("\n\n\nsomething wrong here\n\n\n"));
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
|
||||||
|
|
||||||
bssid_ex_sz = get_wlan_bssid_ex_sz(target);
|
bssid_ex_sz = get_wlan_bssid_ex_sz(target);
|
||||||
target->Length = bssid_ex_sz;
|
target->Length = bssid_ex_sz;
|
||||||
|
@ -517,12 +507,6 @@ static int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *
|
||||||
return bselected;
|
return bselected;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Perry: For Power Management */
|
|
||||||
void rtw_atimdone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|
||||||
{
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("receive atimdone_event\n"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
u32 len;
|
u32 len;
|
||||||
|
@ -531,15 +515,9 @@ 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_,
|
|
||||||
("%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****%s: return a wrong bss ***\n", __func__));
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
/* update IBSS_network 's timestamp */
|
/* update IBSS_network 's timestamp */
|
||||||
|
@ -582,14 +560,9 @@ 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_,
|
|
||||||
("%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);
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
|
||||||
} else {
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("nic status=%x, survey done event comes too late!\n", get_fwstate(pmlmepriv)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
||||||
|
@ -608,8 +581,6 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
|
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("switching to adhoc master\n"));
|
|
||||||
|
|
||||||
memcpy(&pdev_network->ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
memcpy(&pdev_network->ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(adapter);
|
rtw_update_registrypriv_dev_network(adapter);
|
||||||
|
@ -617,8 +588,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
|
|
||||||
pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
|
pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
|
||||||
|
|
||||||
if (rtw_createbss_cmd(adapter) != _SUCCESS)
|
rtw_createbss_cmd(adapter);
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Error=>rtw_createbss_cmd status FAIL\n"));
|
|
||||||
pmlmepriv->to_join = false;
|
pmlmepriv->to_join = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -671,7 +641,6 @@ 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_, ("+%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);
|
||||||
|
|
||||||
|
@ -711,11 +680,6 @@ void rtw_free_assoc_resources_locked(struct adapter *adapter)
|
||||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||||
struct wlan_network *tgt_network = &pmlmepriv->cur_network;
|
struct wlan_network *tgt_network = &pmlmepriv->cur_network;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+rtw_free_assoc_resources\n"));
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
|
||||||
("tgt_network->network.MacAddress=%pM ssid=%s\n",
|
|
||||||
tgt_network->network.MacAddress, tgt_network->network.ssid.ssid));
|
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_AP_STATE)) {
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_AP_STATE)) {
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
|
|
||||||
|
@ -742,8 +706,6 @@ void rtw_free_assoc_resources_locked(struct adapter *adapter)
|
||||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||||
if (pwlan)
|
if (pwlan)
|
||||||
pwlan->fixed = false;
|
pwlan->fixed = false;
|
||||||
else
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("rtw_free_assoc_resources:pwlan==NULL\n\n"));
|
|
||||||
|
|
||||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) && (adapter->stapriv.asoc_sta_count == 1)))
|
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) && (adapter->stapriv.asoc_sta_count == 1)))
|
||||||
rtw_free_network_nolock(pmlmepriv, pwlan);
|
rtw_free_network_nolock(pmlmepriv, pwlan);
|
||||||
|
@ -758,8 +720,6 @@ void rtw_indicate_connect(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+%s\n", __func__));
|
|
||||||
|
|
||||||
pmlmepriv->to_join = false;
|
pmlmepriv->to_join = false;
|
||||||
|
|
||||||
if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) {
|
if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) {
|
||||||
|
@ -773,8 +733,6 @@ void rtw_indicate_connect(struct adapter *padapter)
|
||||||
pmlmepriv->to_roaming = 0;
|
pmlmepriv->to_roaming = 0;
|
||||||
|
|
||||||
rtw_set_scan_deny(padapter, 3000);
|
rtw_set_scan_deny(padapter, 3000);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("-%s: fw_state=0x%08x\n", __func__, get_fwstate(pmlmepriv)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -784,8 +742,6 @@ 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_, ("+%s\n", __func__));
|
|
||||||
|
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING | WIFI_UNDER_WPS);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING | WIFI_UNDER_WPS);
|
||||||
|
|
||||||
if (pmlmepriv->to_roaming > 0)
|
if (pmlmepriv->to_roaming > 0)
|
||||||
|
@ -882,10 +838,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct wlan_network *cur_network = &pmlmepriv->cur_network;
|
struct wlan_network *cur_network = &pmlmepriv->cur_network;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
|
||||||
("\nfw_state:%x, BSSID:%pM\n",
|
|
||||||
get_fwstate(pmlmepriv), pnetwork->network.MacAddress));
|
|
||||||
|
|
||||||
/* why not use ptarget_wlan?? */
|
/* why not use ptarget_wlan?? */
|
||||||
memcpy(&cur_network->network, &pnetwork->network, pnetwork->network.Length);
|
memcpy(&cur_network->network, &pnetwork->network, pnetwork->network.Length);
|
||||||
/* some ies in pnetwork is wrong, so we should use ptarget_wlan ies */
|
/* some ies in pnetwork is wrong, so we should use ptarget_wlan ies */
|
||||||
|
@ -914,7 +866,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pmlmepriv->fw_state = WIFI_NULL_STATE;
|
pmlmepriv->fw_state = WIFI_NULL_STATE;
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Invalid network_mode\n"));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -941,27 +892,16 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||||
struct wlan_network *pcur_wlan = NULL, *ptarget_wlan = NULL;
|
struct wlan_network *pcur_wlan = NULL, *ptarget_wlan = NULL;
|
||||||
unsigned int the_same_macaddr = false;
|
unsigned int the_same_macaddr = false;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("joinbss event call back received with res=%d\n", pnetwork->join_res));
|
|
||||||
|
|
||||||
rtw_get_encrypt_decrypt_from_registrypriv(adapter);
|
rtw_get_encrypt_decrypt_from_registrypriv(adapter);
|
||||||
|
|
||||||
if (pmlmepriv->assoc_ssid.ssid_length == 0)
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@ joinbss event call back for Any SSid\n"));
|
|
||||||
else
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@ rtw_joinbss_event_callback for SSid:%s\n", pmlmepriv->assoc_ssid.ssid));
|
|
||||||
|
|
||||||
the_same_macaddr = !memcmp(pnetwork->network.MacAddress, cur_network->network.MacAddress, ETH_ALEN);
|
the_same_macaddr = !memcmp(pnetwork->network.MacAddress, cur_network->network.MacAddress, ETH_ALEN);
|
||||||
|
|
||||||
pnetwork->network.Length = get_wlan_bssid_ex_sz(&pnetwork->network);
|
pnetwork->network.Length = get_wlan_bssid_ex_sz(&pnetwork->network);
|
||||||
if (pnetwork->network.Length > sizeof(struct wlan_bssid_ex)) {
|
if (pnetwork->network.Length > sizeof(struct wlan_bssid_ex))
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n\n ***joinbss_evt_callback return a wrong bss ***\n\n"));
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\nrtw_joinbss_event_callback!! _enter_critical\n"));
|
|
||||||
|
|
||||||
if (pnetwork->join_res > 0) {
|
if (pnetwork->join_res > 0) {
|
||||||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
|
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
|
||||||
|
@ -999,7 +939,6 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||||
if (ptarget_wlan) {
|
if (ptarget_wlan) {
|
||||||
rtw_joinbss_update_network(adapter, ptarget_wlan, pnetwork);
|
rtw_joinbss_update_network(adapter, ptarget_wlan, pnetwork);
|
||||||
} else {
|
} else {
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't find ptarget_wlan when joinbss_event callback\n"));
|
|
||||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
goto ignore_joinbss_callback;
|
goto ignore_joinbss_callback;
|
||||||
}
|
}
|
||||||
|
@ -1008,7 +947,6 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
||||||
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
|
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
|
||||||
if (!ptarget_sta) {
|
if (!ptarget_sta) {
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't update stainfo when joinbss_event callback\n"));
|
|
||||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
goto ignore_joinbss_callback;
|
goto ignore_joinbss_callback;
|
||||||
}
|
}
|
||||||
|
@ -1017,18 +955,11 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||||
/* s4. indicate connect */
|
/* s4. indicate connect */
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
||||||
rtw_indicate_connect(adapter);
|
rtw_indicate_connect(adapter);
|
||||||
} else {
|
|
||||||
/* adhoc mode will rtw_indicate_connect when rtw_stassoc_event_callback */
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("adhoc mode, fw_state:%x", get_fwstate(pmlmepriv)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* s5. Cancel assoc_timer */
|
/* s5. Cancel assoc_timer */
|
||||||
del_timer_sync(&pmlmepriv->assoc_timer);
|
del_timer_sync(&pmlmepriv->assoc_timer);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("Cancel assoc_timer\n"));
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("rtw_joinbss_event_callback err: fw_state:%x", get_fwstate(pmlmepriv)));
|
|
||||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
goto ignore_joinbss_callback;
|
goto ignore_joinbss_callback;
|
||||||
}
|
}
|
||||||
|
@ -1040,10 +971,8 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||||
mod_timer(&pmlmepriv->assoc_timer,
|
mod_timer(&pmlmepriv->assoc_timer,
|
||||||
jiffies + msecs_to_jiffies(1));
|
jiffies + msecs_to_jiffies(1));
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
|
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING))
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("fail! clear _FW_UNDER_LINKING ^^^fw_state=%x\n", get_fwstate(pmlmepriv)));
|
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||||
}
|
|
||||||
} else { /* if join_res < 0 (join fails), then try again */
|
} else { /* if join_res < 0 (join fails), then try again */
|
||||||
mod_timer(&pmlmepriv->assoc_timer,
|
mod_timer(&pmlmepriv->assoc_timer,
|
||||||
jiffies + msecs_to_jiffies(1));
|
jiffies + msecs_to_jiffies(1));
|
||||||
|
@ -1130,19 +1059,13 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
#endif
|
#endif
|
||||||
/* for AD-HOC mode */
|
/* for AD-HOC mode */
|
||||||
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: %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 %s\n", __func__));
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
/* to do: init sta_info variable */
|
/* to do: init sta_info variable */
|
||||||
psta->qos_option = 0;
|
psta->qos_option = 0;
|
||||||
psta->mac_id = (uint)pstassoc->cam_id;
|
psta->mac_id = (uint)pstassoc->cam_id;
|
||||||
|
@ -1257,18 +1180,12 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_STATE);
|
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtw_createbss_cmd(adapter) != _SUCCESS)
|
rtw_createbss_cmd(adapter);
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("***Error=>stadel_event_callback: rtw_createbss_cmd status FAIL***\n "));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spin_unlock_bh(&pmlmepriv->lock);
|
spin_unlock_bh(&pmlmepriv->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
|
|
||||||
{
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+%s !!!\n", __func__));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _rtw_join_timeout_handler - Timeout/failure handler for CMD JoinBss
|
* _rtw_join_timeout_handler - Timeout/failure handler for CMD JoinBss
|
||||||
* @adapter: pointer to struct adapter structure
|
* @adapter: pointer to struct adapter structure
|
||||||
|
@ -1481,9 +1398,6 @@ int rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv)
|
||||||
pcmd->rsp = NULL;
|
pcmd->rsp = NULL;
|
||||||
pcmd->rspsz = 0;
|
pcmd->rspsz = 0;
|
||||||
INIT_LIST_HEAD(&pcmd->list);
|
INIT_LIST_HEAD(&pcmd->list);
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
|
||||||
("after enqueue set_auth_cmd, auth_mode=%x\n",
|
|
||||||
psecuritypriv->dot11AuthAlgrthm));
|
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, pcmd);
|
res = rtw_enqueue_cmd(pcmdpriv, pcmd);
|
||||||
exit:
|
exit:
|
||||||
return res;
|
return res;
|
||||||
|
@ -1508,23 +1422,13 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in
|
||||||
goto err_free_cmd;
|
goto err_free_cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
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_,
|
else
|
||||||
("\n %s: psetkeyparm->algorithm=(unsigned char)psecuritypriv->dot118021XGrpPrivacy=%d\n",
|
|
||||||
__func__, psetkeyparm->algorithm));
|
|
||||||
} else {
|
|
||||||
psetkeyparm->algorithm = (u8)psecuritypriv->dot11PrivacyAlgrthm;
|
psetkeyparm->algorithm = (u8)psecuritypriv->dot11PrivacyAlgrthm;
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
|
||||||
("\n %s: psetkeyparm->algorithm=(u8)psecuritypriv->dot11PrivacyAlgrthm=%d\n",
|
|
||||||
__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);
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
|
||||||
("\n %s: psetkeyparm->algorithm=%d psetkeyparm->keyid=(u8)keyid=%d\n",
|
|
||||||
__func__, psetkeyparm->algorithm, keyid));
|
|
||||||
|
|
||||||
switch (psetkeyparm->algorithm) {
|
switch (psetkeyparm->algorithm) {
|
||||||
case _WEP40_:
|
case _WEP40_:
|
||||||
|
@ -1548,9 +1452,6 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in
|
||||||
psetkeyparm->grpkey = 1;
|
psetkeyparm->grpkey = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
|
|
||||||
("\n %s:psecuritypriv->dot11PrivacyAlgrthm=%x (must be 1 or 2 or 4 or 5)\n",
|
|
||||||
__func__, psecuritypriv->dot11PrivacyAlgrthm));
|
|
||||||
res = _FAIL;
|
res = _FAIL;
|
||||||
goto err_free_parm;
|
goto err_free_parm;
|
||||||
}
|
}
|
||||||
|
@ -1656,11 +1557,6 @@ int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_
|
||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
struct security_priv *psecuritypriv = &adapter->securitypriv;
|
struct security_priv *psecuritypriv = &adapter->securitypriv;
|
||||||
uint ndisauthmode = psecuritypriv->ndisauthtype;
|
uint ndisauthmode = psecuritypriv->ndisauthtype;
|
||||||
uint ndissecuritytype = psecuritypriv->ndisencryptstatus;
|
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_,
|
|
||||||
("+%s: ndisauthmode=%d ndissecuritytype=%d\n", __func__,
|
|
||||||
ndisauthmode, ndissecuritytype));
|
|
||||||
|
|
||||||
/* copy fixed ie only */
|
/* copy fixed ie only */
|
||||||
memcpy(out_ie, in_ie, 12);
|
memcpy(out_ie, in_ie, 12);
|
||||||
|
@ -1740,9 +1636,6 @@ void rtw_update_registrypriv_dev_network(struct adapter *adapter)
|
||||||
}
|
}
|
||||||
|
|
||||||
pdev_network->Configuration.DSConfig = pregistrypriv->channel;
|
pdev_network->Configuration.DSConfig = pregistrypriv->channel;
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
|
|
||||||
("pregistrypriv->channel=%d, pdev_network->Configuration.DSConfig=0x%x\n",
|
|
||||||
pregistrypriv->channel, pdev_network->Configuration.DSConfig));
|
|
||||||
|
|
||||||
if (cur_network->network.InfrastructureMode == Ndis802_11IBSS)
|
if (cur_network->network.InfrastructureMode == Ndis802_11IBSS)
|
||||||
pdev_network->Configuration.ATIMWindow = 0;
|
pdev_network->Configuration.ATIMWindow = 0;
|
||||||
|
|
|
@ -220,8 +220,6 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||||
void rtw_joinbss_event_callback(struct adapter *adapter, u8 *pbuf);
|
void rtw_joinbss_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||||
void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf);
|
void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||||
void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf);
|
void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf);
|
||||||
void rtw_atimdone_event_callback(struct adapter *adapter, u8 *pbuf);
|
|
||||||
void rtw_cpwm_event_callback(struct adapter *adapter, u8 *pbuf);
|
|
||||||
void indicate_wx_scan_complete_event(struct adapter *padapter);
|
void indicate_wx_scan_complete_event(struct adapter *padapter);
|
||||||
void rtw_indicate_wx_assoc_event(struct adapter *padapter);
|
void rtw_indicate_wx_assoc_event(struct adapter *padapter);
|
||||||
void rtw_indicate_wx_disassoc_event(struct adapter *padapter);
|
void rtw_indicate_wx_disassoc_event(struct adapter *padapter);
|
||||||
|
|
|
@ -661,7 +661,7 @@ static struct fwevent wlanevents[] = {
|
||||||
{0, &rtw_joinbss_event_callback}, /*10*/
|
{0, &rtw_joinbss_event_callback}, /*10*/
|
||||||
{sizeof(struct stassoc_event), &rtw_stassoc_event_callback},
|
{sizeof(struct stassoc_event), &rtw_stassoc_event_callback},
|
||||||
{sizeof(struct stadel_event), &rtw_stadel_event_callback},
|
{sizeof(struct stadel_event), &rtw_stadel_event_callback},
|
||||||
{0, &rtw_atimdone_event_callback},
|
{0, NULL},
|
||||||
{0, rtw_dummy_event_callback},
|
{0, rtw_dummy_event_callback},
|
||||||
{0, NULL}, /*15*/
|
{0, NULL}, /*15*/
|
||||||
{0, NULL},
|
{0, NULL},
|
||||||
|
@ -671,7 +671,7 @@ static struct fwevent wlanevents[] = {
|
||||||
{0, NULL}, /*20*/
|
{0, NULL}, /*20*/
|
||||||
{0, NULL},
|
{0, NULL},
|
||||||
{0, NULL},
|
{0, NULL},
|
||||||
{0, &rtw_cpwm_event_callback},
|
{0, NULL},
|
||||||
{0, NULL},
|
{0, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue