Search Linux Wireless

[PATCH 2/4] mwifiex: remove MWIFIEX_AUTH_MODE_ macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc Yang <yangyang@xxxxxxxxxxx>

replace them with NL80211_AUTHTYPE_ macros

Signed-off-by: Marc Yang <yangyang@xxxxxxxxxxx>
Signed-off-by: Bing Zhao <bzhao@xxxxxxxxxxx>
---
 drivers/net/wireless/mwifiex/cfg80211.c |    8 ++++----
 drivers/net/wireless/mwifiex/init.c     |    2 +-
 drivers/net/wireless/mwifiex/ioctl.h    |    5 -----
 drivers/net/wireless/mwifiex/join.c     |    2 +-
 4 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 701c179..2d96800 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -600,7 +600,7 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
 
 	mwifiex_deauthenticate(priv, wait, NULL);
 
-	priv->sec_info.authentication_mode = MWIFIEX_AUTH_MODE_OPEN;
+	priv->sec_info.authentication_mode = NL80211_AUTHTYPE_OPEN_SYSTEM;
 
 	ret = mwifiex_prepare_cmd(priv, HostCmd_CMD_SET_BSS_MODE,
 				  HostCmd_ACT_GEN_SET, 0, wait, NULL);
@@ -1056,7 +1056,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 			priv->sec_info.encryption_mode =
 					MWIFIEX_ENCRYPTION_MODE_WEP104;
 			priv->sec_info.authentication_mode =
-					MWIFIEX_AUTH_MODE_OPEN;
+					NL80211_AUTHTYPE_OPEN_SYSTEM;
 		}
 
 		goto done;
@@ -1065,9 +1065,9 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 	/* Now handle infra mode. "sme" is valid for infra mode only */
 	if (sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC
 			|| sme->auth_type == NL80211_AUTHTYPE_OPEN_SYSTEM)
-		auth_type = MWIFIEX_AUTH_MODE_OPEN;
+		auth_type = NL80211_AUTHTYPE_OPEN_SYSTEM;
 	else if (sme->auth_type == NL80211_AUTHTYPE_SHARED_KEY)
-		auth_type = MWIFIEX_AUTH_MODE_SHARED;
+		auth_type = NL80211_AUTHTYPE_SHARED_KEY;
 
 	if (sme->crypto.n_ciphers_pairwise) {
 		pairwise_encrypt_mode = mwifiex_get_mwifiex_cipher(sme->crypto.
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index 00e73ea..bad436d 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -85,7 +85,7 @@ static int mwifiex_init_priv(struct mwifiex_private *priv)
 	priv->data_avg_factor = DEFAULT_DATA_AVG_FACTOR;
 
 	priv->sec_info.wep_status = MWIFIEX_802_11_WEP_DISABLED;
-	priv->sec_info.authentication_mode = MWIFIEX_AUTH_MODE_OPEN;
+	priv->sec_info.authentication_mode = NL80211_AUTHTYPE_OPEN_SYSTEM;
 	priv->sec_info.encryption_mode = MWIFIEX_ENCRYPTION_MODE_NONE;
 	for (i = 0; i < ARRAY_SIZE(priv->wep_key); i++)
 		memset(&priv->wep_key[i], 0, sizeof(struct mwifiex_wep_key));
diff --git a/drivers/net/wireless/mwifiex/ioctl.h b/drivers/net/wireless/mwifiex/ioctl.h
index 7fb81df..7e0d316 100644
--- a/drivers/net/wireless/mwifiex/ioctl.h
+++ b/drivers/net/wireless/mwifiex/ioctl.h
@@ -269,11 +269,6 @@ struct mwifiex_debug_info {
 };
 
 enum {
-	MWIFIEX_AUTH_MODE_OPEN = 0x00,
-	MWIFIEX_AUTH_MODE_SHARED = 0x01,
-};
-
-enum {
 	MWIFIEX_ENCRYPTION_MODE_NONE = 0,
 	MWIFIEX_ENCRYPTION_MODE_WEP40 = 1,
 	MWIFIEX_ENCRYPTION_MODE_TKIP = 2,
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index d8c7c5f..8a1eb2a 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -449,7 +449,7 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
 		auth_tlv->auth_type = cpu_to_le16(
 				(u16) priv->sec_info.authentication_mode);
 	else
-		auth_tlv->auth_type = cpu_to_le16(MWIFIEX_AUTH_MODE_OPEN);
+		auth_tlv->auth_type = cpu_to_le16(NL80211_AUTHTYPE_OPEN_SYSTEM);
 
 	pos += sizeof(auth_tlv->header) + le16_to_cpu(auth_tlv->header.len);
 
-- 
1.7.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux