diff options
Diffstat (limited to 'drivers/staging/vt6655/hostap.c')
-rw-r--r-- | drivers/staging/vt6655/hostap.c | 189 |
1 files changed, 91 insertions, 98 deletions
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index f105c2ac091b..ae0dade229d8 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -47,9 +47,6 @@ /*--------------------- Static Classes ----------------------------*/ -/*--------------------- Static Variables --------------------------*/ -static int msglevel = MSG_LEVEL_INFO; - /*--------------------- Static Functions --------------------------*/ /*--------------------- Export Variables --------------------------*/ @@ -68,16 +65,16 @@ static int msglevel = MSG_LEVEL_INFO; * */ -static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) +static int hostap_enable_hostapd(struct vnt_private *pDevice, int rtnl_locked) { - PSDevice apdev_priv; + struct vnt_private *apdev_priv; struct net_device *dev = pDevice->dev; int ret; const struct net_device_ops apdev_netdev_ops = { .ndo_start_xmit = pDevice->tx_80211, }; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name); + pr_debug("%s: Enabling hostapd mode\n", dev->name); pDevice->apdev = alloc_etherdev(sizeof(*apdev_priv)); if (pDevice->apdev == NULL) @@ -101,15 +98,15 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) else ret = register_netdev(pDevice->apdev); if (ret) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: register_netdevice(AP) failed!\n", - dev->name); + pr_debug("%s: register_netdevice(AP) failed!\n", + dev->name); free_netdev(pDevice->apdev); pDevice->apdev = NULL; return -1; } - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Registered netdevice %s for AP management\n", - dev->name, pDevice->apdev->name); + pr_debug("%s: Registered netdevice %s for AP management\n", + dev->name, pDevice->apdev->name); KeyvInitTable(&pDevice->sKey, pDevice->PortOffset); @@ -130,17 +127,17 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) * */ -static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked) +static int hostap_disable_hostapd(struct vnt_private *pDevice, int rtnl_locked) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: disabling hostapd mode\n", pDevice->dev->name); + pr_debug("%s: disabling hostapd mode\n", pDevice->dev->name); if (pDevice->apdev && pDevice->apdev->name && pDevice->apdev->name[0]) { if (rtnl_locked) unregister_netdevice(pDevice->apdev); else unregister_netdev(pDevice->apdev); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", - pDevice->dev->name, pDevice->apdev->name); + pr_debug("%s: Netdevice %s unregistered\n", + pDevice->dev->name, pDevice->apdev->name); } if (pDevice->apdev) free_netdev(pDevice->apdev); @@ -149,8 +146,8 @@ static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked) pDevice->bEnableHostWEP = false; pDevice->bEncryptionEnable = false; -//4.2007-0118-03,<Add> by EinsnLiu -//execute some clear work +/* 4.2007-0118-03,<Add> by EinsnLiu */ +/* execute some clear work */ pDevice->pMgmt->byCSSPK = KEY_CTL_NONE; pDevice->pMgmt->byCSSGK = KEY_CTL_NONE; KeyvInitTable(&pDevice->sKey, pDevice->PortOffset); @@ -172,7 +169,8 @@ static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked) * */ -int vt6655_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked) +int vt6655_hostap_set_hostapd(struct vnt_private *pDevice, + int val, int rtnl_locked) { if (val < 0 || val > 1) return -EINVAL; @@ -201,7 +199,7 @@ int vt6655_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked) * Return Value: * */ -static int hostap_remove_sta(PSDevice pDevice, +static int hostap_remove_sta(struct vnt_private *pDevice, struct viawget_hostapd_param *param) { unsigned int uNodeIndex; @@ -227,28 +225,28 @@ static int hostap_remove_sta(PSDevice pDevice, * Return Value: * */ -static int hostap_add_sta(PSDevice pDevice, +static int hostap_add_sta(struct vnt_private *pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = pDevice->pMgmt; unsigned int uNodeIndex; if (!BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &uNodeIndex)) - BSSvCreateOneNode((PSDevice)pDevice, &uNodeIndex); + BSSvCreateOneNode(pDevice, &uNodeIndex); memcpy(pMgmt->sNodeDBTable[uNodeIndex].abyMACAddr, param->sta_addr, WLAN_ADDR_LEN); pMgmt->sNodeDBTable[uNodeIndex].eNodeState = NODE_ASSOC; pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = param->u.add_sta.capability; -// TODO listenInterval +/* TODO listenInterval */ pMgmt->sNodeDBTable[uNodeIndex].bPSEnable = false; pMgmt->sNodeDBTable[uNodeIndex].bySuppRate = param->u.add_sta.tx_supp_rates; - // set max tx rate + /* set max tx rate */ pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate = pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate; - // set max basic rate + /* set max basic rate */ pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate = RATE_2M; - // Todo: check sta preamble, if ap can't support, set status code + /* Todo: check sta preamble, if ap can't support, set status code */ pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble = WLAN_GET_CAP_INFO_SHORTPREAMBLE(pMgmt->sNodeDBTable[uNodeIndex].wCapInfo); @@ -256,17 +254,10 @@ static int hostap_add_sta(PSDevice pDevice, pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = jiffies; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Add STA AID= %d\n", pMgmt->sNodeDBTable[uNodeIndex].wAID); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n", - param->sta_addr[0], - param->sta_addr[1], - param->sta_addr[2], - param->sta_addr[3], - param->sta_addr[4], - param->sta_addr[5] - ); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Max Support rate = %d\n", - pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate); + pr_debug("Add STA AID= %d\n", pMgmt->sNodeDBTable[uNodeIndex].wAID); + pr_debug("MAC=%pM\n", param->sta_addr); + pr_debug("Max Support rate = %d\n", + pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate); return 0; } @@ -285,7 +276,7 @@ static int hostap_add_sta(PSDevice pDevice, * */ -static int hostap_get_info_sta(PSDevice pDevice, +static int hostap_get_info_sta(struct vnt_private *pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = pDevice->pMgmt; @@ -314,7 +305,7 @@ static int hostap_get_info_sta(PSDevice pDevice, * Return Value: * */ -static int hostap_set_flags_sta(PSDevice pDevice, +static int hostap_set_flags_sta(struct vnt_private *pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = pDevice->pMgmt; @@ -323,8 +314,8 @@ static int hostap_set_flags_sta(PSDevice pDevice, if (BSSDBbIsSTAInNodeDB(pMgmt, 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", - (unsigned int)pMgmt->sNodeDBTable[uNodeIndex].dwFlags); + pr_debug(" dwFlags = %x\n", + (unsigned int)pMgmt->sNodeDBTable[uNodeIndex].dwFlags); } else { return -ENOENT; } @@ -345,11 +336,14 @@ static int hostap_set_flags_sta(PSDevice pDevice, * Return Value: * */ -static int hostap_set_generic_element(PSDevice pDevice, +static int hostap_set_generic_element(struct vnt_private *pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = pDevice->pMgmt; + if (param->u.generic_elem.len > sizeof(pMgmt->abyWPAIE)) + return -EINVAL; + memcpy(pMgmt->abyWPAIE, param->u.generic_elem.data, param->u.generic_elem.len @@ -357,18 +351,18 @@ static int hostap_set_generic_element(PSDevice pDevice, pMgmt->wWPAIELen = param->u.generic_elem.len; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->wWPAIELen = %d\n", pMgmt->wWPAIELen); + pr_debug("pMgmt->wWPAIELen = %d\n", pMgmt->wWPAIELen); - // disable wpa + /* disable wpa */ if (pMgmt->wWPAIELen == 0) { pMgmt->eAuthenMode = WMAC_AUTH_OPEN; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " No WPAIE, Disable WPA\n"); + pr_debug(" No WPAIE, Disable WPA\n"); } else { - // enable wpa + /* enable wpa */ if ((pMgmt->abyWPAIE[0] == WLAN_EID_RSN_WPA) || (pMgmt->abyWPAIE[0] == WLAN_EID_RSN)) { pMgmt->eAuthenMode = WMAC_AUTH_WPANONE; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set WPAIE enable WPA\n"); + pr_debug("Set WPAIE enable WPA\n"); } else return -EINVAL; } @@ -389,9 +383,9 @@ static int hostap_set_generic_element(PSDevice pDevice, * */ -static void hostap_flush_sta(PSDevice pDevice) +static void hostap_flush_sta(struct vnt_private *pDevice) { - // reserved node index =0 for multicast node. + /* reserved node index =0 for multicast node. */ BSSvClearNodeDBTable(pDevice, 1); pDevice->uAssocCount = 0; } @@ -409,7 +403,7 @@ static void hostap_flush_sta(PSDevice pDevice) * Return Value: * */ -static int hostap_set_encryption(PSDevice pDevice, +static int hostap_set_encryption(struct vnt_private *pDevice, struct viawget_hostapd_param *param, int param_len) { @@ -417,7 +411,7 @@ static int hostap_set_encryption(PSDevice pDevice, unsigned long dwKeyIndex = 0; unsigned char abyKey[MAX_KEY_LEN]; unsigned char abySeq[MAX_KEY_LEN]; - unsigned long long KeyRSC; + u64 KeyRSC; unsigned char byKeyDecMode = KEY_CTL_WEP; int iNodeIndex = -1; int ii; @@ -431,7 +425,7 @@ static int hostap_set_encryption(PSDevice pDevice, if ((param->u.crypt.idx > 3) || (param->u.crypt.key_len > MAX_KEY_LEN)) { param->u.crypt.err = HOSTAP_CRYPT_ERR_KEY_SET_FAILED; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " HOSTAP_CRYPT_ERR_KEY_SET_FAILED\n"); + pr_debug(" HOSTAP_CRYPT_ERR_KEY_SET_FAILED\n"); return -EINVAL; } @@ -443,12 +437,12 @@ static int hostap_set_encryption(PSDevice pDevice, } else { if (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &iNodeIndex) == false) { param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ADDR; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " HOSTAP_CRYPT_ERR_UNKNOWN_ADDR\n"); + pr_debug(" HOSTAP_CRYPT_ERR_UNKNOWN_ADDR\n"); return -EINVAL; } } - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " hostap_set_encryption: sta_index %d\n", iNodeIndex); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " hostap_set_encryption: alg %d\n", param->u.crypt.alg); + pr_debug(" hostap_set_encryption: sta_index %d\n", iNodeIndex); + pr_debug(" hostap_set_encryption: alg %d\n", param->u.crypt.alg); if (param->u.crypt.alg == WPA_ALG_NONE) { if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly) { @@ -456,7 +450,7 @@ static int hostap_set_encryption(PSDevice pDevice, param->sta_addr, pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex, pDevice->PortOffset)) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "KeybRemoveKey fail\n"); + pr_debug("KeybRemoveKey fail\n"); } pMgmt->sNodeDBTable[iNodeIndex].bOnFly = false; } @@ -476,7 +470,7 @@ static int hostap_set_encryption(PSDevice pDevice, } memcpy(abyKey, param->u.crypt.key, param->u.crypt.key_len); - // copy to node key tbl + /* copy to node key tbl */ pMgmt->sNodeDBTable[iNodeIndex].byKeyIndex = param->u.crypt.idx; pMgmt->sNodeDBTable[iNodeIndex].uWepKeyLength = param->u.crypt.key_len; memcpy(&pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[0], @@ -503,13 +497,13 @@ static int hostap_set_encryption(PSDevice pDevice, pDevice->byLocalID); } else { - // 8021x enable, individual key - dwKeyIndex |= (1 << 30); // set pairwise key + /* 8021x enable, individual key */ + dwKeyIndex |= (1 << 30); /* set pairwise key */ if (KeybSetKey(&(pDevice->sKey), ¶m->sta_addr[0], dwKeyIndex & ~(USE_KEYRSC), param->u.crypt.key_len, - (PQWORD) &(KeyRSC), + (u64 *) &KeyRSC, (unsigned char *)abyKey, KEY_CTL_WEP, pDevice->PortOffset, @@ -517,7 +511,7 @@ static int hostap_set_encryption(PSDevice pDevice, pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true; } else { - // Key Table Full + /* Key Table Full */ pMgmt->sNodeDBTable[iNodeIndex].bOnFly = false; bKeyTableFull = true; } @@ -534,7 +528,7 @@ static int hostap_set_encryption(PSDevice pDevice, if (param->u.crypt.seq) { memcpy(&abySeq, param->u.crypt.seq, 8); for (ii = 0; ii < 8; ii++) - KeyRSC |= (unsigned long)abySeq[ii] << (ii * 8); + KeyRSC |= (u64)abySeq[ii] << (ii * 8); dwKeyIndex |= 1 << 29; pMgmt->sNodeDBTable[iNodeIndex].KeyRSC = KeyRSC; @@ -563,7 +557,7 @@ static int hostap_set_encryption(PSDevice pDevice, KeybSetDefaultKey(&(pDevice->sKey), dwKeyIndex, param->u.crypt.key_len, - (PQWORD) &(KeyRSC), + (u64 *) &KeyRSC, abyKey, byKeyDecMode, pDevice->PortOffset, @@ -571,12 +565,12 @@ static int hostap_set_encryption(PSDevice pDevice, pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true; } else { - dwKeyIndex |= (1 << 30); // set pairwise key + dwKeyIndex |= (1 << 30); /* set pairwise key */ if (KeybSetKey(&(pDevice->sKey), ¶m->sta_addr[0], dwKeyIndex, param->u.crypt.key_len, - (PQWORD) &(KeyRSC), + (u64 *) &KeyRSC, (unsigned char *)abyKey, byKeyDecMode, pDevice->PortOffset, @@ -584,35 +578,34 @@ static int hostap_set_encryption(PSDevice pDevice, pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true; } else { - // Key Table Full + /* Key Table Full */ pMgmt->sNodeDBTable[iNodeIndex].bOnFly = false; bKeyTableFull = true; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Key Table Full\n"); + pr_debug(" Key Table Full\n"); } } if (bKeyTableFull) { - wKeyCtl &= 0x7F00; // clear all key control filed + wKeyCtl &= 0x7F00; /* clear all key control filed */ wKeyCtl |= (byKeyDecMode << 4); wKeyCtl |= (byKeyDecMode); - wKeyCtl |= 0x0044; // use group key for all address - wKeyCtl |= 0x4000; // disable KeyTable[MAX_KEY_TABLE-1] on-fly to genernate rx int + wKeyCtl |= 0x0044; /* use group key for all address */ + wKeyCtl |= 0x4000; /* disable KeyTable[MAX_KEY_TABLE-1] on-fly to genernate rx int */ MACvSetDefaultKeyCtl(pDevice->PortOffset, wKeyCtl, MAX_KEY_TABLE-1, pDevice->byLocalID); } - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Set key sta_index= %d\n", iNodeIndex); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " tx_index=%d len=%d\n", param->u.crypt.idx, - param->u.crypt.key_len); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " key=%x-%x-%x-%x-%x-xxxxx\n", - pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[0], - pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[1], - pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[2], - pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[3], - pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[4] -); - - // set wep key + pr_debug(" Set key sta_index= %d\n", iNodeIndex); + pr_debug(" tx_index=%d len=%d\n", + param->u.crypt.idx, param->u.crypt.key_len); + pr_debug(" key=%x-%x-%x-%x-%x-xxxxx\n", + pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[0], + pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[1], + pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[2], + pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[3], + pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[4]); + + /* set wep key */ pDevice->bEncryptionEnable = true; pMgmt->sNodeDBTable[iNodeIndex].byCipherSuite = byKeyDecMode; pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex = dwKeyIndex; @@ -635,7 +628,7 @@ static int hostap_set_encryption(PSDevice pDevice, * Return Value: * */ -static int hostap_get_encryption(PSDevice pDevice, +static int hostap_get_encryption(struct vnt_private *pDevice, struct viawget_hostapd_param *param, int param_len) { @@ -650,11 +643,11 @@ static int hostap_get_encryption(PSDevice pDevice, } else { if (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &iNodeIndex) == false) { param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ADDR; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_get_encryption: HOSTAP_CRYPT_ERR_UNKNOWN_ADDR\n"); + pr_debug("hostap_get_encryption: HOSTAP_CRYPT_ERR_UNKNOWN_ADDR\n"); return -EINVAL; } } - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_get_encryption: %d\n", iNodeIndex); + pr_debug("hostap_get_encryption: %d\n", iNodeIndex); memset(param->u.crypt.seq, 0, 8); for (ii = 0; ii < 8; ii++) param->u.crypt.seq[ii] = (unsigned char)pMgmt->sNodeDBTable[iNodeIndex].KeyRSC >> (ii * 8); @@ -675,7 +668,7 @@ static int hostap_get_encryption(PSDevice pDevice, * Return Value: * */ -int vt6655_hostap_ioctl(PSDevice pDevice, struct iw_point *p) +int vt6655_hostap_ioctl(struct vnt_private *pDevice, struct iw_point *p) { struct viawget_hostapd_param *param; int ret = 0; @@ -696,67 +689,67 @@ int vt6655_hostap_ioctl(PSDevice pDevice, struct iw_point *p) switch (param->cmd) { case VIAWGET_HOSTAPD_SET_ENCRYPTION: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_ENCRYPTION\n"); + pr_debug("VIAWGET_HOSTAPD_SET_ENCRYPTION\n"); spin_lock_irq(&pDevice->lock); ret = hostap_set_encryption(pDevice, param, p->length); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_HOSTAPD_GET_ENCRYPTION: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_GET_ENCRYPTION\n"); + pr_debug("VIAWGET_HOSTAPD_GET_ENCRYPTION\n"); spin_lock_irq(&pDevice->lock); ret = hostap_get_encryption(pDevice, param, p->length); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_HOSTAPD_SET_ASSOC_AP_ADDR: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_ASSOC_AP_ADDR\n"); + pr_debug("VIAWGET_HOSTAPD_SET_ASSOC_AP_ADDR\n"); ret = -EOPNOTSUPP; goto out; case VIAWGET_HOSTAPD_FLUSH: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_FLUSH\n"); + pr_debug("VIAWGET_HOSTAPD_FLUSH\n"); spin_lock_irq(&pDevice->lock); hostap_flush_sta(pDevice); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_HOSTAPD_ADD_STA: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_ADD_STA\n"); + pr_debug("VIAWGET_HOSTAPD_ADD_STA\n"); spin_lock_irq(&pDevice->lock); ret = hostap_add_sta(pDevice, param); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_HOSTAPD_REMOVE_STA: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_REMOVE_STA\n"); + pr_debug("VIAWGET_HOSTAPD_REMOVE_STA\n"); spin_lock_irq(&pDevice->lock); ret = hostap_remove_sta(pDevice, param); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_HOSTAPD_GET_INFO_STA: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_GET_INFO_STA\n"); + pr_debug("VIAWGET_HOSTAPD_GET_INFO_STA\n"); ret = hostap_get_info_sta(pDevice, param); ap_ioctl = 1; break; case VIAWGET_HOSTAPD_SET_FLAGS_STA: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_FLAGS_STA\n"); + pr_debug("VIAWGET_HOSTAPD_SET_FLAGS_STA\n"); ret = hostap_set_flags_sta(pDevice, param); break; case VIAWGET_HOSTAPD_MLME: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_MLME\n"); + pr_debug("VIAWGET_HOSTAPD_MLME\n"); ret = -EOPNOTSUPP; goto out; case VIAWGET_HOSTAPD_SET_GENERIC_ELEMENT: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_GENERIC_ELEMENT\n"); + pr_debug("VIAWGET_HOSTAPD_SET_GENERIC_ELEMENT\n"); ret = hostap_set_generic_element(pDevice, param); break; case VIAWGET_HOSTAPD_SCAN_REQ: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SCAN_REQ\n"); + pr_debug("VIAWGET_HOSTAPD_SCAN_REQ\n"); ret = -EOPNOTSUPP; goto out; case VIAWGET_HOSTAPD_STA_CLEAR_STATS: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_STA_CLEAR_STATS\n"); + pr_debug("VIAWGET_HOSTAPD_STA_CLEAR_STATS\n"); ret = -EOPNOTSUPP; goto out; default: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "vt6655_hostap_ioctl: unknown cmd=%d\n", - (int)param->cmd); + pr_debug("vt6655_hostap_ioctl: unknown cmd=%d\n", + (int)param->cmd); ret = -EOPNOTSUPP; goto out; } |