diff options
author | Jim Lieb | 2009-08-12 23:54:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2009-09-15 21:02:07 +0200 |
commit | 612822f5dd1638de442cf50eb9da54632fba0e66 (patch) | |
tree | 941babacbfbe553589623c979968ef2fbf053277 /drivers/staging/vt6655/wpactl.c | |
parent | Staging: vt665x: Text janitor in prep for driver merge (diff) | |
download | kernel-qcow2-linux-612822f5dd1638de442cf50eb9da54632fba0e66.tar.gz kernel-qcow2-linux-612822f5dd1638de442cf50eb9da54632fba0e66.tar.xz kernel-qcow2-linux-612822f5dd1638de442cf50eb9da54632fba0e66.zip |
Staging: vt665x: Text janitor in prep for driver merge, part 2
Text only changes to remove textual differences between the vt6655
and vt6656 trees in prep for driver merge.
Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6655/wpactl.c')
-rw-r--r-- | drivers/staging/vt6655/wpactl.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index ec2839a70a20..460182c74a3e 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -16,6 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: wpactl.c * * Purpose: handle wpa supplicant ioctl input/out functions @@ -79,8 +80,6 @@ static int msglevel =MSG_LEVEL_INFO; /*--------------------- Export Variables --------------------------*/ - - static void wpadev_setup(struct net_device *dev) { dev->type = ARPHRD_IEEE80211; @@ -94,8 +93,6 @@ static void wpadev_setup(struct net_device *dev) dev->flags = IFF_BROADCAST|IFF_MULTICAST; } - - /* * Description: * register netdev for wpa supplicant deamon @@ -122,7 +119,6 @@ static int wpa_init_wpadev(PSDevice pDevice) wpadev_priv = netdev_priv(pDevice->wpadev); *wpadev_priv = *pDevice; - memcpy(pDevice->wpadev->dev_addr, dev->dev_addr, U_ETHER_ADDR_LEN); pDevice->wpadev->base_addr = dev->base_addr; pDevice->wpadev->irq = dev->irq; @@ -164,7 +160,6 @@ static int wpa_init_wpadev(PSDevice pDevice) static int wpa_release_wpadev(PSDevice pDevice) { - if (pDevice->skb) { dev_kfree_skb(pDevice->skb); pDevice->skb = NULL; @@ -201,8 +196,6 @@ static int wpa_release_wpadev(PSDevice pDevice) int wpa_set_wpadev(PSDevice pDevice, int val) { - - if (val) return wpa_init_wpadev(pDevice); else @@ -224,9 +217,9 @@ int wpa_set_wpadev(PSDevice pDevice, int val) * */ -int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL fcpfkernel) + int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL fcpfkernel) { - struct viawget_wpa_param *param=ctx; + struct viawget_wpa_param *param=ctx; PSMgmtObject pMgmt = pDevice->pMgmt; DWORD dwKeyIndex = 0; BYTE abyKey[MAX_KEY_LEN]; @@ -261,8 +254,8 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL fcpfkernel) else { spin_unlock_irq(&pDevice->lock); if (param->u.wpa_key.key && - copy_from_user(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len)){ - spin_lock_irq(&pDevice->lock); + copy_from_user(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len)) { + spin_lock_irq(&pDevice->lock); return -EINVAL; } spin_lock_irq(&pDevice->lock); @@ -302,9 +295,8 @@ spin_lock_irq(&pDevice->lock); else { spin_unlock_irq(&pDevice->lock); if (param->u.wpa_key.seq && - copy_from_user(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len)){ - - spin_lock_irq(&pDevice->lock); + copy_from_user(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len)) { + spin_lock_irq(&pDevice->lock); return -EINVAL; } spin_lock_irq(&pDevice->lock); @@ -337,6 +329,7 @@ spin_lock_irq(&pDevice->lock); if (param->u.wpa_key.set_tx) dwKeyIndex |= (1 << 31); + if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) byKeyDecMode = KEY_CTL_CCMP; else if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) @@ -359,7 +352,6 @@ spin_lock_irq(&pDevice->lock); byKeyDecMode = KEY_CTL_WEP; } - // Check TKIP key length if ((byKeyDecMode == KEY_CTL_TKIP) && (param->u.wpa_key.key_len != MAX_KEY_LEN)) { |