Commit 80c96e08 authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

staging:r8188eu: remove unused WIFI_MP_*STATE and WIFI_MP_CTX* definitions

fw_state member of struct mlme_priv never obtain WIFI_MP_STATE value,
so code only for (fw_state == WIFI_MP_STATE) is dead.
Remove it, WIFI_MP_*STATE and WIFI_MP_CTX* definitions.
Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3747e00
...@@ -1321,9 +1321,6 @@ void rtw_setassocsta_cmdrsp_callback(struct adapter *padapter, struct cmd_obj * ...@@ -1321,9 +1321,6 @@ void rtw_setassocsta_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *
spin_lock_bh(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true))
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
set_fwstate(pmlmepriv, _FW_LINKED); set_fwstate(pmlmepriv, _FW_LINKED);
spin_unlock_bh(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
......
...@@ -573,11 +573,6 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter) ...@@ -573,11 +573,6 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
u8 bw_40MHz = 0, short_GI_20 = 0, short_GI_40 = 0; u8 bw_40MHz = 0, short_GI_20 = 0, short_GI_40 = 0;
u32 ht_ielen = 0; u32 ht_ielen = 0;
if (adapter->registrypriv.mp_mode == 1) {
if (check_fwstate(pmlmepriv, WIFI_MP_STATE))
return 0;
}
if ((!check_fwstate(pmlmepriv, _FW_LINKED)) && if ((!check_fwstate(pmlmepriv, _FW_LINKED)) &&
(!check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) (!check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)))
return 0; return 0;
......
...@@ -650,7 +650,6 @@ int sta2sta_data_frame( ...@@ -650,7 +650,6 @@ int sta2sta_data_frame(
int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame, int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame,
struct sta_info **psta) struct sta_info **psta)
{ {
u8 *ptr = precv_frame->rx_data;
int ret = _SUCCESS; int ret = _SUCCESS;
struct rx_pkt_attrib *pattrib = &precv_frame->attrib; struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
struct sta_priv *pstapriv = &adapter->stapriv; struct sta_priv *pstapriv = &adapter->stapriv;
...@@ -706,14 +705,6 @@ int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame, ...@@ -706,14 +705,6 @@ int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame,
sta_addr = pattrib->src; sta_addr = pattrib->src;
} }
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
sta_addr = mybssid;
} else { } else {
ret = _FAIL; ret = _FAIL;
} }
...@@ -802,23 +793,6 @@ static int ap2sta_data_frame( ...@@ -802,23 +793,6 @@ static int ap2sta_data_frame(
ret = RTW_RX_HANDLED; ret = RTW_RX_HANDLED;
goto exit; goto exit;
} }
} else if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) &&
(check_fwstate(pmlmepriv, _FW_LINKED) == true)) {
memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
/* */
memcpy(pattrib->bssid, mybssid, ETH_ALEN);
*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */
if (*psta == NULL) {
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("can't get psta under MP_MODE ; drop pkt\n"));
ret = _FAIL;
goto exit;
}
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
/* Special case */ /* Special case */
ret = RTW_RX_HANDLED; ret = RTW_RX_HANDLED;
...@@ -1309,8 +1283,6 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe) ...@@ -1309,8 +1283,6 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
u8 *psnap_type; u8 *psnap_type;
struct ieee80211_snap_hdr *psnap; struct ieee80211_snap_hdr *psnap;
struct adapter *adapter = precvframe->adapter;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
u8 *ptr = precvframe->rx_data; u8 *ptr = precvframe->rx_data;
struct rx_pkt_attrib *pattrib = &precvframe->attrib; struct rx_pkt_attrib *pattrib = &precvframe->attrib;
...@@ -1341,19 +1313,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe) ...@@ -1341,19 +1313,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
eth_type = ntohs(be_tmp); /* pattrib->ether_type */ eth_type = ntohs(be_tmp); /* pattrib->ether_type */
pattrib->eth_type = eth_type; pattrib->eth_type = eth_type;
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE))) {
ptr += rmv_len;
*ptr = 0x87;
*(ptr+1) = 0x12;
eth_type = 0x8712;
/* append rx status for mp test packets */
ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr)+2)-24);
memcpy(ptr, get_rxmem(precvframe), 24);
ptr += 24;
} else {
ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0))); ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0)));
}
memcpy(ptr, pattrib->dst, ETH_ALEN); memcpy(ptr, pattrib->dst, ETH_ALEN);
memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN); memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN);
......
...@@ -532,7 +532,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p ...@@ -532,7 +532,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
pattrib->encrypt = 0; pattrib->encrypt = 0;
if ((pattrib->ether_type != ETH_P_PAE) && !check_fwstate(pmlmepriv, WIFI_MP_STATE)) { if (pattrib->ether_type != ETH_P_PAE) {
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("\npsta->ieee8021x_blocked == true, pattrib->ether_type(%.4x) != ETH_P_PAE\n", pattrib->ether_type)); RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("\npsta->ieee8021x_blocked == true, pattrib->ether_type(%.4x) != ETH_P_PAE\n", pattrib->ether_type));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
......
...@@ -47,14 +47,6 @@ ...@@ -47,14 +47,6 @@
#define WIFI_STA_ALIVE_CHK_STATE 0x00000400 #define WIFI_STA_ALIVE_CHK_STATE 0x00000400
#define WIFI_SITE_MONITOR 0x00000800 /* to indicate the station is under site surveying */ #define WIFI_SITE_MONITOR 0x00000800 /* to indicate the station is under site surveying */
#define WIFI_MP_STATE 0x00010000
#define WIFI_MP_CTX_BACKGROUND 0x00020000 /* in continuous tx background */
#define WIFI_MP_CTX_ST 0x00040000 /* in continuous tx with single-tone */
#define WIFI_MP_CTX_BACKGROUND_PENDING 0x00080000 /* pending in continuous tx background due to out of skb */
#define WIFI_MP_CTX_CCK_HW 0x00100000 /* in continuous tx */
#define WIFI_MP_CTX_CCK_CS 0x00200000 /* in continuous tx with carrier suppression */
#define WIFI_MP_LPBK_STATE 0x00400000
#define _FW_UNDER_LINKING WIFI_UNDER_LINKING #define _FW_UNDER_LINKING WIFI_UNDER_LINKING
#define _FW_LINKED WIFI_ASOC_STATE #define _FW_LINKED WIFI_ASOC_STATE
#define _FW_UNDER_SURVEY WIFI_SITE_MONITOR #define _FW_UNDER_SURVEY WIFI_SITE_MONITOR
......
...@@ -443,7 +443,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, ...@@ -443,7 +443,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
struct sta_info *psta, *pbcmc_sta; struct sta_info *psta, *pbcmc_sta;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE)) { /* sta mode */ if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { /* sta mode */
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv)); psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
if (!psta) { if (!psta) {
; ;
...@@ -1089,12 +1089,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, ...@@ -1089,12 +1089,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_set_scan\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_set_scan\n"));
if (padapter->registrypriv.mp_mode == 1) {
if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
ret = -1;
goto exit;
}
}
if (_FAIL == rtw_pwr_wakeup(padapter)) { if (_FAIL == rtw_pwr_wakeup(padapter)) {
ret = -1; ret = -1;
goto exit; goto exit;
......
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