if (pItemSSID->abySSID[req->essid_len - 1] == '\0') {
if (req->essid_len > 0)
pItemSSID->len = req->essid_len - 1;
- }
- else
+ } else {
pItemSSID->len = req->essid_len;
+ }
pMgmt->eScanType = WMAC_SCAN_PASSIVE;
PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n", ((PWLAN_IE_SSID)abyScanSSID)->abySSID,
((PWLAN_IE_SSID)abyScanSSID)->len);
PRINT_K(" SIOCSIWAP \n");
- if (wrq->sa_family != ARPHRD_ETHER)
+ if (wrq->sa_family != ARPHRD_ETHER) {
rc = -EINVAL;
- else {
+ } else {
memcpy(pMgmt->abyDesireBSSID, wrq->sa_data, 6);
// mike: add
if ((is_broadcast_ether_addr(pMgmt->abyDesireBSSID)) ||
pDevice->uConnectionRate = brate;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fixed to Rate %d \n", pDevice->uConnectionRate);
}
- }
- else {
+ } else {
pDevice->bFixRate = FALSE;
pDevice->uConnectionRate = 13;
}
wrq->length = 0;
if ((index == 0) && (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled ||
- pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled)){ // get wpa pairwise key
+ pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled)) { // get wpa pairwise key
if (KeybGetKey(&(pDevice->sKey), pMgmt->abyCurrBSSID, 0xffffffff, &pKey)) {
wrq->length = pKey->uKeyLength;
memcpy(abyKey, pKey->abyKey, pKey->uKeyLength);
if (wpa_version == IW_AUTH_WPA_VERSION_DISABLED)
break;
if (pairwise == IW_AUTH_CIPHER_NONE) {
- if (wrq->value == IW_AUTH_CIPHER_CCMP) {
+ if (wrq->value == IW_AUTH_CIPHER_CCMP)
pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled;
- }else {
+ else
pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled;
- }
}
break;
case IW_AUTH_KEY_MGMT:
goto out;
}
pMgmt->wWPAIELen = wrq->length;
- }else {
+ } else {
memset(pMgmt->abyWPAIE, 0, MAX_WPA_IE_LEN);
pMgmt->wWPAIELen = 0;
}
if (copy_to_user(extra, pMgmt->abyWPAIE, pMgmt->wWPAIELen)) {
ret = -EFAULT;
}
- } else
+ } else {
ret = -E2BIG;
+ }
}
return ret;
}