Exemplo n.º 1
0
/* This function is called by wl_get to execute either local dhd command
 * or send a dhd command over wl transport
 */
static int
ioctl_queryinformation_fe(void *wl, int cmd, void* input_buf, int *input_len)
{
	if (remote_type == NO_REMOTE) {
		return dhd_ioctl(wl, cmd, input_buf, *input_len, FALSE);
	} else {
		return rwl_queryinformation_fe(wl, cmd, input_buf,
			(unsigned long*)input_len, 0, RDHD_GET_IOCTL);
	}
}
Exemplo n.º 2
0
static int
ioctl_queryinformation_fe(void *wl, int cmd, void* input_buf, int *input_len)
{
	int error = BCME_OK;

	if (remote_type == NO_REMOTE)
		error = wl_ioctl(wl, cmd, input_buf, *input_len, FALSE);
	else if (rwl_queryinformation_fe(wl, cmd, input_buf,
	                                 (unsigned long *)input_len, 0, REMOTE_GET_IOCTL) < 0)
		error = BCME_ERROR;

	return error;
}
static int
ioctl_queryinformation_fe(void *wl, int cmd, void* input_buf, unsigned long *input_len)
{
    int error = NO_ERROR;

    if (remote_type == NO_REMOTE) {
        error = wl_ioctl(wl, cmd, input_buf, *input_len, FALSE);
    } else {
        error = rwl_queryinformation_fe(wl, cmd, input_buf,
                                        input_len, 0, REMOTE_GET_IOCTL);

    }
    return error;
}
Exemplo n.º 4
0
/* This function is called by wl_get to execute either local dhd command
 * or send a dhd command over wl transport
 */
static int
ioctl_queryinformation_fe(void *wl, int cmd, void* input_buf, int *input_len)
{
	if (remote_type == NO_REMOTE) {
		return dhd_ioctl(wl, cmd, input_buf, *input_len, FALSE);
	}
#ifdef RWL_ENABLE
	else {
		return rwl_queryinformation_fe(wl, cmd, input_buf,
			(unsigned long*)input_len, 0, RDHD_GET_IOCTL);
	}
#else /* RWL_ENABLE */
	return IOCTL_ERROR;
#endif /* RWL_ENABLE */
}
Exemplo n.º 5
0
int rwl_detect(void *wl, bool debug, int* os_type_ptr)
{
	int error, buf = UNKNOWN_OS;
	unsigned long len = sizeof(buf);

	error = rwl_queryinformation_fe(wl,
		NEGOTIATE_GET_OS, &buf, &len, debug, REMOTE_NEGOTIATE_CMD);
	if (!error) {
		if (buf > UNKNOWN_OS && buf < INVALID_OS) {
			*os_type_ptr = buf;
			if (debug)
				fprintf(stderr, "Autodetect: %d\n", *os_type_ptr);
			return 0;
		}
	}

	fprintf(stderr, "Autodetect failed, rwl server is either "
			"too old or unreachable. Use --nodetect to disable autodetect.\n");
	return FAIL;
}