Skip to contentSkip to conversation

cfg80211: add some element IDs in enum ieee80211_eid

PATCH In review Bing Zhao 2 participants 3 messages Dec 7, 2010

Subsystems (2)
lore
Share & tools
lore

Bing Zhao

author
#0 lore raw

PATCH 1/2 cfg80211: add some element IDs in enum ieee80211_eid

From: Amitkumar Karwar <[email protected]>

1)WLAN_EID_BSS_COEX_2040
2)WLAN_EID_OVERLAP_BSS_SCAN_PARAM
3)WLAN_EID_EXT_CAPABILITY

---
 include/linux/ieee80211.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
include/linux/ieee80211.h +3 -0
index ed5a03c..351c0ab 100644
@@ -1223,6 +1223,9 @@ enum ieee80211_eid {
 	WLAN_EID_BSS_AC_ACCESS_DELAY = 68,
 	WLAN_EID_RRM_ENABLED_CAPABILITIES = 70,
 	WLAN_EID_MULTIPLE_BSSID = 71,
+	WLAN_EID_BSS_COEX_2040 = 72,
+	WLAN_EID_OVERLAP_BSS_SCAN_PARAM = 74,
+	WLAN_EID_EXT_CAPABILITY = 127,
 
 	WLAN_EID_MOBILITY_DOMAIN = 54,
 	WLAN_EID_FAST_BSS_TRANSITION = 55,
Signature · 1 line
1.7.0.2
author
#1 lore raw

PATCH v2 2/2 mwifiex: remove some element ID's definitions

From: Amitkumar Karwar <[email protected]>

Those are already defined in include/linux/ieee80211.h under "enum ieee80211_eid".

---
 drivers/net/wireless/mwifiex/11n.c         |    9 ++--
 drivers/net/wireless/mwifiex/cfg80211.c    |   20 +++----
 drivers/net/wireless/mwifiex/fw.h          |   10 +---
 drivers/net/wireless/mwifiex/ieee.h        |   29 ----------
 drivers/net/wireless/mwifiex/join.c        |   22 ++++----
 drivers/net/wireless/mwifiex/scan.c        |   80 ++++++++++++++-------------
 drivers/net/wireless/mwifiex/sta_cmd.c     |    4 +-
 drivers/net/wireless/mwifiex/sta_cmdresp.c |    4 +-
 drivers/net/wireless/mwifiex/sta_event.c   |    2 +-
 drivers/net/wireless/mwifiex/sta_ioctl.c   |   16 +++---
 drivers/net/wireless/mwifiex/wmm.c         |   12 +++--
 11 files changed, 88 insertions(+), 120 deletions(-)
drivers/net/wireless/mwifiex/11n.c +5 -4
index 00ab56c..d1494bf 100644
@@ -829,7 +829,7 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
 	if (bss_desc->bcn_ht_cap) {
 		ht_cap = (struct mwifiex_ie_types_htcap *) *buffer;
 		memset(ht_cap, 0, sizeof(struct mwifiex_ie_types_htcap));
-		ht_cap->header.type = cpu_to_le16(HT_CAPABILITY);
+		ht_cap->header.type = cpu_to_le16(WLAN_EID_HT_CAPABILITY);
 		ht_cap->header.len = cpu_to_le16(sizeof(struct ieee_htcap));
 		memcpy((u8 *) ht_cap + sizeof(struct mwifiex_ie_types_header),
 		       (u8 *) bss_desc->bcn_ht_cap +
@@ -849,7 +849,8 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
 			ht_info = (struct mwifiex_ie_types_htinfo *) *buffer;
 			memset(ht_info, 0,
 			       sizeof(struct mwifiex_ie_types_htinfo));
-			ht_info->header.type = cpu_to_le16(HT_OPERATION);
+			ht_info->header.type =
+					cpu_to_le16(WLAN_EID_HT_INFORMATION);
 			ht_info->header.len =
 				cpu_to_le16(sizeof(struct ieee_htinfo));
 
@@ -904,7 +905,7 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
 		bss_co_2040 = (struct mwifiex_ie_types_2040bssco *) *buffer;
 		memset(bss_co_2040, 0,
 		       sizeof(struct mwifiex_ie_types_2040bssco));
-		bss_co_2040->header.type = cpu_to_le16(BSSCO_2040);
+		bss_co_2040->header.type = cpu_to_le16(WLAN_EID_BSS_COEX_2040);
 		bss_co_2040->header.len =
 		       cpu_to_le16(sizeof(struct ieee_bssco_2040));
 
@@ -923,7 +924,7 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
 	if (bss_desc->bcn_ext_cap) {
 		ext_cap = (struct mwifiex_ie_types_extcap *) *buffer;
 		memset(ext_cap, 0, sizeof(struct mwifiex_ie_types_extcap));
-		ext_cap->header.type = cpu_to_le16(EXT_CAPABILITY);
+		ext_cap->header.type = cpu_to_le16(WLAN_EID_EXT_CAPABILITY);
 		ext_cap->header.len = cpu_to_le16(sizeof(struct ieee_extcap));
 
 		memcpy((u8 *) ext_cap +
drivers/net/wireless/mwifiex/cfg80211.c +9 -11
index d3b2b3e..4a42493 100644
@@ -1254,7 +1254,7 @@ mwifiex_inform_bss_from_scan_result(struct mwifiex_private *priv,
 	u8 *cap;
 	u8 *beacon;
 	int beacon_size;
-	enum ieee_types_elementid_e element_id;
+	u8 element_id;
 	u8 element_len;
 
 	ENTER();
@@ -1322,10 +1322,8 @@ mwifiex_inform_bss_from_scan_result(struct mwifiex_private *priv,
 
 		while (beacon_size >= sizeof(struct ieee_types_header)) {
 			ie = ie_buf + ie_len;
-			element_id =
-				(enum ieee_types_elementid_e) (*(u8 *)
-							       beacon);
-			element_len = *((u8 *) beacon + 1);
+			element_id = *beacon;
+			element_len = *(beacon + 1);
 			if (beacon_size <
 			    (int) element_len +
 			    sizeof(struct ieee_types_header)) {
@@ -1335,12 +1333,12 @@ mwifiex_inform_bss_from_scan_result(struct mwifiex_private *priv,
 				break;
 			}
 			switch (element_id) {
-			case EXT_CAPABILITY:
-			case DS_PARAM_SET:
-			case HT_CAPABILITY:
-			case VENDOR_SPECIFIC_221:
-			case RSN_IE:
-			case WAPI_IE:
+			case WLAN_EID_EXT_CAPABILITY:
+			case WLAN_EID_DS_PARAMS:
+			case WLAN_EID_HT_CAPABILITY:
+			case WLAN_EID_VENDOR_SPECIFIC:
+			case WLAN_EID_RSN:
+			case WLAN_EID_BSS_AC_ACCESS_DELAY:
 				ie[0] = element_id;
 				ie[1] = element_len;
 				tmp = (u8 *) beacon;
drivers/net/wireless/mwifiex/fw.h +1 -9
index bafeafb..ed691ac 100644
@@ -134,14 +134,6 @@ enum MWIFIEX_802_11_WEP_STATUS {
 #define CAL_SNR(RSSI, NF)		((s16)((s16)(RSSI)-(s16)(NF)))
 
 #define PROPRIETARY_TLV_BASE_ID                 0x0100
-#define TLV_TYPE_SSID                           0x0000
-#define TLV_TYPE_RATES                          0x0001
-#define TLV_TYPE_PHY_FH                         0x0002
-#define TLV_TYPE_PHY_DS                         0x0003
-#define TLV_TYPE_CF                             0x0004
-#define TLV_TYPE_IBSS                           0x0006
-#define TLV_TYPE_DOMAIN                         0x0007
-
 #define TLV_TYPE_KEY_MATERIAL       (PROPRIETARY_TLV_BASE_ID + 0)
 #define TLV_TYPE_CHANLIST           (PROPRIETARY_TLV_BASE_ID + 1)
 #define TLV_TYPE_NUMPROBES          (PROPRIETARY_TLV_BASE_ID + 2)
@@ -1006,7 +998,7 @@ struct mwifiex_scan_cmd_config {
 	 *  SSID TLV(s) and ChanList TLVs to be sent in the firmware command
 	 *
 	 *  TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set
-	 *  TLV_TYPE_SSID, mwifiex_ie_types_ssid_param_set
+	 *  WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set
 	 */
 	u8 tlv_buf[1];	/* SSID TLV(s) and ChanList TLVs are stored
 				   here */
drivers/net/wireless/mwifiex/ieee.h +0 -29
index 21e4fc2..ed9e03d 100644
@@ -32,35 +32,6 @@ enum MWIFIEX_802_11_NETWORK_TYPE {
 
 #define IEEE_MAX_IE_SIZE			256
 
-enum ieee_types_elementid_e {
-	SSID = 0,
-	SUPPORTED_RATES = 1,
-	FH_PARAM_SET = 2,
-	DS_PARAM_SET = 3,
-	CF_PARAM_SET = 4,
-
-	IBSS_PARAM_SET = 6,
-
-	HT_CAPABILITY = 45,
-	HT_OPERATION = 61,
-	BSSCO_2040 = 72,
-	OVERLAP_BSS_SCAN_PARAM = 74,
-	EXT_CAPABILITY = 127,
-
-	ERP_INFO = 42,
-
-	EXTENDED_SUPPORTED_RATES = 50,
-
-	VENDOR_SPECIFIC_221 = 221,
-	WMM_IE = VENDOR_SPECIFIC_221,
-
-	WPS_IE = VENDOR_SPECIFIC_221,
-	WPA_IE = VENDOR_SPECIFIC_221,
-	RSN_IE = 48,
-	VS_IE = VENDOR_SPECIFIC_221,
-	WAPI_IE = 68,
-} __attribute__ ((packed));
-
 struct ieee_types_header {
 	u8 element_id;
 	u8 len;
drivers/net/wireless/mwifiex/join.c +11 -11
index aa26105..917f368 100644
@@ -387,14 +387,14 @@ mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
 	pos += sizeof(assoc->dtim_period);
 
 	ssid_tlv = (struct mwifiex_ie_types_ssid_param_set *) pos;
-	ssid_tlv->header.type = cpu_to_le16(TLV_TYPE_SSID);
+	ssid_tlv->header.type = cpu_to_le16(WLAN_EID_SSID);
 	ssid_tlv->header.len = cpu_to_le16((u16) bss_desc->ssid.ssid_len);
 	memcpy(ssid_tlv->ssid, bss_desc->ssid.ssid,
 		le16_to_cpu(ssid_tlv->header.len));
 	pos += sizeof(ssid_tlv->header) + le16_to_cpu(ssid_tlv->header.len);
 
 	phy_tlv = (struct mwifiex_ie_types_phy_param_set *) pos;
-	phy_tlv->header.type = cpu_to_le16(TLV_TYPE_PHY_DS);
+	phy_tlv->header.type = cpu_to_le16(WLAN_EID_DS_PARAMS);
 	phy_tlv->header.len = cpu_to_le16(sizeof(phy_tlv->fh_ds.ds_param_set));
 	memcpy(&phy_tlv->fh_ds.ds_param_set,
 	       &bss_desc->phy_param_set.ds_param_set.current_chan,
@@ -402,7 +402,7 @@ mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
 	pos += sizeof(phy_tlv->header) + le16_to_cpu(phy_tlv->header.len);
 
 	ss_tlv = (struct mwifiex_ie_types_ss_param_set *) pos;
-	ss_tlv->header.type = cpu_to_le16(TLV_TYPE_CF);
+	ss_tlv->header.type = cpu_to_le16(WLAN_EID_CF_PARAMS);
 	ss_tlv->header.len = cpu_to_le16(sizeof(ss_tlv->cf_ibss.cf_param_set));
 	pos += sizeof(ss_tlv->header) + le16_to_cpu(ss_tlv->header.len);
 
@@ -419,7 +419,7 @@ mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
 
 	/* Setup the Rates TLV in the association command */
 	rates_tlv = (struct mwifiex_ie_types_rates_param_set *) pos;
-	rates_tlv->header.type = cpu_to_le16(TLV_TYPE_RATES);
+	rates_tlv->header.type = cpu_to_le16(WLAN_EID_SUPP_RATES);
 	rates_tlv->header.len = cpu_to_le16((u16) rates_size);
 	memcpy(rates_tlv->rates, rates, rates_size);
 	pos += sizeof(rates_tlv->header) + rates_size;
@@ -477,7 +477,6 @@ mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
 					priv->sec_info.wpa2_enabled)) {
 			rsn_ie_tlv =
 				(struct mwifiex_ie_types_rsn_param_set *) pos;
-			/* WPA_IE or WPA2_IE */
 			rsn_ie_tlv->header.type =
 				cpu_to_le16((u16) priv->wpa_ie[0]);
 			rsn_ie_tlv->header.type =
@@ -748,14 +747,15 @@ mwifiex_ret_802_11_associate(struct mwifiex_private *priv,
 	 */
 	mwifiex_update_tsf_timestamps(priv, bss_desc);
 
-	if (bss_desc->wmm_ie.vend_hdr.element_id == WMM_IE)
+	if (bss_desc->wmm_ie.vend_hdr.element_id == WLAN_EID_VENDOR_SPECIFIC)
 		priv->curr_bss_params.wmm_enabled = true;
 	else
 		priv->curr_bss_params.wmm_enabled = false;
 
 	if ((priv->wmm_required
 	     || (bss_desc->bcn_ht_cap &&
-		 (bss_desc->bcn_ht_cap->ieee_hdr.element_id == HT_CAPABILITY))
+		 (bss_desc->bcn_ht_cap->ieee_hdr.element_id ==
+			WLAN_EID_HT_CAPABILITY))
 	    ) && priv->curr_bss_params.wmm_enabled)
 		priv->wmm_enabled = true;
 	else
@@ -1093,7 +1093,6 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
 
 	if (priv->sec_info.wpa_enabled || priv->sec_info.ewpa_enabled) {
 		rsn_ie_tlv = (struct mwifiex_ie_types_rsn_param_set *) pos;
-			/* WPA_IE or  WPA2_IE */
 		rsn_ie_tlv->header.type = cpu_to_le16((u16) priv->wpa_ie[0]);
 		rsn_ie_tlv->header.type =
 			cpu_to_le16(le16_to_cpu(rsn_ie_tlv->header.type)
@@ -1126,7 +1125,8 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
 			ht_cap = (struct mwifiex_ie_types_htcap *) pos;
 			memset(ht_cap, 0,
 			       sizeof(struct mwifiex_ie_types_htcap));
-			ht_cap->header.type = cpu_to_le16(HT_CAPABILITY);
+			ht_cap->header.type =
+				cpu_to_le16(WLAN_EID_HT_CAPABILITY);
 			ht_cap->header.len =
 			       cpu_to_le16(sizeof(struct ieee_htcap));
 			ht_cap_info = le16_to_cpu(ht_cap->ht_cap.ht_cap_info);
@@ -1152,7 +1152,8 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
 			ht_info = (struct mwifiex_ie_types_htinfo *) pos;
 			memset(ht_info, 0,
 			       sizeof(struct mwifiex_ie_types_htinfo));
-			ht_info->header.type = cpu_to_le16(HT_OPERATION);
+			ht_info->header.type =
+				cpu_to_le16(WLAN_EID_HT_INFORMATION);
 			ht_info->header.len =
 				cpu_to_le16(sizeof(struct ieee_htinfo));
 			ht_info->ht_info.pri_chan =
@@ -1351,7 +1352,6 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv,
 
 	if (priv->sec_info.wpa_enabled) {
 		rsn_ie_tlv = (struct mwifiex_ie_types_rsn_param_set *) pos;
-		/* WPA_IE or WPA2_IE */
 		rsn_ie_tlv->header.type = cpu_to_le16((u16) priv->wpa_ie[0]);
 		rsn_ie_tlv->header.type =
 			cpu_to_le16(le16_to_cpu(rsn_ie_tlv->header.type)
drivers/net/wireless/mwifiex/scan.c +41 -39

278 lines not on this page · raw message

drivers/net/wireless/mwifiex/sta_cmd.c +2 -2
index 51206db..955b960 100644
@@ -860,7 +860,7 @@ static enum mwifiex_status mwifiex_cmd_802_11_supplicant_pmk(
 	if (psk->ssid.ssid_len) {
 		pssid_tlv = (struct mwifiex_ie_types_ssid_param_set *)
 					ptlv_buffer;
-		pssid_tlv->header.type = cpu_to_le16(TLV_TYPE_SSID);
+		pssid_tlv->header.type = cpu_to_le16(WLAN_EID_SSID);
 		pssid_tlv->header.len = cpu_to_le16((u16)psk->ssid.ssid_len);
 		memcpy((char *)pssid_tlv->ssid, psk->ssid.ssid,
 					psk->ssid.ssid_len);
@@ -984,7 +984,7 @@ mwifiex_cmd_802_11d_domain_info(struct mwifiex_private *priv,
 	}
 
 	/* Set domain info fields */
-	domain->header.type = cpu_to_le16(TLV_TYPE_DOMAIN);
+	domain->header.type = cpu_to_le16(WLAN_EID_COUNTRY);
 	memcpy(domain->country_code,
 			adapter->domain_reg.country_code,
 			sizeof(domain->country_code));
drivers/net/wireless/mwifiex/sta_cmdresp.c +2 -2
index 5ae2c8e..ed8e1aa 100644
@@ -877,13 +877,13 @@ mwifiex_ret_802_11_supplicant_pmk(struct mwifiex_private *priv,
 		if (action == HostCmd_ACT_GEN_GET) {
 			while (tlv_buf_len > 0) {
 				tlv = (*tlv_buf) | (*(tlv_buf + 1) << 8);
-				if ((tlv != TLV_TYPE_SSID)
+				if ((tlv != WLAN_EID_SSID)
 						&& (tlv != TLV_TYPE_BSSID)
 						&& (tlv != TLV_TYPE_PASSPHRASE)
 						&& (tlv != TLV_TYPE_PMK))
 					break;
 				switch (tlv) {
-				case TLV_TYPE_SSID:
+				case WLAN_EID_SSID:
 					pssid_tlv =
 						(struct
 						mwifiex_ie_types_ssid_param_set
drivers/net/wireless/mwifiex/sta_event.c +1 -1
index 005f522..f4384d5 100644
@@ -162,7 +162,7 @@ mwifiex_2040_coex_event(struct mwifiex_private *priv)
 
 	if (priv->curr_bss_params.bss_descriptor.bcn_obss_scan &&
 	    priv->curr_bss_params.bss_descriptor.bcn_obss_scan->
-	    ieee_hdr.element_id == OVERLAP_BSS_SCAN_PARAM) {
+	    ieee_hdr.element_id == WLAN_EID_OVERLAP_BSS_SCAN_PARAM) {
 		ele_len =
 			priv->curr_bss_params.bss_descriptor.
 			bcn_obss_scan->ieee_hdr.len;
drivers/net/wireless/mwifiex/sta_ioctl.c +9 -7
index 0bcb1ac..cad23c3 100644
@@ -3182,9 +3182,9 @@ mwifiex_set_wpa_ie_helper(struct mwifiex_private *priv, u8 *ie_data_ptr,
 		PRINTM(MCMND, "Set Wpa_ie_len=%d IE=%#x\n", priv->wpa_ie_len,
 		       priv->wpa_ie[0]);
 		DBG_HEXDUMP(MCMD_D, "Wpa_ie", priv->wpa_ie, priv->wpa_ie_len);
-		if (priv->wpa_ie[0] == WPA_IE) {
+		if (priv->wpa_ie[0] == WLAN_EID_WPA) {
 			priv->sec_info.wpa_enabled = true;
-		} else if (priv->wpa_ie[0] == RSN_IE) {
+		} else if (priv->wpa_ie[0] == WLAN_EID_RSN) {
 			priv->sec_info.wpa2_enabled = true;
 		} else {
 			priv->sec_info.wpa_enabled = false;
@@ -3227,7 +3227,7 @@ mwifiex_set_wapi_ie(struct mwifiex_private *priv, u8 *ie_data_ptr,
 		       priv->wapi_ie[0]);
 		DBG_HEXDUMP(MCMD_D, "wapi_ie", priv->wapi_ie,
 			    priv->wapi_ie_len);
-		if (priv->wapi_ie[0] == WAPI_IE)
+		if (priv->wapi_ie[0] == WLAN_EID_BSS_AC_ACCESS_DELAY)
 			priv->sec_info.wapi_enabled = true;
 	} else {
 		memset(priv->wapi_ie, 0, sizeof(priv->wapi_ie));
@@ -5743,16 +5743,17 @@ mwifiex_set_gen_ie_helper(struct mwifiex_private *priv, u8 *ie_data_ptr,
 	} else {
 		pvendor_ie = (struct ieee_types_vendor_header *) ie_data_ptr;
 		/* Test to see if it is a WPA IE, if not, then it is a gen IE */
-		if (((pvendor_ie->element_id == WPA_IE)
+		if (((pvendor_ie->element_id == WLAN_EID_WPA)
 		     && (!memcmp(pvendor_ie->oui, wpa_oui, sizeof(wpa_oui))))
-		    || (pvendor_ie->element_id == RSN_IE)
+		    || (pvendor_ie->element_id == WLAN_EID_RSN)
 			) {
 
 			/* IE is a WPA/WPA2 IE so call set_wpa function */
 			ret = mwifiex_set_wpa_ie_helper(priv, ie_data_ptr,
 							ie_len);
 			priv->wps.session_enable = false;
-		} else if (pvendor_ie->element_id == WAPI_IE) {
+		} else if (pvendor_ie->element_id ==
+				WLAN_EID_BSS_AC_ACCESS_DELAY) {
 			/* IE is a WAPI IE so call set_wapi function */
 			ret = mwifiex_set_wapi_ie(priv, ie_data_ptr, ie_len);
 		} else {
@@ -5769,7 +5770,8 @@ mwifiex_set_gen_ie_helper(struct mwifiex_private *priv, u8 *ie_data_ptr,
 				pvendor_ie = (struct
 					      ieee_types_vendor_header
 					      *) ie_data_ptr;
-				if ((pvendor_ie->element_id == WPS_IE)
+				if ((pvendor_ie->element_id ==
+						WLAN_EID_VENDOR_SPECIFIC)
 						&& (!memcmp(pvendor_ie->oui,
 						wps_oui, sizeof(wps_oui)))) {
 					priv->wps.session_enable = true;
drivers/net/wireless/mwifiex/wmm.c +7 -5
index 7a47eab..4758151 100644
@@ -39,7 +39,7 @@
 #define IPTOS_OFFSET 5
 
 /** WMM information IE */
-static const u8 wmm_info_ie[] = { WMM_IE, 0x07,
+static const u8 wmm_info_ie[] = { WLAN_EID_VENDOR_SPECIFIC, 0x07,
 	0x00, 0x50, 0xf2, 0x02,
 	0x00, 0x01, 0x00
 };
@@ -871,7 +871,7 @@ mwifiex_ret_wmm_get_status(struct mwifiex_private *priv,
 			ac_status->flow_created = tlv_wmm_qstatus->flow_created;
 			break;
 
-		case WMM_IE:
+		case WLAN_EID_VENDOR_SPECIFIC:
 			/*
 			 * Point the regular IEEE IE 2 bytes into the Marvell IE
 			 *   and setup the IEEE IE type and length byte fields
@@ -883,7 +883,8 @@ mwifiex_ret_wmm_get_status(struct mwifiex_private *priv,
 				(struct ieee_types_wmm_parameter *) (curr +
 								    2);
 			wmm_param_ie->vend_hdr.len = (u8) tlv_len;
-			wmm_param_ie->vend_hdr.element_id = WMM_IE;
+			wmm_param_ie->vend_hdr.element_id =
+						WLAN_EID_VENDOR_SPECIFIC;
 
 			PRINTM(MINFO, "CMD_RESP: WMM_GET_STATUS: WMM Parameter "
 					"Set: %d\n",
@@ -950,11 +951,12 @@ mwifiex_wmm_process_association_req(struct mwifiex_private *priv,
 	       wmm_ie->vend_hdr.element_id);
 
 	if ((priv->wmm_required
-	     || (ht_cap && (ht_cap->ieee_hdr.element_id == HT_CAPABILITY)
+	     || (ht_cap && (ht_cap->ieee_hdr.element_id ==
+		WLAN_EID_HT_CAPABILITY)
 		 && (priv->adapter->config_bands & BAND_GN
 		     || priv->adapter->config_bands & BAND_AN))
 	    )
-	    && wmm_ie->vend_hdr.element_id == WMM_IE) {
+	    && wmm_ie->vend_hdr.element_id == WLAN_EID_VENDOR_SPECIFIC) {
 		wmm_tlv = (struct mwifiex_ie_types_wmm_param_set *) *assoc_buf;
 		wmm_tlv->header.type = cpu_to_le16((u16) wmm_info_ie[0]);
 		wmm_tlv->header.len = cpu_to_le16((u16) wmm_info_ie[1]);
Signature · 1 line
1.7.0.2