rand % sta->plink_timeout;
++sta->plink_retries;
mod_plink_timer(sta, sta->plink_timeout);
- spin_unlock_bh(&sta->lock);
action = WLAN_SP_MESH_PEERING_OPEN;
break;
}
reason = cpu_to_le16(WLAN_REASON_MESH_CONFIRM_TIMEOUT);
sta->plink_state = NL80211_PLINK_HOLDING;
mod_plink_timer(sta, mshcfg->dot11MeshHoldingTimeout);
- spin_unlock_bh(&sta->lock);
action = WLAN_SP_MESH_PEERING_CLOSE;
break;
case NL80211_PLINK_HOLDING:
/* holding timer */
del_timer(&sta->plink_timer);
mesh_plink_fsm_restart(sta);
- spin_unlock_bh(&sta->lock);
break;
default:
- spin_unlock_bh(&sta->lock);
break;
}
+ spin_unlock_bh(&sta->lock);
if (action)
mesh_plink_frame_tx(sdata, action, sta->sta.addr,
llid, plid, reason);
reason = 0;
spin_lock_bh(&sta->lock);
switch (sta->plink_state) {
- /* spin_unlock as soon as state is updated at each case */
case NL80211_PLINK_LISTEN:
switch (event) {
case CLS_ACPT:
mesh_plink_fsm_restart(sta);
- spin_unlock_bh(&sta->lock);
break;
case OPN_ACPT:
sta->plink_state = NL80211_PLINK_OPN_RCVD;
/* set the non-peer mode to active during peering */
changed |= ieee80211_mps_local_status_update(sdata);
- spin_unlock_bh(&sta->lock);
action = WLAN_SP_MESH_PEERING_OPEN;
break;
default:
- spin_unlock_bh(&sta->lock);
break;
}
break;
mshcfg->dot11MeshHoldingTimeout))
sta->ignore_plink_timer = true;
- spin_unlock_bh(&sta->lock);
action = WLAN_SP_MESH_PEERING_CLOSE;
break;
case OPN_ACPT:
/* retry timer is left untouched */
sta->plink_state = NL80211_PLINK_OPN_RCVD;
sta->plid = plid;
- spin_unlock_bh(&sta->lock);
action = WLAN_SP_MESH_PEERING_CONFIRM;
break;
case CNF_ACPT:
mshcfg->dot11MeshConfirmTimeout))
sta->ignore_plink_timer = true;
- spin_unlock_bh(&sta->lock);
break;
default:
- spin_unlock_bh(&sta->lock);
break;
}
break;
mshcfg->dot11MeshHoldingTimeout))
sta->ignore_plink_timer = true;
- spin_unlock_bh(&sta->lock);
action = WLAN_SP_MESH_PEERING_CLOSE;
break;
case OPN_ACPT:
- spin_unlock_bh(&sta->lock);
action = WLAN_SP_MESH_PEERING_CONFIRM;
break;
case CNF_ACPT:
del_timer(&sta->plink_timer);
sta->plink_state = NL80211_PLINK_ESTAB;
- spin_unlock_bh(&sta->lock);
changed |= mesh_plink_inc_estab_count(sdata);
changed |= mesh_set_ht_prot_mode(sdata);
changed |= mesh_set_short_slot_time(sdata);
mshcfg->power_mode);
break;
default:
- spin_unlock_bh(&sta->lock);
break;
}
break;
mshcfg->dot11MeshHoldingTimeout))
sta->ignore_plink_timer = true;
- spin_unlock_bh(&sta->lock);
action = WLAN_SP_MESH_PEERING_CLOSE;
break;
case OPN_ACPT:
del_timer(&sta->plink_timer);
sta->plink_state = NL80211_PLINK_ESTAB;
- spin_unlock_bh(&sta->lock);
changed |= mesh_plink_inc_estab_count(sdata);
changed |= mesh_set_ht_prot_mode(sdata);
changed |= mesh_set_short_slot_time(sdata);
mshcfg->power_mode);
break;
default:
- spin_unlock_bh(&sta->lock);
break;
}
break;
changed |= __mesh_plink_deactivate(sta);
sta->plink_state = NL80211_PLINK_HOLDING;
mod_plink_timer(sta, mshcfg->dot11MeshHoldingTimeout);
- spin_unlock_bh(&sta->lock);
changed |= mesh_set_ht_prot_mode(sdata);
changed |= mesh_set_short_slot_time(sdata);
action = WLAN_SP_MESH_PEERING_CLOSE;
break;
case OPN_ACPT:
- spin_unlock_bh(&sta->lock);
action = WLAN_SP_MESH_PEERING_CONFIRM;
break;
default:
- spin_unlock_bh(&sta->lock);
break;
}
break;
if (del_timer(&sta->plink_timer))
sta->ignore_plink_timer = 1;
mesh_plink_fsm_restart(sta);
- spin_unlock_bh(&sta->lock);
break;
case OPN_ACPT:
case CNF_ACPT:
case OPN_RJCT:
case CNF_RJCT:
- spin_unlock_bh(&sta->lock);
action = WLAN_SP_MESH_PEERING_CLOSE;
break;
default:
- spin_unlock_bh(&sta->lock);
+ break;
}
break;
default:
/* should not get here, PLINK_BLOCKED is dealt with at the
* beginning of the function
*/
- spin_unlock_bh(&sta->lock);
break;
}
+ spin_unlock_bh(&sta->lock);
if (action) {
mesh_plink_frame_tx(sdata, action, sta->sta.addr,
sta->llid, sta->plid, sta->reason);