aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/sdio.c
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 03:24:56 -0400
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-11-03 15:49:36 -0500
commitc931ceeb780560ff652a8f9875f88778439ee87e (patch)
treeca754722967ff1b9a4660ef38b0eae3d36f38a58 /drivers/net/wimax/i2400m/sdio.c
parent55a662d6468005ec3cd799fbd8d0ad03dfae6d2a (diff)
wimax/i2400m: introduce i2400m_reset(), stopping TX and carrier
Currently the i2400m driver was resetting by just calling i2400m->bus_reset(). However, this was missing stopping the TX queue and downing the carrier. This was causing, for the corner case of the driver reseting a device that refuses to go out of idle mode, that a few packets would be queued and more than one reset would go through, making the recovery a wee bit messy. To avoid introducing the same cleanup in all the bus-specific driver, introduced a i2400m_reset() function that takes care of house cleaning and then calling the bus-level reset implementation. The bulk of the changes in all files are just to rename the call from i2400m->bus_reset() to i2400m_reset(). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/sdio.c')
-rw-r--r--drivers/net/wimax/i2400m/sdio.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/wimax/i2400m/sdio.c b/drivers/net/wimax/i2400m/sdio.c
index ec178928914e..20ab22ec291b 100644
--- a/drivers/net/wimax/i2400m/sdio.c
+++ b/drivers/net/wimax/i2400m/sdio.c
@@ -43,7 +43,7 @@
43 * i2400m_release() 43 * i2400m_release()
44 * free_netdev(net_dev) 44 * free_netdev(net_dev)
45 * 45 *
46 * i2400ms_bus_reset() Called by i2400m->bus_reset 46 * i2400ms_bus_reset() Called by i2400m_reset
47 * __i2400ms_reset() 47 * __i2400ms_reset()
48 * __i2400ms_send_barker() 48 * __i2400ms_send_barker()
49 */ 49 */
@@ -342,13 +342,6 @@ int i2400ms_bus_reset(struct i2400m *i2400m, enum i2400m_reset_type rt)
342 sizeof(i2400m_COLD_BOOT_BARKER)); 342 sizeof(i2400m_COLD_BOOT_BARKER));
343 else if (rt == I2400M_RT_BUS) { 343 else if (rt == I2400M_RT_BUS) {
344do_bus_reset: 344do_bus_reset:
345 /* call netif_tx_disable() before sending IOE disable,
346 * so that all the tx from network layer are stopped
347 * while IOE is being reset. Make sure it is called
348 * only after register_netdev() was issued.
349 */
350 if (i2400m->wimax_dev.net_dev->reg_state == NETREG_REGISTERED)
351 netif_tx_disable(i2400m->wimax_dev.net_dev);
352 345
353 i2400ms_bus_release(i2400m); 346 i2400ms_bus_release(i2400m);
354 347