diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 5da6b35cd26d..36bafeb353ce 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1719,6 +1719,10 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1719 | priv->ucode_data_backup.len = data_size; | 1719 | priv->ucode_data_backup.len = data_size; |
1720 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); | 1720 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); |
1721 | 1721 | ||
1722 | if (!priv->ucode_code.v_addr || !priv->ucode_data.v_addr || | ||
1723 | !priv->ucode_data_backup.v_addr) | ||
1724 | goto err_pci_alloc; | ||
1725 | |||
1722 | /* Initialization instructions and data */ | 1726 | /* Initialization instructions and data */ |
1723 | if (init_size && init_data_size) { | 1727 | if (init_size && init_data_size) { |
1724 | priv->ucode_init.len = init_size; | 1728 | priv->ucode_init.len = init_size; |
@@ -2482,7 +2486,7 @@ static int iwl_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2482 | dev_kfree_skb_any(skb); | 2486 | dev_kfree_skb_any(skb); |
2483 | 2487 | ||
2484 | IWL_DEBUG_MACDUMP("leave\n"); | 2488 | IWL_DEBUG_MACDUMP("leave\n"); |
2485 | return 0; | 2489 | return NETDEV_TX_OK; |
2486 | } | 2490 | } |
2487 | 2491 | ||
2488 | static int iwl_mac_add_interface(struct ieee80211_hw *hw, | 2492 | static int iwl_mac_add_interface(struct ieee80211_hw *hw, |
@@ -4038,6 +4042,19 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
4038 | priv->is_open = 1; | 4042 | priv->is_open = 1; |
4039 | } | 4043 | } |
4040 | 4044 | ||
4045 | /* pci driver assumes state will be saved in this function. | ||
4046 | * pci state is saved and device disabled when interface is | ||
4047 | * stopped, so at this time pci device will always be disabled - | ||
4048 | * whether interface was started or not. saving pci state now will | ||
4049 | * cause saved state be that of a disabled device, which will cause | ||
4050 | * problems during resume in that we will end up with a disabled device. | ||
4051 | * | ||
4052 | * indicate that the current saved state (from when interface was | ||
4053 | * stopped) is valid. if interface was never up at time of suspend | ||
4054 | * then the saved state will still be valid as it was saved during | ||
4055 | * .probe. */ | ||
4056 | pdev->state_saved = true; | ||
4057 | |||
4041 | pci_set_power_state(pdev, PCI_D3hot); | 4058 | pci_set_power_state(pdev, PCI_D3hot); |
4042 | 4059 | ||
4043 | return 0; | 4060 | return 0; |