aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-09-16 20:10:55 -0400
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 02:56:07 -0400
commitc2315b4ea9ac9c3f8caf03c3511d86fabe4a5fcd (patch)
tree17e2d15abfd26fa83f8a9654bf581f6d40fc8c33 /include/net
parent8f90f3ee83dc54e182d6a7548727cbae4b523e6e (diff)
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>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/wimax.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/wimax.h b/include/net/wimax.h
index 2af7bf839f23..d69c4a7a1267 100644
--- a/include/net/wimax.h
+++ b/include/net/wimax.h
@@ -195,6 +195,12 @@
195 * defining the `struct nla_policy` for each message, it has to have 195 * defining the `struct nla_policy` for each message, it has to have
196 * an array size of WIMAX_GNL_ATTR_MAX+1. 196 * an array size of WIMAX_GNL_ATTR_MAX+1.
197 * 197 *
198 * The op_*() function pointers will not be called if the wimax_dev is
199 * in a state <= %WIMAX_ST_UNINITIALIZED. The exception is:
200 *
201 * - op_reset: can be called at any time after wimax_dev_add() has
202 * been called.
203 *
198 * THE PIPE INTERFACE: 204 * THE PIPE INTERFACE:
199 * 205 *
200 * This interface is kept intentionally simple. The driver can send 206 * This interface is kept intentionally simple. The driver can send