Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04b2312a authored by Arend van Spriel's avatar Arend van Spriel Committed by Johannes Berg
Browse files

wireless: drivers: make use of WLAN_EID_VENDOR_SPECIFIC



The include file linux/ieee80211.h contains three definitions for
the same thing in enum ieee80211_eid due to historic changes:

/* Information Element IDs */
enum ieee80211_eid {
    :
    WLAN_EID_WPA = 221,
    WLAN_EID_GENERIC = 221,
    WLAN_EID_VENDOR_SPECIFIC = 221,
    :
};

The standard refers to this as "vendor specific" element so the
other two definitions are better not used. This patch changes the
wireless drivers to use one definition, ie. WLAN_EID_VENDOR_SPECIFIC.

Cc: Jouni Malinen <j@w1.fi>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> [ath6kl]
Acked-by: Bing Zhao <bzhao@marvell.com> [mwifiex]
Acked-by: Stanislav Yakovlev <stas.yakovlev@gmail.com> [ipw2x00]
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
[change libipw as well]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c13a765b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -7433,7 +7433,7 @@ static inline char *airo_translate_scan(struct net_device *dev,
					num_null_ies++;
					num_null_ies++;
				break;
				break;


			case WLAN_EID_GENERIC:
			case WLAN_EID_VENDOR_SPECIFIC:
				if (ie[1] >= 4 &&
				if (ie[1] >= 4 &&
				    ie[2] == 0x00 &&
				    ie[2] == 0x00 &&
				    ie[3] == 0x50 &&
				    ie[3] == 0x50 &&
+1 −1
Original line number Original line Diff line number Diff line
@@ -301,7 +301,7 @@ static bool ath6kl_cfg80211_ready(struct ath6kl_vif *vif)


static bool ath6kl_is_wpa_ie(const u8 *pos)
static bool ath6kl_is_wpa_ie(const u8 *pos)
{
{
	return pos[0] == WLAN_EID_WPA && pos[1] >= 4 &&
	return pos[0] == WLAN_EID_VENDOR_SPECIFIC && pos[1] >= 4 &&
		pos[2] == 0x00 && pos[3] == 0x50 &&
		pos[2] == 0x00 && pos[3] == 0x50 &&
		pos[4] == 0xf2 && pos[5] == 0x01;
		pos[4] == 0xf2 && pos[5] == 0x01;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -2679,7 +2679,7 @@ brcmf_find_wpaie(u8 *parse, u32 len)
{
{
	struct brcmf_tlv *ie;
	struct brcmf_tlv *ie;


	while ((ie = brcmf_parse_tlvs(parse, len, WLAN_EID_WPA))) {
	while ((ie = brcmf_parse_tlvs(parse, len, WLAN_EID_VENDOR_SPECIFIC))) {
		if (brcmf_tlv_has_ie((u8 *)ie, &parse, &len,
		if (brcmf_tlv_has_ie((u8 *)ie, &parse, &len,
				     WPA_OUI, TLV_OUI_LEN, WPA_OUI_TYPE))
				     WPA_OUI, TLV_OUI_LEN, WPA_OUI_TYPE))
			return (struct brcmf_vs_tlv *)ie;
			return (struct brcmf_vs_tlv *)ie;
+1 −1
Original line number Original line Diff line number Diff line
@@ -415,7 +415,7 @@ static void hostap_rx_sta_beacon(local_info_t *local, struct sk_buff *skb,
			ssid = pos + 2;
			ssid = pos + 2;
			ssid_len = pos[1];
			ssid_len = pos[1];
			break;
			break;
		case WLAN_EID_GENERIC:
		case WLAN_EID_VENDOR_SPECIFIC:
			if (pos[1] >= 4 &&
			if (pos[1] >= 4 &&
			    pos[2] == 0x00 && pos[3] == 0x50 &&
			    pos[2] == 0x00 && pos[3] == 0x50 &&
			    pos[4] == 0xf2 && pos[5] == 1) {
			    pos[4] == 0xf2 && pos[5] == 1) {
+3 −3
Original line number Original line Diff line number Diff line
@@ -1108,7 +1108,7 @@ static const char *get_info_element_string(u16 id)
		MFIE_STRING(ERP_INFO);
		MFIE_STRING(ERP_INFO);
		MFIE_STRING(RSN);
		MFIE_STRING(RSN);
		MFIE_STRING(EXT_SUPP_RATES);
		MFIE_STRING(EXT_SUPP_RATES);
		MFIE_STRING(GENERIC);
		MFIE_STRING(VENDOR_SPECIFIC);
		MFIE_STRING(QOS_PARAMETER);
		MFIE_STRING(QOS_PARAMETER);
	default:
	default:
		return "UNKNOWN";
		return "UNKNOWN";
@@ -1248,8 +1248,8 @@ static int libipw_parse_info_param(struct libipw_info_element
			LIBIPW_DEBUG_MGMT("WLAN_EID_CHALLENGE: ignored\n");
			LIBIPW_DEBUG_MGMT("WLAN_EID_CHALLENGE: ignored\n");
			break;
			break;


		case WLAN_EID_GENERIC:
		case WLAN_EID_VENDOR_SPECIFIC:
			LIBIPW_DEBUG_MGMT("WLAN_EID_GENERIC: %d bytes\n",
			LIBIPW_DEBUG_MGMT("WLAN_EID_VENDOR_SPECIFIC: %d bytes\n",
					     info_element->len);
					     info_element->len);
			if (!libipw_parse_qos_info_param_IE(info_element,
			if (!libipw_parse_qos_info_param_IE(info_element,
							       network))
							       network))
Loading