fwrq->m = c + 1;
}
/* Setting by channel number */
- if ((fwrq->m > 1000) || (fwrq->e > 0))
+ if ((fwrq->m > 1000) || (fwrq->e > 0)) {
rc = -EOPNOTSUPP;
- else {
+ } else {
int channel = fwrq->m;
/* We should do a better check than that,
* based on the card capability !!! */
if (priv->reg.wep_key[index].size) {
priv->reg.wep_index = index;
priv->need_commit |= SME_WEP_INDEX;
- } else
+ } else {
return -EINVAL;
+ }
}
}
}
if ((index >= 0) && (index < 4))
memcpy(extra, priv->reg.wep_key[index].val,
dwrq->length);
- } else
+ } else {
memcpy(extra, zeros, dwrq->length);
+ }
#endif
return 0;
}
priv->reg.powermgt = POWMGT_SAVE2_MODE;
else
return -EINVAL;
- } else
+ } else {
return -EINVAL;
+ }
hostif_sme_enqueue(priv, SME_POW_MNGMT_REQUEST);
return -EINVAL;
}
priv->wpa.key[index].alg = enc->alg;
- } else
+ } else {
return -EINVAL;
+ }
if (commit) {
if (commit & SME_WEP_INDEX)
} else if (*uwrq == DISCONNECT_STATUS) { /* 1 */
priv->connect_status |= FORCE_DISCONNECT;
netif_carrier_off(dev);
- } else
+ } else {
return -EINVAL;
+ }
return 0;
}
priv->reg.preamble = LONG_PREAMBLE;
} else if (*uwrq == SHORT_PREAMBLE) { /* 1 */
priv->reg.preamble = SHORT_PREAMBLE;
- } else
+ } else {
return -EINVAL;
+ }
priv->need_commit |= SME_MODE_SET;
return -EINPROGRESS; /* Call commit handler */
priv->reg.powermgt = POWMGT_SAVE2_MODE;
else
return -EINVAL;
- } else
+ } else {
return -EINVAL;
+ }
hostif_sme_enqueue(priv, SME_POW_MNGMT_REQUEST);
priv->reg.scan_type = ACTIVE_SCAN;
} else if (*uwrq == PASSIVE_SCAN) { /* 1 */
priv->reg.scan_type = PASSIVE_SCAN;
- } else
+ } else {
return -EINVAL;
+ }
return 0;
}
if (priv->reg.operation_mode == MODE_INFRASTRUCTURE) {
priv->need_commit |= SME_MODE_SET;
return -EINPROGRESS; /* Call commit handler */
- } else
+ } else {
return 0;
+ }
}
/*------------------------------------------------------------------*/
priv->reg.phy_type = D_11G_ONLY_MODE;
} else if (*uwrq == D_11BG_COMPATIBLE_MODE) { /* 2 */
priv->reg.phy_type = D_11BG_COMPATIBLE_MODE;
- } else
+ } else {
return -EINVAL;
+ }
priv->need_commit |= SME_MODE_SET;
return -EINPROGRESS; /* Call commit handler */
priv->reg.cts_mode = CTS_MODE_FALSE;
} else if (*uwrq == CTS_MODE_TRUE) { /* 1 */
if (priv->reg.phy_type == D_11G_ONLY_MODE ||
- priv->reg.phy_type == D_11BG_COMPATIBLE_MODE)
+ priv->reg.phy_type == D_11BG_COMPATIBLE_MODE) {
priv->reg.cts_mode = CTS_MODE_TRUE;
- else
+ } else {
priv->reg.cts_mode = CTS_MODE_FALSE;
- } else
+ }
+ } else {
return -EINVAL;
+ }
priv->need_commit |= SME_MODE_SET;
return -EINPROGRESS; /* Call commit handler */