mwifiex: get rid of global user_rmmod flag
authorXinming Hu <huxm@marvell.com>
Wed, 30 Nov 2016 14:52:17 +0000 (20:22 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 12 Jan 2017 14:46:23 +0000 (16:46 +0200)
commit045f0c1b5e26818e28a401e623a581dfbd6b371e
treebdd9da44fa6ecade8e362ceefddf8fbde60547bd
parent90ff71f9557591218b5fce1ce7b67afd4cf83894
mwifiex: get rid of global user_rmmod flag

bus.remove() callback function is called when user removes this module
from kernel space or ejects the card from the slot. The driver handles
these 2 cases differently. Few commands (FUNC_SHUTDOWN etc.) are sent to
the firmware only for module unload case.

The variable 'user_rmmod' is used to distinguish between these two
scenarios.

This patch checks hardware status and get rid of global variable
user_rmmod.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/pcie.c
drivers/net/wireless/marvell/mwifiex/sdio.c
drivers/net/wireless/marvell/mwifiex/usb.c