|
@@ -1244,6 +1244,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw,
|
|
|
struct iwl_rxon_context *tmp, *ctx = NULL;
|
|
|
int err;
|
|
|
enum nl80211_iftype viftype = ieee80211_vif_type_p2p(vif);
|
|
|
+ bool reset = false;
|
|
|
|
|
|
IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n",
|
|
|
viftype, vif->addr);
|
|
@@ -1265,6 +1266,13 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw,
|
|
|
tmp->interface_modes | tmp->exclusive_interface_modes;
|
|
|
|
|
|
if (tmp->vif) {
|
|
|
+ /* On reset we need to add the same interface again */
|
|
|
+ if (tmp->vif == vif) {
|
|
|
+ reset = true;
|
|
|
+ ctx = tmp;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
/* check if this busy context is exclusive */
|
|
|
if (tmp->exclusive_interface_modes &
|
|
|
BIT(tmp->vif->type)) {
|
|
@@ -1291,7 +1299,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw,
|
|
|
ctx->vif = vif;
|
|
|
|
|
|
err = iwl_setup_interface(priv, ctx);
|
|
|
- if (!err)
|
|
|
+ if (!err || reset)
|
|
|
goto out;
|
|
|
|
|
|
ctx->vif = NULL;
|