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);
223 * @sdata: local mesh subif
236 int mesh_path_error_tx(struct ieee80211_sub_if_data *sdata,
240 struct ieee80211_local *local = sdata->local;
242 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
264 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
266 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
290 prepare_frame_for_deferred_tx(sdata, skb);
379 * @sdata: local mesh subif
393 static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
397 struct ieee80211_local *local = sdata->local;
410 sta = sta_info_get(sdata, mgmt->sa);
449 if (ether_addr_equal(orig_addr, sdata->vif.addr)) {
456 mpath = mesh_path_lookup(sdata, orig_addr);
494 mpath = mesh_path_add(sdata, orig_addr);
536 mpath = mesh_path_lookup(sdata, ta);
546 mpath = mesh_path_add(sdata, ta);
581 static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
585 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
605 mhwmp_dbg(sdata, "received PREQ from %pM\n", orig_addr);
607 if (ether_addr_equal(target_addr, sdata->vif.addr)) {
608 mhwmp_dbg(sdata, "PREQ is for us\n");
617 net_traversal_jiffies(sdata)) ||
626 mpath = mesh_path_lookup(sdata, orig_addr);
630 target_addr = sdata->vif.addr;
641 mpath = mesh_path_lookup(sdata, target_addr);
665 mhwmp_dbg(sdata, "replying to the PREQ\n");
670 sdata);
686 mhwmp_dbg(sdata, "forwarding the PREQ from %pM\n", orig_addr);
701 orig_metric, preq_id, sdata);
719 static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata,
723 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
730 mhwmp_dbg(sdata, "received PREP from %pM\n",
734 if (ether_addr_equal(orig_addr, sdata->vif.addr))
743 sdata->u.mesh.mshstats.dropped_frames_ttl++;
748 mpath = mesh_path_lookup(sdata, orig_addr);
769 ttl, lifetime, metric, 0, sdata);
772 sdata->u.mesh.mshstats.fwded_unicast++;
773 sdata->u.mesh.mshstats.fwded_frames++;
778 sdata->u.mesh.mshstats.dropped_frames_no_route++;
781 static void hwmp_perr_frame_process(struct ieee80211_sub_if_data *sdata,
785 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
804 mpath = mesh_path_lookup(sdata, target_addr);
823 mesh_path_error_tx(sdata, ttl, target_addr,
833 static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
837 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
838 struct ieee80211_local *local = sdata->local;
857 if (ether_addr_equal(orig_addr, sdata->vif.addr))
860 mhwmp_dbg(sdata,
865 sta = sta_info_get(sdata, mgmt->sa);
876 mpath = mesh_path_lookup(sdata, orig_addr);
878 mpath = mesh_path_add(sdata, orig_addr);
881 sdata->u.mesh.mshstats.dropped_frames_no_route++;
894 root_path_confirmation_jiffies(sdata)) ||
897 mhwmp_dbg(sdata,
925 new_metric, 0, sdata);
932 void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
945 sta = sta_info_get(sdata, mgmt->sa);
965 path_metric = hwmp_route_info_get(sdata, mgmt, elems->preq,
968 hwmp_preq_frame_process(sdata, mgmt, elems->preq,
975 path_metric = hwmp_route_info_get(sdata, mgmt, elems->prep,
978 hwmp_prep_frame_process(sdata, mgmt, elems->prep,
985 hwmp_perr_frame_process(sdata, mgmt, elems->perr);
988 hwmp_rann_frame_process(sdata, mgmt, elems->rann);
1004 struct ieee80211_sub_if_data *sdata = mpath->sdata;
1005 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
1010 mhwmp_dbg(sdata, "could not allocate PREQ node\n");
1019 mhwmp_dbg(sdata, "PREQ node queue full\n");
1041 if (time_after(jiffies, ifmsh->last_preq + min_preq_int_jiff(sdata)))
1042 wiphy_work_queue(sdata->local->hw.wiphy, &sdata->work);
1048 ifmsh->last_preq = jiffies - min_preq_int_jiff(sdata) - 1;
1049 wiphy_work_queue(sdata->local->hw.wiphy, &sdata->work);
1052 min_preq_int_jiff(sdata));
1058 * @sdata: local mesh subif
1060 void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata)
1062 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
1072 min_preq_int_jiff(sdata))) {
1084 mpath = mesh_path_lookup(sdata, preq_node->dst);
1102 mpath->discovery_timeout = disc_timeout_jiff(sdata);
1114 net_traversal_jiffies(sdata)) ||
1117 sdata->u.mesh.last_sn_update = jiffies;
1119 lifetime = default_lifetime(sdata);
1120 ttl = sdata->u.mesh.mshcfg.element_ttl;
1122 sdata->u.mesh.mshstats.dropped_frames_ttl++;
1134 mesh_path_sel_frame_tx(MPATH_PREQ, 0, sdata->vif.addr, ifmsh->sn,
1136 ttl, lifetime, 0, ifmsh->preq_id++, sdata);
1151 * @sdata: network subif the frame will be sent through
1160 int mesh_nexthop_resolve(struct ieee80211_sub_if_data *sdata,
1177 if (!mesh_nexthop_lookup(sdata, skb))
1181 mpath = mesh_path_lookup(sdata, target_addr);
1183 mpath = mesh_path_add(sdata, target_addr);
1185 mesh_path_discard_frame(sdata, skb);
1191 mesh_path_sel_is_hwmp(sdata))
1198 ieee80211_set_qos_hdr(sdata, skb);
1201 mesh_path_discard_frame(sdata, skb_to_free);
1209 * @sdata: network subif the frame will be sent through
1217 static int mesh_nexthop_lookup_nolearn(struct ieee80211_sub_if_data *sdata,
1227 sta = sta_info_get(sdata, hdr->addr3);
1236 memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
1240 void mesh_path_refresh(struct ieee80211_sub_if_data *sdata,
1249 msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) &&
1250 (!addr || ether_addr_equal(sdata->vif.addr, addr)))
1259 * @sdata: network subif the frame will be sent through
1264 int mesh_nexthop_lookup(struct ieee80211_sub_if_data *sdata,
1267 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
1274 !mesh_nexthop_lookup_nolearn(sdata, skb))
1277 mpath = mesh_path_lookup(sdata, target_addr);
1281 mesh_path_refresh(sdata, mpath, hdr->addr4);
1286 memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
1287 ieee80211_mps_set_frame_flags(sdata, next_hop, hdr);
1288 if (ieee80211_hw_check(&sdata->local->hw, SUPPORT_FAST_XMIT))
1289 mesh_fast_tx_cache(sdata, skb, mpath);
1299 struct ieee80211_sub_if_data *sdata = mpath->sdata;
1302 if (sdata->local->quiescing)
1310 } else if (mpath->discovery_retries < max_preq_retries(sdata)) {
1322 if (!mpath->is_gate && mesh_gate_num(sdata) > 0) {
1325 mhwmp_dbg(sdata, "no gate was reachable\n");
1331 void mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata)
1333 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
1342 mesh_path_sel_frame_tx(MPATH_RANN, flags, sdata->vif.addr,
1345 interval, 0, 0, sdata);
1354 mesh_path_sel_frame_tx(MPATH_PREQ, flags, sdata->vif.addr,
1358 0, ifmsh->preq_id++, sdata);
1361 mhwmp_dbg(sdata, "Proactive mechanism not supported\n");