mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-29 18:36:14 +02:00
fix kernel version detection in switch driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2782 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b6ef8792f8
commit
4cc40687a3
@ -11,8 +11,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
obj-m := switch-core.o switch-adm.o switch-robo.o
|
obj-m := switch-core.o switch-adm.o switch-robo.o
|
||||||
export-objs := switch-core.o
|
|
||||||
|
|
||||||
ifeq ($(MAKING_MODULES),1)
|
ifeq ($(MAKING_MODULES),1)
|
||||||
|
export-objs := switch-core.o
|
||||||
|
|
||||||
-include $(TOPDIR)/Rules.make
|
-include $(TOPDIR)/Rules.make
|
||||||
endif
|
endif
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef __SWITCH_CORE_H
|
#ifndef __SWITCH_CORE_H
|
||||||
#define __SWITCH_CORE_H
|
#define __SWITCH_CORE_H
|
||||||
|
|
||||||
|
#include <linux/version.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#define SWITCH_MAX_BUFSZ 4096
|
#define SWITCH_MAX_BUFSZ 4096
|
||||||
|
|
||||||
@ -8,6 +9,14 @@
|
|||||||
#define SWITCH_MEDIA_100 2
|
#define SWITCH_MEDIA_100 2
|
||||||
#define SWITCH_MEDIA_FD 4
|
#define SWITCH_MEDIA_FD 4
|
||||||
|
|
||||||
|
#ifndef KERNEL_VERSION
|
||||||
|
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
|
||||||
|
#define LINUX_2_4
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef int (*switch_handler)(char *buf, int nr);
|
typedef int (*switch_handler)(char *buf, int nr);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user