Lines Matching refs:mesh

20 #define mod_plink_timer(s, t) (mod_timer(&s->mesh->plink_timer, \
61 s32 rssi_threshold = sdata->u.mesh.mshcfg.rssi_threshold; in rssi_threshold_check()
77 lockdep_assert_held(&sta->mesh->plink_lock); in mesh_plink_fsm_restart()
78 sta->mesh->plink_state = NL80211_PLINK_LISTEN; in mesh_plink_fsm_restart()
79 sta->mesh->llid = sta->mesh->plid = sta->mesh->reason = 0; in mesh_plink_fsm_restart()
80 sta->mesh->plink_retries = 0; in mesh_plink_fsm_restart()
120 sta->mesh->plink_state != NL80211_PLINK_ESTAB) in mesh_set_short_slot_time()
170 sta->mesh->plink_state != NL80211_PLINK_ESTAB) in mesh_set_ht_prot_mode()
200 sdata->u.mesh.mshcfg.ht_opmode = ht_opmode; in mesh_set_ht_prot_mode()
227 2 + sdata->u.mesh.mesh_id_len + in mesh_plink_frame_tx()
234 sdata->u.mesh.ie_len); in mesh_plink_frame_tx()
344 lockdep_assert_held(&sta->mesh->plink_lock); in __mesh_plink_deactivate()
346 if (sta->mesh->plink_state == NL80211_PLINK_ESTAB) in __mesh_plink_deactivate()
348 sta->mesh->plink_state = NL80211_PLINK_BLOCKED; in __mesh_plink_deactivate()
370 spin_lock_bh(&sta->mesh->plink_lock); in mesh_plink_deactivate()
372 sta->mesh->reason = WLAN_REASON_MESH_PEER_CANCELED; in mesh_plink_deactivate()
374 sta->sta.addr, sta->mesh->llid, sta->mesh->plid, in mesh_plink_deactivate()
375 sta->mesh->reason); in mesh_plink_deactivate()
376 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_deactivate()
394 spin_lock_bh(&sta->mesh->plink_lock); in mesh_sta_info_init()
398 if (sta->mesh->plink_state == NL80211_PLINK_ESTAB && in mesh_sta_info_init()
399 sta->mesh->processed_beacon) in mesh_sta_info_init()
401 sta->mesh->processed_beacon = true; in mesh_sta_info_init()
431 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_sta_info_init()
479 sta->mesh->plink_state = NL80211_PLINK_LISTEN; in __mesh_sta_info_alloc()
497 if (sdata->u.mesh.user_mpm || in mesh_sta_info_alloc()
498 sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) in mesh_sta_info_alloc()
568 sta->mesh->plink_state == NL80211_PLINK_LISTEN && in mesh_neighbour_update()
569 sdata->u.mesh.accepting_plinks && in mesh_neighbour_update()
570 sdata->u.mesh.mshcfg.auto_open_plinks && in mesh_neighbour_update()
598 spin_lock_bh(&sta->mesh->plink_lock); in mesh_plink_timer()
605 if (time_before(jiffies, sta->mesh->plink_timer.expires)) { in mesh_plink_timer()
608 sta->sta.addr, mplstates[sta->mesh->plink_state]); in mesh_plink_timer()
609 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_timer()
614 if (sta->mesh->plink_state == NL80211_PLINK_LISTEN || in mesh_plink_timer()
615 sta->mesh->plink_state == NL80211_PLINK_ESTAB) { in mesh_plink_timer()
618 sta->sta.addr, mplstates[sta->mesh->plink_state]); in mesh_plink_timer()
619 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_timer()
625 sta->sta.addr, mplstates[sta->mesh->plink_state]); in mesh_plink_timer()
627 mshcfg = &sdata->u.mesh.mshcfg; in mesh_plink_timer()
629 switch (sta->mesh->plink_state) { in mesh_plink_timer()
633 if (sta->mesh->plink_retries < mshcfg->dot11MeshMaxRetries) { in mesh_plink_timer()
637 sta->sta.addr, sta->mesh->plink_retries, in mesh_plink_timer()
638 sta->mesh->plink_timeout); in mesh_plink_timer()
640 sta->mesh->plink_timeout = sta->mesh->plink_timeout + in mesh_plink_timer()
641 rand % sta->mesh->plink_timeout; in mesh_plink_timer()
642 ++sta->mesh->plink_retries; in mesh_plink_timer()
643 mod_plink_timer(sta, sta->mesh->plink_timeout); in mesh_plink_timer()
653 sta->mesh->plink_state = NL80211_PLINK_HOLDING; in mesh_plink_timer()
659 del_timer(&sta->mesh->plink_timer); in mesh_plink_timer()
665 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_timer()
668 sta->mesh->llid, sta->mesh->plid, reason); in mesh_plink_timer()
673 sta->mesh->plink_timer.expires = jiffies + msecs_to_jiffies(timeout); in mesh_plink_timer_set()
674 sta->mesh->plink_timer.data = (unsigned long) sta; in mesh_plink_timer_set()
675 sta->mesh->plink_timer.function = mesh_plink_timer; in mesh_plink_timer_set()
676 sta->mesh->plink_timeout = timeout; in mesh_plink_timer_set()
677 add_timer(&sta->mesh->plink_timer); in mesh_plink_timer_set()
692 if (!memcmp(&sta->mesh->llid, &llid, sizeof(llid))) { in llid_in_use()
721 spin_lock_bh(&sta->mesh->plink_lock); in mesh_plink_open()
722 sta->mesh->llid = mesh_get_new_llid(sdata); in mesh_plink_open()
723 if (sta->mesh->plink_state != NL80211_PLINK_LISTEN && in mesh_plink_open()
724 sta->mesh->plink_state != NL80211_PLINK_BLOCKED) { in mesh_plink_open()
725 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_open()
728 sta->mesh->plink_state = NL80211_PLINK_OPN_SNT; in mesh_plink_open()
729 mesh_plink_timer_set(sta, sdata->u.mesh.mshcfg.dot11MeshRetryTimeout); in mesh_plink_open()
730 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_open()
739 sta->sta.addr, sta->mesh->llid, 0, 0); in mesh_plink_open()
747 spin_lock_bh(&sta->mesh->plink_lock); in mesh_plink_block()
749 sta->mesh->plink_state = NL80211_PLINK_BLOCKED; in mesh_plink_block()
750 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_block()
759 struct mesh_config *mshcfg = &sdata->u.mesh.mshcfg; in mesh_plink_close()
763 sta->mesh->reason = reason; in mesh_plink_close()
764 sta->mesh->plink_state = NL80211_PLINK_HOLDING; in mesh_plink_close()
771 struct mesh_config *mshcfg = &sdata->u.mesh.mshcfg; in mesh_plink_establish()
774 del_timer(&sta->mesh->plink_timer); in mesh_plink_establish()
775 sta->mesh->plink_state = NL80211_PLINK_ESTAB; in mesh_plink_establish()
797 struct mesh_config *mshcfg = &sdata->u.mesh.mshcfg; in mesh_plink_fsm()
802 mplstates[sta->mesh->plink_state], mplevents[event]); in mesh_plink_fsm()
804 spin_lock_bh(&sta->mesh->plink_lock); in mesh_plink_fsm()
805 switch (sta->mesh->plink_state) { in mesh_plink_fsm()
812 sta->mesh->plink_state = NL80211_PLINK_OPN_RCVD; in mesh_plink_fsm()
813 sta->mesh->llid = mesh_get_new_llid(sdata); in mesh_plink_fsm()
835 sta->mesh->plink_state = NL80211_PLINK_OPN_RCVD; in mesh_plink_fsm()
839 sta->mesh->plink_state = NL80211_PLINK_CNF_RCVD; in mesh_plink_fsm()
899 del_timer(&sta->mesh->plink_timer); in mesh_plink_fsm()
918 spin_unlock_bh(&sta->mesh->plink_lock); in mesh_plink_fsm()
921 sta->mesh->llid, sta->mesh->plid, in mesh_plink_fsm()
922 sta->mesh->reason); in mesh_plink_fsm()
928 sta->sta.addr, sta->mesh->llid, in mesh_plink_fsm()
929 sta->mesh->plid, 0); in mesh_plink_fsm()
984 if (sta->mesh->plink_state == NL80211_PLINK_BLOCKED) in mesh_plink_get_event()
999 (sta->mesh->plid && sta->mesh->plid != plid)) in mesh_plink_get_event()
1008 sta->mesh->llid != llid || in mesh_plink_get_event()
1009 (sta->mesh->plid && sta->mesh->plid != plid)) in mesh_plink_get_event()
1015 if (sta->mesh->plink_state == NL80211_PLINK_ESTAB) in mesh_plink_get_event()
1026 else if (sta->mesh->plid != plid) in mesh_plink_get_event()
1028 else if (ie_len == 8 && sta->mesh->llid != llid) in mesh_plink_get_event()
1062 sdata->u.mesh.security == IEEE80211_MESH_SEC_NONE) { in mesh_process_plink_frame()
1115 sta->mesh->plid = plid; in mesh_process_plink_frame()
1128 if (!sta->mesh->plid) in mesh_process_plink_frame()
1129 sta->mesh->plid = plid; in mesh_process_plink_frame()
1131 sta->mesh->aid = get_unaligned_le16(PLINK_CNF_AID(mgmt)); in mesh_process_plink_frame()
1155 if (sdata->u.mesh.user_mpm) in mesh_rx_plink_frame()