Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1503866

[PATCH 04/37] staging:r8188eu: remove WIFI_MP_* definitions and all corresponding code

From Ivan Safonov <insafonov@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 04/37] staging:r8188eu: remove WIFI_MP_* definitions and all corresponding code
Date 2016-10-19 17:20 +0200
Message-ID <su0OS-308-29@gated-at.bofh.it> (permalink)
References <su0Fb-2Wq-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


fw_state member of mlme_priv
never obtain WIFI_MP_STATE value.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_cmd.c       |  4 ---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c |  5 ---
 drivers/staging/rtl8188eu/core/rtw_recv.c      | 42 +-------------------------
 drivers/staging/rtl8188eu/core/rtw_xmit.c      |  2 +-
 drivers/staging/rtl8188eu/include/rtw_mlme.h   |  8 -----
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c |  8 +----
 6 files changed, 3 insertions(+), 66 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index 36109ce..cfa5648 100644
--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
+++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
@@ -1320,10 +1320,6 @@ void rtw_setassocsta_cmdrsp_callback(struct adapter *padapter,  struct cmd_obj *
 	psta->mac_id = passocsta_rsp->cam_id;
 
 	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);
 	spin_unlock_bh(&pmlmepriv->lock);
 
diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 6ed23f4..67508a6 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -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;
 	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)) &&
 	    (!check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)))
 		return 0;
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 691623c..dd71894 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -647,7 +647,6 @@ int sta2sta_data_frame(
 int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame,
 		       struct sta_info **psta)
 {
-	u8 *ptr = precv_frame->rx_data;
 	int ret = _SUCCESS;
 	struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
 	struct	sta_priv *pstapriv = &adapter->stapriv;
@@ -703,14 +702,6 @@ int sta2sta_data_frame(struct adapter *adapter, struct recv_frame *precv_frame,
 
 			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 {
 		ret  = _FAIL;
 	}
@@ -799,23 +790,6 @@ static int ap2sta_data_frame(
 			ret = RTW_RX_HANDLED;
 			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)) {
 		/* Special case */
 		ret = RTW_RX_HANDLED;
@@ -1303,8 +1277,6 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 	u8	*psnap_type;
 	struct ieee80211_snap_hdr	*psnap;
 
-	struct adapter		*adapter = precvframe->adapter;
-	struct mlme_priv	*pmlmepriv = &adapter->mlmepriv;
 	u8 *ptr = precvframe->rx_data;
 	struct rx_pkt_attrib *pattrib = &precvframe->attrib;
 
@@ -1335,19 +1307,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 	eth_type = ntohs(be_tmp); /* pattrib->ether_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, precvframe->rx_head, 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+ETH_ALEN, pattrib->src, ETH_ALEN);
diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index b60b126..0f73b3f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -530,7 +530,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
 
 		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));
 			res = _FAIL;
 			goto exit;
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 9434b86..a30448a 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -47,14 +47,6 @@
 #define	WIFI_STA_ALIVE_CHK_STATE	0x00000400
 #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_LINKED			WIFI_ASOC_STATE
 #define _FW_UNDER_SURVEY	WIFI_SITE_MONITOR
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index 4de9dbc..6364a05 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -442,7 +442,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
 		struct sta_info *psta, *pbcmc_sta;
 		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));
 			if (!psta) {
 				;
@@ -1086,12 +1086,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
 	struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
 	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)) {
 		ret = -1;
 		goto exit;
-- 
2.7.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/37] staging:r8188eu: remove get_rxmem function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:10 +0200
  [PATCH 25/37] staging:r8188eu: remove len member of recv_frame structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:10 +0200
  [PATCH 32/37] staging:r8188eu: remove SET_EARLYMODE_* definitions Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:10 +0200
  [PATCH 24/37] staging:r8188eu: remove rx_tail member of recv_frame structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:10 +0200
  [PATCH 13/37] staging:r8188eu: remove debug messages after memory allocation failed Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
    Re: [PATCH 13/37] staging:r8188eu: remove debug messages after  memory allocation failed Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-25 11:20 +0200
  [PATCH 21/37] staging:r8188eu: change recvframe_pull_tail last argument type Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 02/37] staging:r8188eu: remove device assignment after netdev_alloc_skb call Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
    Re: [PATCH 02/37] staging:r8188eu: remove device assignment after  netdev_alloc_skb call Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-10-19 19:00 +0200
      Re: [PATCH 02/37] staging:r8188eu: remove device assignment after  netdev_alloc_skb call Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-10-19 19:10 +0200
        Re: [PATCH 02/37] staging:r8188eu: remove device assignment after  netdev_alloc_skb call Ivan Safonov <insafonov@gmail.com> - 2016-10-20 14:20 +0200
          Re: [PATCH 02/37] staging:r8188eu: remove device assignment after  netdev_alloc_skb call Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-25 11:00 +0200
    Re: [PATCH 02/37] staging:r8188eu: remove device assignment after  netdev_alloc_skb call Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-20 10:50 +0200
  [PATCH 37/37] staging:r8188eu: remove P2P_* enumerations. Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 19/37] staging:r8188eu: remove rx_end member of recv_frame structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 04/37] staging:r8188eu: remove WIFI_MP_* definitions and all corresponding code Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 30/37] staging:r8188eu: remove eth_type member of rx_pkt_attrib structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 16/37] staging:r8188eu: change recvframe_pull last argument type Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 36/37] staging:r8188eu: remove unused structures from include/rtw_mlme.h Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 03/37] staging:r8188eu: remove skb cloning after netdev_alloc_skb fail Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
    Re: [PATCH 03/37] staging:r8188eu: remove skb cloning after  netdev_alloc_skb fail Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-20 10:50 +0200
  [PATCH 27/37] staging:r8188eu: remove recvframe_put function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 07/37] staging:r8188eu: remove is2t argument if the phy_iq_calibrate function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 11/37] staging:r8188eu: remove is_(multicast|broadcast)_mac_addr Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 10/37] staging:r8188eu: remove type cast for first argument of memset Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:20 +0200
  [PATCH 14/37] staging:r8188eu: remove ieee80211_is_empty_essid function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 15/37] staging:r8188eu: remove rx_head member of recv_frame structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 34/37] staging:r8188eu: remove update_bcn member of mlme_priv structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 23/37] staging:r8188eu: update rx_tail and pkt->tail synchronously Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 20/37] staging:r8188eu: change recvframe_put last argument type Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 22/37] staging:r8188eu: change recvframe_pull_tail type to void Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 31/37] staging:r8188eu: remove pscanned member of mlme_priv structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 35/37] staging:r8188eu: remove clr_fwstate* functions Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 29/37] staging:r8188eu: take out stripping of iv and icv space from wlanhdr_to_ethhdr function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
    Re: [PATCH 29/37] staging:r8188eu: take out stripping of iv and icv  space from wlanhdr_to_ethhdr function Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-20 11:20 +0200
  [PATCH 12/37] staging:r8188eu: remove ieee80211_get_hdrlen function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 26/37] staging:r8188eu: remove recvframe_pull function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 09/37] staging:r8188eu: remove is2t argument of phy_lc_calibrate function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 28/37] staging:r8188eu: remove recvframe_pull_tail function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 18/37] staging:r8188eu: remove rx_data member of recv_frame structure Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  [PATCH 08/37] staging:r8188eu: refactor path_adda_on function Ivan Safonov <insafonov@gmail.com> - 2016-10-19 17:30 +0200
  Re: [PATCH 01/37] staging:r8188eu: remove get_rxmem function Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-20 11:20 +0200
    Re: [PATCH 01/37] staging:r8188eu: remove get_rxmem function Ivan Safonov <insafonov@gmail.com> - 2016-10-20 16:00 +0200

csiph-web