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;
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);
371 * @sdata: local mesh subif
385 static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
389 struct ieee80211_local *local = sdata->local;
402 sta = sta_info_get(sdata, mgmt->sa);
441 if (ether_addr_equal(orig_addr, sdata->vif.addr)) {
448 mpath = mesh_path_lookup(sdata, orig_addr);
486 mpath = mesh_path_add(sdata, orig_addr);
528 mpath = mesh_path_lookup(sdata, ta);
538 mpath = mesh_path_add(sdata, ta);
573 static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
577 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
597 mhwmp_dbg(sdata, "received PREQ from %pM\n", orig_addr);
599 if (ether_addr_equal(target_addr, sdata->vif.addr)) {
600 mhwmp_dbg(sdata, "PREQ is for us\n");
609 net_traversal_jiffies(sdata)) ||
618 mpath = mesh_path_lookup(sdata, orig_addr);
622 target_addr = sdata->vif.addr;
633 mpath = mesh_path_lookup(sdata, target_addr);
655 mhwmp_dbg(sdata, "replying to the PREQ\n");
660 sdata);
676 mhwmp_dbg(sdata, "forwarding the PREQ from %pM\n", orig_addr);
691 orig_metric, preq_id, sdata);
709 static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata,
713 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
720 mhwmp_dbg(sdata, "received PREP from %pM\n",
724 if (ether_addr_equal(orig_addr, sdata->vif.addr))
733 sdata->u.mesh.mshstats.dropped_frames_ttl++;
738 mpath = mesh_path_lookup(sdata, orig_addr);
759 ttl, lifetime, metric, 0, sdata);
762 sdata->u.mesh.mshstats.fwded_unicast++;
763 sdata->u.mesh.mshstats.fwded_frames++;
768 sdata->u.mesh.mshstats.dropped_frames_no_route++;
771 static void hwmp_perr_frame_process(struct ieee80211_sub_if_data *sdata,
775 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
794 mpath = mesh_path_lookup(sdata, target_addr);
813 mesh_path_error_tx(sdata, ttl, target_addr,
823 static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
827 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
828 struct ieee80211_local *local = sdata->local;
847 if (ether_addr_equal(orig_addr, sdata->vif.addr))
850 mhwmp_dbg(sdata,
855 sta = sta_info_get(sdata, mgmt->sa);
866 mpath = mesh_path_lookup(sdata, orig_addr);
868 mpath = mesh_path_add(sdata, orig_addr);
871 sdata->u.mesh.mshstats.dropped_frames_no_route++;
884 root_path_confirmation_jiffies(sdata)) ||
887 mhwmp_dbg(sdata,
915 new_metric, 0, sdata);
922 void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
935 sta = sta_info_get(sdata, mgmt->sa);
952 path_metric = hwmp_route_info_get(sdata, mgmt, elems->preq,
955 hwmp_preq_frame_process(sdata, mgmt, elems->preq,
962 path_metric = hwmp_route_info_get(sdata, mgmt, elems->prep,
965 hwmp_prep_frame_process(sdata, mgmt, elems->prep,
972 hwmp_perr_frame_process(sdata, mgmt, elems->perr);
975 hwmp_rann_frame_process(sdata, mgmt, elems->rann);
991 struct ieee80211_sub_if_data *sdata = mpath->sdata;
992 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
997 mhwmp_dbg(sdata, "could not allocate PREQ node\n");
1006 mhwmp_dbg(sdata, "PREQ node queue full\n");
1028 if (time_after(jiffies, ifmsh->last_preq + min_preq_int_jiff(sdata)))
1029 wiphy_work_queue(sdata->local->hw.wiphy, &sdata->work);
1035 ifmsh->last_preq = jiffies - min_preq_int_jiff(sdata) - 1;
1036 wiphy_work_queue(sdata->local->hw.wiphy, &sdata->work);
1039 min_preq_int_jiff(sdata));
1045 * @sdata: local mesh subif
1047 void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata)
1049 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
1059 min_preq_int_jiff(sdata))) {
1071 mpath = mesh_path_lookup(sdata, preq_node->dst);
1089 mpath->discovery_timeout = disc_timeout_jiff(sdata);
1101 net_traversal_jiffies(sdata)) ||
1104 sdata->u.mesh.last_sn_update = jiffies;
1106 lifetime = default_lifetime(sdata);
1107 ttl = sdata->u.mesh.mshcfg.element_ttl;
1109 sdata->u.mesh.mshstats.dropped_frames_ttl++;
1121 mesh_path_sel_frame_tx(MPATH_PREQ, 0, sdata->vif.addr, ifmsh->sn,
1123 ttl, lifetime, 0, ifmsh->preq_id++, sdata);
1139 * @sdata: network subif the frame will be sent through
1147 int mesh_nexthop_resolve(struct ieee80211_sub_if_data *sdata,
1164 if (!mesh_nexthop_lookup(sdata, skb))
1168 mpath = mesh_path_lookup(sdata, target_addr);
1170 mpath = mesh_path_add(sdata, target_addr);
1172 mesh_path_discard_frame(sdata, skb);
1178 mesh_path_sel_is_hwmp(sdata))
1185 ieee80211_set_qos_hdr(sdata, skb);
1188 mesh_path_discard_frame(sdata, skb_to_free);
1196 * @sdata: network subif the frame will be sent through
1204 static int mesh_nexthop_lookup_nolearn(struct ieee80211_sub_if_data *sdata,
1214 sta = sta_info_get(sdata, hdr->addr3);
1223 memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
1227 void mesh_path_refresh(struct ieee80211_sub_if_data *sdata,
1236 msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) &&
1237 (!addr || ether_addr_equal(sdata->vif.addr, addr)))
1247 * @sdata: network subif the frame will be sent through
1251 int mesh_nexthop_lookup(struct ieee80211_sub_if_data *sdata,
1254 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
1261 !mesh_nexthop_lookup_nolearn(sdata, skb))
1264 mpath = mesh_path_lookup(sdata, target_addr);
1268 mesh_path_refresh(sdata, mpath, hdr->addr4);
1273 memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
1274 ieee80211_mps_set_frame_flags(sdata, next_hop, hdr);
1275 if (ieee80211_hw_check(&sdata->local->hw, SUPPORT_FAST_XMIT))
1276 mesh_fast_tx_cache(sdata, skb, mpath);
1286 struct ieee80211_sub_if_data *sdata = mpath->sdata;
1289 if (sdata->local->quiescing)
1297 } else if (mpath->discovery_retries < max_preq_retries(sdata)) {
1309 if (!mpath->is_gate && mesh_gate_num(sdata) > 0) {
1312 mhwmp_dbg(sdata, "no gate was reachable\n");
1318 void mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata)
1320 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
1329 mesh_path_sel_frame_tx(MPATH_RANN, flags, sdata->vif.addr,
1332 interval, 0, 0, sdata);
1341 mesh_path_sel_frame_tx(MPATH_PREQ, flags, sdata->vif.addr,
1345 0, ifmsh->preq_id++, sdata);
1348 mhwmp_dbg(sdata, "Proactive mechanism not supported\n");