Lines Matching refs:sdata
87 msecs_to_jiffies(sdata->u.mesh.mshcfg.min_discovery_timeout)
89 msecs_to_jiffies(sdata->u.mesh.mshcfg.dot11MeshHWMPconfirmationInterval)
106 struct ieee80211_sub_if_data *sdata) in mesh_path_sel_frame_tx() argument
108 struct ieee80211_local *local = sdata->local; in mesh_path_sel_frame_tx()
126 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); in mesh_path_sel_frame_tx()
128 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); in mesh_path_sel_frame_tx()
135 mhwmp_dbg(sdata, "sending PREQ to %pM\n", target); in mesh_path_sel_frame_tx()
141 mhwmp_dbg(sdata, "sending PREP to %pM\n", orig_addr); in mesh_path_sel_frame_tx()
147 mhwmp_dbg(sdata, "sending RANN from %pM\n", orig_addr); in mesh_path_sel_frame_tx()
193 ieee80211_tx_skb(sdata, skb); in mesh_path_sel_frame_tx()
200 static void prepare_frame_for_deferred_tx(struct ieee80211_sub_if_data *sdata, in prepare_frame_for_deferred_tx() argument
214 info->control.vif = &sdata->vif; in prepare_frame_for_deferred_tx()
216 ieee80211_set_qos_hdr(sdata, skb); in prepare_frame_for_deferred_tx()
217 ieee80211_mps_set_frame_flags(sdata, NULL, hdr); in prepare_frame_for_deferred_tx()
234 int mesh_path_error_tx(struct ieee80211_sub_if_data *sdata, in mesh_path_error_tx() argument
238 struct ieee80211_local *local = sdata->local; in mesh_path_error_tx()
240 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_path_error_tx()
250 sdata->encrypt_headroom + in mesh_path_error_tx()
256 skb_reserve(skb, local->tx_headroom + sdata->encrypt_headroom); in mesh_path_error_tx()
262 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); in mesh_path_error_tx()
264 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); in mesh_path_error_tx()
288 prepare_frame_for_deferred_tx(sdata, skb); in mesh_path_error_tx()
380 static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, in hwmp_route_info_get() argument
384 struct ieee80211_local *local = sdata->local; in hwmp_route_info_get()
396 sta = sta_info_get(sdata, mgmt->sa); in hwmp_route_info_get()
435 if (ether_addr_equal(orig_addr, sdata->vif.addr)) { in hwmp_route_info_get()
442 mpath = mesh_path_lookup(sdata, orig_addr); in hwmp_route_info_get()
480 mpath = mesh_path_add(sdata, orig_addr); in hwmp_route_info_get()
518 mpath = mesh_path_lookup(sdata, ta); in hwmp_route_info_get()
528 mpath = mesh_path_add(sdata, ta); in hwmp_route_info_get()
559 static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, in hwmp_preq_frame_process() argument
563 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in hwmp_preq_frame_process()
583 mhwmp_dbg(sdata, "received PREQ from %pM\n", orig_addr); in hwmp_preq_frame_process()
585 if (ether_addr_equal(target_addr, sdata->vif.addr)) { in hwmp_preq_frame_process()
586 mhwmp_dbg(sdata, "PREQ is for us\n"); in hwmp_preq_frame_process()
595 net_traversal_jiffies(sdata)) || in hwmp_preq_frame_process()
604 mpath = mesh_path_lookup(sdata, orig_addr); in hwmp_preq_frame_process()
608 target_addr = sdata->vif.addr; in hwmp_preq_frame_process()
619 mpath = mesh_path_lookup(sdata, target_addr); in hwmp_preq_frame_process()
641 mhwmp_dbg(sdata, "replying to the PREQ\n"); in hwmp_preq_frame_process()
646 sdata); in hwmp_preq_frame_process()
662 mhwmp_dbg(sdata, "forwarding the PREQ from %pM\n", orig_addr); in hwmp_preq_frame_process()
677 orig_metric, preq_id, sdata); in hwmp_preq_frame_process()
695 static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata, in hwmp_prep_frame_process() argument
699 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in hwmp_prep_frame_process()
706 mhwmp_dbg(sdata, "received PREP from %pM\n", in hwmp_prep_frame_process()
710 if (ether_addr_equal(orig_addr, sdata->vif.addr)) in hwmp_prep_frame_process()
719 sdata->u.mesh.mshstats.dropped_frames_ttl++; in hwmp_prep_frame_process()
724 mpath = mesh_path_lookup(sdata, orig_addr); in hwmp_prep_frame_process()
745 ttl, lifetime, metric, 0, sdata); in hwmp_prep_frame_process()
748 sdata->u.mesh.mshstats.fwded_unicast++; in hwmp_prep_frame_process()
749 sdata->u.mesh.mshstats.fwded_frames++; in hwmp_prep_frame_process()
754 sdata->u.mesh.mshstats.dropped_frames_no_route++; in hwmp_prep_frame_process()
757 static void hwmp_perr_frame_process(struct ieee80211_sub_if_data *sdata, in hwmp_perr_frame_process() argument
761 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in hwmp_perr_frame_process()
780 mpath = mesh_path_lookup(sdata, target_addr); in hwmp_perr_frame_process()
799 mesh_path_error_tx(sdata, ttl, target_addr, in hwmp_perr_frame_process()
809 static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, in hwmp_rann_frame_process() argument
813 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in hwmp_rann_frame_process()
814 struct ieee80211_local *local = sdata->local; in hwmp_rann_frame_process()
833 if (ether_addr_equal(orig_addr, sdata->vif.addr)) in hwmp_rann_frame_process()
836 mhwmp_dbg(sdata, in hwmp_rann_frame_process()
841 sta = sta_info_get(sdata, mgmt->sa); in hwmp_rann_frame_process()
852 mpath = mesh_path_lookup(sdata, orig_addr); in hwmp_rann_frame_process()
854 mpath = mesh_path_add(sdata, orig_addr); in hwmp_rann_frame_process()
857 sdata->u.mesh.mshstats.dropped_frames_no_route++; in hwmp_rann_frame_process()
870 root_path_confirmation_jiffies(sdata)) || in hwmp_rann_frame_process()
873 mhwmp_dbg(sdata, in hwmp_rann_frame_process()
901 new_metric, 0, sdata); in hwmp_rann_frame_process()
908 void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata, in mesh_rx_path_sel_frame() argument
921 sta = sta_info_get(sdata, mgmt->sa); in mesh_rx_path_sel_frame()
936 path_metric = hwmp_route_info_get(sdata, mgmt, elems.preq, in mesh_rx_path_sel_frame()
939 hwmp_preq_frame_process(sdata, mgmt, elems.preq, in mesh_rx_path_sel_frame()
946 path_metric = hwmp_route_info_get(sdata, mgmt, elems.prep, in mesh_rx_path_sel_frame()
949 hwmp_prep_frame_process(sdata, mgmt, elems.prep, in mesh_rx_path_sel_frame()
956 hwmp_perr_frame_process(sdata, mgmt, elems.perr); in mesh_rx_path_sel_frame()
959 hwmp_rann_frame_process(sdata, mgmt, elems.rann); in mesh_rx_path_sel_frame()
973 struct ieee80211_sub_if_data *sdata = mpath->sdata; in mesh_queue_preq() local
974 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_queue_preq()
979 mhwmp_dbg(sdata, "could not allocate PREQ node\n"); in mesh_queue_preq()
988 mhwmp_dbg(sdata, "PREQ node queue full\n"); in mesh_queue_preq()
1010 if (time_after(jiffies, ifmsh->last_preq + min_preq_int_jiff(sdata))) in mesh_queue_preq()
1011 ieee80211_queue_work(&sdata->local->hw, &sdata->work); in mesh_queue_preq()
1017 ifmsh->last_preq = jiffies - min_preq_int_jiff(sdata) - 1; in mesh_queue_preq()
1018 ieee80211_queue_work(&sdata->local->hw, &sdata->work); in mesh_queue_preq()
1021 min_preq_int_jiff(sdata)); in mesh_queue_preq()
1029 void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata) in mesh_path_start_discovery() argument
1031 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_path_start_discovery()
1041 min_preq_int_jiff(sdata))) { in mesh_path_start_discovery()
1053 mpath = mesh_path_lookup(sdata, preq_node->dst); in mesh_path_start_discovery()
1071 mpath->discovery_timeout = disc_timeout_jiff(sdata); in mesh_path_start_discovery()
1083 net_traversal_jiffies(sdata)) || in mesh_path_start_discovery()
1086 sdata->u.mesh.last_sn_update = jiffies; in mesh_path_start_discovery()
1088 lifetime = default_lifetime(sdata); in mesh_path_start_discovery()
1089 ttl = sdata->u.mesh.mshcfg.element_ttl; in mesh_path_start_discovery()
1091 sdata->u.mesh.mshstats.dropped_frames_ttl++; in mesh_path_start_discovery()
1103 mesh_path_sel_frame_tx(MPATH_PREQ, 0, sdata->vif.addr, ifmsh->sn, in mesh_path_start_discovery()
1105 ttl, lifetime, 0, ifmsh->preq_id++, sdata); in mesh_path_start_discovery()
1129 int mesh_nexthop_resolve(struct ieee80211_sub_if_data *sdata, in mesh_nexthop_resolve() argument
1146 if (!mesh_nexthop_lookup(sdata, skb)) in mesh_nexthop_resolve()
1150 mpath = mesh_path_lookup(sdata, target_addr); in mesh_nexthop_resolve()
1152 mpath = mesh_path_add(sdata, target_addr); in mesh_nexthop_resolve()
1154 mesh_path_discard_frame(sdata, skb); in mesh_nexthop_resolve()
1160 mesh_path_sel_is_hwmp(sdata)) in mesh_nexthop_resolve()
1167 ieee80211_set_qos_hdr(sdata, skb); in mesh_nexthop_resolve()
1170 mesh_path_discard_frame(sdata, skb_to_free); in mesh_nexthop_resolve()
1186 static int mesh_nexthop_lookup_nolearn(struct ieee80211_sub_if_data *sdata, in mesh_nexthop_lookup_nolearn() argument
1196 sta = sta_info_get(sdata, hdr->addr3); in mesh_nexthop_lookup_nolearn()
1205 memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN); in mesh_nexthop_lookup_nolearn()
1219 int mesh_nexthop_lookup(struct ieee80211_sub_if_data *sdata, in mesh_nexthop_lookup() argument
1222 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_nexthop_lookup()
1229 !mesh_nexthop_lookup_nolearn(sdata, skb)) in mesh_nexthop_lookup()
1232 mpath = mesh_path_lookup(sdata, target_addr); in mesh_nexthop_lookup()
1238 msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) && in mesh_nexthop_lookup()
1239 ether_addr_equal(sdata->vif.addr, hdr->addr4) && in mesh_nexthop_lookup()
1247 memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN); in mesh_nexthop_lookup()
1248 ieee80211_mps_set_frame_flags(sdata, next_hop, hdr); in mesh_nexthop_lookup()
1258 struct ieee80211_sub_if_data *sdata = mpath->sdata; in mesh_path_timer() local
1261 if (sdata->local->quiescing) in mesh_path_timer()
1269 } else if (mpath->discovery_retries < max_preq_retries(sdata)) { in mesh_path_timer()
1281 if (!mpath->is_gate && mesh_gate_num(sdata) > 0) { in mesh_path_timer()
1284 mhwmp_dbg(sdata, "no gate was reachable\n"); in mesh_path_timer()
1290 void mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata) in mesh_path_tx_root_frame() argument
1292 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; in mesh_path_tx_root_frame()
1301 mesh_path_sel_frame_tx(MPATH_RANN, flags, sdata->vif.addr, in mesh_path_tx_root_frame()
1304 interval, 0, 0, sdata); in mesh_path_tx_root_frame()
1313 mesh_path_sel_frame_tx(MPATH_PREQ, flags, sdata->vif.addr, in mesh_path_tx_root_frame()
1317 0, ifmsh->preq_id++, sdata); in mesh_path_tx_root_frame()
1320 mhwmp_dbg(sdata, "Proactive mechanism not supported\n"); in mesh_path_tx_root_frame()