diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-05 18:09:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-05 18:09:05 -0400 |
commit | 2861a185e3ac2ebe5958a2039b66062445bf4f7d (patch) | |
tree | 535546ba778348477c95cb781677432a2bc831c9 /drivers/net/wireless/ath/ath9k/htc_drv_init.c | |
parent | ec7d2f2cf3a1b76202986519ec4f8ec75b2de232 (diff) | |
parent | 83163244f845c296a118ce85c653872dbff6abfe (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc_drv_init.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index a86189629d92..701f2ef5a440 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
@@ -744,6 +744,9 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev, | |||
744 | if (ret) | 744 | if (ret) |
745 | goto err_init; | 745 | goto err_init; |
746 | 746 | ||
747 | /* The device may have been unplugged earlier. */ | ||
748 | priv->op_flags &= ~OP_UNPLUGGED; | ||
749 | |||
747 | ret = ath9k_init_device(priv, devid); | 750 | ret = ath9k_init_device(priv, devid); |
748 | if (ret) | 751 | if (ret) |
749 | goto err_init; | 752 | goto err_init; |
@@ -760,6 +763,11 @@ err_free: | |||
760 | void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug) | 763 | void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug) |
761 | { | 764 | { |
762 | if (htc_handle->drv_priv) { | 765 | if (htc_handle->drv_priv) { |
766 | |||
767 | /* Check if the device has been yanked out. */ | ||
768 | if (hotunplug) | ||
769 | htc_handle->drv_priv->op_flags |= OP_UNPLUGGED; | ||
770 | |||
763 | ath9k_deinit_device(htc_handle->drv_priv); | 771 | ath9k_deinit_device(htc_handle->drv_priv); |
764 | ath9k_deinit_wmi(htc_handle->drv_priv); | 772 | ath9k_deinit_wmi(htc_handle->drv_priv); |
765 | ieee80211_free_hw(htc_handle->drv_priv->hw); | 773 | ieee80211_free_hw(htc_handle->drv_priv->hw); |