Ejemplo n.º 1
0
/* The function is replica of wl_set in wlu_linux.c. Optimize when we have some
 * common code between wlu_linux.c and dhdu_linux.c
 */
int
wl_set(void *wl, int cmd, void *buf, int len)
{
	int error = BCME_OK;

	/* For RWL: When interfacing to a Windows client, need t add in OID_BASE */
	if ((rwl_os_type == WIN32_OS) && (remote_type != NO_REMOTE)) {
		error = (int)ioctl_setinformation_fe(wl, WL_OID_BASE + cmd, buf, &len);
	} else {
		error = (int)ioctl_setinformation_fe(wl, cmd, buf, &len);
	}

	if (error == SERIAL_PORT_ERR)
		return SERIAL_PORT_ERR;

	if (error != 0) {
		return IOCTL_ERROR;
	}
	return error;
}
Ejemplo n.º 2
0
int
wl_set(void *wl, int cmd, void *buf, int len)
{
	int error = BCME_OK;

	/* For RWL: When interfacing to a Windows client, need t add in OID_BASE */
	if (((rwl_os_type == WIN32_OS) || (rwl_os_type == WINVISTA_OS))	&&
	    (remote_type != NO_REMOTE))
		error = ioctl_setinformation_fe(wl, WL_OID_BASE + cmd, buf, &len);
	else
		error = ioctl_setinformation_fe(wl, cmd, buf, &len);

#if 0
	/* xxx what is this?? not a bcmerror! */
	if (error == SERIAL_PORT_ERR)
		return SERIAL_PORT_ERR;
	else if (error == BCME_NODEVICE)
		return BCME_NODEVICE;
	else if (error != 0)
		return IOCTL_ERROR;
#endif

	return error;
}
int
wl_set(void *wl, int cmd, void *buf, int len)
{
    int error = 0;
    unsigned long input_len = len;

    if ((rwl_os_type == WIN32_OS || rwl_os_type == WINVISTA_OS) && remote_type != NO_REMOTE)
        cmd += WL_OID_BASE;
    error = (int)ioctl_setinformation_fe(wl, cmd, buf, &input_len);

    if (error == SERIAL_PORT_ERR)
        return SERIAL_PORT_ERR;
    else if (error == BCME_NODEVICE)
        return BCME_NODEVICE;
    else if (error != 0)
        return IOCTL_ERROR;

    return 0;
}