Lines Matching refs:mesh
22 #define mod_plink_timer(s, t) (mod_timer(&s->mesh->plink_timer, \
63 s32 rssi_threshold = sdata->u.mesh.mshcfg.rssi_threshold; in rssi_threshold_check()
79 lockdep_assert_held(&sta->mesh->plink_lock); in mesh_plink_fsm_restart()
80 sta->mesh->plink_state = NL80211_PLINK_LISTEN; in mesh_plink_fsm_restart()
81 sta->mesh->llid = sta->mesh->plid = sta->mesh->reason = 0; in mesh_plink_fsm_restart()
82 sta->mesh->plink_retries = 0; in mesh_plink_fsm_restart()
126 sta->mesh->plink_state != NL80211_PLINK_ESTAB) in mesh_set_short_slot_time()
176 sta->mesh->plink_state != NL80211_PLINK_ESTAB) in mesh_set_ht_prot_mode()
206 sdata->u.mesh.mshcfg.ht_opmode = ht_opmode; in mesh_set_ht_prot_mode()
232 2 + sdata->u.mesh.mesh_id_len + in mesh_plink_frame_tx()
239 sdata->u.mesh.ie_len); in mesh_plink_frame_tx()
357 lockdep_assert_held(&sta->mesh->plink_lock); in __mesh_plink_deactivate()
359 if (sta->mesh->plink_state == NL80211_PLINK_ESTAB) in __mesh_plink_deactivate()
361 sta->mesh->plink_state = NL80211_PLINK_BLOCKED; in __mesh_plink_deactivate()
382 spin_lock_bh(&sta->mesh->plink_lock); in mesh_plink_deactivate()
385 if (!sdata->u.mesh.user_mpm) { in mesh_plink_deactivate()
386 sta->mesh->reason = WLAN_REASON_MESH_PEER_CANCELED; in mesh_plink_deactivate()
388 sta->sta.addr, sta->mesh->llid, in mesh_plink_deactivate()
389 sta->mesh->plid, sta->mesh->reason); in mesh_plink_deactivate()
391 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_deactivate()
392 if (!sdata->u.mesh.user_mpm) in mesh_plink_deactivate()
393 del_timer_sync(&sta->mesh->plink_timer); in mesh_plink_deactivate()
418 spin_lock_bh(&sta->mesh->plink_lock); in mesh_sta_info_init()
422 if (sta->mesh->plink_state == NL80211_PLINK_ESTAB && in mesh_sta_info_init()
423 sta->mesh->processed_beacon) in mesh_sta_info_init()
425 sta->mesh->processed_beacon = true; in mesh_sta_info_init()
455 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_sta_info_init()
503 sta->mesh->plink_state = NL80211_PLINK_LISTEN; in __mesh_sta_info_alloc()
521 if (sdata->u.mesh.user_mpm || in mesh_sta_info_alloc()
522 sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) { in mesh_sta_info_alloc()
594 sta->mesh->plink_state == NL80211_PLINK_LISTEN && in mesh_neighbour_update()
595 sdata->u.mesh.accepting_plinks && in mesh_neighbour_update()
596 sdata->u.mesh.mshcfg.auto_open_plinks && in mesh_neighbour_update()
608 struct mesh_sta *mesh = from_timer(mesh, t, plink_timer); in mesh_plink_timer() local
620 sta = mesh->plink_sta; in mesh_plink_timer()
625 spin_lock_bh(&sta->mesh->plink_lock); in mesh_plink_timer()
632 if (time_before(jiffies, sta->mesh->plink_timer.expires)) { in mesh_plink_timer()
635 sta->sta.addr, mplstates[sta->mesh->plink_state]); in mesh_plink_timer()
636 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_timer()
641 if (sta->mesh->plink_state == NL80211_PLINK_LISTEN || in mesh_plink_timer()
642 sta->mesh->plink_state == NL80211_PLINK_ESTAB) { in mesh_plink_timer()
645 sta->sta.addr, mplstates[sta->mesh->plink_state]); in mesh_plink_timer()
646 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_timer()
652 sta->sta.addr, mplstates[sta->mesh->plink_state]); in mesh_plink_timer()
654 mshcfg = &sdata->u.mesh.mshcfg; in mesh_plink_timer()
656 switch (sta->mesh->plink_state) { in mesh_plink_timer()
660 if (sta->mesh->plink_retries < mshcfg->dot11MeshMaxRetries) { in mesh_plink_timer()
664 sta->sta.addr, sta->mesh->plink_retries, in mesh_plink_timer()
665 sta->mesh->plink_timeout); in mesh_plink_timer()
667 sta->mesh->plink_timeout = sta->mesh->plink_timeout + in mesh_plink_timer()
668 rand % sta->mesh->plink_timeout; in mesh_plink_timer()
669 ++sta->mesh->plink_retries; in mesh_plink_timer()
670 mod_plink_timer(sta, sta->mesh->plink_timeout); in mesh_plink_timer()
680 sta->mesh->plink_state = NL80211_PLINK_HOLDING; in mesh_plink_timer()
686 del_timer(&sta->mesh->plink_timer); in mesh_plink_timer()
692 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_timer()
695 sta->mesh->llid, sta->mesh->plid, reason); in mesh_plink_timer()
700 sta->mesh->plink_timeout = timeout; in mesh_plink_timer_set()
701 mod_timer(&sta->mesh->plink_timer, jiffies + msecs_to_jiffies(timeout)); in mesh_plink_timer_set()
716 if (!memcmp(&sta->mesh->llid, &llid, sizeof(llid))) { in llid_in_use()
745 spin_lock_bh(&sta->mesh->plink_lock); in mesh_plink_open()
746 sta->mesh->llid = mesh_get_new_llid(sdata); in mesh_plink_open()
747 if (sta->mesh->plink_state != NL80211_PLINK_LISTEN && in mesh_plink_open()
748 sta->mesh->plink_state != NL80211_PLINK_BLOCKED) { in mesh_plink_open()
749 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_open()
752 sta->mesh->plink_state = NL80211_PLINK_OPN_SNT; in mesh_plink_open()
753 mesh_plink_timer_set(sta, sdata->u.mesh.mshcfg.dot11MeshRetryTimeout); in mesh_plink_open()
754 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_open()
763 sta->sta.addr, sta->mesh->llid, 0, 0); in mesh_plink_open()
771 spin_lock_bh(&sta->mesh->plink_lock); in mesh_plink_block()
773 sta->mesh->plink_state = NL80211_PLINK_BLOCKED; in mesh_plink_block()
774 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_block()
784 struct mesh_config *mshcfg = &sdata->u.mesh.mshcfg; in mesh_plink_close()
788 sta->mesh->reason = reason; in mesh_plink_close()
789 sta->mesh->plink_state = NL80211_PLINK_HOLDING; in mesh_plink_close()
796 struct mesh_config *mshcfg = &sdata->u.mesh.mshcfg; in mesh_plink_establish()
799 del_timer(&sta->mesh->plink_timer); in mesh_plink_establish()
800 sta->mesh->plink_state = NL80211_PLINK_ESTAB; in mesh_plink_establish()
822 struct mesh_config *mshcfg = &sdata->u.mesh.mshcfg; in mesh_plink_fsm()
828 mplstates[sta->mesh->plink_state], mplevents[event]); in mesh_plink_fsm()
830 spin_lock_bh(&sta->mesh->plink_lock); in mesh_plink_fsm()
831 switch (sta->mesh->plink_state) { in mesh_plink_fsm()
838 sta->mesh->plink_state = NL80211_PLINK_OPN_RCVD; in mesh_plink_fsm()
839 sta->mesh->llid = mesh_get_new_llid(sdata); in mesh_plink_fsm()
861 sta->mesh->plink_state = NL80211_PLINK_OPN_RCVD; in mesh_plink_fsm()
865 sta->mesh->plink_state = NL80211_PLINK_CNF_RCVD; in mesh_plink_fsm()
926 del_timer(&sta->mesh->plink_timer); in mesh_plink_fsm()
945 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_fsm()
950 sta->mesh->llid, sta->mesh->plid, in mesh_plink_fsm()
951 sta->mesh->reason); in mesh_plink_fsm()
957 sta->sta.addr, sta->mesh->llid, in mesh_plink_fsm()
958 sta->mesh->plid, 0); in mesh_plink_fsm()
1017 if (sta->mesh->plink_state == NL80211_PLINK_BLOCKED) in mesh_plink_get_event()
1026 (sta->mesh->plid && sta->mesh->plid != plid)) in mesh_plink_get_event()
1035 sta->mesh->llid != llid || in mesh_plink_get_event()
1036 (sta->mesh->plid && sta->mesh->plid != plid)) in mesh_plink_get_event()
1042 if (sta->mesh->plink_state == NL80211_PLINK_ESTAB) in mesh_plink_get_event()
1053 else if (sta->mesh->plid != plid) in mesh_plink_get_event()
1055 else if (ie_len == 8 && sta->mesh->llid != llid) in mesh_plink_get_event()
1089 sdata->u.mesh.security == IEEE80211_MESH_SEC_NONE) { in mesh_process_plink_frame()
1142 sta->mesh->plid = plid; in mesh_process_plink_frame()
1155 if (!sta->mesh->plid) in mesh_process_plink_frame()
1156 sta->mesh->plid = plid; in mesh_process_plink_frame()
1158 sta->mesh->aid = get_unaligned_le16(PLINK_CNF_AID(mgmt)); in mesh_process_plink_frame()
1182 if (sdata->u.mesh.user_mpm) in mesh_rx_plink_frame()