diff options
author | Felix Fietkau <nbd@openwrt.org> | 2005-07-24 19:58:14 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2005-07-24 19:58:14 +0000 |
commit | 8304dfdacebbabb05cf8301c66c4002c543e8888 (patch) | |
tree | 056c21ee081ea7e79141723c2b6a0d083c49a348 /target/linux/package/nvram/src/wl.c | |
parent | f91aad926f9e0d34d806454a99f25bac63500b12 (diff) | |
download | upstream-8304dfdacebbabb05cf8301c66c4002c543e8888.tar.gz upstream-8304dfdacebbabb05cf8301c66c4002c543e8888.tar.bz2 upstream-8304dfdacebbabb05cf8301c66c4002c543e8888.zip |
move wificonf and nvram stuff back to package/, remove build_mipsel/root, run install part of package/ for every board/kernel - fixes dependency mess
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1540 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/package/nvram/src/wl.c')
-rw-r--r-- | target/linux/package/nvram/src/wl.c | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/target/linux/package/nvram/src/wl.c b/target/linux/package/nvram/src/wl.c deleted file mode 100644 index f09317ad06..0000000000 --- a/target/linux/package/nvram/src/wl.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Wireless network adapter utilities - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ -#include <string.h> - -#include <typedefs.h> -#include <wlutils.h> - -int -wl_probe(char *name) -{ - int ret, val; - - /* Check interface */ - if ((ret = wl_ioctl(name, WLC_GET_MAGIC, &val, sizeof(val)))) - return ret; - if (val != WLC_IOCTL_MAGIC) - return -1; - if ((ret = wl_ioctl(name, WLC_GET_VERSION, &val, sizeof(val)))) - return ret; - if (val > WLC_IOCTL_VERSION) - return -1; - - return ret; -} - -int -wl_set_val(char *name, char *var, void *val, int len) -{ - char buf[128]; - int buf_len; - - /* check for overflow */ - if ((buf_len = strlen(var)) + 1 + len > sizeof(buf)) - return -1; - - strcpy(buf, var); - buf_len += 1; - - /* append int value onto the end of the name string */ - memcpy(&buf[buf_len], val, len); - buf_len += len; - - return wl_ioctl(name, WLC_SET_VAR, buf, buf_len); -} - -int -wl_get_val(char *name, char *var, void *val, int len) -{ - char buf[128]; - int ret; - - /* check for overflow */ - if (strlen(var) + 1 > sizeof(buf) || len > sizeof(buf)) - return -1; - - strcpy(buf, var); - if ((ret = wl_ioctl(name, WLC_GET_VAR, buf, sizeof(buf)))) - return ret; - - memcpy(val, buf, len); - return 0; -} - -int -wl_set_int(char *name, char *var, int val) -{ - return wl_set_val(name, var, &val, sizeof(val)); -} - -int -wl_get_int(char *name, char *var, int *val) -{ - return wl_get_val(name, var, val, sizeof(*val)); -} - |