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