|
@@ -858,7 +858,7 @@ static struct sk_buff *rtllib_probe_resp(struct rtllib_device *ieee,
|
|
|
|
|
|
crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx];
|
|
|
encrypt = ieee->host_encrypt && crypt && crypt->ops &&
|
|
|
- ((0 == strcmp(crypt->ops->name, "R-WEP") || wpa_ie_len));
|
|
|
+ ((strcmp(crypt->ops->name, "R-WEP") == 0 || wpa_ie_len));
|
|
|
if (ieee->pHTInfo->bCurrentHTSupport) {
|
|
|
tmp_ht_cap_buf = (u8 *) &(ieee->pHTInfo->SelfHTCap);
|
|
|
tmp_ht_cap_len = sizeof(ieee->pHTInfo->SelfHTCap);
|
|
@@ -1180,7 +1180,7 @@ inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon,
|
|
|
crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx];
|
|
|
if (crypt != NULL)
|
|
|
encrypt = ieee->host_encrypt && crypt && crypt->ops &&
|
|
|
- ((0 == strcmp(crypt->ops->name, "R-WEP") ||
|
|
|
+ ((strcmp(crypt->ops->name, "R-WEP") == 0 ||
|
|
|
wpa_ie_len));
|
|
|
else
|
|
|
encrypt = 0;
|
|
@@ -2229,7 +2229,7 @@ inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
|
|
|
ieee->state == RTLLIB_ASSOCIATING_AUTHENTICATED &&
|
|
|
(ieee->iw_mode == IW_MODE_INFRA)) {
|
|
|
errcode = assoc_parse(ieee, skb, &aid);
|
|
|
- if (0 == errcode) {
|
|
|
+ if (!errcode) {
|
|
|
struct rtllib_network *network =
|
|
|
kzalloc(sizeof(struct rtllib_network),
|
|
|
GFP_ATOMIC);
|
|
@@ -3480,7 +3480,7 @@ u8 rtllib_ap_sec_type(struct rtllib_device *ieee)
|
|
|
crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx];
|
|
|
encrypt = (ieee->current_network.capability & WLAN_CAPABILITY_PRIVACY)
|
|
|
|| (ieee->host_encrypt && crypt && crypt->ops &&
|
|
|
- (0 == strcmp(crypt->ops->name, "R-WEP")));
|
|
|
+ (strcmp(crypt->ops->name, "R-WEP") == 0));
|
|
|
|
|
|
/* simply judge */
|
|
|
if (encrypt && (wpa_ie_len == 0)) {
|