diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_init.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/wmi.c | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h index f6f09d1378f4..58e2ddc927a9 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.h +++ b/drivers/net/wireless/ath/ath9k/eeprom.h | |||
@@ -23,8 +23,6 @@ | |||
23 | #include <net/cfg80211.h> | 23 | #include <net/cfg80211.h> |
24 | #include "ar9003_eeprom.h" | 24 | #include "ar9003_eeprom.h" |
25 | 25 | ||
26 | #define AH_USE_EEPROM 0x1 | ||
27 | |||
28 | #ifdef __BIG_ENDIAN | 26 | #ifdef __BIG_ENDIAN |
29 | #define AR5416_EEPROM_MAGIC 0x5aa5 | 27 | #define AR5416_EEPROM_MAGIC 0x5aa5 |
30 | #else | 28 | #else |
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 22b68b3c8566..c20c8c8201a2 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
@@ -993,16 +993,16 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface) | |||
993 | { | 993 | { |
994 | struct usb_device *udev = interface_to_usbdev(interface); | 994 | struct usb_device *udev = interface_to_usbdev(interface); |
995 | struct hif_device_usb *hif_dev = usb_get_intfdata(interface); | 995 | struct hif_device_usb *hif_dev = usb_get_intfdata(interface); |
996 | bool unplugged = (udev->state == USB_STATE_NOTATTACHED) ? true : false; | ||
996 | 997 | ||
997 | if (hif_dev) { | 998 | if (hif_dev) { |
998 | ath9k_htc_hw_deinit(hif_dev->htc_handle, | 999 | ath9k_htc_hw_deinit(hif_dev->htc_handle, unplugged); |
999 | (udev->state == USB_STATE_NOTATTACHED) ? true : false); | ||
1000 | ath9k_htc_hw_free(hif_dev->htc_handle); | 1000 | ath9k_htc_hw_free(hif_dev->htc_handle); |
1001 | ath9k_hif_usb_dev_deinit(hif_dev); | 1001 | ath9k_hif_usb_dev_deinit(hif_dev); |
1002 | usb_set_intfdata(interface, NULL); | 1002 | usb_set_intfdata(interface, NULL); |
1003 | } | 1003 | } |
1004 | 1004 | ||
1005 | if (hif_dev->flags & HIF_USB_START) | 1005 | if (!unplugged && (hif_dev->flags & HIF_USB_START)) |
1006 | ath9k_hif_usb_reboot(udev); | 1006 | ath9k_hif_usb_reboot(udev); |
1007 | 1007 | ||
1008 | kfree(hif_dev); | 1008 | kfree(hif_dev); |
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index fdf9d5fe8cc0..e6c2f0aad28f 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -339,9 +339,8 @@ void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv); | |||
339 | #define OP_ASSOCIATED BIT(7) | 339 | #define OP_ASSOCIATED BIT(7) |
340 | #define OP_ENABLE_BEACON BIT(8) | 340 | #define OP_ENABLE_BEACON BIT(8) |
341 | #define OP_LED_DEINIT BIT(9) | 341 | #define OP_LED_DEINIT BIT(9) |
342 | #define OP_UNPLUGGED BIT(10) | 342 | #define OP_BT_PRIORITY_DETECTED BIT(10) |
343 | #define OP_BT_PRIORITY_DETECTED BIT(11) | 343 | #define OP_BT_SCAN BIT(11) |
344 | #define OP_BT_SCAN BIT(12) | ||
345 | 344 | ||
346 | struct ath9k_htc_priv { | 345 | struct ath9k_htc_priv { |
347 | struct device *dev; | 346 | struct device *dev; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 0f6be350fd3c..724f5451a415 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
@@ -851,9 +851,6 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev, | |||
851 | if (ret) | 851 | if (ret) |
852 | goto err_init; | 852 | goto err_init; |
853 | 853 | ||
854 | /* The device may have been unplugged earlier. */ | ||
855 | priv->op_flags &= ~OP_UNPLUGGED; | ||
856 | |||
857 | ret = ath9k_init_device(priv, devid, product, drv_info); | 854 | ret = ath9k_init_device(priv, devid, product, drv_info); |
858 | if (ret) | 855 | if (ret) |
859 | goto err_init; | 856 | goto err_init; |
@@ -873,7 +870,7 @@ void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug) | |||
873 | 870 | ||
874 | /* Check if the device has been yanked out. */ | 871 | /* Check if the device has been yanked out. */ |
875 | if (hotunplug) | 872 | if (hotunplug) |
876 | htc_handle->drv_priv->op_flags |= OP_UNPLUGGED; | 873 | htc_handle->drv_priv->ah->ah_flags |= AH_UNPLUGGED; |
877 | 874 | ||
878 | ath9k_deinit_device(htc_handle->drv_priv); | 875 | ath9k_deinit_device(htc_handle->drv_priv); |
879 | ath9k_deinit_wmi(htc_handle->drv_priv); | 876 | ath9k_deinit_wmi(htc_handle->drv_priv); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 4b51ed47fe69..fde978665e07 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1615,7 +1615,9 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode) | |||
1615 | * simply keep the ATH_DBG_WARN_ON_ONCE() but make | 1615 | * simply keep the ATH_DBG_WARN_ON_ONCE() but make |
1616 | * ath9k_hw_setpower() return type void. | 1616 | * ath9k_hw_setpower() return type void. |
1617 | */ | 1617 | */ |
1618 | ATH_DBG_WARN_ON_ONCE(!status); | 1618 | |
1619 | if (!(ah->ah_flags & AH_UNPLUGGED)) | ||
1620 | ATH_DBG_WARN_ON_ONCE(!status); | ||
1619 | 1621 | ||
1620 | return status; | 1622 | return status; |
1621 | } | 1623 | } |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index b8ffaa5dc650..5a3dfec45e96 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -646,6 +646,10 @@ struct ath_nf_limits { | |||
646 | s16 nominal; | 646 | s16 nominal; |
647 | }; | 647 | }; |
648 | 648 | ||
649 | /* ah_flags */ | ||
650 | #define AH_USE_EEPROM 0x1 | ||
651 | #define AH_UNPLUGGED 0x2 /* The card has been physically removed. */ | ||
652 | |||
649 | struct ath_hw { | 653 | struct ath_hw { |
650 | struct ieee80211_hw *hw; | 654 | struct ieee80211_hw *hw; |
651 | struct ath_common common; | 655 | struct ath_common common; |
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c index 8f42ea78198c..573daca135fd 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.c +++ b/drivers/net/wireless/ath/ath9k/wmi.c | |||
@@ -250,7 +250,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id, | |||
250 | int time_left, ret = 0; | 250 | int time_left, ret = 0; |
251 | unsigned long flags; | 251 | unsigned long flags; |
252 | 252 | ||
253 | if (wmi->drv_priv->op_flags & OP_UNPLUGGED) | 253 | if (ah->ah_flags & AH_UNPLUGGED) |
254 | return 0; | 254 | return 0; |
255 | 255 | ||
256 | skb = alloc_skb(headroom + cmd_len, GFP_ATOMIC); | 256 | skb = alloc_skb(headroom + cmd_len, GFP_ATOMIC); |