aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/atmel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/atmel.c')
-rw-r--r--drivers/net/wireless/atmel.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index 8606c88886fc..0fc267d626dc 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -39,7 +39,6 @@
39 39
40******************************************************************************/ 40******************************************************************************/
41 41
42#include <linux/config.h>
43#include <linux/init.h> 42#include <linux/init.h>
44 43
45#include <linux/kernel.h> 44#include <linux/kernel.h>
@@ -1578,7 +1577,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
1578 1577
1579 SET_NETDEV_DEV(dev, sys_dev); 1578 SET_NETDEV_DEV(dev, sys_dev);
1580 1579
1581 if ((rc = request_irq(dev->irq, service_interrupt, SA_SHIRQ, dev->name, dev))) { 1580 if ((rc = request_irq(dev->irq, service_interrupt, IRQF_SHARED, dev->name, dev))) {
1582 printk(KERN_ERR "%s: register interrupt %d failed, rc %d\n", dev->name, irq, rc); 1581 printk(KERN_ERR "%s: register interrupt %d failed, rc %d\n", dev->name, irq, rc);
1583 goto err_out_free; 1582 goto err_out_free;
1584 } 1583 }
@@ -1657,13 +1656,13 @@ static int atmel_set_essid(struct net_device *dev,
1657 priv->connect_to_any_BSS = 0; 1656 priv->connect_to_any_BSS = 0;
1658 1657
1659 /* Check the size of the string */ 1658 /* Check the size of the string */
1660 if (dwrq->length > MAX_SSID_LENGTH + 1) 1659 if (dwrq->length > MAX_SSID_LENGTH)
1661 return -E2BIG; 1660 return -E2BIG;
1662 if (index != 0) 1661 if (index != 0)
1663 return -EINVAL; 1662 return -EINVAL;
1664 1663
1665 memcpy(priv->new_SSID, extra, dwrq->length - 1); 1664 memcpy(priv->new_SSID, extra, dwrq->length);
1666 priv->new_SSID_size = dwrq->length - 1; 1665 priv->new_SSID_size = dwrq->length;
1667 } 1666 }
1668 1667
1669 return -EINPROGRESS; 1668 return -EINPROGRESS;
@@ -2121,9 +2120,9 @@ static int atmel_set_retry(struct net_device *dev,
2121 struct atmel_private *priv = netdev_priv(dev); 2120 struct atmel_private *priv = netdev_priv(dev);
2122 2121
2123 if (!vwrq->disabled && (vwrq->flags & IW_RETRY_LIMIT)) { 2122 if (!vwrq->disabled && (vwrq->flags & IW_RETRY_LIMIT)) {
2124 if (vwrq->flags & IW_RETRY_MAX) 2123 if (vwrq->flags & IW_RETRY_LONG)
2125 priv->long_retry = vwrq->value; 2124 priv->long_retry = vwrq->value;
2126 else if (vwrq->flags & IW_RETRY_MIN) 2125 else if (vwrq->flags & IW_RETRY_SHORT)
2127 priv->short_retry = vwrq->value; 2126 priv->short_retry = vwrq->value;
2128 else { 2127 else {
2129 /* No modifier : set both */ 2128 /* No modifier : set both */
@@ -2145,15 +2144,15 @@ static int atmel_get_retry(struct net_device *dev,
2145 2144
2146 vwrq->disabled = 0; /* Can't be disabled */ 2145 vwrq->disabled = 0; /* Can't be disabled */
2147 2146
2148 /* Note : by default, display the min retry number */ 2147 /* Note : by default, display the short retry number */
2149 if (vwrq->flags & IW_RETRY_MAX) { 2148 if (vwrq->flags & IW_RETRY_LONG) {
2150 vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX; 2149 vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_LONG;
2151 vwrq->value = priv->long_retry; 2150 vwrq->value = priv->long_retry;
2152 } else { 2151 } else {
2153 vwrq->flags = IW_RETRY_LIMIT; 2152 vwrq->flags = IW_RETRY_LIMIT;
2154 vwrq->value = priv->short_retry; 2153 vwrq->value = priv->short_retry;
2155 if (priv->long_retry != priv->short_retry) 2154 if (priv->long_retry != priv->short_retry)
2156 vwrq->flags |= IW_RETRY_MIN; 2155 vwrq->flags |= IW_RETRY_SHORT;
2157 } 2156 }
2158 2157
2159 return 0; 2158 return 0;