Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236947
b: refs/heads/master
c: c5c6576
h: refs/heads/master
i:
  236945: c314791
  236943: 67c54f3
v: v3
  • Loading branch information
Helmut Schaa authored and John W. Linville committed Jan 31, 2011
1 parent cc7047a commit 8780d13
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d59c4e993427df37fb8bfc3470c298194a68e7a
refs/heads/master: c5c65761839e3d85cc620cc1c85db8d4a7173f53
13 changes: 13 additions & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2x00.h
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@ struct rt2x00lib_ops {
* TX status tasklet handler.
*/
void (*txstatus_tasklet) (unsigned long data);
void (*pretbtt_tasklet) (unsigned long data);
void (*tbtt_tasklet) (unsigned long data);
void (*rxdone_tasklet) (unsigned long data);
void (*autowake_tasklet) (unsigned long data);

/*
* Device init handlers.
Expand Down Expand Up @@ -905,6 +909,15 @@ struct rt2x00_dev {
* Tasklet for processing tx status reports (rt2800pci).
*/
struct tasklet_struct txstatus_tasklet;
struct tasklet_struct pretbtt_tasklet;
struct tasklet_struct tbtt_tasklet;
struct tasklet_struct rxdone_tasklet;
struct tasklet_struct autowake_tasklet;

/*
* Protect the interrupt mask register.
*/
spinlock_t irqmask_lock;
};

/*
Expand Down
21 changes: 21 additions & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2x00dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,26 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)

}

/*
* Initialize tasklets if used by the driver. Tasklets are
* disabled until the interrupts are turned on. The driver
* has to handle that.
*/
#define RT2X00_TASKLET_INIT(taskletname) \
if (rt2x00dev->ops->lib->taskletname) { \
tasklet_init(&rt2x00dev->taskletname, \
rt2x00dev->ops->lib->taskletname, \
(unsigned long)rt2x00dev); \
tasklet_disable(&rt2x00dev->taskletname); \
}

RT2X00_TASKLET_INIT(pretbtt_tasklet);
RT2X00_TASKLET_INIT(tbtt_tasklet);
RT2X00_TASKLET_INIT(rxdone_tasklet);
RT2X00_TASKLET_INIT(autowake_tasklet);

#undef RT2X00_TASKLET_INIT

/*
* Register HW.
*/
Expand Down Expand Up @@ -958,6 +978,7 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
{
int retval = -ENOMEM;

spin_lock_init(&rt2x00dev->irqmask_lock);
mutex_init(&rt2x00dev->csr_mutex);

set_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
Expand Down

0 comments on commit 8780d13

Please sign in to comment.