diff options
Diffstat (limited to 'drivers/staging/vt6656/iwctl.c')
-rw-r--r-- | drivers/staging/vt6656/iwctl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index 3a68dfa..cf4c06a 100644 --- a/drivers/staging/vt6656/iwctl.c +++ b/drivers/staging/vt6656/iwctl.c @@ -41,6 +41,7 @@ #include "wpactl.h" #include "control.h" #include "rndis.h" +#include "baseband.h" static const long frequency_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484, @@ -57,7 +58,7 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev) struct vnt_private *pDevice = netdev_priv(dev); long ldBm; - pDevice->wstats.status = pDevice->eOPMode; + pDevice->wstats.status = pDevice->op_mode; RFvRSSITodBm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm); pDevice->wstats.qual.level = ldBm; pDevice->wstats.qual.noise = 0; @@ -724,10 +725,10 @@ int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info, if (!wrq->pointer) return -EINVAL; - sock = kzalloc(sizeof(struct sockaddr) * IW_MAX_AP, GFP_KERNEL); + sock = kcalloc(IW_MAX_AP, sizeof(struct sockaddr), GFP_KERNEL); if (sock == NULL) return -ENOMEM; - qual = kzalloc(sizeof(struct iw_quality) * IW_MAX_AP, GFP_KERNEL); + qual = kcalloc(IW_MAX_AP, sizeof(struct iw_quality), GFP_KERNEL); if (qual == NULL) { kfree(sock); return -ENOMEM; @@ -1394,7 +1395,8 @@ int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info, if (pMgmt == NULL) return -EFAULT; - if ((wrq->disabled = (mode == WMAC_POWER_CAM))) + wrq->disabled = (mode == WMAC_POWER_CAM); + if (wrq->disabled) return 0; if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) { |