aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/scan.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-05-10 22:57:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-05-11 14:54:54 -0400
commit889c05bdf3056b029b9fa95096eac4f0dfd3fb6f (patch)
treeefbe9e5abc2ca8197cdd07044a39791725ffd226 /drivers/net/wireless/libertas/scan.c
parent6affe785aaf983253b27e71e67bf5fceaee6ff88 (diff)
[PATCH] libertas: remove WLAN_802_11_WEP_STATUS enum
Also change WEPstatus to "wep_enabled"; it's clearer and consistent with the WPAenabled and WPA2enabled members. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r--drivers/net/wireless/libertas/scan.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index ddd95eb4ad21..23f100a971b5 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -89,7 +89,7 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode)
89 ENTER(); 89 ENTER();
90 90
91 if (adapter->scantable[index].inframode == mode) { 91 if (adapter->scantable[index].inframode == mode) {
92 if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled 92 if ( !adapter->secinfo.wep_enabled
93 && !adapter->secinfo.WPAenabled 93 && !adapter->secinfo.WPAenabled
94 && !adapter->secinfo.WPA2enabled 94 && !adapter->secinfo.WPA2enabled
95 && adapter->scantable[index].wpa_ie[0] != WPA_IE 95 && adapter->scantable[index].wpa_ie[0] != WPA_IE
@@ -98,14 +98,14 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode)
98 /* no security */ 98 /* no security */
99 LEAVE(); 99 LEAVE();
100 return index; 100 return index;
101 } else if (adapter->secinfo.WEPstatus == wlan802_11WEPenabled 101 } else if ( adapter->secinfo.wep_enabled
102 && !adapter->secinfo.WPAenabled 102 && !adapter->secinfo.WPAenabled
103 && !adapter->secinfo.WPA2enabled 103 && !adapter->secinfo.WPA2enabled
104 && adapter->scantable[index].privacy) { 104 && adapter->scantable[index].privacy) {
105 /* static WEP enabled */ 105 /* static WEP enabled */
106 LEAVE(); 106 LEAVE();
107 return index; 107 return index;
108 } else if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled 108 } else if ( !adapter->secinfo.wep_enabled
109 && adapter->secinfo.WPAenabled 109 && adapter->secinfo.WPAenabled
110 && !adapter->secinfo.WPA2enabled 110 && !adapter->secinfo.WPA2enabled
111 && (adapter->scantable[index].wpa_ie[0] == WPA_IE) 111 && (adapter->scantable[index].wpa_ie[0] == WPA_IE)
@@ -119,14 +119,13 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode)
119 "privacy=%#x\n", index, 119 "privacy=%#x\n", index,
120 adapter->scantable[index].wpa_ie[0], 120 adapter->scantable[index].wpa_ie[0],
121 adapter->scantable[index].rsn_ie[0], 121 adapter->scantable[index].rsn_ie[0],
122 (adapter->secinfo.WEPstatus == 122 adapter->secinfo.wep_enabled ? "e" : "d",
123 wlan802_11WEPenabled) ? "e" : "d", 123 adapter->secinfo.WPAenabled ? "e" : "d",
124 (adapter->secinfo.WPAenabled) ? "e" : "d", 124 adapter->secinfo.WPA2enabled ? "e" : "d",
125 (adapter->secinfo.WPA2enabled) ? "e" : "d",
126 adapter->scantable[index].privacy); 125 adapter->scantable[index].privacy);
127 LEAVE(); 126 LEAVE();
128 return index; 127 return index;
129 } else if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled 128 } else if ( !adapter->secinfo.wep_enabled
130 && !adapter->secinfo.WPAenabled 129 && !adapter->secinfo.WPAenabled
131 && adapter->secinfo.WPA2enabled 130 && adapter->secinfo.WPA2enabled
132 && (adapter->scantable[index].rsn_ie[0] == WPA2_IE) 131 && (adapter->scantable[index].rsn_ie[0] == WPA2_IE)
@@ -140,14 +139,13 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode)
140 "privacy=%#x\n", index, 139 "privacy=%#x\n", index,
141 adapter->scantable[index].wpa_ie[0], 140 adapter->scantable[index].wpa_ie[0],
142 adapter->scantable[index].rsn_ie[0], 141 adapter->scantable[index].rsn_ie[0],
143 (adapter->secinfo.WEPstatus == 142 adapter->secinfo.wep_enabled ? "e" : "d",
144 wlan802_11WEPenabled) ? "e" : "d", 143 adapter->secinfo.WPAenabled ? "e" : "d",
145 (adapter->secinfo.WPAenabled) ? "e" : "d", 144 adapter->secinfo.WPA2enabled ? "e" : "d",
146 (adapter->secinfo.WPA2enabled) ? "e" : "d",
147 adapter->scantable[index].privacy); 145 adapter->scantable[index].privacy);
148 LEAVE(); 146 LEAVE();
149 return index; 147 return index;
150 } else if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled 148 } else if ( !adapter->secinfo.wep_enabled
151 && !adapter->secinfo.WPAenabled 149 && !adapter->secinfo.WPAenabled
152 && !adapter->secinfo.WPA2enabled 150 && !adapter->secinfo.WPA2enabled
153 && (adapter->scantable[index].wpa_ie[0] != WPA_IE) 151 && (adapter->scantable[index].wpa_ie[0] != WPA_IE)
@@ -172,9 +170,9 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode)
172 index, 170 index,
173 adapter->scantable[index].wpa_ie[0], 171 adapter->scantable[index].wpa_ie[0],
174 adapter->scantable[index].rsn_ie[0], 172 adapter->scantable[index].rsn_ie[0],
175 (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) ? "e" : "d", 173 adapter->secinfo.wep_enabled ? "e" : "d",
176 (adapter->secinfo.WPAenabled) ? "e" : "d", 174 adapter->secinfo.WPAenabled ? "e" : "d",
177 (adapter->secinfo.WPA2enabled) ? "e" : "d", 175 adapter->secinfo.WPA2enabled ? "e" : "d",
178 adapter->scantable[index].privacy); 176 adapter->scantable[index].privacy);
179 LEAVE(); 177 LEAVE();
180 return -ECONNREFUSED; 178 return -ECONNREFUSED;