Lines Matching refs:sdata
96 msecs_to_jiffies(sdata->u.mesh.mshcfg.min_discovery_timeout)
111 struct ieee80211_sub_if_data *sdata) in mesh_path_sel_frame_tx() argument
113 struct ieee80211_local *local = sdata->local; in mesh_path_sel_frame_tx()
132 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); in mesh_path_sel_frame_tx()
134 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); in mesh_path_sel_frame_tx()
191 ieee80211_tx_skb(sdata, skb); in mesh_path_sel_frame_tx()
205 struct ieee80211_sub_if_data *sdata) in mesh_path_error_tx() argument
207 struct ieee80211_local *local = sdata->local; in mesh_path_error_tx()
226 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); in mesh_path_error_tx()
254 ieee80211_tx_skb(sdata, skb); in mesh_path_error_tx()
324 static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, in hwmp_route_info_get() argument
328 struct ieee80211_local *local = sdata->local; in hwmp_route_info_get()
339 sta = sta_info_get(sdata, mgmt->sa); in hwmp_route_info_get()
378 if (memcmp(orig_addr, sdata->vif.addr, ETH_ALEN) == 0) { in hwmp_route_info_get()
385 mpath = mesh_path_lookup(orig_addr, sdata); in hwmp_route_info_get()
401 mesh_path_add(orig_addr, sdata); in hwmp_route_info_get()
402 mpath = mesh_path_lookup(orig_addr, sdata); in hwmp_route_info_get()
434 mpath = mesh_path_lookup(ta, sdata); in hwmp_route_info_get()
442 mesh_path_add(ta, sdata); in hwmp_route_info_get()
443 mpath = mesh_path_lookup(ta, sdata); in hwmp_route_info_get()
469 static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, in hwmp_preq_frame_process() argument
473 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in hwmp_preq_frame_process()
490 if (memcmp(target_addr, sdata->vif.addr, ETH_ALEN) == 0) { in hwmp_preq_frame_process()
496 net_traversal_jiffies(sdata)) || in hwmp_preq_frame_process()
503 mpath = mesh_path_lookup(target_addr, sdata); in hwmp_preq_frame_process()
532 0, sdata); in hwmp_preq_frame_process()
557 sdata); in hwmp_preq_frame_process()
564 static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata, in hwmp_prep_frame_process() argument
583 if (memcmp(target_addr, sdata->vif.addr, ETH_ALEN) == 0) in hwmp_prep_frame_process()
589 sdata->u.mesh.mshstats.dropped_frames_ttl++; in hwmp_prep_frame_process()
594 mpath = mesh_path_lookup(target_addr, sdata); in hwmp_prep_frame_process()
617 0, sdata); in hwmp_prep_frame_process()
620 sdata->u.mesh.mshstats.fwded_unicast++; in hwmp_prep_frame_process()
621 sdata->u.mesh.mshstats.fwded_frames++; in hwmp_prep_frame_process()
626 sdata->u.mesh.mshstats.dropped_frames_no_route++; in hwmp_prep_frame_process()
629 static void hwmp_perr_frame_process(struct ieee80211_sub_if_data *sdata, in hwmp_perr_frame_process() argument
632 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in hwmp_perr_frame_process()
653 mpath = mesh_path_lookup(target_addr, sdata); in hwmp_perr_frame_process()
665 broadcast_addr, sdata); in hwmp_perr_frame_process()
672 static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, in hwmp_rann_frame_process() argument
676 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in hwmp_rann_frame_process()
699 mpath = mesh_path_lookup(orig_addr, sdata); in hwmp_rann_frame_process()
701 mesh_path_add(orig_addr, sdata); in hwmp_rann_frame_process()
702 mpath = mesh_path_lookup(orig_addr, sdata); in hwmp_rann_frame_process()
705 sdata->u.mesh.mshstats.dropped_frames_no_route++; in hwmp_rann_frame_process()
717 0, sdata); in hwmp_rann_frame_process()
724 void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata, in mesh_rx_path_sel_frame() argument
744 last_hop_metric = hwmp_route_info_get(sdata, mgmt, elems.preq, in mesh_rx_path_sel_frame()
747 hwmp_preq_frame_process(sdata, mgmt, elems.preq, in mesh_rx_path_sel_frame()
754 last_hop_metric = hwmp_route_info_get(sdata, mgmt, elems.prep, in mesh_rx_path_sel_frame()
757 hwmp_prep_frame_process(sdata, mgmt, elems.prep, in mesh_rx_path_sel_frame()
764 hwmp_perr_frame_process(sdata, mgmt, elems.perr); in mesh_rx_path_sel_frame()
767 hwmp_rann_frame_process(sdata, mgmt, elems.rann); in mesh_rx_path_sel_frame()
781 struct ieee80211_sub_if_data *sdata = mpath->sdata; in mesh_queue_preq() local
782 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_queue_preq()
807 if (time_after(jiffies, ifmsh->last_preq + min_preq_int_jiff(sdata))) in mesh_queue_preq()
808 ieee80211_queue_work(&sdata->local->hw, &sdata->work); in mesh_queue_preq()
814 ifmsh->last_preq = jiffies - min_preq_int_jiff(sdata) - 1; in mesh_queue_preq()
815 ieee80211_queue_work(&sdata->local->hw, &sdata->work); in mesh_queue_preq()
818 min_preq_int_jiff(sdata)); in mesh_queue_preq()
826 void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata) in mesh_path_start_discovery() argument
828 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_path_start_discovery()
837 min_preq_int_jiff(sdata))) { in mesh_path_start_discovery()
849 mpath = mesh_path_lookup(preq_node->dst, sdata); in mesh_path_start_discovery()
862 mpath->discovery_timeout = disc_timeout_jiff(sdata); in mesh_path_start_discovery()
874 net_traversal_jiffies(sdata)) || in mesh_path_start_discovery()
877 sdata->u.mesh.last_sn_update = jiffies; in mesh_path_start_discovery()
879 lifetime = default_lifetime(sdata); in mesh_path_start_discovery()
880 ttl = sdata->u.mesh.mshcfg.element_ttl; in mesh_path_start_discovery()
882 sdata->u.mesh.mshstats.dropped_frames_ttl++; in mesh_path_start_discovery()
893 mesh_path_sel_frame_tx(MPATH_PREQ, 0, sdata->vif.addr, in mesh_path_start_discovery()
897 cpu_to_le32(ifmsh->preq_id++), sdata); in mesh_path_start_discovery()
917 struct ieee80211_sub_if_data *sdata) in mesh_nexthop_lookup() argument
926 mpath = mesh_path_lookup(target_addr, sdata); in mesh_nexthop_lookup()
929 mesh_path_add(target_addr, sdata); in mesh_nexthop_lookup()
930 mpath = mesh_path_lookup(target_addr, sdata); in mesh_nexthop_lookup()
932 sdata->u.mesh.mshstats.dropped_frames_no_route++; in mesh_nexthop_lookup()
941 msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) && in mesh_nexthop_lookup()
942 !memcmp(sdata->vif.addr, hdr->addr4, ETH_ALEN) && in mesh_nexthop_lookup()
963 mesh_path_discard_frame(skb_to_free, sdata); in mesh_nexthop_lookup()
974 struct ieee80211_sub_if_data *sdata; in mesh_path_timer() local
982 sdata = mpath->sdata; in mesh_path_timer()
984 if (sdata->local->quiescing) { in mesh_path_timer()
993 else if (mpath->discovery_retries < max_preq_retries(sdata)) { in mesh_path_timer()
1009 mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata) in mesh_path_tx_root_frame() argument
1011 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_path_tx_root_frame()
1013 mesh_path_sel_frame_tx(MPATH_RANN, 0, sdata->vif.addr, in mesh_path_tx_root_frame()
1016 0, sdata->u.mesh.mshcfg.element_ttl, in mesh_path_tx_root_frame()
1017 0, 0, 0, sdata); in mesh_path_tx_root_frame()