aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/atmel.c
diff options
context:
space:
mode:
authorJean Tourrilhes <jt@hpl.hp.com>2006-08-29 20:59:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-09-25 16:52:14 -0400
commit6a484db472e77218252025d31d4ef96dbc11ada9 (patch)
treeb05d24b3a673a21cfacde4a7646b31eb6186510c /drivers/net/wireless/atmel.c
parent7f8544cc95c7f521847fa760ce38d932e6ab4542 (diff)
[PATCH] WE-21 for atmel
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/atmel.c')
-rw-r--r--drivers/net/wireless/atmel.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index 995c7bea5897..0fc267d626dc 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -1656,13 +1656,13 @@ static int atmel_set_essid(struct net_device *dev,
1656 priv->connect_to_any_BSS = 0; 1656 priv->connect_to_any_BSS = 0;
1657 1657
1658 /* Check the size of the string */ 1658 /* Check the size of the string */
1659 if (dwrq->length > MAX_SSID_LENGTH + 1) 1659 if (dwrq->length > MAX_SSID_LENGTH)
1660 return -E2BIG; 1660 return -E2BIG;
1661 if (index != 0) 1661 if (index != 0)
1662 return -EINVAL; 1662 return -EINVAL;
1663 1663
1664 memcpy(priv->new_SSID, extra, dwrq->length - 1); 1664 memcpy(priv->new_SSID, extra, dwrq->length);
1665 priv->new_SSID_size = dwrq->length - 1; 1665 priv->new_SSID_size = dwrq->length;
1666 } 1666 }
1667 1667
1668 return -EINPROGRESS; 1668 return -EINPROGRESS;
@@ -2120,9 +2120,9 @@ static int atmel_set_retry(struct net_device *dev,
2120 struct atmel_private *priv = netdev_priv(dev); 2120 struct atmel_private *priv = netdev_priv(dev);
2121 2121
2122 if (!vwrq->disabled && (vwrq->flags & IW_RETRY_LIMIT)) { 2122 if (!vwrq->disabled && (vwrq->flags & IW_RETRY_LIMIT)) {
2123 if (vwrq->flags & IW_RETRY_MAX) 2123 if (vwrq->flags & IW_RETRY_LONG)
2124 priv->long_retry = vwrq->value; 2124 priv->long_retry = vwrq->value;
2125 else if (vwrq->flags & IW_RETRY_MIN) 2125 else if (vwrq->flags & IW_RETRY_SHORT)
2126 priv->short_retry = vwrq->value; 2126 priv->short_retry = vwrq->value;
2127 else { 2127 else {
2128 /* No modifier : set both */ 2128 /* No modifier : set both */
@@ -2144,15 +2144,15 @@ static int atmel_get_retry(struct net_device *dev,
2144 2144
2145 vwrq->disabled = 0; /* Can't be disabled */ 2145 vwrq->disabled = 0; /* Can't be disabled */
2146 2146
2147 /* Note : by default, display the min retry number */ 2147 /* Note : by default, display the short retry number */
2148 if (vwrq->flags & IW_RETRY_MAX) { 2148 if (vwrq->flags & IW_RETRY_LONG) {
2149 vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX; 2149 vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_LONG;
2150 vwrq->value = priv->long_retry; 2150 vwrq->value = priv->long_retry;
2151 } else { 2151 } else {
2152 vwrq->flags = IW_RETRY_LIMIT; 2152 vwrq->flags = IW_RETRY_LIMIT;
2153 vwrq->value = priv->short_retry; 2153 vwrq->value = priv->short_retry;
2154 if (priv->long_retry != priv->short_retry) 2154 if (priv->long_retry != priv->short_retry)
2155 vwrq->flags |= IW_RETRY_MIN; 2155 vwrq->flags |= IW_RETRY_SHORT;
2156 } 2156 }
2157 2157
2158 return 0; 2158 return 0;