Lines Matching refs:sdata
40 struct ieee80211_sub_if_data *sdata = in ieee80211_mesh_housekeeping_timer() local
41 from_timer(sdata, t, u.mesh.housekeeping_timer); in ieee80211_mesh_housekeeping_timer()
42 struct ieee80211_local *local = sdata->local; in ieee80211_mesh_housekeeping_timer()
43 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_housekeeping_timer()
47 ieee80211_queue_work(&local->hw, &sdata->work); in ieee80211_mesh_housekeeping_timer()
59 bool mesh_matches_local(struct ieee80211_sub_if_data *sdata, in mesh_matches_local() argument
62 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_matches_local()
87 sband = ieee80211_get_sband(sdata); in mesh_matches_local()
91 ieee80211_sta_get_rates(sdata, ie, sband->band, in mesh_matches_local()
94 if (sdata->vif.bss_conf.basic_rates != basic_rates) in mesh_matches_local()
97 cfg80211_chandef_create(&sta_chan_def, sdata->vif.bss_conf.chandef.chan, in mesh_matches_local()
104 ieee80211_chandef_vht_oper(&sdata->local->hw, vht_cap_info, in mesh_matches_local()
107 ieee80211_chandef_he_6ghz_oper(sdata, ie->he_operation, NULL, in mesh_matches_local()
110 if (!cfg80211_chandef_compatible(&sdata->vif.bss_conf.chandef, in mesh_matches_local()
135 u32 mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata) in mesh_accept_plinks_update() argument
146 free_plinks = mesh_plink_availables(sdata); in mesh_accept_plinks_update()
148 if (free_plinks != sdata->u.mesh.accepting_plinks) { in mesh_accept_plinks_update()
149 sdata->u.mesh.accepting_plinks = free_plinks; in mesh_accept_plinks_update()
163 struct ieee80211_sub_if_data *sdata = sta->sdata; in mesh_sta_cleanup() local
167 ieee80211_mbss_info_change_notify(sdata, changed); in mesh_sta_cleanup()
170 int mesh_rmc_init(struct ieee80211_sub_if_data *sdata) in mesh_rmc_init() argument
174 sdata->u.mesh.rmc = kmalloc(sizeof(struct mesh_rmc), GFP_KERNEL); in mesh_rmc_init()
175 if (!sdata->u.mesh.rmc) in mesh_rmc_init()
177 sdata->u.mesh.rmc->idx_mask = RMC_BUCKETS - 1; in mesh_rmc_init()
179 INIT_HLIST_HEAD(&sdata->u.mesh.rmc->bucket[i]); in mesh_rmc_init()
183 void mesh_rmc_free(struct ieee80211_sub_if_data *sdata) in mesh_rmc_free() argument
185 struct mesh_rmc *rmc = sdata->u.mesh.rmc; in mesh_rmc_free()
190 if (!sdata->u.mesh.rmc) in mesh_rmc_free()
201 sdata->u.mesh.rmc = NULL; in mesh_rmc_free()
217 int mesh_rmc_check(struct ieee80211_sub_if_data *sdata, in mesh_rmc_check() argument
220 struct mesh_rmc *rmc = sdata->u.mesh.rmc; in mesh_rmc_check()
255 int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata, in mesh_add_meshconf_ie() argument
258 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_add_meshconf_ie()
304 int mesh_add_meshid_ie(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) in mesh_add_meshid_ie() argument
306 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_add_meshid_ie()
321 static int mesh_add_awake_window_ie(struct ieee80211_sub_if_data *sdata, in mesh_add_awake_window_ie() argument
324 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_add_awake_window_ie()
344 int mesh_add_vendor_ies(struct ieee80211_sub_if_data *sdata, in mesh_add_vendor_ies() argument
347 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_add_vendor_ies()
368 int mesh_add_rsn_ie(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) in mesh_add_rsn_ie() argument
370 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_add_rsn_ie()
391 static int mesh_add_ds_params_ie(struct ieee80211_sub_if_data *sdata, in mesh_add_ds_params_ie() argument
402 chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf); in mesh_add_ds_params_ie()
418 int mesh_add_ht_cap_ie(struct ieee80211_sub_if_data *sdata, in mesh_add_ht_cap_ie() argument
424 sband = ieee80211_get_sband(sdata); in mesh_add_ht_cap_ie()
433 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || in mesh_add_ht_cap_ie()
434 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || in mesh_add_ht_cap_ie()
435 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) in mesh_add_ht_cap_ie()
447 int mesh_add_ht_oper_ie(struct ieee80211_sub_if_data *sdata, in mesh_add_ht_oper_ie() argument
450 struct ieee80211_local *local = sdata->local; in mesh_add_ht_oper_ie()
458 chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf); in mesh_add_ht_oper_ie()
474 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || in mesh_add_ht_oper_ie()
475 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || in mesh_add_ht_oper_ie()
476 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) in mesh_add_ht_oper_ie()
483 ieee80211_ie_build_ht_oper(pos, ht_cap, &sdata->vif.bss_conf.chandef, in mesh_add_ht_oper_ie()
484 sdata->vif.bss_conf.ht_operation_mode, in mesh_add_ht_oper_ie()
490 int mesh_add_vht_cap_ie(struct ieee80211_sub_if_data *sdata, in mesh_add_vht_cap_ie() argument
496 sband = ieee80211_get_sband(sdata); in mesh_add_vht_cap_ie()
505 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || in mesh_add_vht_cap_ie()
506 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || in mesh_add_vht_cap_ie()
507 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) in mesh_add_vht_cap_ie()
519 int mesh_add_vht_oper_ie(struct ieee80211_sub_if_data *sdata, in mesh_add_vht_oper_ie() argument
522 struct ieee80211_local *local = sdata->local; in mesh_add_vht_oper_ie()
530 chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf); in mesh_add_vht_oper_ie()
546 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || in mesh_add_vht_oper_ie()
547 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || in mesh_add_vht_oper_ie()
548 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) in mesh_add_vht_oper_ie()
556 &sdata->vif.bss_conf.chandef); in mesh_add_vht_oper_ie()
561 int mesh_add_he_cap_ie(struct ieee80211_sub_if_data *sdata, in mesh_add_he_cap_ie() argument
568 sband = ieee80211_get_sband(sdata); in mesh_add_he_cap_ie()
575 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || in mesh_add_he_cap_ie()
576 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || in mesh_add_he_cap_ie()
577 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) in mesh_add_he_cap_ie()
589 int mesh_add_he_oper_ie(struct ieee80211_sub_if_data *sdata, in mesh_add_he_oper_ie() argument
597 sband = ieee80211_get_sband(sdata); in mesh_add_he_oper_ie()
603 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || in mesh_add_he_oper_ie()
604 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || in mesh_add_he_oper_ie()
605 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) in mesh_add_he_oper_ie()
609 if (sdata->vif.bss_conf.chandef.chan->band == NL80211_BAND_6GHZ) in mesh_add_he_oper_ie()
616 ieee80211_ie_build_he_oper(pos, &sdata->vif.bss_conf.chandef); in mesh_add_he_oper_ie()
621 int mesh_add_he_6ghz_cap_ie(struct ieee80211_sub_if_data *sdata, in mesh_add_he_6ghz_cap_ie() argument
627 sband = ieee80211_get_sband(sdata); in mesh_add_he_6ghz_cap_ie()
637 ieee80211_ie_build_he_6ghz_cap(sdata, sdata->deflink.smps_mode, skb); in mesh_add_he_6ghz_cap_ie()
643 struct ieee80211_sub_if_data *sdata = in ieee80211_mesh_path_timer() local
644 from_timer(sdata, t, u.mesh.mesh_path_timer); in ieee80211_mesh_path_timer()
646 ieee80211_queue_work(&sdata->local->hw, &sdata->work); in ieee80211_mesh_path_timer()
651 struct ieee80211_sub_if_data *sdata = in ieee80211_mesh_path_root_timer() local
652 from_timer(sdata, t, u.mesh.mesh_path_root_timer); in ieee80211_mesh_path_root_timer()
653 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_path_root_timer()
657 ieee80211_queue_work(&sdata->local->hw, &sdata->work); in ieee80211_mesh_path_root_timer()
672 ieee80211_mesh_update_bss_params(struct ieee80211_sub_if_data *sdata, in ieee80211_mesh_update_bss_params() argument
679 sband = ieee80211_get_sband(sdata); in ieee80211_mesh_update_bss_params()
684 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || in ieee80211_mesh_update_bss_params()
685 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || in ieee80211_mesh_update_bss_params()
686 sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) in ieee80211_mesh_update_bss_params()
689 sdata->vif.bss_conf.he_support = true; in ieee80211_mesh_update_bss_params()
697 sdata->vif.bss_conf.he_oper.params = in ieee80211_mesh_update_bss_params()
744 unsigned int ieee80211_new_mesh_header(struct ieee80211_sub_if_data *sdata, in ieee80211_new_mesh_header() argument
753 meshhdr->ttl = sdata->u.mesh.mshcfg.dot11MeshTTL; in ieee80211_new_mesh_header()
756 put_unaligned(cpu_to_le32(sdata->u.mesh.mesh_seqnum), &meshhdr->seqnum); in ieee80211_new_mesh_header()
757 sdata->u.mesh.mesh_seqnum++; in ieee80211_new_mesh_header()
773 static void ieee80211_mesh_housekeeping(struct ieee80211_sub_if_data *sdata) in ieee80211_mesh_housekeeping() argument
775 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_housekeeping()
779 ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout * HZ); in ieee80211_mesh_housekeeping()
780 mesh_path_expire(sdata); in ieee80211_mesh_housekeeping()
782 changed = mesh_accept_plinks_update(sdata); in ieee80211_mesh_housekeeping()
783 ieee80211_mbss_info_change_notify(sdata, changed); in ieee80211_mesh_housekeeping()
790 static void ieee80211_mesh_rootpath(struct ieee80211_sub_if_data *sdata) in ieee80211_mesh_rootpath() argument
792 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_rootpath()
795 mesh_path_tx_root_frame(sdata); in ieee80211_mesh_rootpath()
818 struct ieee80211_sub_if_data *sdata; in ieee80211_mesh_build_beacon() local
821 sdata = container_of(ifmsh, struct ieee80211_sub_if_data, u.mesh); in ieee80211_mesh_build_beacon()
823 chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf); in ieee80211_mesh_build_beacon()
827 ie_len_he_cap = ieee80211_ie_len_he_cap(sdata, in ieee80211_mesh_build_beacon()
872 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); in ieee80211_mesh_build_beacon()
873 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); in ieee80211_mesh_build_beacon()
874 ieee80211_mps_set_frame_flags(sdata, NULL, (void *) mgmt); in ieee80211_mesh_build_beacon()
876 cpu_to_le16(sdata->vif.bss_conf.beacon_int); in ieee80211_mesh_build_beacon()
878 sdata->u.mesh.security ? WLAN_CAPABILITY_PRIVACY : 0); in ieee80211_mesh_build_beacon()
949 if (ieee80211_add_srates_ie(sdata, skb, true, band) || in ieee80211_mesh_build_beacon()
950 mesh_add_ds_params_ie(sdata, skb)) in ieee80211_mesh_build_beacon()
960 if (ieee80211_add_ext_srates_ie(sdata, skb, true, band) || in ieee80211_mesh_build_beacon()
961 mesh_add_rsn_ie(sdata, skb) || in ieee80211_mesh_build_beacon()
962 mesh_add_ht_cap_ie(sdata, skb) || in ieee80211_mesh_build_beacon()
963 mesh_add_ht_oper_ie(sdata, skb) || in ieee80211_mesh_build_beacon()
964 mesh_add_meshid_ie(sdata, skb) || in ieee80211_mesh_build_beacon()
965 mesh_add_meshconf_ie(sdata, skb) || in ieee80211_mesh_build_beacon()
966 mesh_add_awake_window_ie(sdata, skb) || in ieee80211_mesh_build_beacon()
967 mesh_add_vht_cap_ie(sdata, skb) || in ieee80211_mesh_build_beacon()
968 mesh_add_vht_oper_ie(sdata, skb) || in ieee80211_mesh_build_beacon()
969 mesh_add_he_cap_ie(sdata, skb, ie_len_he_cap) || in ieee80211_mesh_build_beacon()
970 mesh_add_he_oper_ie(sdata, skb) || in ieee80211_mesh_build_beacon()
971 mesh_add_he_6ghz_cap_ie(sdata, skb) || in ieee80211_mesh_build_beacon()
972 mesh_add_vendor_ies(sdata, skb)) in ieee80211_mesh_build_beacon()
977 ieee80211_mesh_update_bss_params(sdata, bcn->tail, bcn->tail_len); in ieee80211_mesh_build_beacon()
991 ieee80211_mesh_rebuild_beacon(struct ieee80211_sub_if_data *sdata) in ieee80211_mesh_rebuild_beacon() argument
996 old_bcn = sdata_dereference(sdata->u.mesh.beacon, sdata); in ieee80211_mesh_rebuild_beacon()
997 ret = ieee80211_mesh_build_beacon(&sdata->u.mesh); in ieee80211_mesh_rebuild_beacon()
1007 void ieee80211_mbss_info_change_notify(struct ieee80211_sub_if_data *sdata, in ieee80211_mbss_info_change_notify() argument
1010 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mbss_info_change_notify()
1021 ieee80211_queue_work(&sdata->local->hw, &sdata->work); in ieee80211_mbss_info_change_notify()
1024 int ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) in ieee80211_start_mesh() argument
1026 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_start_mesh()
1027 struct ieee80211_local *local = sdata->local; in ieee80211_start_mesh()
1046 ieee80211_queue_work(&local->hw, &sdata->work); in ieee80211_start_mesh()
1047 sdata->vif.bss_conf.ht_operation_mode = in ieee80211_start_mesh()
1049 sdata->vif.bss_conf.enable_beacon = true; in ieee80211_start_mesh()
1051 changed |= ieee80211_mps_local_status_update(sdata); in ieee80211_start_mesh()
1054 ieee80211_stop_mesh(sdata); in ieee80211_start_mesh()
1058 ieee80211_recalc_dtim(local, sdata); in ieee80211_start_mesh()
1059 ieee80211_link_info_change_notify(sdata, &sdata->deflink, changed); in ieee80211_start_mesh()
1061 netif_carrier_on(sdata->dev); in ieee80211_start_mesh()
1065 void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) in ieee80211_stop_mesh() argument
1067 struct ieee80211_local *local = sdata->local; in ieee80211_stop_mesh()
1068 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_stop_mesh()
1071 netif_carrier_off(sdata->dev); in ieee80211_stop_mesh()
1074 sta_info_flush(sdata); in ieee80211_stop_mesh()
1075 ieee80211_free_keys(sdata, true); in ieee80211_stop_mesh()
1076 mesh_path_flush_by_iface(sdata); in ieee80211_stop_mesh()
1080 sdata->vif.bss_conf.enable_beacon = false; in ieee80211_stop_mesh()
1081 sdata->beacon_rate_set = false; in ieee80211_stop_mesh()
1082 clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state); in ieee80211_stop_mesh()
1083 ieee80211_link_info_change_notify(sdata, &sdata->deflink, in ieee80211_stop_mesh()
1087 bcn = sdata_dereference(ifmsh->beacon, sdata); in ieee80211_stop_mesh()
1095 del_timer_sync(&sdata->u.mesh.housekeeping_timer); in ieee80211_stop_mesh()
1096 del_timer_sync(&sdata->u.mesh.mesh_path_root_timer); in ieee80211_stop_mesh()
1097 del_timer_sync(&sdata->u.mesh.mesh_path_timer); in ieee80211_stop_mesh()
1108 static void ieee80211_mesh_csa_mark_radar(struct ieee80211_sub_if_data *sdata) in ieee80211_mesh_csa_mark_radar() argument
1115 err = cfg80211_chandef_dfs_required(sdata->local->hw.wiphy, in ieee80211_mesh_csa_mark_radar()
1116 &sdata->vif.bss_conf.chandef, in ieee80211_mesh_csa_mark_radar()
1119 cfg80211_radar_event(sdata->local->hw.wiphy, in ieee80211_mesh_csa_mark_radar()
1120 &sdata->vif.bss_conf.chandef, GFP_ATOMIC); in ieee80211_mesh_csa_mark_radar()
1124 ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata, in ieee80211_mesh_process_chnswitch() argument
1129 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_process_chnswitch()
1135 sdata_assert_lock(sdata); in ieee80211_mesh_process_chnswitch()
1137 sband = ieee80211_get_sband(sdata); in ieee80211_mesh_process_chnswitch()
1141 switch (sdata->vif.bss_conf.chandef.width) { in ieee80211_mesh_process_chnswitch()
1160 err = ieee80211_parse_ch_switch_ie(sdata, elems, sband->band, in ieee80211_mesh_process_chnswitch()
1162 conn_flags, sdata->vif.addr, in ieee80211_mesh_process_chnswitch()
1173 ieee80211_mesh_csa_mark_radar(sdata); in ieee80211_mesh_process_chnswitch()
1178 if (!cfg80211_chandef_usable(sdata->local->hw.wiphy, ¶ms.chandef, in ieee80211_mesh_process_chnswitch()
1180 !cfg80211_reg_can_beacon(sdata->local->hw.wiphy, ¶ms.chandef, in ieee80211_mesh_process_chnswitch()
1182 sdata_info(sdata, in ieee80211_mesh_process_chnswitch()
1184 sdata->vif.addr, in ieee80211_mesh_process_chnswitch()
1192 err = cfg80211_chandef_dfs_required(sdata->local->hw.wiphy, in ieee80211_mesh_process_chnswitch()
1198 sdata_info(sdata, in ieee80211_mesh_process_chnswitch()
1200 sdata->vif.addr, in ieee80211_mesh_process_chnswitch()
1211 &sdata->vif.bss_conf.chandef)) { in ieee80211_mesh_process_chnswitch()
1212 mcsa_dbg(sdata, in ieee80211_mesh_process_chnswitch()
1217 mcsa_dbg(sdata, in ieee80211_mesh_process_chnswitch()
1234 if (ieee80211_channel_switch(sdata->local->hw.wiphy, sdata->dev, in ieee80211_mesh_process_chnswitch()
1242 ieee80211_mesh_rx_probe_req(struct ieee80211_sub_if_data *sdata, in ieee80211_mesh_rx_probe_req() argument
1245 struct ieee80211_local *local = sdata->local; in ieee80211_mesh_rx_probe_req()
1246 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_rx_probe_req()
1267 if ((!ether_addr_equal(mgmt->da, sdata->vif.addr) && in ieee80211_mesh_rx_probe_req()
1296 ieee80211_tx_skb(sdata, presp); in ieee80211_mesh_rx_probe_req()
1303 static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, in ieee80211_mesh_rx_bcn_presp() argument
1309 struct ieee80211_local *local = sdata->local; in ieee80211_mesh_rx_bcn_presp()
1310 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_rx_bcn_presp()
1319 !ether_addr_equal(mgmt->da, sdata->vif.addr)) in ieee80211_mesh_rx_bcn_presp()
1334 (elems->rsn && sdata->u.mesh.security == IEEE80211_MESH_SEC_NONE) || in ieee80211_mesh_rx_bcn_presp()
1335 (!elems->rsn && sdata->u.mesh.security != IEEE80211_MESH_SEC_NONE)) in ieee80211_mesh_rx_bcn_presp()
1348 if (mesh_matches_local(sdata, elems)) { in ieee80211_mesh_rx_bcn_presp()
1349 mpl_dbg(sdata, "rssi_threshold=%d,rx_status->signal=%d\n", in ieee80211_mesh_rx_bcn_presp()
1350 sdata->u.mesh.mshcfg.rssi_threshold, rx_status->signal); in ieee80211_mesh_rx_bcn_presp()
1351 if (!sdata->u.mesh.user_mpm || in ieee80211_mesh_rx_bcn_presp()
1352 sdata->u.mesh.mshcfg.rssi_threshold == 0 || in ieee80211_mesh_rx_bcn_presp()
1353 sdata->u.mesh.mshcfg.rssi_threshold < rx_status->signal) in ieee80211_mesh_rx_bcn_presp()
1354 mesh_neighbour_update(sdata, mgmt->sa, elems, in ieee80211_mesh_rx_bcn_presp()
1358 !sdata->vif.bss_conf.csa_active) in ieee80211_mesh_rx_bcn_presp()
1359 ieee80211_mesh_process_chnswitch(sdata, elems, true); in ieee80211_mesh_rx_bcn_presp()
1363 ifmsh->sync_ops->rx_bcn_presp(sdata, stype, mgmt, len, in ieee80211_mesh_rx_bcn_presp()
1369 int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata) in ieee80211_mesh_finish_csa() argument
1371 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_finish_csa()
1381 tmp_csa_settings = sdata_dereference(ifmsh->csa, sdata); in ieee80211_mesh_finish_csa()
1385 ret = ieee80211_mesh_rebuild_beacon(sdata); in ieee80211_mesh_finish_csa()
1391 mcsa_dbg(sdata, "complete switching to center freq %d MHz", in ieee80211_mesh_finish_csa()
1392 sdata->vif.bss_conf.chandef.chan->center_freq); in ieee80211_mesh_finish_csa()
1396 int ieee80211_mesh_csa_beacon(struct ieee80211_sub_if_data *sdata, in ieee80211_mesh_csa_beacon() argument
1399 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_csa_beacon()
1403 lockdep_assert_held(&sdata->wdev.mtx); in ieee80211_mesh_csa_beacon()
1415 ret = ieee80211_mesh_rebuild_beacon(sdata); in ieee80211_mesh_csa_beacon()
1426 static int mesh_fwd_csa_frame(struct ieee80211_sub_if_data *sdata, in mesh_fwd_csa_frame() argument
1432 struct ieee80211_local *local = sdata->local; in mesh_fwd_csa_frame()
1446 memcpy(mgmt_fwd->sa, sdata->vif.addr, ETH_ALEN); in mesh_fwd_csa_frame()
1447 memcpy(mgmt_fwd->bssid, sdata->vif.addr, ETH_ALEN); in mesh_fwd_csa_frame()
1449 ieee80211_tx_skb(sdata, skb); in mesh_fwd_csa_frame()
1453 static void mesh_rx_csa_frame(struct ieee80211_sub_if_data *sdata, in mesh_rx_csa_frame() argument
1456 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_rx_csa_frame()
1474 if (!mesh_matches_local(sdata, elems)) in mesh_rx_csa_frame()
1487 if (!sdata->vif.bss_conf.csa_active && in mesh_rx_csa_frame()
1488 !ieee80211_mesh_process_chnswitch(sdata, elems, false)) { in mesh_rx_csa_frame()
1489 mcsa_dbg(sdata, "Failed to process CSA action frame"); in mesh_rx_csa_frame()
1495 if (mesh_fwd_csa_frame(sdata, mgmt, len, elems) < 0) in mesh_rx_csa_frame()
1496 mcsa_dbg(sdata, "Failed to forward the CSA frame"); in mesh_rx_csa_frame()
1502 static void ieee80211_mesh_rx_mgmt_action(struct ieee80211_sub_if_data *sdata, in ieee80211_mesh_rx_mgmt_action() argument
1513 mesh_rx_plink_frame(sdata, mgmt, len, rx_status); in ieee80211_mesh_rx_mgmt_action()
1519 mesh_rx_path_sel_frame(sdata, mgmt, len); in ieee80211_mesh_rx_mgmt_action()
1522 mesh_rx_csa_frame(sdata, mgmt, len); in ieee80211_mesh_rx_mgmt_action()
1527 void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, in ieee80211_mesh_rx_queued_mgmt() argument
1534 sdata_lock(sdata); in ieee80211_mesh_rx_queued_mgmt()
1537 if (!sdata->u.mesh.mesh_id_len) in ieee80211_mesh_rx_queued_mgmt()
1547 ieee80211_mesh_rx_bcn_presp(sdata, stype, mgmt, skb->len, in ieee80211_mesh_rx_queued_mgmt()
1551 ieee80211_mesh_rx_probe_req(sdata, mgmt, skb->len); in ieee80211_mesh_rx_queued_mgmt()
1554 ieee80211_mesh_rx_mgmt_action(sdata, mgmt, skb->len, rx_status); in ieee80211_mesh_rx_queued_mgmt()
1558 sdata_unlock(sdata); in ieee80211_mesh_rx_queued_mgmt()
1561 static void mesh_bss_info_changed(struct ieee80211_sub_if_data *sdata) in mesh_bss_info_changed() argument
1563 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_bss_info_changed()
1572 if (sdata->vif.bss_conf.enable_beacon && in mesh_bss_info_changed()
1577 if (ieee80211_mesh_rebuild_beacon(sdata)) in mesh_bss_info_changed()
1580 ieee80211_link_info_change_notify(sdata, &sdata->deflink, changed); in mesh_bss_info_changed()
1583 void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata) in ieee80211_mesh_work() argument
1585 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_work()
1587 sdata_lock(sdata); in ieee80211_mesh_work()
1590 if (!sdata->u.mesh.mesh_id_len) in ieee80211_mesh_work()
1596 mesh_path_start_discovery(sdata); in ieee80211_mesh_work()
1599 ieee80211_mesh_housekeeping(sdata); in ieee80211_mesh_work()
1602 ieee80211_mesh_rootpath(sdata); in ieee80211_mesh_work()
1605 mesh_sync_adjust_tsf(sdata); in ieee80211_mesh_work()
1608 mesh_bss_info_changed(sdata); in ieee80211_mesh_work()
1610 sdata_unlock(sdata); in ieee80211_mesh_work()
1614 void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata) in ieee80211_mesh_init_sdata() argument
1616 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in ieee80211_mesh_init_sdata()
1624 mesh_rmc_init(sdata); in ieee80211_mesh_init_sdata()
1632 mesh_pathtbl_init(sdata); in ieee80211_mesh_init_sdata()
1643 sdata->vif.bss_conf.bssid = zero_addr; in ieee80211_mesh_init_sdata()
1646 void ieee80211_mesh_teardown_sdata(struct ieee80211_sub_if_data *sdata) in ieee80211_mesh_teardown_sdata() argument
1648 mesh_rmc_free(sdata); in ieee80211_mesh_teardown_sdata()
1649 mesh_pathtbl_unregister(sdata); in ieee80211_mesh_teardown_sdata()