aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/iwl-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-core.c')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-core.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c
index d418b647be80..7007d61bb6b5 100644
--- a/drivers/net/wireless/iwlegacy/iwl-core.c
+++ b/drivers/net/wireless/iwlegacy/iwl-core.c
@@ -1030,7 +1030,7 @@ int iwl_legacy_apm_init(struct iwl_priv *priv)
1030 /* 1030 /*
1031 * Enable HAP INTA (interrupt from management bus) to 1031 * Enable HAP INTA (interrupt from management bus) to
1032 * wake device's PCI Express link L1a -> L0s 1032 * wake device's PCI Express link L1a -> L0s
1033 * NOTE: This is no-op for 3945 (non-existant bit) 1033 * NOTE: This is no-op for 3945 (non-existent bit)
1034 */ 1034 */
1035 iwl_legacy_set_bit(priv, CSR_HW_IF_CONFIG_REG, 1035 iwl_legacy_set_bit(priv, CSR_HW_IF_CONFIG_REG,
1036 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); 1036 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A);
@@ -1805,6 +1805,15 @@ iwl_legacy_mac_change_interface(struct ieee80211_hw *hw,
1805 1805
1806 mutex_lock(&priv->mutex); 1806 mutex_lock(&priv->mutex);
1807 1807
1808 if (!ctx->vif || !iwl_legacy_is_ready_rf(priv)) {
1809 /*
1810 * Huh? But wait ... this can maybe happen when
1811 * we're in the middle of a firmware restart!
1812 */
1813 err = -EBUSY;
1814 goto out;
1815 }
1816
1808 interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes; 1817 interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes;
1809 1818
1810 if (!(interface_modes & BIT(newtype))) { 1819 if (!(interface_modes & BIT(newtype))) {
@@ -1832,6 +1841,7 @@ iwl_legacy_mac_change_interface(struct ieee80211_hw *hw,
1832 /* success */ 1841 /* success */
1833 iwl_legacy_teardown_interface(priv, vif, true); 1842 iwl_legacy_teardown_interface(priv, vif, true);
1834 vif->type = newtype; 1843 vif->type = newtype;
1844 vif->p2p = newp2p;
1835 err = iwl_legacy_setup_interface(priv, ctx); 1845 err = iwl_legacy_setup_interface(priv, ctx);
1836 WARN_ON(err); 1846 WARN_ON(err);
1837 /* 1847 /*