Commit a15707d8 authored by Reinette Chatre's avatar Reinette Chatre

Merge branch 'wireless-2.6' into wireless-next-2.6

Conflicts:
	drivers/net/wireless/iwlwifi/iwl-dev.h
parents 9459d59f 562db532
...@@ -736,12 +736,16 @@ static void ar9170_usb_firmware_failed(struct ar9170_usb *aru) ...@@ -736,12 +736,16 @@ static void ar9170_usb_firmware_failed(struct ar9170_usb *aru)
{ {
struct device *parent = aru->udev->dev.parent; struct device *parent = aru->udev->dev.parent;
complete(&aru->firmware_loading_complete);
/* unbind anything failed */ /* unbind anything failed */
if (parent) if (parent)
down(&parent->sem); down(&parent->sem);
device_release_driver(&aru->udev->dev); device_release_driver(&aru->udev->dev);
if (parent) if (parent)
up(&parent->sem); up(&parent->sem);
usb_put_dev(aru->udev);
} }
static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context) static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context)
...@@ -770,6 +774,8 @@ static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context) ...@@ -770,6 +774,8 @@ static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context)
if (err) if (err)
goto err_unrx; goto err_unrx;
complete(&aru->firmware_loading_complete);
usb_put_dev(aru->udev);
return; return;
err_unrx: err_unrx:
...@@ -867,6 +873,7 @@ static int ar9170_usb_probe(struct usb_interface *intf, ...@@ -867,6 +873,7 @@ static int ar9170_usb_probe(struct usb_interface *intf,
init_usb_anchor(&aru->tx_pending); init_usb_anchor(&aru->tx_pending);
init_usb_anchor(&aru->tx_submitted); init_usb_anchor(&aru->tx_submitted);
init_completion(&aru->cmd_wait); init_completion(&aru->cmd_wait);
init_completion(&aru->firmware_loading_complete);
spin_lock_init(&aru->tx_urb_lock); spin_lock_init(&aru->tx_urb_lock);
aru->tx_pending_urbs = 0; aru->tx_pending_urbs = 0;
...@@ -886,6 +893,7 @@ static int ar9170_usb_probe(struct usb_interface *intf, ...@@ -886,6 +893,7 @@ static int ar9170_usb_probe(struct usb_interface *intf,
if (err) if (err)
goto err_freehw; goto err_freehw;
usb_get_dev(aru->udev);
return request_firmware_nowait(THIS_MODULE, 1, "ar9170.fw", return request_firmware_nowait(THIS_MODULE, 1, "ar9170.fw",
&aru->udev->dev, GFP_KERNEL, aru, &aru->udev->dev, GFP_KERNEL, aru,
ar9170_usb_firmware_step2); ar9170_usb_firmware_step2);
...@@ -905,6 +913,9 @@ static void ar9170_usb_disconnect(struct usb_interface *intf) ...@@ -905,6 +913,9 @@ static void ar9170_usb_disconnect(struct usb_interface *intf)
return; return;
aru->common.state = AR9170_IDLE; aru->common.state = AR9170_IDLE;
wait_for_completion(&aru->firmware_loading_complete);
ar9170_unregister(&aru->common); ar9170_unregister(&aru->common);
ar9170_usb_cancel_urbs(aru); ar9170_usb_cancel_urbs(aru);
......
...@@ -71,6 +71,7 @@ struct ar9170_usb { ...@@ -71,6 +71,7 @@ struct ar9170_usb {
unsigned int tx_pending_urbs; unsigned int tx_pending_urbs;
struct completion cmd_wait; struct completion cmd_wait;
struct completion firmware_loading_complete;
int readlen; int readlen;
u8 *readbuf; u8 *readbuf;
......
...@@ -1776,6 +1776,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) ...@@ -1776,6 +1776,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
/* We have our copies now, allow OS release its copies */ /* We have our copies now, allow OS release its copies */
release_firmware(ucode_raw); release_firmware(ucode_raw);
complete(&priv->_agn.firmware_loading_complete);
return; return;
try_again: try_again:
...@@ -1789,6 +1790,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) ...@@ -1789,6 +1790,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
IWL_ERR(priv, "failed to allocate pci memory\n"); IWL_ERR(priv, "failed to allocate pci memory\n");
iwl_dealloc_ucode_pci(priv); iwl_dealloc_ucode_pci(priv);
out_unbind: out_unbind:
complete(&priv->_agn.firmware_loading_complete);
device_release_driver(&priv->pci_dev->dev); device_release_driver(&priv->pci_dev->dev);
release_firmware(ucode_raw); release_firmware(ucode_raw);
} }
...@@ -3586,6 +3588,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -3586,6 +3588,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
iwl_power_initialize(priv); iwl_power_initialize(priv);
iwl_tt_initialize(priv); iwl_tt_initialize(priv);
init_completion(&priv->_agn.firmware_loading_complete);
err = iwl_request_firmware(priv, true); err = iwl_request_firmware(priv, true);
if (err) if (err)
goto out_remove_sysfs; goto out_remove_sysfs;
...@@ -3626,6 +3630,8 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev) ...@@ -3626,6 +3630,8 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
if (!priv) if (!priv)
return; return;
wait_for_completion(&priv->_agn.firmware_loading_complete);
IWL_DEBUG_INFO(priv, "*** UNLOAD DRIVER ***\n"); IWL_DEBUG_INFO(priv, "*** UNLOAD DRIVER ***\n");
iwl_dbgfs_unregister(priv); iwl_dbgfs_unregister(priv);
......
...@@ -1242,6 +1242,8 @@ struct iwl_priv { ...@@ -1242,6 +1242,8 @@ struct iwl_priv {
struct iwl_rx_phy_res last_phy_res; struct iwl_rx_phy_res last_phy_res;
bool last_phy_res_valid; bool last_phy_res_valid;
struct completion firmware_loading_complete;
} _agn; } _agn;
#endif #endif
}; };
......
...@@ -2177,7 +2177,8 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, ...@@ -2177,7 +2177,8 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
continue; continue;
if (wk->type != IEEE80211_WORK_DIRECT_PROBE && if (wk->type != IEEE80211_WORK_DIRECT_PROBE &&
wk->type != IEEE80211_WORK_AUTH) wk->type != IEEE80211_WORK_AUTH &&
wk->type != IEEE80211_WORK_ASSOC)
continue; continue;
if (memcmp(req->bss->bssid, wk->filter_ta, ETH_ALEN)) if (memcmp(req->bss->bssid, wk->filter_ta, ETH_ALEN))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment