staging: rtl8723au: Remove duplicate #defines for WLAN_EID_VENDOR_SPECIFIC

Lets not keep one local copy ... no lets keep two ... no lets keep three!
Rip them all out and use the kernel provided one.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
index 131d787..fc8b7b2 100644
--- a/drivers/staging/rtl8723au/core/rtw_ap.c
+++ b/drivers/staging/rtl8723au/core/rtw_ap.c
@@ -927,7 +927,7 @@
 	psecuritypriv->wpa_group_cipher = _NO_PRIVACY_;
 	psecuritypriv->wpa_pairwise_cipher = _NO_PRIVACY_;
 	for (p = ie + _BEACON_IE_OFFSET_; ;p += (ie_len + 2)) {
-		p = rtw_get_ie23a(p, _SSN_IE_1_, &ie_len,
+		p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len,
 				  (pbss_network->IELength - _BEACON_IE_OFFSET_ -
 				  (ie_len + 2)));
 		if ((p) && (!memcmp(p+2, OUI1, 4))) {
@@ -955,7 +955,7 @@
 	pmlmepriv->qospriv.qos_option = 0;
 	if (pregistrypriv->wmm_enable) {
 		for (p = ie + _BEACON_IE_OFFSET_; ;p += (ie_len + 2)) {
-			p = rtw_get_ie23a(p, _VENDOR_SPECIFIC_IE_, &ie_len,
+			p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len,
 					  (pbss_network->IELength -
 					  _BEACON_IE_OFFSET_ - (ie_len + 2)));
 			if ((p) && !memcmp(p+2, WMM_PARA_IE, 6)) {
@@ -1374,7 +1374,7 @@
 		update_bcn_htinfo_ie(padapter);
 		break;
 
-	case _VENDOR_SPECIFIC_IE_:
+	case WLAN_EID_VENDOR_SPECIFIC:
 		update_bcn_vendor_spec_ie(padapter, oui);
 		break;
 
diff --git a/drivers/staging/rtl8723au/core/rtw_ieee80211.c b/drivers/staging/rtl8723au/core/rtw_ieee80211.c
index a48ab25..b01dd00 100644
--- a/drivers/staging/rtl8723au/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723au/core/rtw_ieee80211.c
@@ -469,7 +469,8 @@
 	int limit_new = limit;
 
 	while(1) {
-		pbuf = rtw_get_ie23a(pbuf, _WPA_IE_ID_, &len, limit_new);
+		pbuf = rtw_get_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC,
+				     &len, limit_new);
 
 		if (pbuf) {
 			/* check if oui matches... */
@@ -557,7 +558,8 @@
 		return _FAIL;
 	}
 
-	if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie+1) != (u8)(wpa_ie_len - 2)) ||
+	if ((*wpa_ie != WLAN_EID_VENDOR_SPECIFIC) ||
+	    (*(wpa_ie+1) != (u8)(wpa_ie_len - 2)) ||
 	    memcmp(wpa_ie + 2, RTW_WPA_OUI23A_TYPE, WPA_SELECTOR_LEN)) {
 		return _FAIL;
 	}
@@ -719,7 +721,7 @@
 	while(cnt < in_len) {
 		authmode = in_ie[cnt];
 
-		if ((authmode == _WPA_IE_ID_) &&
+		if ((authmode == WLAN_EID_VENDOR_SPECIFIC) &&
 		    !memcmp(&in_ie[cnt+2], &wpa_oui[0], 4)) {
 				RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
 					 ("\n rtw_get_wpa_ie23a: sec_idx =%d "
@@ -788,7 +790,8 @@
 
 	eid = ie_ptr[0];
 
-	if ((eid == _WPA_IE_ID_) && !memcmp(&ie_ptr[2], wps_oui, 4)) {
+	if ((eid == WLAN_EID_VENDOR_SPECIFIC) &&
+	    !memcmp(&ie_ptr[2], wps_oui, 4)) {
 		/* DBG_8723A("==> found WPS_IE.....\n"); */
 		*wps_ielen = ie_ptr[1] + 2;
 		match = true;
@@ -824,7 +827,8 @@
 	while (cnt < in_len) {
 		eid = in_ie[cnt];
 
-		if ((eid == _WPA_IE_ID_) && !memcmp(&in_ie[cnt+2], wps_oui, 4)) {
+		if ((eid == WLAN_EID_VENDOR_SPECIFIC) &&
+		    !memcmp(&in_ie[cnt+2], wps_oui, 4)) {
 			wpsie_ptr = &in_ie[cnt];
 
 			if (wps_ie)
@@ -866,7 +870,7 @@
 	if (len_attr)
 		*len_attr = 0;
 
-	if ((wps_ie[0] != _VENDOR_SPECIFIC_IE_) ||
+	if ((wps_ie[0] != WLAN_EID_VENDOR_SPECIFIC) ||
 	    memcmp(wps_ie + 2, wps_oui, 4)) {
 		return attr_ptr;
 	}
@@ -1305,7 +1309,7 @@
 			dump_stack();
 			return NULL;
 		}
-		if ((eid == _VENDOR_SPECIFIC_IE_) &&
+		if ((eid == WLAN_EID_VENDOR_SPECIFIC) &&
 		    !memcmp(&in_ie[cnt + 2], p2p_oui, 4)) {
 			p2p_ie_ptr = in_ie + cnt;
 
@@ -1351,7 +1355,7 @@
 	if (len_attr)
 		*len_attr = 0;
 
-	if (!p2p_ie || (p2p_ie[0] != _VENDOR_SPECIFIC_IE_) ||
+	if (!p2p_ie || (p2p_ie[0] != WLAN_EID_VENDOR_SPECIFIC) ||
 	    memcmp(p2p_ie + 2, p2p_oui, 4)) {
 		return attr_ptr;
 	}
@@ -1531,7 +1535,7 @@
 
 	match = false;
 
-	if ((wfd_ie[0] != _VENDOR_SPECIFIC_IE_) ||
+	if ((wfd_ie[0] != WLAN_EID_VENDOR_SPECIFIC) ||
 	    memcmp(wfd_ie + 2, wfd_oui, 4)) {
 		return match;
 	}
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 1060a9f..d94cff6 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -2014,7 +2014,7 @@
 		 ("+_rtw_report_sec_ie, authmode =%d\n", authmode));
 
 	buff = NULL;
-	if (authmode == _WPA_IE_ID_) {
+	if (authmode == WLAN_EID_VENDOR_SPECIFIC) {
 		RT_TRACE(_module_mlme_osdep_c_, _drv_info_,
 			 ("_rtw_report_sec_ie, authmode =%d\n", authmode));
 
@@ -2064,7 +2064,7 @@
 	ielength = 12;
 	if ((ndisauthmode==Ndis802_11AuthModeWPA) ||
 	    (ndisauthmode==Ndis802_11AuthModeWPAPSK))
-		authmode=_WPA_IE_ID_;
+		authmode = WLAN_EID_VENDOR_SPECIFIC;
 	if ((ndisauthmode==Ndis802_11AuthModeWPA2) ||
 	    (ndisauthmode==Ndis802_11AuthModeWPA2PSK))
 		authmode=_WPA2_IE_ID_;
@@ -2074,7 +2074,8 @@
 		       psecuritypriv->wps_ie_len);
 
 		ielength += psecuritypriv->wps_ie_len;
-	} else if ((authmode==_WPA_IE_ID_) || (authmode==_WPA2_IE_ID_)) {
+	} else if ((authmode == WLAN_EID_VENDOR_SPECIFIC) ||
+		   (authmode==_WPA2_IE_ID_)) {
 		/* copy RSN or SSN */
 		memcpy(&out_ie[ielength], &psecuritypriv->supplicant_ie[0],
 		       psecuritypriv->supplicant_ie[1] + 2);
@@ -2242,7 +2243,7 @@
 		if (pqospriv->qos_option == 0) {
 			out_len = *pout_len;
 			pframe = rtw_set_ie23a(out_ie + out_len,
-					    _VENDOR_SPECIFIC_IE_,
+					    WLAN_EID_VENDOR_SPECIFIC,
 					    _WMM_IE_Length_, WMM_IE, pout_len);
 
 			pqospriv->qos_option = 1;
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
index 07493bc..423f395 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
@@ -1543,7 +1543,10 @@
 		p = pframe + sizeof(struct ieee80211_hdr_3addr) + ie_offset; ie_len = 0;
 		for (;;)
 		{
-			p = rtw_get_ie23a(p, _VENDOR_SPECIFIC_IE_, &ie_len, pkt_len - sizeof(struct ieee80211_hdr_3addr) - ie_offset);
+			p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len,
+					  pkt_len -
+					  sizeof(struct ieee80211_hdr_3addr) -
+					  ie_offset);
 			if (p != NULL) {
 				if (!memcmp(p+2, WMM_IE, 6)) {
 
@@ -1826,7 +1829,7 @@
 
 		switch (pIE->ElementID)
 		{
-		case _VENDOR_SPECIFIC_IE_:
+		case WLAN_EID_VENDOR_SPECIFIC:
 			if (!memcmp(pIE->data, WMM_PARA_OUI23A, 6))/* WMM */
 					WMM_param_handler23a(padapter, pIE);
 #if defined(CONFIG_8723AU_P2P)
@@ -2245,7 +2248,8 @@
 
 	wpsielen += 2;
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen,
+			       (unsigned char *) wpsie, &pattrib->pktlen);
 
 	/*	P2P IE Section. */
 
@@ -2497,7 +2501,8 @@
 	/*	Channel Number */
 	p2pie[p2pielen++] = pwdinfo->operating_channel;	/*	operating channel number */
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen);
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
+			       (unsigned char *) p2pie, &pattrib->pktlen);
 
 #ifdef CONFIG_8723AU_P2P
 	wfdielen = build_nego_req_wfd_ie(pwdinfo, pframe);
@@ -2641,7 +2646,7 @@
 		}
 	}
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, wpsielen,
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen,
 			       (unsigned char *) wpsie, &pattrib->pktlen);
 
 	/*	P2P IE Section. */
@@ -2910,7 +2915,7 @@
 
 	}
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, p2pielen,
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
 			       (unsigned char *) p2pie, &pattrib->pktlen);
 
 #ifdef CONFIG_8723AU_P2P
@@ -3115,7 +3120,7 @@
 		p2pielen += pwdinfo->nego_ssidlen;
 	}
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, p2pielen,
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
 			       (unsigned char *)p2pie, &pattrib->pktlen);
 
 #ifdef CONFIG_8723AU_P2P
@@ -3393,7 +3398,7 @@
 	       pwdinfo->device_name_len);
 	p2pielen += pwdinfo->device_name_len;
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, p2pielen,
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
 			       (unsigned char *) p2pie, &pattrib->pktlen);
 
 #ifdef CONFIG_8723AU_P2P
@@ -3612,7 +3617,7 @@
 		}
 	}
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, p2pielen,
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
 			       (unsigned char *)p2pie, &pattrib->pktlen);
 
 #ifdef CONFIG_8723AU_P2P
@@ -3721,7 +3726,7 @@
 	*(u16*) (wpsie + wpsielen) = cpu_to_be16(pwdinfo->tx_prov_disc_info.wps_config_method_request);
 	wpsielen += 2;
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, wpsielen,
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen,
 			       (unsigned char *) wpsie, &pattrib->pktlen);
 
 #ifdef CONFIG_8723AU_P2P
@@ -4047,8 +4052,8 @@
 			cpu_to_be16(pwdinfo->supported_wps_cm);
 		wpsielen += 2;
 
-		pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, wpsielen,
-				       (unsigned char *)wpsie,
+		pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC,
+				       wpsielen, (unsigned char *)wpsie,
 				       &pattrib->pktlen);
 
 		p2pielen = build_probe_resp_p2p_ie23a(pwdinfo, pframe);
@@ -4283,8 +4288,8 @@
 			cpu_to_be16(WPS_DPID_REGISTRAR_SPEC);
 		wpsielen += 2;
 
-		pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, wpsielen,
-				       (unsigned char *)wpsie,
+		pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC,
+				       wpsielen, (unsigned char *)wpsie,
 				       &pattrib->pktlen);
 
 		/*	P2P OUI */
@@ -4393,8 +4398,8 @@
 			p2pie[p2pielen++] = pwdinfo->operating_channel;
 		}
 
-		pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, p2pielen,
-				       (unsigned char *)p2pie,
+		pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC,
+				       p2pielen, (unsigned char *)p2pie,
 				       &pattrib->pktlen);
 
 		if (pmlmepriv->wps_probe_req_ie) {
@@ -6239,7 +6244,7 @@
 					       0x01, 0x01};
 
 		for (pbuf = ie + _BEACON_IE_OFFSET_; ; pbuf += (ie_len + 2)) {
-			pbuf = rtw_get_ie23a(pbuf, _VENDOR_SPECIFIC_IE_,
+			pbuf = rtw_get_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC,
 					     &ie_len, (pnetwork->IELength -
 						       _BEACON_IE_OFFSET_ -
 						       (ie_len + 2)));
@@ -6257,7 +6262,7 @@
 	}
 
 	if (pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_REALTEK) {
-		pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, 6,
+		pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, 6,
 				       REALTEK_96B_IE23A, &pattrib->pktlen);
 	}
 
@@ -6513,7 +6518,7 @@
 
 		switch (pIE->ElementID)
 		{
-		case _VENDOR_SPECIFIC_IE_:
+		case WLAN_EID_VENDOR_SPECIFIC:
 			if (!memcmp(pIE->data, RTW_WPA_OUI23A, 4) ||
 			    !memcmp(pIE->data, WMM_OUI23A, 4) ||
 			    !memcmp(pIE->data, WPS_OUI23A, 4)) {
@@ -6526,7 +6531,7 @@
 						pIE->Length = 14;
 				}
 				pframe = rtw_set_ie23a(pframe,
-						       _VENDOR_SPECIFIC_IE_,
+						       WLAN_EID_VENDOR_SPECIFIC,
 						       pIE->Length, pIE->data,
 						       &pattrib->pktlen);
 			}
@@ -6540,7 +6545,7 @@
 	}
 
 	if (pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_REALTEK)
-		pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, 6,
+		pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, 6,
 				       REALTEK_96B_IE23A, &pattrib->pktlen);
 
 #ifdef CONFIG_8723AU_P2P
@@ -6704,7 +6709,7 @@
 			       ETH_ALEN);	/* P2P Interface Address List */
 			p2pielen += ETH_ALEN;
 
-			pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_,
+			pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC,
 					       p2pielen, (unsigned char *)p2pie,
 					       &pattrib->pktlen);
 
@@ -9300,7 +9305,7 @@
 
 		switch (pIE->ElementID)
 		{
-		case _VENDOR_SPECIFIC_IE_:/* Get WMM IE. */
+		case WLAN_EID_VENDOR_SPECIFIC:/* Get WMM IE. */
 			if (!memcmp(pIE->data, WMM_OUI23A, 4))
 				pmlmeinfo->WMM_enable = 1;
 			break;
diff --git a/drivers/staging/rtl8723au/core/rtw_p2p.c b/drivers/staging/rtl8723au/core/rtw_p2p.c
index a3bf031..22753e3 100644
--- a/drivers/staging/rtl8723au/core/rtw_p2p.c
+++ b/drivers/staging/rtl8723au/core/rtw_p2p.c
@@ -256,7 +256,8 @@
 	/*  P2P_ATTR_STATUS */
 	p2pielen += rtw_set_p2p_attr_content23a(&p2pie[p2pielen], P2P_ATTR_STATUS, 1, &status);
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, p2pie, &pattrib->pktlen);
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
+			       p2pie, &pattrib->pktlen);
 
 	pattrib->last_txcmdsz = pattrib->pktlen;
 
@@ -340,7 +341,8 @@
 	put_unaligned_be16(config_method, wpsie + wpsielen);
 	wpsielen += 2;
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen,
+			       (unsigned char *) wpsie, &pattrib->pktlen);
 
 #ifdef CONFIG_8723AU_P2P
 	wfdielen = build_provdisc_resp_wfd_ie(pwdinfo, pframe);
@@ -428,8 +430,8 @@
 
 	p2pielen += rtw_set_p2p_attr_content23a(&p2pie[p2pielen], P2P_ATTR_NOA, 2, noa_attr_content);
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, p2pie,
-			       &pattrib->pktlen);
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
+			       p2pie, &pattrib->pktlen);
 
 	pattrib->last_txcmdsz = pattrib->pktlen;
 
@@ -481,7 +483,8 @@
 
 	/* go_add_noa_attr(pwdinfo); */
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
+			     (unsigned char *) p2pie, &len);
 
 	return len;
 }
@@ -602,7 +605,8 @@
 	wfdie[ wfdielen++ ] = 0;
 	wfdie[ wfdielen++ ] = 0;
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -713,7 +717,8 @@
 	wfdie[ wfdielen++ ] = 0;
 	wfdie[ wfdielen++ ] = 0;
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -900,7 +905,8 @@
 
 	}
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -1007,7 +1013,8 @@
 	wfdie[ wfdielen++ ] = 0;
 	wfdie[ wfdielen++ ] = 0;
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -1105,7 +1112,8 @@
 	wfdie[ wfdielen++ ] = 0;
 	wfdie[ wfdielen++ ] = 0;
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -1203,7 +1211,8 @@
 	wfdie[ wfdielen++ ] = 0;
 	wfdie[ wfdielen++ ] = 0;
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -1301,7 +1310,8 @@
 	wfdie[ wfdielen++ ] = 0;
 	wfdie[ wfdielen++ ] = 0;
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -1398,7 +1408,8 @@
 	wfdie[ wfdielen++ ] = 0;
 	wfdie[ wfdielen++ ] = 0;
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -1511,7 +1522,8 @@
 
 	}
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -1624,7 +1636,8 @@
 
 	}
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -1722,7 +1735,8 @@
 	wfdie[ wfdielen++ ] = 0;
 	wfdie[ wfdielen++ ] = 0;
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -1820,7 +1834,8 @@
 	wfdie[ wfdielen++ ] = 0;
 	wfdie[ wfdielen++ ] = 0;
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen,
+			     (unsigned char *) wfdie, &len);
 
 	return len;
 }
@@ -1973,7 +1988,8 @@
 		p2pielen += go_add_group_info_attr(pwdinfo, p2pie + p2pielen);
 	}
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
+			     (unsigned char *) p2pie, &len);
 
 	return len;
 }
@@ -2103,7 +2119,8 @@
 
 	}
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
+			     (unsigned char *) p2pie, &len);
 
 	return len;
 }
@@ -2132,7 +2149,8 @@
 	/*	Length: */
 	/*	Value: */
 
-	pbuf = rtw_set_ie23a(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
+	pbuf = rtw_set_ie23a(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
+			     (unsigned char *) p2pie, &len);
 
 	return len;
 }
diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c
index f54021c..8f0e79e 100644
--- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c
@@ -1130,7 +1130,7 @@
 			pIE = (struct ndis_802_11_var_ies *)(pmlmeinfo->network.IEs + i);
 
 			switch (pIE->ElementID) {
-			case _VENDOR_SPECIFIC_IE_:
+			case WLAN_EID_VENDOR_SPECIFIC:
 				if ((!memcmp(pIE->data, RTW_WPA_OUI23A, 4)) && (!memcmp((pIE->data + 12), WPA_TKIP_CIPHER23A, 4)))
 					return true;
 				break;
@@ -1161,7 +1161,7 @@
 			pIE = (struct ndis_802_11_var_ies *)(cur_network->IEs + i);
 
 			switch (pIE->ElementID) {
-			case _VENDOR_SPECIFIC_IE_:
+			case WLAN_EID_VENDOR_SPECIFIC:
 				if (!memcmp(pIE->data, RTW_WPA_OUI23A, 4) &&
 					((!memcmp((pIE->data + 12), WPA_CIPHER_SUITE_CCMP23A, 4)) ||
 					  (!memcmp((pIE->data + 16), WPA_CIPHER_SUITE_CCMP23A, 4))))
@@ -1196,7 +1196,7 @@
 			pIE = (struct ndis_802_11_var_ies *)(pmlmeinfo->network.IEs + i);
 
 			switch (pIE->ElementID) {
-			case _VENDOR_SPECIFIC_IE_:
+			case WLAN_EID_VENDOR_SPECIFIC:
 				if (!memcmp(pIE->data, RTW_WPA_OUI23A, 4))
 					return false;
 				break;
@@ -1404,7 +1404,7 @@
 		pIE = (struct ndis_802_11_var_ies *)(pframe + i);
 
 		switch (pIE->ElementID) {
-		case _VENDOR_SPECIFIC_IE_:
+		case WLAN_EID_VENDOR_SPECIFIC:
 			if ((!memcmp(pIE->data, ARTHEROS_OUI1, 3)) ||
 			    (!memcmp(pIE->data, ARTHEROS_OUI2, 3))) {
 				DBG_8723A("link to Artheros AP\n");
diff --git a/drivers/staging/rtl8723au/include/rtw_security.h b/drivers/staging/rtl8723au/include/rtw_security.h
index 75bbb93..fcb43bd1 100644
--- a/drivers/staging/rtl8723au/include/rtw_security.h
+++ b/drivers/staging/rtl8723au/include/rtw_security.h
@@ -30,7 +30,6 @@
 
 #define is_wep_enc(alg) (((alg) == _WEP40_) || ((alg) == _WEP104_))
 
-#define _WPA_IE_ID_	0xdd
 #define _WPA2_IE_ID_	0x30
 
 #define SHA256_MAC_LEN 32
diff --git a/drivers/staging/rtl8723au/include/wifi.h b/drivers/staging/rtl8723au/include/wifi.h
index b5034c6..a8695f4 100644
--- a/drivers/staging/rtl8723au/include/wifi.h
+++ b/drivers/staging/rtl8723au/include/wifi.h
@@ -229,7 +229,6 @@
 #define _SUPPORTED_CH_IE_		36
 #define _CH_SWTICH_ANNOUNCE_	37	/* Secondary Channel Offset */
 #define _RSN_IE_2_			48
-#define _SSN_IE_1_			221
 #define _ERPINFO_IE_			42
 #define _EXT_SUPPORTEDRATES_IE_		50
 
@@ -249,7 +248,6 @@
 #define _CH_SWITCH_TIMING_	104
 #define _PTI_BUFFER_STATUS_	106
 #define _EXT_CAP_IE_		127
-#define _VENDOR_SPECIFIC_IE_	221
 
 #define	_RESERVED47_		47
 
diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
index 86721dc..a0d59c7 100644
--- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
@@ -2986,10 +2986,10 @@
 #endif
 
 	/* pbss_network->IEs will not include p2p_ie, wfd ie */
-	rtw_ies_remove_ie23a(pbuf, &len, _BEACON_IE_OFFSET_, _VENDOR_SPECIFIC_IE_,
-			  P2P_OUI23A, 4);
-	rtw_ies_remove_ie23a(pbuf, &len, _BEACON_IE_OFFSET_, _VENDOR_SPECIFIC_IE_,
-			  WFD_OUI23A, 4);
+	rtw_ies_remove_ie23a(pbuf, &len, _BEACON_IE_OFFSET_,
+			     WLAN_EID_VENDOR_SPECIFIC, P2P_OUI23A, 4);
+	rtw_ies_remove_ie23a(pbuf, &len, _BEACON_IE_OFFSET_,
+			     WLAN_EID_VENDOR_SPECIFIC, WFD_OUI23A, 4);
 
 	if (rtw_check_beacon_data23a(adapter, pbuf, len) == _SUCCESS) {
 #ifdef CONFIG_8723AU_P2P
@@ -3489,7 +3489,7 @@
 	memcpy(p2p_ie + p2pielen, devinfo_content, devinfo_contentlen);
 	p2pielen += devinfo_contentlen;
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, p2pielen,
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen,
 			    (unsigned char *)p2p_ie, &p2p_ielen);
 	pattrib->pktlen += p2p_ielen;
 
@@ -3524,7 +3524,7 @@
 	    cpu_to_be16(pwdinfo->tx_prov_disc_info.wps_config_method_request);
 	wpsielen += 2;
 
-	pframe = rtw_set_ie23a(pframe, _VENDOR_SPECIFIC_IE_, wpsielen,
+	pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen,
 			    (unsigned char *)wpsie, &pattrib->pktlen);
 
 #ifdef CONFIG_8723AU_P2P
@@ -3897,8 +3897,8 @@
 			pmlmepriv->wps_beacon_ie_len = wps_ielen;
 
 #ifdef CONFIG_8723AU_AP_MODE
-			update_beacon23a(padapter, _VENDOR_SPECIFIC_IE_, wps_oui,
-				      true);
+			update_beacon23a(padapter, WLAN_EID_VENDOR_SPECIFIC,
+					 wps_oui, true);
 #endif
 		}
 #ifdef CONFIG_8723AU_P2P