diff options
Diffstat (limited to 'drivers/staging/vt6656/hostap.c')
-rw-r--r-- | drivers/staging/vt6656/hostap.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c index 1078d616c497..f70e922a615b 100644 --- a/drivers/staging/vt6656/hostap.c +++ b/drivers/staging/vt6656/hostap.c @@ -91,10 +91,9 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name); - pDevice->apdev = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL); + pDevice->apdev = kzalloc(sizeof(struct net_device), GFP_KERNEL); if (pDevice->apdev == NULL) return -ENOMEM; - memset(pDevice->apdev, 0, sizeof(struct net_device)); apdev_priv = netdev_priv(pDevice->apdev); *apdev_priv = *pDevice; @@ -178,7 +177,7 @@ static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked) * */ -int hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked) +int vt6656_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked) { if (val < 0 || val > 1) return -EINVAL; @@ -211,7 +210,7 @@ int hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked) static int hostap_remove_sta(PSDevice pDevice, struct viawget_hostapd_param *param) { - UINT uNodeIndex; + unsigned int uNodeIndex; if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { @@ -240,7 +239,7 @@ static int hostap_add_sta(PSDevice pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT uNodeIndex; + unsigned int uNodeIndex; if (!BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { @@ -300,7 +299,7 @@ static int hostap_get_info_sta(PSDevice pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT uNodeIndex; + unsigned int uNodeIndex; if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { param->u.get_info_sta.inactive_sec = @@ -334,7 +333,7 @@ static int hostap_reset_txexc_sta(PSDevice pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT uNodeIndex; + unsigned int uNodeIndex; if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts = 0; @@ -364,13 +363,13 @@ static int hostap_set_flags_sta(PSDevice pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT uNodeIndex; + unsigned int uNodeIndex; if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { pMgmt->sNodeDBTable[uNodeIndex].dwFlags |= param->u.set_flags_sta.flags_or; pMgmt->sNodeDBTable[uNodeIndex].dwFlags &= param->u.set_flags_sta.flags_and; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x \n", - (UINT)pMgmt->sNodeDBTable[uNodeIndex].dwFlags); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x\n", + (unsigned int) pMgmt->sNodeDBTable[uNodeIndex].dwFlags); } else { return -ENOENT; @@ -744,7 +743,7 @@ static int hostap_get_encryption(PSDevice pDevice, /* * Description: - * hostap_ioctl main function supported for hostap deamon. + * vt6656_hostap_ioctl main function supported for hostap deamon. * * Parameters: * In: @@ -756,7 +755,7 @@ static int hostap_get_encryption(PSDevice pDevice, * */ -int hostap_ioctl(PSDevice pDevice, struct iw_point *p) +int vt6656_hostap_ioctl(PSDevice pDevice, struct iw_point *p) { struct viawget_hostapd_param *param; int ret = 0; @@ -766,7 +765,7 @@ int hostap_ioctl(PSDevice pDevice, struct iw_point *p) p->length > VIAWGET_HOSTAPD_MAX_BUF_SIZE || !p->pointer) return -EINVAL; - param = (struct viawget_hostapd_param *) kmalloc((int)p->length, (int)GFP_KERNEL); + param = kmalloc((int)p->length, (int)GFP_KERNEL); if (param == NULL) return -ENOMEM; @@ -844,7 +843,7 @@ int hostap_ioctl(PSDevice pDevice, struct iw_point *p) return -EOPNOTSUPP; default: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_ioctl: unknown cmd=%d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "vt6656_hostap_ioctl: unknown cmd=%d\n", (int)param->cmd); return -EOPNOTSUPP; break; |