diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-22 19:54:53 (GMT) |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-22 20:01:40 (GMT) |
commit | ae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (patch) | |
tree | 3c2086ab67398a019089a47ca3f362a4bc6db74f /drivers/staging/otus/ioctl.c | |
parent | 34e84f39a27d059a3e6ec6e8b94aafa702e6f220 (diff) | |
parent | 9173a8ef24a6b1b8031507b35b8ffe5f85a87692 (diff) | |
download | linux-fsl-qoriq-ae19ffbadc1b2100285a5b5b3d0a4e0a11390904.tar.xz |
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/staging/otus/ioctl.c')
-rw-r--r-- | drivers/staging/otus/ioctl.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c index ce04218..6808e69 100644 --- a/drivers/staging/otus/ioctl.c +++ b/drivers/staging/otus/ioctl.c @@ -58,9 +58,7 @@ #define ZD_MAX_KEY_SIZE 32 #define ZD_MAX_GENERIC_SIZE 64 -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif extern u16_t zfLnxGetVapId(zdev_t *dev); @@ -248,7 +246,6 @@ int usbdrv_ioctl_setrts(struct net_device *dev, struct iw_param *rrq) return 0; } -#if WIRELESS_EXT > 14 /* * Encode a WPA or RSN information element as a custom * element using the hostap format. @@ -269,7 +266,6 @@ u32 encode_ie(void *buf, u32 bufsize, const u8 *ie, u32 ielen, p += sprintf(p, "%02x", ie[i]); return (i == ielen ? p - (u8 *)buf:0); } -#endif /* WIRELESS_EXT > 14 */ /* * Translate scan data returned from the card to a card independent @@ -284,9 +280,7 @@ char *usbdrv_translate_scan(struct net_device *dev, char *current_val; /* For rates */ char *last_ev; int i; - #if WIRELESS_EXT > 14 - char buf[64*2 + 30]; - #endif + char buf[64*2 + 30]; last_ev = current_ev; @@ -365,10 +359,8 @@ char *usbdrv_translate_scan(struct net_device *dev, /* Add quality statistics */ iwe.cmd = IWEVQUAL; - #if WIRELESS_EXT > 18 iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED | IW_QUAL_NOISE_UPDATED; - #endif iwe.u.qual.level = list->signalStrength; iwe.u.qual.noise = 0; iwe.u.qual.qual = list->signalQuality; @@ -441,7 +433,6 @@ char *usbdrv_translate_scan(struct net_device *dev, /* Check if we added any event */ if ((current_val - current_ev) > IW_EV_LCP_LEN) current_ev = current_val; - #if WIRELESS_EXT > 14 #define IEEE80211_ELEMID_RSN 0x30 memset(&iwe, 0, sizeof(iwe)); iwe.cmd = IWEVCUSTOM; @@ -503,7 +494,6 @@ char *usbdrv_translate_scan(struct net_device *dev, last_ev = current_ev; } } - #endif /* The other data in the scan result are not really * interesting, so for now drop it */ @@ -697,12 +687,9 @@ int usbdrvwext_giwrange(struct net_device *dev, if (!netif_running(dev)) return -EINVAL; - #if WIRELESS_EXT > 9 range->txpower_capa = IW_TXPOW_DBM; /* XXX what about min/max_pmp, min/max_pmt, etc. */ - #endif - #if WIRELESS_EXT > 10 range->we_version_compiled = WIRELESS_EXT; range->we_version_source = 13; @@ -710,7 +697,6 @@ int usbdrvwext_giwrange(struct net_device *dev, range->retry_flags = IW_RETRY_LIMIT; range->min_retry = 0; range->max_retry = 255; - #endif /* WIRELESS_EXT > 10 */ channel_num = zfiWlanQueryAllowChannels(dev, channels); @@ -917,13 +903,11 @@ int usbdrvwext_giwscan(struct net_device *dev, current_ev = usbdrv_translate_scan(dev, info, current_ev, end_buf, &pBssList->bssInfo[i]); - #if WIRELESS_EXT > 16 if (current_ev == end_buf) { kfree(pBssList); data->length = current_ev - extra; return -E2BIG; } - #endif } /* Length of data */ @@ -2045,6 +2029,7 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm) struct zsKeyInfo keyInfo; struct usbdrv_private *macp = dev->ml_priv; u16_t vapId = 0; + int ii; /* zmw_get_wlan_dev(dev); */ @@ -2168,7 +2153,6 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm) /* DUMP key context */ /* #ifdef WPA_DEBUG */ if (keyInfo.keyLength > 0) { - int ii; printk(KERN_WARNING "Otus: Key Context:\n"); for (ii = 0; ii < keyInfo.keyLength; ) { @@ -2266,7 +2250,6 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm) /* zfiWlanSetWpaIe(dev, zdparm->u.generic_elem.data, * zdparm->u.generic_elem.len); */ - int ii; u8_t len = zdparm->u.generic_elem.len; u8_t *wpaie = (u8_t *)zdparm->u.generic_elem.data; @@ -2401,7 +2384,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) struct athr_wlan_param zdparm; struct usbdrv_private *macp = dev->ml_priv; - int err = 0; + int err = 0, val = 0; int changed = 0; /* regp = macp->regp; */ @@ -2445,7 +2428,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) err = -EPERM; break; } - int val = *((int *) wrq->u.name); + val = *((int *) wrq->u.name); if ((val < 0) || (val > 2)) { err = -EINVAL; break; |