diff options
Diffstat (limited to 'drivers/staging/wlan-ng/p80211wext.c')
-rw-r--r-- | drivers/staging/wlan-ng/p80211wext.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 9fb9532c72a..2fa1dfa2378 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -46,8 +46,8 @@ #include <linux/wireless.h> #include <net/iw_handler.h> #include <linux/if_arp.h> -#include <asm/bitops.h> -#include <asm/uaccess.h> +#include <linux/bitops.h> +#include <linux/uaccess.h> #include <asm/byteorder.h> #include <linux/if_ether.h> #include <linux/bitops.h> @@ -553,15 +553,14 @@ static int p80211wext_siwencode(netdevice_t *dev, } /* Check the Key index first. */ - i = (erq->flags & IW_ENCODE_INDEX); + i = (erq->flags & IW_ENCODE_INDEX); if (i) { - if ((i < 1) || (i > NUM_WEPKEYS)) { err = -EINVAL; goto exit; - } else + } else { i--; - + } /* Set current key number only if no keys are given */ if (erq->flags & IW_ENCODE_NOKEY) { result = |