aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/orinoco.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/orinoco/orinoco.c')
-rw-r--r--drivers/net/wireless/orinoco/orinoco.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco.c b/drivers/net/wireless/orinoco/orinoco.c
index 6ff6c3803c0..b1c763fd124 100644
--- a/drivers/net/wireless/orinoco/orinoco.c
+++ b/drivers/net/wireless/orinoco/orinoco.c
@@ -3497,9 +3497,8 @@ static int orinoco_init(struct net_device *dev)
3497 /* Get initial AP density */ 3497 /* Get initial AP density */
3498 err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFSYSTEMSCALE, 3498 err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFSYSTEMSCALE,
3499 &priv->ap_density); 3499 &priv->ap_density);
3500 if (err || priv->ap_density < 1 || priv->ap_density > 3) { 3500 if (err || priv->ap_density < 1 || priv->ap_density > 3)
3501 priv->has_sensitivity = 0; 3501 priv->has_sensitivity = 0;
3502 }
3503 3502
3504 /* Get initial RTS threshold */ 3503 /* Get initial RTS threshold */
3505 err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFRTSTHRESHOLD, 3504 err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFRTSTHRESHOLD,
@@ -3811,9 +3810,8 @@ static int orinoco_hw_get_bitratelist(struct orinoco_private *priv,
3811 *numrates = num; 3810 *numrates = num;
3812 num = min(num, max); 3811 num = min(num, max);
3813 3812
3814 for (i = 0; i < num; i++) { 3813 for (i = 0; i < num; i++)
3815 rates[i] = (p[i] & 0x7f) * 500000; /* convert to bps */ 3814 rates[i] = (p[i] & 0x7f) * 500000; /* convert to bps */
3816 }
3817 3815
3818 return 0; 3816 return 0;
3819} 3817}
@@ -4130,11 +4128,11 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev,
4130 index = priv->tx_key; 4128 index = priv->tx_key;
4131 4129
4132 /* Adjust key length to a supported value */ 4130 /* Adjust key length to a supported value */
4133 if (erq->length > SMALL_KEY_SIZE) { 4131 if (erq->length > SMALL_KEY_SIZE)
4134 xlen = LARGE_KEY_SIZE; 4132 xlen = LARGE_KEY_SIZE;
4135 } else if (erq->length > 0) { 4133 else if (erq->length > 0)
4136 xlen = SMALL_KEY_SIZE; 4134 xlen = SMALL_KEY_SIZE;
4137 } else 4135 else
4138 xlen = 0; 4136 xlen = 0;
4139 4137
4140 /* Switch on WEP if off */ 4138 /* Switch on WEP if off */
@@ -4256,9 +4254,8 @@ static int orinoco_ioctl_setessid(struct net_device *dev,
4256 memset(priv->desired_essid, 0, sizeof(priv->desired_essid)); 4254 memset(priv->desired_essid, 0, sizeof(priv->desired_essid));
4257 4255
4258 /* If not ANY, get the new ESSID */ 4256 /* If not ANY, get the new ESSID */
4259 if (erq->flags) { 4257 if (erq->flags)
4260 memcpy(priv->desired_essid, essidbuf, erq->length); 4258 memcpy(priv->desired_essid, essidbuf, erq->length);
4261 }
4262 4259
4263 orinoco_unlock(priv, &flags); 4260 orinoco_unlock(priv, &flags);
4264 4261
@@ -4393,9 +4390,8 @@ static int orinoco_ioctl_getfreq(struct net_device *dev,
4393 4390
4394 /* Locking done in there */ 4391 /* Locking done in there */
4395 tmp = orinoco_hw_get_freq(priv); 4392 tmp = orinoco_hw_get_freq(priv);
4396 if (tmp < 0) { 4393 if (tmp < 0)
4397 return tmp; 4394 return tmp;
4398 }
4399 4395
4400 frq->m = tmp * 100000; 4396 frq->m = tmp * 100000;
4401 frq->e = 1; 4397 frq->e = 1;