|
@@ -1775,6 +1775,15 @@ int iwl_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
|
|
|
|
|
mutex_lock(&priv->mutex);
|
|
mutex_lock(&priv->mutex);
|
|
|
|
|
|
|
|
+ if (!ctx->vif || !iwl_is_ready_rf(priv)) {
|
|
|
|
+ /*
|
|
|
|
+ * Huh? But wait ... this can maybe happen when
|
|
|
|
+ * we're in the middle of a firmware restart!
|
|
|
|
+ */
|
|
|
|
+ err = -EBUSY;
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
+
|
|
interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes;
|
|
interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes;
|
|
|
|
|
|
if (!(interface_modes & BIT(newtype))) {
|
|
if (!(interface_modes & BIT(newtype))) {
|
|
@@ -1802,6 +1811,7 @@ int iwl_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
|
/* success */
|
|
/* success */
|
|
iwl_teardown_interface(priv, vif, true);
|
|
iwl_teardown_interface(priv, vif, true);
|
|
vif->type = newtype;
|
|
vif->type = newtype;
|
|
|
|
+ vif->p2p = newp2p;
|
|
err = iwl_setup_interface(priv, ctx);
|
|
err = iwl_setup_interface(priv, ctx);
|
|
WARN_ON(err);
|
|
WARN_ON(err);
|
|
/*
|
|
/*
|