X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/ca920f8cceefb6092c6d003c811da4e102d9aa8c..4ac9ee9aa6e596e98a487ee3a3e5a3c2f10b5738:/openwrt/target/linux/package/switch/src/switch-core.c diff --git a/openwrt/target/linux/package/switch/src/switch-core.c b/openwrt/target/linux/package/switch/src/switch-core.c index 5d4693c28..6b59b9ba2 100644 --- a/openwrt/target/linux/package/switch/src/switch-core.c +++ b/openwrt/target/linux/package/switch/src/switch-core.c @@ -18,6 +18,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: $ + * + * Basic doc of driver's /proc interface: + * /proc/switch// + * registers: read-only + * counters: read-only + * reset: write causes hardware reset + * enable_vlan: "0", "1" + * port// + * enabled: "0", "1" + * media: "AUTO", "100FD", "100HD", "10FD", "10HD" + * vlan// + * ports: same syntax as for nvram's vlan*ports (eg. "1 2 3 4 5*") */ #include @@ -56,13 +68,6 @@ static struct file_operations switch_proc_fops = { write: switch_proc_write }; -static inline char *strdup(char *str) -{ - char *new = kmalloc(strlen(str) + 1, GFP_KERNEL); - strcpy(new, str); - return new; -} - static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos) { #ifdef LINUX_2_4