wimax/i2400m: queue device's report until the driver is ready for them
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Wed, 7 Oct 2009 12:43:10 +0000 (21:43 +0900)
committerInaky Perez-Gonzalez <inaky@linux.intel.com>
Mon, 19 Oct 2009 06:56:19 +0000 (15:56 +0900)
commita0beba21c3e2dff9a31739f1660ba3ff8c7150a7
treec38d559fd600274c4526f835c2b614a55df5d4c6
parentaf77dfa7811cd4e533003a9e7e9bf27dece96c6d
wimax/i2400m: queue device's report until the driver is ready for them

The i2400m might start sending reports to the driver before it is done
setting up all the infrastructure needed for handling them.

Currently we were just dropping them when the driver wasn't ready and
that is bad in certain situations, as the sync between the driver's
idea of the device's state and the device's state dissapears.

This changes that by implementing a queue for handling
reports. Incoming reports are appended to it and a workstruct is woken
to process the list of queued reports.

When the device is not yet ready to handle them, the workstruct is not
woken, but at soon as the device becomes ready again, the queue is
processed.

As a consequence of this, i2400m_queue_work() is no longer used, and
thus removed.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
drivers/net/wimax/i2400m/driver.c
drivers/net/wimax/i2400m/i2400m.h
drivers/net/wimax/i2400m/rx.c