Skip to content

Commit

Permalink
Merge branch 'wireless-2.6' into wireless-next-2.6
Browse files Browse the repository at this point in the history
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-dev.h
  • Loading branch information
Reinette Chatre committed May 10, 2010
2 parents 9459d59 + 562db53 commit a15707d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
11 changes: 11 additions & 0 deletions drivers/net/wireless/ath/ar9170/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,12 +736,16 @@ static void ar9170_usb_firmware_failed(struct ar9170_usb *aru)
{
struct device *parent = aru->udev->dev.parent;

complete(&aru->firmware_loading_complete);

/* unbind anything failed */
if (parent)
down(&parent->sem);
device_release_driver(&aru->udev->dev);
if (parent)
up(&parent->sem);

usb_put_dev(aru->udev);
}

static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context)
Expand Down Expand Up @@ -770,6 +774,8 @@ static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context)
if (err)
goto err_unrx;

complete(&aru->firmware_loading_complete);
usb_put_dev(aru->udev);
return;

err_unrx:
Expand Down Expand Up @@ -867,6 +873,7 @@ static int ar9170_usb_probe(struct usb_interface *intf,
init_usb_anchor(&aru->tx_pending);
init_usb_anchor(&aru->tx_submitted);
init_completion(&aru->cmd_wait);
init_completion(&aru->firmware_loading_complete);
spin_lock_init(&aru->tx_urb_lock);

aru->tx_pending_urbs = 0;
Expand All @@ -886,6 +893,7 @@ static int ar9170_usb_probe(struct usb_interface *intf,
if (err)
goto err_freehw;

usb_get_dev(aru->udev);
return request_firmware_nowait(THIS_MODULE, 1, "ar9170.fw",
&aru->udev->dev, GFP_KERNEL, aru,
ar9170_usb_firmware_step2);
Expand All @@ -905,6 +913,9 @@ static void ar9170_usb_disconnect(struct usb_interface *intf)
return;

aru->common.state = AR9170_IDLE;

wait_for_completion(&aru->firmware_loading_complete);

ar9170_unregister(&aru->common);
ar9170_usb_cancel_urbs(aru);

Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ar9170/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ struct ar9170_usb {
unsigned int tx_pending_urbs;

struct completion cmd_wait;
struct completion firmware_loading_complete;
int readlen;
u8 *readbuf;

Expand Down
6 changes: 6 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
release_firmware(ucode_raw);
complete(&priv->_agn.firmware_loading_complete);
return;

try_again:
Expand All @@ -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_dealloc_ucode_pci(priv);
out_unbind:
complete(&priv->_agn.firmware_loading_complete);
device_release_driver(&priv->pci_dev->dev);
release_firmware(ucode_raw);
}
Expand Down Expand Up @@ -3586,6 +3588,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
iwl_power_initialize(priv);
iwl_tt_initialize(priv);

init_completion(&priv->_agn.firmware_loading_complete);

err = iwl_request_firmware(priv, true);
if (err)
goto out_remove_sysfs;
Expand Down Expand Up @@ -3626,6 +3630,8 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
if (!priv)
return;

wait_for_completion(&priv->_agn.firmware_loading_complete);

IWL_DEBUG_INFO(priv, "*** UNLOAD DRIVER ***\n");

iwl_dbgfs_unregister(priv);
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,8 @@ struct iwl_priv {

struct iwl_rx_phy_res last_phy_res;
bool last_phy_res_valid;

struct completion firmware_loading_complete;
} _agn;
#endif
};
Expand Down
3 changes: 2 additions & 1 deletion net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,8 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
continue;

if (wk->type != IEEE80211_WORK_DIRECT_PROBE &&
wk->type != IEEE80211_WORK_AUTH)
wk->type != IEEE80211_WORK_AUTH &&
wk->type != IEEE80211_WORK_ASSOC)
continue;

if (memcmp(req->bss->bssid, wk->filter_ta, ETH_ALEN))
Expand Down

0 comments on commit a15707d

Please sign in to comment.