14 |
#include <linux/version.h> |
#include <linux/version.h> |
15 |
#include "hermes.h" |
#include "hermes.h" |
16 |
|
|
|
/* Workqueue / task queue backwards compatibility stuff */ |
|
|
|
|
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41) |
|
|
#include <linux/workqueue.h> |
|
|
#else |
|
|
#include <linux/tqueue.h> |
|
|
#define work_struct tq_struct |
|
|
#define INIT_WORK INIT_TQUEUE |
|
|
#define schedule_work schedule_task |
|
|
#endif |
|
|
|
|
|
/* Interrupt handler backwards compatibility stuff */ |
|
|
#ifndef IRQ_NONE |
|
|
|
|
|
#define IRQ_NONE |
|
|
#define IRQ_HANDLED |
|
|
typedef void irqreturn_t; |
|
|
|
|
|
#endif |
|
|
|
|
17 |
/* To enable debug messages */ |
/* To enable debug messages */ |
18 |
//#define ORINOCO_DEBUG 3 |
//#define ORINOCO_DEBUG 3 |
19 |
|
|
30 |
char data[ORINOCO_MAX_KEY_SIZE]; |
char data[ORINOCO_MAX_KEY_SIZE]; |
31 |
} __attribute__ ((packed)); |
} __attribute__ ((packed)); |
32 |
|
|
|
#define ORINOCO_INTEN ( HERMES_EV_RX | HERMES_EV_ALLOC | HERMES_EV_TX | \ |
|
|
HERMES_EV_TXEXC | HERMES_EV_WTERR | HERMES_EV_INFO | \ |
|
|
HERMES_EV_INFDROP ) |
|
|
|
|
|
|
|
33 |
struct orinoco_private { |
struct orinoco_private { |
34 |
void *card; /* Pointer to card dependent structure */ |
void *card; /* Pointer to card dependent structure */ |
35 |
int (*hard_reset)(struct orinoco_private *); |
int (*hard_reset)(struct orinoco_private *); |
103 |
#define TRACE_ENTER(devname) DEBUG(2, "%s: -> %s()\n", devname, __FUNCTION__); |
#define TRACE_ENTER(devname) DEBUG(2, "%s: -> %s()\n", devname, __FUNCTION__); |
104 |
#define TRACE_EXIT(devname) DEBUG(2, "%s: <- %s()\n", devname, __FUNCTION__); |
#define TRACE_EXIT(devname) DEBUG(2, "%s: <- %s()\n", devname, __FUNCTION__); |
105 |
|
|
106 |
|
/********************************************************************/ |
107 |
|
/* Exported prototypes */ |
108 |
|
/********************************************************************/ |
109 |
|
|
110 |
extern struct net_device *alloc_orinocodev(int sizeof_card, |
extern struct net_device *alloc_orinocodev(int sizeof_card, |
111 |
int (*hard_reset)(struct orinoco_private *)); |
int (*hard_reset)(struct orinoco_private *)); |
112 |
extern int __orinoco_up(struct net_device *dev); |
extern int __orinoco_up(struct net_device *dev); |