summaryrefslogtreecommitdiff
path: root/drivers/staging/otus/ioctl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-06 11:41:17 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-06 11:41:17 -0700
commitcc41f5cede3c63836d1c0958204630b07f5b5ee7 (patch)
treedfd94451c919b5185d8a01fd3e5a90244fb0de1c /drivers/staging/otus/ioctl.c
parentab69bcd66fb4be64edfc767365cb9eb084961246 (diff)
parent9015e4996273c86574d6fd26df8a203941d3cc24 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (524 commits) Staging: wlan-ng: Update prism2_set_tx_power() to use mBm Staging: ti-st: update TODO Staging: wlags49_h2: use common PCI_VENDOR/DEVICE_ID name format Staging: comedi : fix brace coding style issue in wwrap.c Staging: quatech_usb2: remove unused qt2_box_flush function Staging: slicoss: Remove net_device_stats from the driver's private staging: rtl8192su: check whether requests succeeded staging: panel: fix error path staging: otus: check kmalloc() return value staging: octeon: check request_irq() return value Staging: wlan-ng: remove typedef in p80211hdr.h Staging: wlan-ng: fix checkpatch issues in headers. Staging: wlan-ng: remove typedef in p80211ioctl.h Staging: wlan-ng: fix style issues in p80211conv.h Staging: wlan-ng: fix style issues for p80211hdr.h staging: vt6656: removed NTSTATUS definition staging: vt6656: simplified tests involving both multi/broad-casts Staging: vt6655: replace BOOL with in kernel bool Staging: vt6655: replace FALSE with in kernel false Staging: vt6655: replace TRUE with in kernel true ...
Diffstat (limited to 'drivers/staging/otus/ioctl.c')
-rw-r--r--drivers/staging/otus/ioctl.c55
1 files changed, 24 insertions, 31 deletions
diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c
index a48c8e4a9ea7..dc3066d28845 100644
--- a/drivers/staging/otus/ioctl.c
+++ b/drivers/staging/otus/ioctl.c
@@ -63,8 +63,7 @@
extern u16_t zfLnxGetVapId(zdev_t *dev);
-static const u32_t channel_frequency_11A[] =
-{
+static const u32_t channel_frequency_11A[] = {
/* Even element for Channel Number, Odd for Frequency */
36, 5180,
40, 5200,
@@ -507,7 +506,7 @@ int usbdrvwext_giwname(struct net_device *dev,
{
/* struct usbdrv_private *macp = dev->ml_priv; */
- strcpy(wrq->name, "IEEE 802.11-MIMO");
+ strcpy(wrq->name, "IEEE 802.11abgn");
return 0;
}
@@ -1361,7 +1360,7 @@ int usbdrvwext_giwpower(struct net_device *dev,
}
/*int usbdrvwext_setparam(struct net_device *dev, struct iw_request_info *info,
-* void *w, char *extra)
+* void *w, char *extra)
*{
* struct ieee80211vap *vap = dev->ml_priv;
* struct ieee80211com *ic = vap->iv_ic;
@@ -2261,10 +2260,10 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm)
printk(KERN_ERR "wd->ap.wpaLen : % d\n", len);
/* DUMP WPA IE */
- for(ii = 0; ii < len;) {
+ for (ii = 0; ii < len;) {
printk(KERN_ERR "0x%02x ", wpaie[ii]);
- if((++ii % 16) == 0)
+ if ((++ii % 16) == 0)
printk(KERN_ERR "\n");
}
printk(KERN_ERR "\n");
@@ -2309,11 +2308,10 @@ int usbdrv_cenc_ioctl(struct net_device *dev, struct zydas_cenc_param *zdparm)
/* Get the AP Id */
apId = zfLnxGetVapId(dev);
- if (apId == 0xffff) {
+ if (apId == 0xffff)
apId = 0;
- } else {
+ else
apId = apId + 1;
- }
switch (zdparm->cmd) {
case ZM_CMD_CENC_SETCENC:
@@ -2334,15 +2332,15 @@ int usbdrv_cenc_ioctl(struct net_device *dev, struct zydas_cenc_param *zdparm)
printk(KERN_ERR "Key Index : % d\n", zdparm->u.crypt.keyid);
printk(KERN_ERR "Encryption key = ");
- for (ii = 0; ii < 16; ii++) {
+ for (ii = 0; ii < 16; ii++)
printk(KERN_ERR "0x%02x ", zdparm->u.crypt.key[ii]);
- }
+
printk(KERN_ERR "\n");
printk(KERN_ERR "MIC key = ");
- for(ii = 16; ii < ZM_CENC_KEY_SIZE; ii++) {
+ for (ii = 16; ii < ZM_CENC_KEY_SIZE; ii++)
printk(KERN_ERR "0x%02x ", zdparm->u.crypt.key[ii]);
- }
+
printk(KERN_ERR "\n");
/* Set up key information */
@@ -2424,7 +2422,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
break;
case SIOCSIWRTS:
err = usbdrv_ioctl_setrts(dev, &wrq->u.rts);
- if (! err)
+ if (!err)
changed = 1;
break;
/* set_auth */
@@ -2582,8 +2580,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
ZM_AUTH_MODE_WPA);
} else if ((macp->supIe[17] == 0xf) &&
(macp->supIe[18] == 0xac) &&
- (macp->supIe[19] == 0x2))
- {
+ (macp->supIe[19] == 0x2)) {
printk(KERN_ERR
"wd->sta.authMode = ZM_AUTH_MODE_WPA2PSK\n");
/* wd->sta.authMode = ZM_AUTH_MODE_WPA2PSK; */
@@ -2592,8 +2589,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
ZM_AUTH_MODE_WPA2PSK);
} else if ((macp->supIe[17] == 0xf) &&
(macp->supIe[18] == 0xac) &&
- (macp->supIe[19] == 0x1))
- {
+ (macp->supIe[19] == 0x1)) {
printk(KERN_ERR
"wd->sta.authMode = ZM_AUTH_MODE_WPA2\n");
/* wd->sta.authMode = ZM_AUTH_MODE_WPA2; */
@@ -2618,7 +2614,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
zfiWlanSetWepStatus(dev, ZM_ENCRYPTION_AES);
}
}
- //WPA2 or WPA2PSK
+ /*WPA2 or WPA2PSK*/
if ((macp->supIe[17] == 0xf) ||
(macp->supIe[18] == 0xac)) {
if (macp->supIe[13] == 0x2) {
@@ -2656,7 +2652,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
printk(KERN_ERR
"****************ZD_PARAM_COUNTERMEASURES : ");
- if(arg) {
+ if (arg) {
/* mCounterMeasureState=1; */
printk(KERN_ERR "enable\n");
} else {
@@ -2667,20 +2663,18 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
if (op == ZD_PARAM_DROPUNENCRYPTED) {
printk(KERN_ERR "ZD_PARAM_DROPUNENCRYPTED : ");
- if(arg) {
+ if (arg)
printk(KERN_ERR "enable\n");
- } else {
+ else
printk(KERN_ERR "disable\n");
- }
}
if (op == ZD_PARAM_AUTH_ALGS) {
printk(KERN_ERR "ZD_PARAM_AUTH_ALGS : ");
- if (arg == 0) {
+ if (arg == 0)
printk(KERN_ERR "OPEN_SYSTEM\n");
- } else {
+ else
printk(KERN_ERR "SHARED_KEY\n");
- }
}
if (op == ZD_PARAM_WPS_FILTER) {
printk(KERN_ERR "ZD_PARAM_WPS_FILTER : ");
@@ -2705,11 +2699,10 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
/* Get the AP Id */
apId = zfLnxGetVapId(dev);
- if (apId == 0xffff) {
+ if (apId == 0xffff)
apId = 0;
- } else {
+ else
apId = apId + 1;
- }
if (copy_from_user(&req_wpaie, ifr->ifr_data,
sizeof(struct ieee80211req_wpaie))) {
@@ -2721,10 +2714,10 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
for (j = 0; j < IEEE80211_ADDR_LEN; j++) {
if (macp->stawpaie[i].wpa_macaddr[j] !=
req_wpaie.wpa_macaddr[j])
- break;
+ break;
}
if (j == 6)
- break;
+ break;
}
if (i < ZM_OAL_MAX_STA_SUPPORT) {