aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/i2400m.h
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-09-16 20:53:57 -0400
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 02:56:06 -0400
commit8f90f3ee83dc54e182d6a7548727cbae4b523e6e (patch)
tree8a81fd0076562a5c6e30a652c63fa25343783dc6 /drivers/net/wimax/i2400m/i2400m.h
parentac53aed9349242095a780f57ac0c995fb170c950 (diff)
wimax/i2400m: cleanup initialization/destruction flow
Currently the i2400m driver was starting in a weird way: registering a network device, setting the device up and then registering a WiMAX device. This is an historic artifact, and was causing issues, a some early reports the device sends were getting lost by issue of the wimax_dev not being registered. Fix said situation by doing the wimax device registration in i2400m_setup() after network device registration and before starting thed device. As well, removed spurious setting of the state to UNINITIALIZED; i2400m.dev_start() does that already. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/i2400m.h')
-rw-r--r--drivers/net/wimax/i2400m/i2400m.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/drivers/net/wimax/i2400m/i2400m.h b/drivers/net/wimax/i2400m/i2400m.h
index 303eb78bce32..2b9c400810b5 100644
--- a/drivers/net/wimax/i2400m/i2400m.h
+++ b/drivers/net/wimax/i2400m/i2400m.h
@@ -117,16 +117,28 @@
117 * well as i2400m->wimax_dev.net_dev and call i2400m_setup(). The 117 * well as i2400m->wimax_dev.net_dev and call i2400m_setup(). The
118 * i2400m driver will only register with the WiMAX and network stacks; 118 * i2400m driver will only register with the WiMAX and network stacks;
119 * the only access done to the device is to read the MAC address so we 119 * the only access done to the device is to read the MAC address so we
120 * can register a network device. This calls i2400m_dev_start() to 120 * can register a network device.
121 * load firmware, setup communication with the device and configure it
122 * for operation.
123 * 121 *
124 * At this point, control and data communications are possible. 122 * The high-level call flow is:
123 *
124 * bus_probe()
125 * i2400m_setup()
126 * boot rom initialization / read mac addr
127 * network / WiMAX stacks registration
128 * i2400m_dev_start()
129 * i2400m->bus_dev_start()
130 * i2400m_dev_initialize()
131 *
132 * The reverse applies for a disconnect() call:
125 * 133 *
126 * On disconnect/driver unload, the bus-specific disconnect function 134 * bus_disconnect()
127 * calls i2400m_release() to undo i2400m_setup(). i2400m_dev_stop() 135 * i2400m_release()
128 * shuts the firmware down and releases resources uses to communicate 136 * i2400m_dev_stop()
129 * with the device. 137 * i2400m_dev_shutdown()
138 * i2400m->bus_dev_stop()
139 * network / WiMAX stack unregistration
140 *
141 * At this point, control and data communications are possible.
130 * 142 *
131 * While the device is up, it might reset. The bus-specific driver has 143 * While the device is up, it might reset. The bus-specific driver has
132 * to catch that situation and call i2400m_dev_reset_handle() to deal 144 * to catch that situation and call i2400m_dev_reset_handle() to deal
@@ -706,7 +718,7 @@ static inline int i2400m_debugfs_add(struct i2400m *i2400m)
706static inline void i2400m_debugfs_rm(struct i2400m *i2400m) {} 718static inline void i2400m_debugfs_rm(struct i2400m *i2400m) {}
707#endif 719#endif
708 720
709/* Called by _dev_start()/_dev_stop() to initialize the device itself */ 721/* Initialize/shutdown the device */
710extern int i2400m_dev_initialize(struct i2400m *); 722extern int i2400m_dev_initialize(struct i2400m *);
711extern void i2400m_dev_shutdown(struct i2400m *); 723extern void i2400m_dev_shutdown(struct i2400m *);
712 724