Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36514
b: refs/heads/master
c: 6a484db
h: refs/heads/master
v: v3
  • Loading branch information
Jean Tourrilhes authored and John W. Linville committed Sep 25, 2006
1 parent 7dc49b3 commit 5a780d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7f8544cc95c7f521847fa760ce38d932e6ab4542
refs/heads/master: 6a484db472e77218252025d31d4ef96dbc11ada9
18 changes: 9 additions & 9 deletions trunk/drivers/net/wireless/atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1656,13 +1656,13 @@ static int atmel_set_essid(struct net_device *dev,
priv->connect_to_any_BSS = 0;

/* Check the size of the string */
if (dwrq->length > MAX_SSID_LENGTH + 1)
if (dwrq->length > MAX_SSID_LENGTH)
return -E2BIG;
if (index != 0)
return -EINVAL;

memcpy(priv->new_SSID, extra, dwrq->length - 1);
priv->new_SSID_size = dwrq->length - 1;
memcpy(priv->new_SSID, extra, dwrq->length);
priv->new_SSID_size = dwrq->length;
}

return -EINPROGRESS;
Expand Down Expand Up @@ -2120,9 +2120,9 @@ static int atmel_set_retry(struct net_device *dev,
struct atmel_private *priv = netdev_priv(dev);

if (!vwrq->disabled && (vwrq->flags & IW_RETRY_LIMIT)) {
if (vwrq->flags & IW_RETRY_MAX)
if (vwrq->flags & IW_RETRY_LONG)
priv->long_retry = vwrq->value;
else if (vwrq->flags & IW_RETRY_MIN)
else if (vwrq->flags & IW_RETRY_SHORT)
priv->short_retry = vwrq->value;
else {
/* No modifier : set both */
Expand All @@ -2144,15 +2144,15 @@ static int atmel_get_retry(struct net_device *dev,

vwrq->disabled = 0; /* Can't be disabled */

/* Note : by default, display the min retry number */
if (vwrq->flags & IW_RETRY_MAX) {
vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
/* Note : by default, display the short retry number */
if (vwrq->flags & IW_RETRY_LONG) {
vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_LONG;
vwrq->value = priv->long_retry;
} else {
vwrq->flags = IW_RETRY_LIMIT;
vwrq->value = priv->short_retry;
if (priv->long_retry != priv->short_retry)
vwrq->flags |= IW_RETRY_MIN;
vwrq->flags |= IW_RETRY_SHORT;
}

return 0;
Expand Down

0 comments on commit 5a780d8

Please sign in to comment.