diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-01-19 17:07:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-19 17:07:41 -0500 |
commit | 64147c729732ba9c9e50966971bdfbd503c888bb (patch) | |
tree | 26a3734cd29fc7cd0d24c261340caceae40f772d /drivers | |
parent | c9f6a6567f3e8dd69dd3f80a67e73d7d10884bea (diff) |
libertas/assoc.c: rearrange some strange line breaks
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/libertas/assoc.c | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index fb3dff0fdfa8..0979b07799a0 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c | |||
@@ -1160,11 +1160,11 @@ int lbs_adhoc_stop(struct lbs_private *priv) | |||
1160 | static inline int match_bss_no_security(struct lbs_802_11_security *secinfo, | 1160 | static inline int match_bss_no_security(struct lbs_802_11_security *secinfo, |
1161 | struct bss_descriptor *match_bss) | 1161 | struct bss_descriptor *match_bss) |
1162 | { | 1162 | { |
1163 | if (!secinfo->wep_enabled && !secinfo->WPAenabled | 1163 | if (!secinfo->wep_enabled && |
1164 | && !secinfo->WPA2enabled | 1164 | !secinfo->WPAenabled && !secinfo->WPA2enabled && |
1165 | && match_bss->wpa_ie[0] != WLAN_EID_GENERIC | 1165 | match_bss->wpa_ie[0] != WLAN_EID_GENERIC && |
1166 | && match_bss->rsn_ie[0] != WLAN_EID_RSN | 1166 | match_bss->rsn_ie[0] != WLAN_EID_RSN && |
1167 | && !(match_bss->capability & WLAN_CAPABILITY_PRIVACY)) | 1167 | !(match_bss->capability & WLAN_CAPABILITY_PRIVACY)) |
1168 | return 1; | 1168 | return 1; |
1169 | else | 1169 | else |
1170 | return 0; | 1170 | return 0; |
@@ -1173,9 +1173,9 @@ static inline int match_bss_no_security(struct lbs_802_11_security *secinfo, | |||
1173 | static inline int match_bss_static_wep(struct lbs_802_11_security *secinfo, | 1173 | static inline int match_bss_static_wep(struct lbs_802_11_security *secinfo, |
1174 | struct bss_descriptor *match_bss) | 1174 | struct bss_descriptor *match_bss) |
1175 | { | 1175 | { |
1176 | if (secinfo->wep_enabled && !secinfo->WPAenabled | 1176 | if (secinfo->wep_enabled && |
1177 | && !secinfo->WPA2enabled | 1177 | !secinfo->WPAenabled && !secinfo->WPA2enabled && |
1178 | && (match_bss->capability & WLAN_CAPABILITY_PRIVACY)) | 1178 | (match_bss->capability & WLAN_CAPABILITY_PRIVACY)) |
1179 | return 1; | 1179 | return 1; |
1180 | else | 1180 | else |
1181 | return 0; | 1181 | return 0; |
@@ -1184,8 +1184,8 @@ static inline int match_bss_static_wep(struct lbs_802_11_security *secinfo, | |||
1184 | static inline int match_bss_wpa(struct lbs_802_11_security *secinfo, | 1184 | static inline int match_bss_wpa(struct lbs_802_11_security *secinfo, |
1185 | struct bss_descriptor *match_bss) | 1185 | struct bss_descriptor *match_bss) |
1186 | { | 1186 | { |
1187 | if (!secinfo->wep_enabled && secinfo->WPAenabled | 1187 | if (!secinfo->wep_enabled && secinfo->WPAenabled && |
1188 | && (match_bss->wpa_ie[0] == WLAN_EID_GENERIC) | 1188 | (match_bss->wpa_ie[0] == WLAN_EID_GENERIC) |
1189 | /* privacy bit may NOT be set in some APs like LinkSys WRT54G | 1189 | /* privacy bit may NOT be set in some APs like LinkSys WRT54G |
1190 | && (match_bss->capability & WLAN_CAPABILITY_PRIVACY) */ | 1190 | && (match_bss->capability & WLAN_CAPABILITY_PRIVACY) */ |
1191 | ) | 1191 | ) |
@@ -1210,11 +1210,11 @@ static inline int match_bss_wpa2(struct lbs_802_11_security *secinfo, | |||
1210 | static inline int match_bss_dynamic_wep(struct lbs_802_11_security *secinfo, | 1210 | static inline int match_bss_dynamic_wep(struct lbs_802_11_security *secinfo, |
1211 | struct bss_descriptor *match_bss) | 1211 | struct bss_descriptor *match_bss) |
1212 | { | 1212 | { |
1213 | if (!secinfo->wep_enabled && !secinfo->WPAenabled | 1213 | if (!secinfo->wep_enabled && |
1214 | && !secinfo->WPA2enabled | 1214 | !secinfo->WPAenabled && !secinfo->WPA2enabled && |
1215 | && (match_bss->wpa_ie[0] != WLAN_EID_GENERIC) | 1215 | (match_bss->wpa_ie[0] != WLAN_EID_GENERIC) && |
1216 | && (match_bss->rsn_ie[0] != WLAN_EID_RSN) | 1216 | (match_bss->rsn_ie[0] != WLAN_EID_RSN) && |
1217 | && (match_bss->capability & WLAN_CAPABILITY_PRIVACY)) | 1217 | (match_bss->capability & WLAN_CAPABILITY_PRIVACY)) |
1218 | return 1; | 1218 | return 1; |
1219 | else | 1219 | else |
1220 | return 0; | 1220 | return 0; |
@@ -1525,8 +1525,8 @@ static int assoc_helper_associate(struct lbs_private *priv, | |||
1525 | /* If we're given and 'any' BSSID, try associating based on SSID */ | 1525 | /* If we're given and 'any' BSSID, try associating based on SSID */ |
1526 | 1526 | ||
1527 | if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { | 1527 | if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { |
1528 | if (compare_ether_addr(bssid_any, assoc_req->bssid) | 1528 | if (compare_ether_addr(bssid_any, assoc_req->bssid) && |
1529 | && compare_ether_addr(bssid_off, assoc_req->bssid)) { | 1529 | compare_ether_addr(bssid_off, assoc_req->bssid)) { |
1530 | ret = assoc_helper_bssid(priv, assoc_req); | 1530 | ret = assoc_helper_bssid(priv, assoc_req); |
1531 | done = 1; | 1531 | done = 1; |
1532 | } | 1532 | } |
@@ -1612,11 +1612,9 @@ static int assoc_helper_channel(struct lbs_private *priv, | |||
1612 | goto restore_mesh; | 1612 | goto restore_mesh; |
1613 | } | 1613 | } |
1614 | 1614 | ||
1615 | if ( assoc_req->secinfo.wep_enabled | 1615 | if (assoc_req->secinfo.wep_enabled && |
1616 | && (assoc_req->wep_keys[0].len | 1616 | (assoc_req->wep_keys[0].len || assoc_req->wep_keys[1].len || |
1617 | || assoc_req->wep_keys[1].len | 1617 | assoc_req->wep_keys[2].len || assoc_req->wep_keys[3].len)) { |
1618 | || assoc_req->wep_keys[2].len | ||
1619 | || assoc_req->wep_keys[3].len)) { | ||
1620 | /* Make sure WEP keys are re-sent to firmware */ | 1618 | /* Make sure WEP keys are re-sent to firmware */ |
1621 | set_bit(ASSOC_FLAG_WEP_KEYS, &assoc_req->flags); | 1619 | set_bit(ASSOC_FLAG_WEP_KEYS, &assoc_req->flags); |
1622 | } | 1620 | } |
@@ -1983,14 +1981,14 @@ void lbs_association_worker(struct work_struct *work) | |||
1983 | assoc_req->secinfo.auth_mode); | 1981 | assoc_req->secinfo.auth_mode); |
1984 | 1982 | ||
1985 | /* If 'any' SSID was specified, find an SSID to associate with */ | 1983 | /* If 'any' SSID was specified, find an SSID to associate with */ |
1986 | if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags) | 1984 | if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags) && |
1987 | && !assoc_req->ssid_len) | 1985 | !assoc_req->ssid_len) |
1988 | find_any_ssid = 1; | 1986 | find_any_ssid = 1; |
1989 | 1987 | ||
1990 | /* But don't use 'any' SSID if there's a valid locked BSSID to use */ | 1988 | /* But don't use 'any' SSID if there's a valid locked BSSID to use */ |
1991 | if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { | 1989 | if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { |
1992 | if (compare_ether_addr(assoc_req->bssid, bssid_any) | 1990 | if (compare_ether_addr(assoc_req->bssid, bssid_any) && |
1993 | && compare_ether_addr(assoc_req->bssid, bssid_off)) | 1991 | compare_ether_addr(assoc_req->bssid, bssid_off)) |
1994 | find_any_ssid = 0; | 1992 | find_any_ssid = 0; |
1995 | } | 1993 | } |
1996 | 1994 | ||
@@ -2064,15 +2062,15 @@ void lbs_association_worker(struct work_struct *work) | |||
2064 | goto out; | 2062 | goto out; |
2065 | } | 2063 | } |
2066 | 2064 | ||
2067 | if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags) | 2065 | if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags) || |
2068 | || test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) { | 2066 | test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) { |
2069 | ret = assoc_helper_wpa_keys(priv, assoc_req); | 2067 | ret = assoc_helper_wpa_keys(priv, assoc_req); |
2070 | if (ret) | 2068 | if (ret) |
2071 | goto out; | 2069 | goto out; |
2072 | } | 2070 | } |
2073 | 2071 | ||
2074 | if ( test_bit(ASSOC_FLAG_WEP_KEYS, &assoc_req->flags) | 2072 | if (test_bit(ASSOC_FLAG_WEP_KEYS, &assoc_req->flags) || |
2075 | || test_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags)) { | 2073 | test_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags)) { |
2076 | ret = assoc_helper_wep_keys(priv, assoc_req); | 2074 | ret = assoc_helper_wep_keys(priv, assoc_req); |
2077 | if (ret) | 2075 | if (ret) |
2078 | goto out; | 2076 | goto out; |
@@ -2082,8 +2080,8 @@ void lbs_association_worker(struct work_struct *work) | |||
2082 | /* SSID/BSSID should be the _last_ config option set, because they | 2080 | /* SSID/BSSID should be the _last_ config option set, because they |
2083 | * trigger the association attempt. | 2081 | * trigger the association attempt. |
2084 | */ | 2082 | */ |
2085 | if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags) | 2083 | if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags) || |
2086 | || test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { | 2084 | test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { |
2087 | int success = 1; | 2085 | int success = 1; |
2088 | 2086 | ||
2089 | ret = assoc_helper_associate(priv, assoc_req); | 2087 | ret = assoc_helper_associate(priv, assoc_req); |