Lines Matching refs:ifmsh

44 	struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;  in ieee80211_mesh_housekeeping_timer()  local
46 set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags); in ieee80211_mesh_housekeeping_timer()
63 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_matches_local() local
79 if (!(ifmsh->mesh_id_len == ie->mesh_id_len && in mesh_matches_local()
80 memcmp(ifmsh->mesh_id, ie->mesh_id, ie->mesh_id_len) == 0 && in mesh_matches_local()
81 (ifmsh->mesh_pp_id == ie->mesh_config->meshconf_psel) && in mesh_matches_local()
82 (ifmsh->mesh_pm_id == ie->mesh_config->meshconf_pmetric) && in mesh_matches_local()
83 (ifmsh->mesh_cc_id == ie->mesh_config->meshconf_congest) && in mesh_matches_local()
84 (ifmsh->mesh_sp_id == ie->mesh_config->meshconf_synch) && in mesh_matches_local()
85 (ifmsh->mesh_auth_id == ie->mesh_config->meshconf_auth))) in mesh_matches_local()
259 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_add_meshconf_ie() local
262 bool is_connected_to_gate = ifmsh->num_gates > 0 || in mesh_add_meshconf_ie()
263 ifmsh->mshcfg.dot11MeshGateAnnouncementProtocol || in mesh_add_meshconf_ie()
264 ifmsh->mshcfg.dot11MeshConnectedToMeshGate; in mesh_add_meshconf_ie()
265 bool is_connected_to_as = ifmsh->mshcfg.dot11MeshConnectedToAuthServer; in mesh_add_meshconf_ie()
275 ifmsh->meshconf_offset = pos - skb->data; in mesh_add_meshconf_ie()
278 *pos++ = ifmsh->mesh_pp_id; in mesh_add_meshconf_ie()
280 *pos++ = ifmsh->mesh_pm_id; in mesh_add_meshconf_ie()
282 *pos++ = ifmsh->mesh_cc_id; in mesh_add_meshconf_ie()
284 *pos++ = ifmsh->mesh_sp_id; in mesh_add_meshconf_ie()
286 *pos++ = ifmsh->mesh_auth_id; in mesh_add_meshconf_ie()
288 neighbors = atomic_read(&ifmsh->estab_plinks); in mesh_add_meshconf_ie()
295 *pos |= ifmsh->mshcfg.dot11MeshForwarding ? in mesh_add_meshconf_ie()
297 *pos |= ifmsh->accepting_plinks ? in mesh_add_meshconf_ie()
300 *pos |= ifmsh->ps_peers_deep_sleep ? in mesh_add_meshconf_ie()
307 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_add_meshid_ie() local
310 if (skb_tailroom(skb) < 2 + ifmsh->mesh_id_len) in mesh_add_meshid_ie()
313 pos = skb_put(skb, 2 + ifmsh->mesh_id_len); in mesh_add_meshid_ie()
315 *pos++ = ifmsh->mesh_id_len; in mesh_add_meshid_ie()
316 if (ifmsh->mesh_id_len) in mesh_add_meshid_ie()
317 memcpy(pos, ifmsh->mesh_id, ifmsh->mesh_id_len); in mesh_add_meshid_ie()
325 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_add_awake_window_ie() local
329 if (ifmsh->ps_peers_light_sleep == 0 && in mesh_add_awake_window_ie()
330 ifmsh->ps_peers_deep_sleep == 0 && in mesh_add_awake_window_ie()
331 ifmsh->nonpeer_pm == NL80211_MESH_POWER_ACTIVE) in mesh_add_awake_window_ie()
340 put_unaligned_le16(ifmsh->mshcfg.dot11MeshAwakeWindowDuration, pos); in mesh_add_awake_window_ie()
348 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_add_vendor_ies() local
352 if (!ifmsh->ie || !ifmsh->ie_len) in mesh_add_vendor_ies()
356 offset = ieee80211_ie_split_vendor(ifmsh->ie, ifmsh->ie_len, 0); in mesh_add_vendor_ies()
358 if (offset < ifmsh->ie_len) { in mesh_add_vendor_ies()
359 len = ifmsh->ie_len - offset; in mesh_add_vendor_ies()
360 data = ifmsh->ie + offset; in mesh_add_vendor_ies()
371 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_add_rsn_ie() local
375 if (!ifmsh->ie || !ifmsh->ie_len) in mesh_add_rsn_ie()
379 data = cfg80211_find_ie(WLAN_EID_RSN, ifmsh->ie, ifmsh->ie_len); in mesh_add_rsn_ie()
713 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_path_root_timer() local
715 set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags); in ieee80211_mesh_path_root_timer()
720 void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh) in ieee80211_mesh_root_setup() argument
722 if (ifmsh->mshcfg.dot11MeshHWMPRootMode > IEEE80211_ROOTMODE_ROOT) in ieee80211_mesh_root_setup()
723 set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags); in ieee80211_mesh_root_setup()
725 clear_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags); in ieee80211_mesh_root_setup()
727 del_timer_sync(&ifmsh->mesh_path_root_timer); in ieee80211_mesh_root_setup()
767 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_xmit_fast() local
780 if (ifmsh->mshcfg.dot11MeshNolearn) in ieee80211_mesh_xmit_fast()
784 if (ifmsh->ps_peers_light_sleep || ifmsh->ps_peers_deep_sleep) in ieee80211_mesh_xmit_fast()
925 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_housekeeping() local
928 if (ifmsh->mshcfg.plink_timeout > 0) in ieee80211_mesh_housekeeping()
929 ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout * HZ); in ieee80211_mesh_housekeeping()
937 mod_timer(&ifmsh->housekeeping_timer, in ieee80211_mesh_housekeeping()
944 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_rootpath() local
949 if (ifmsh->mshcfg.dot11MeshHWMPRootMode == IEEE80211_PROACTIVE_RANN) in ieee80211_mesh_rootpath()
950 interval = ifmsh->mshcfg.dot11MeshHWMPRannInterval; in ieee80211_mesh_rootpath()
952 interval = ifmsh->mshcfg.dot11MeshHWMProotInterval; in ieee80211_mesh_rootpath()
954 mod_timer(&ifmsh->mesh_path_root_timer, in ieee80211_mesh_rootpath()
959 ieee80211_mesh_build_beacon(struct ieee80211_if_mesh *ifmsh) in ieee80211_mesh_build_beacon() argument
973 sdata = container_of(ifmsh, struct ieee80211_sub_if_data, u.mesh); in ieee80211_mesh_build_beacon()
997 2 + ifmsh->mesh_id_len + in ieee80211_mesh_build_beacon()
1009 ifmsh->ie_len; in ieee80211_mesh_build_beacon()
1042 csa = rcu_dereference(ifmsh->csa); in ieee80211_mesh_build_beacon()
1060 if (ifmsh->csa_role == IEEE80211_MESH_CSA_ROLE_INIT) { in ieee80211_mesh_build_beacon()
1061 *pos++ = ifmsh->mshcfg.dot11MeshTTL; in ieee80211_mesh_build_beacon()
1064 *pos++ = ifmsh->chsw_ttl; in ieee80211_mesh_build_beacon()
1070 put_unaligned_le16(ifmsh->pre_value, pos); in ieee80211_mesh_build_beacon()
1138 (bcn->tail + ifmsh->meshconf_offset); in ieee80211_mesh_build_beacon()
1141 rcu_assign_pointer(ifmsh->beacon, bcn); in ieee80211_mesh_build_beacon()
1169 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mbss_info_change_notify() local
1178 set_bit(bit, ifmsh->mbss_changed); in ieee80211_mbss_info_change_notify()
1179 set_bit(MESH_WORK_MBSS_CHANGED, &ifmsh->wrkq_flags); in ieee80211_mbss_info_change_notify()
1185 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_start_mesh() local
1199 ifmsh->mesh_cc_id = 0; /* Disabled */ in ieee80211_start_mesh()
1201 ifmsh->sync_ops = ieee80211_mesh_sync_ops_get(ifmsh->mesh_sp_id); in ieee80211_start_mesh()
1202 ifmsh->sync_offset_clockdrift_max = 0; in ieee80211_start_mesh()
1203 set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags); in ieee80211_start_mesh()
1204 ieee80211_mesh_root_setup(ifmsh); in ieee80211_start_mesh()
1207 ifmsh->mshcfg.ht_opmode; in ieee80211_start_mesh()
1212 if (ieee80211_mesh_build_beacon(ifmsh)) { in ieee80211_start_mesh()
1227 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_stop_mesh() local
1238 ifmsh->mesh_id_len = 0; in ieee80211_stop_mesh()
1246 bcn = sdata_dereference(ifmsh->beacon, sdata); in ieee80211_stop_mesh()
1247 RCU_INIT_POINTER(ifmsh->beacon, NULL); in ieee80211_stop_mesh()
1251 local->total_ps_buffered -= skb_queue_len(&ifmsh->ps.bc_buf); in ieee80211_stop_mesh()
1252 skb_queue_purge(&ifmsh->ps.bc_buf); in ieee80211_stop_mesh()
1259 ifmsh->wrkq_flags = 0; in ieee80211_stop_mesh()
1260 memset(ifmsh->mbss_changed, 0, sizeof(ifmsh->mbss_changed)); in ieee80211_stop_mesh()
1288 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_process_chnswitch() local
1356 if (err > 0 && !ifmsh->userspace_handles_dfs) { in ieee80211_mesh_process_chnswitch()
1382 ifmsh->chsw_ttl = csa_ie.ttl - 1; in ieee80211_mesh_process_chnswitch()
1383 if (ifmsh->pre_value >= csa_ie.pre_value) in ieee80211_mesh_process_chnswitch()
1385 ifmsh->pre_value = csa_ie.pre_value; in ieee80211_mesh_process_chnswitch()
1388 if (ifmsh->chsw_ttl >= ifmsh->mshcfg.dot11MeshTTL) in ieee80211_mesh_process_chnswitch()
1391 ifmsh->csa_role = IEEE80211_MESH_CSA_ROLE_REPEATER; in ieee80211_mesh_process_chnswitch()
1405 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_rx_probe_req() local
1432 (elems->mesh_id_len != ifmsh->mesh_id_len || in ieee80211_mesh_rx_probe_req()
1433 memcmp(elems->mesh_id, ifmsh->mesh_id, ifmsh->mesh_id_len))) in ieee80211_mesh_rx_probe_req()
1437 bcn = rcu_dereference(ifmsh->beacon); in ieee80211_mesh_rx_probe_req()
1469 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_rx_bcn_presp() local
1516 if (ifmsh->csa_role != IEEE80211_MESH_CSA_ROLE_INIT && in ieee80211_mesh_rx_bcn_presp()
1521 if (ifmsh->sync_ops) in ieee80211_mesh_rx_bcn_presp()
1522 ifmsh->sync_ops->rx_bcn_presp(sdata, stype, mgmt, len, in ieee80211_mesh_rx_bcn_presp()
1530 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_finish_csa() local
1535 ifmsh->csa_role = IEEE80211_MESH_CSA_ROLE_NONE; in ieee80211_mesh_finish_csa()
1536 ifmsh->chsw_ttl = 0; in ieee80211_mesh_finish_csa()
1539 tmp_csa_settings = sdata_dereference(ifmsh->csa, sdata); in ieee80211_mesh_finish_csa()
1540 RCU_INIT_POINTER(ifmsh->csa, NULL); in ieee80211_mesh_finish_csa()
1558 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_csa_beacon() local
1572 rcu_assign_pointer(ifmsh->csa, tmp_csa_settings); in ieee80211_mesh_csa_beacon()
1576 tmp_csa_settings = rcu_dereference(ifmsh->csa); in ieee80211_mesh_csa_beacon()
1577 RCU_INIT_POINTER(ifmsh->csa, NULL); in ieee80211_mesh_csa_beacon()
1616 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_rx_csa_frame() local
1637 ifmsh->chsw_ttl = elems->mesh_chansw_params_ie->mesh_ttl; in mesh_rx_csa_frame()
1638 if (!--ifmsh->chsw_ttl) in mesh_rx_csa_frame()
1642 if (ifmsh->pre_value >= pre_value) in mesh_rx_csa_frame()
1645 ifmsh->pre_value = pre_value; in mesh_rx_csa_frame()
1723 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_bss_info_changed() local
1727 for_each_set_bit(bit, ifmsh->mbss_changed, in mesh_bss_info_changed()
1729 clear_bit(bit, ifmsh->mbss_changed); in mesh_bss_info_changed()
1746 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_work() local
1754 if (ifmsh->preq_queue_len && in ieee80211_mesh_work()
1756 ifmsh->last_preq + msecs_to_jiffies(ifmsh->mshcfg.dot11MeshHWMPpreqMinInterval))) in ieee80211_mesh_work()
1759 if (test_and_clear_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags)) in ieee80211_mesh_work()
1762 if (test_and_clear_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags)) in ieee80211_mesh_work()
1765 if (test_and_clear_bit(MESH_WORK_DRIFT_ADJUST, &ifmsh->wrkq_flags)) in ieee80211_mesh_work()
1768 if (test_and_clear_bit(MESH_WORK_MBSS_CHANGED, &ifmsh->wrkq_flags)) in ieee80211_mesh_work()
1777 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_init_sdata() local
1780 timer_setup(&ifmsh->housekeeping_timer, in ieee80211_mesh_init_sdata()
1783 ifmsh->accepting_plinks = true; in ieee80211_mesh_init_sdata()
1784 atomic_set(&ifmsh->mpaths, 0); in ieee80211_mesh_init_sdata()
1786 ifmsh->last_preq = jiffies; in ieee80211_mesh_init_sdata()
1787 ifmsh->next_perr = jiffies; in ieee80211_mesh_init_sdata()
1788 ifmsh->csa_role = IEEE80211_MESH_CSA_ROLE_NONE; in ieee80211_mesh_init_sdata()
1795 timer_setup(&ifmsh->mesh_path_timer, ieee80211_mesh_path_timer, 0); in ieee80211_mesh_init_sdata()
1796 timer_setup(&ifmsh->mesh_path_root_timer, in ieee80211_mesh_init_sdata()
1798 INIT_LIST_HEAD(&ifmsh->preq_queue.list); in ieee80211_mesh_init_sdata()
1799 skb_queue_head_init(&ifmsh->ps.bc_buf); in ieee80211_mesh_init_sdata()
1800 spin_lock_init(&ifmsh->mesh_preq_queue_lock); in ieee80211_mesh_init_sdata()
1801 spin_lock_init(&ifmsh->sync_offset_lock); in ieee80211_mesh_init_sdata()
1802 RCU_INIT_POINTER(ifmsh->beacon, NULL); in ieee80211_mesh_init_sdata()