/*--------------------- Static Functions --------------------------*/
-
-
-
/*--------------------- Export Variables --------------------------*/
-
/*
* Description:
* register net_device (AP) for hostap deamon
static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked)
{
-
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: disabling hostapd mode\n", pDevice->dev->name);
if (pDevice->apdev && pDevice->apdev->name && pDevice->apdev->name[0]) {
return 0;
}
-
/*
* Description:
* Set enable/disable hostapd mode
return hostap_disable_hostapd(pDevice, rtnl_locked);
}
-
/*
* Description:
* remove station function supported for hostap deamon
{
unsigned int uNodeIndex;
-
if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, param->sta_addr, &uNodeIndex)) {
BSSvRemoveOneNode(pDevice, uNodeIndex);
} else {
PSMgmtObject pMgmt = pDevice->pMgmt;
unsigned int uNodeIndex;
-
if (!BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &uNodeIndex)) {
BSSvCreateOneNode((PSDevice)pDevice, &uNodeIndex);
}
return 0;
}
-
-
/*
* Description:
* set generic element (wpa ie)
{
PSMgmtObject pMgmt = pDevice->pMgmt;
-
-
memcpy(pMgmt->abyWPAIE,
param->u.generic_elem.data,
param->u.generic_elem.len
bool bKeyTableFull = false;
unsigned short wKeyCtl = 0;
-
param->u.crypt.err = 0;
/*
if (param_len !=
if (param->u.crypt.alg > WPA_ALG_CCMP)
return -EINVAL;
-
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");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " hostap_set_encryption: alg %d \n", param->u.crypt.alg);
if (param->u.crypt.alg == WPA_ALG_NONE) {
-
if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == true) {
if (KeybRemoveKey(&(pDevice->sKey),
param->sta_addr,
}
if (param->u.crypt.alg == WPA_ALG_WEP) {
-
if ((pDevice->bEnable8021x == false) || (iNodeIndex == 0)) {
KeybSetDefaultKey(&(pDevice->sKey),
dwKeyIndex & ~(BIT30 | USE_KEYRSC),
KEY_CTL_WEP,
pDevice->PortOffset,
pDevice->byLocalID) == true) {
-
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;
} else {
pMgmt->byCSSGK = KEY_CTL_CCMP;
}
-
if (iNodeIndex == 0) {
KeybSetDefaultKey(&(pDevice->sKey),
dwKeyIndex,
byKeyDecMode,
pDevice->PortOffset,
pDevice->byLocalID) == true) {
-
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;
} else {
return ret;
}
-
-
/*
* Description:
* get each stations encryption key
int ii;
int iNodeIndex = 0;
-
param->u.crypt.err = 0;
if (is_broadcast_ether_addr(param->sta_addr)) {
return ret;
}
-
/*
* Description:
* vt6655_hostap_ioctl main function supported for hostap deamon.
break;
}
-
if ((ret == 0) && ap_ioctl) {
if (copy_to_user(p->pointer, param, p->length)) {
ret = -EFAULT;
return ret;
}
-