From: Mike J. Chen Date: Thu, 16 Feb 2012 05:54:57 +0000 (-0800) Subject: net: wireless: bcmdhd: Fix driver hang when resetting X-Git-Tag: firefly_0821_release~7613^2~178 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bfebf726b0e0fd4a26096f9d7ddea8603aeaeac8;p=firefly-linux-kernel-4.4.55.git net: wireless: bcmdhd: Fix driver hang when resetting bus->tx_max was not being initialized when we do a reset and the driver is statically linked. this led to about a 50% chance that it would be considered an illegal value when we send the mac address to the FW. add code to initialize it to a safe value until we receive the right value from the fw. Bug: 5974574 Change-Id: I28ab25d97203ef075e5354c25f85a25daaff5594 Signed-off-by: Mike J. Chen Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/net/wireless/bcmdhd/dhd_sdio.c b/drivers/net/wireless/bcmdhd/dhd_sdio.c index d7823167cca7..53eff583c381 100644 --- a/drivers/net/wireless/bcmdhd/dhd_sdio.c +++ b/drivers/net/wireless/bcmdhd/dhd_sdio.c @@ -3061,6 +3061,13 @@ dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex) bus->rxskip = FALSE; bus->tx_seq = bus->rx_seq = 0; + /* Set to a safe default. It gets updated when we + * receive a packet from the fw but when we reset, + * we need a safe default to be able to send the + * initial mac address. + */ + bus->tx_max = 4; + if (enforce_mutex) dhd_os_sdunlock(bus->dhd); }