linux-kernel-test/drivers/net/wimax/i2400m
Inaky Perez-Gonzalez c2315b4ea9 wimax/i2400m: clarify and fix i2400m->{ready,updown}
The i2400m driver uses two different bits to distinguish how much the
driver is up. i2400m->ready is used to denote that the infrastructure
to communicate with the device is up and running. i2400m->updown is
used to indicate if 'ready' and the device is up and running, ready to
take control and data traffic.

However, all this was pretty dirty and not clear, with many open spots
where race conditions were present.

This commit cleans up the situation by:

 - documenting the usage of both bits

 - setting them only in specific, well controlled places
   (i2400m_dev_start, i2400m_dev_stop)

 - ensuring the i2400m workqueue can't get in the middle of the
   setting by flushing it when i2400m->ready is set to zero. This
   allows the report hook not having to check again for the bit to be
   set [rx.c:i2400m_report_hook_work()].

 - using i2400m->updown to determine if the device is up and running
   instead of the wimax state in i2400m_dev_reset_handle().

 - not loosing missed messages sent by the hardware before
   i2400m->ready is set. In rx.c, whatever the device sends can be
   sent to user space over the message pipes as soon as the wimax
   device is registered, so don't wait for i2400m->ready to be set.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-10-19 15:56:07 +09:00
..
control.c i2400m: keep index within ms_to_errno[] 2009-10-19 15:55:35 +09:00
debug-levels.h wimax/i2400m: allow control of the base-station idle mode timeout 2009-03-02 03:10:25 -08:00
debugfs.c wimax: fix build issue when debugfs is disabled 2009-01-29 17:18:31 -08:00
driver.c wimax/i2400m: clarify and fix i2400m->{ready,updown} 2009-10-19 15:56:07 +09:00
fw.c wimax/i2400m: don't overwrite error codes when failing to load firmware 2009-10-19 15:56:04 +09:00
i2400m-sdio.h wimax/iwmc3200: increase wait time before enable retry 2009-10-19 15:55:43 +09:00
i2400m-usb.h wimax/i6x50: add Intel WiFi/WiMAX Link 6050 Series support 2009-10-19 15:55:59 +09:00
i2400m.h wimax/i2400m: clarify and fix i2400m->{ready,updown} 2009-10-19 15:56:07 +09:00
Kconfig i2400m: Makefile and Kconfig 2009-01-07 10:00:22 -08:00
Makefile wimax/i2400m: allow control of the base-station idle mode timeout 2009-03-02 03:10:25 -08:00
netdev.c wimax/i2400m: cleanup initialization/destruction flow 2009-10-19 15:56:06 +09:00
op-rfkill.c wimax: fix gcc warnings in sh4 when calling BUG() 2009-06-11 11:47:39 -07:00
rx.c wimax/i2400m: clarify and fix i2400m->{ready,updown} 2009-10-19 15:56:07 +09:00
sdio-debug-levels.h i2400m/SDIO: header for the SDIO subdriver 2009-01-07 10:00:22 -08:00
sdio-fw.c wimax/i2400m: be smarter about copying command buffer to bm_cmd_buf 2009-10-19 15:55:46 +09:00
sdio-rx.c wimax/i2400m: add reason argument to i2400m_dev_reset_handle() 2009-10-19 15:56:01 +09:00
sdio-tx.c i2400m/SDIO: TX and RX path backends 2009-01-07 10:00:22 -08:00
sdio.c wimax/iwmc3200: add new sdio device ID to support iwmc3200 2.5GHz sku 2009-10-19 15:55:59 +09:00
sysfs.c wimax/i2400m: allow control of the base-station idle mode timeout 2009-03-02 03:10:25 -08:00
tx.c wimax: misplaced parenthesis 2009-10-19 15:55:36 +09:00
usb-debug-levels.h i2400m/USB: header for the USB bus driver 2009-01-07 10:00:21 -08:00
usb-fw.c wimax/i2400m: workaround not-so-working %zd printf format 2009-10-19 15:55:51 +09:00
usb-notif.c wimax/i2400m: add reason argument to i2400m_dev_reset_handle() 2009-10-19 15:56:01 +09:00
usb-rx.c wimax/i2400m: USB driver uses a configurable endpoint map 2009-10-19 15:55:44 +09:00
usb-tx.c wimax/i2400m: USB driver uses a configurable endpoint map 2009-10-19 15:55:44 +09:00
usb.c wimax/i2400m: clarify and fix i2400m->{ready,updown} 2009-10-19 15:56:07 +09:00