Lines Matching defs:sdata

52 static void mesh_fast_tx_deinit(struct ieee80211_sub_if_data *sdata)
56 cache = &sdata->u.mesh.tx_cache;
61 static void mesh_fast_tx_init(struct ieee80211_sub_if_data *sdata)
65 cache = &sdata->u.mesh.tx_cache;
126 memcpy(hdr->addr2, mpath->sdata->vif.addr, ETH_ALEN);
127 ieee80211_mps_set_frame_flags(sta->sdata, sta, hdr);
169 memcpy(hdr->addr2, gate_mpath->sdata->vif.addr, ETH_ALEN);
212 mpath_dbg(gate_mpath->sdata, "mpath queue full!\n");
230 mpath_dbg(gate_mpath->sdata, "Mpath queue for gate %pM has %d frames\n",
243 struct ieee80211_sub_if_data *sdata)
259 * @sdata: local subif
267 mesh_path_lookup(struct ieee80211_sub_if_data *sdata, const u8 *dst)
269 return mpath_lookup(&sdata->u.mesh.mesh_paths, dst, sdata);
273 mpp_path_lookup(struct ieee80211_sub_if_data *sdata, const u8 *dst)
275 return mpath_lookup(&sdata->u.mesh.mpp_paths, dst, sdata);
303 * @sdata: local subif, or NULL for all entries
310 mesh_path_lookup_by_idx(struct ieee80211_sub_if_data *sdata, int idx)
312 return __mesh_path_lookup_by_idx(&sdata->u.mesh.mesh_paths, idx);
318 * @sdata: local subif, or NULL for all entries
325 mpp_path_lookup_by_idx(struct ieee80211_sub_if_data *sdata, int idx)
327 return __mesh_path_lookup_by_idx(&sdata->u.mesh.mpp_paths, idx);
340 tbl = &mpath->sdata->u.mesh.mesh_paths;
349 mpath->sdata->u.mesh.num_gates++;
357 mpath_dbg(mpath->sdata,
359 mpath->dst, mpath->sdata->u.mesh.num_gates);
380 mpath->sdata->u.mesh.num_gates--;
383 mpath_dbg(mpath->sdata,
385 mpath->dst, mpath->sdata->u.mesh.num_gates);
390 * @sdata: subif data
392 int mesh_gate_num(struct ieee80211_sub_if_data *sdata)
394 return sdata->u.mesh.num_gates;
398 struct mesh_path *mesh_path_new(struct ieee80211_sub_if_data *sdata,
410 new_mpath->sdata = sdata;
429 mesh_fast_tx_get(struct ieee80211_sub_if_data *sdata, const u8 *addr)
434 cache = &sdata->u.mesh.tx_cache;
449 mesh_path_refresh(sdata, entry->mpath, NULL);
457 void mesh_fast_tx_cache(struct ieee80211_sub_if_data *sdata,
471 if (sdata->noack_map ||
479 cache = &sdata->u.mesh.tx_cache;
489 mppath = mpp_path_lookup(sdata, meshhdr->eaddr1);
512 key = rcu_access_pointer(sdata->default_unicast_key);
595 void mesh_fast_tx_gc(struct ieee80211_sub_if_data *sdata)
602 cache = &sdata->u.mesh.tx_cache;
615 struct ieee80211_sub_if_data *sdata = mpath->sdata;
616 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
620 cache = &sdata->u.mesh.tx_cache;
628 void mesh_fast_tx_flush_sta(struct ieee80211_sub_if_data *sdata,
631 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
635 cache = &sdata->u.mesh.tx_cache;
643 void mesh_fast_tx_flush_addr(struct ieee80211_sub_if_data *sdata,
646 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
649 cache = &sdata->u.mesh.tx_cache;
660 * @sdata: local subif
666 struct mesh_path *mesh_path_add(struct ieee80211_sub_if_data *sdata,
672 if (ether_addr_equal(dst, sdata->vif.addr))
679 if (atomic_add_unless(&sdata->u.mesh.mpaths, 1, MESH_MAX_MPATHS) == 0)
682 new_mpath = mesh_path_new(sdata, dst, GFP_ATOMIC);
686 tbl = &sdata->u.mesh.mesh_paths;
704 sdata->u.mesh.mesh_paths_generation++;
708 int mpp_path_add(struct ieee80211_sub_if_data *sdata,
715 if (ether_addr_equal(dst, sdata->vif.addr))
722 new_mpath = mesh_path_new(sdata, dst, GFP_ATOMIC);
728 tbl = &sdata->u.mesh.mpp_paths;
741 mesh_fast_tx_flush_addr(sdata, dst);
743 sdata->u.mesh.mpp_paths_generation++;
758 struct ieee80211_sub_if_data *sdata = sta->sdata;
759 struct mesh_table *tbl = &sdata->u.mesh.mesh_paths;
772 mesh_path_error_tx(sdata,
773 sdata->u.mesh.mshcfg.element_ttl,
784 struct ieee80211_sub_if_data *sdata = mpath->sdata;
791 atomic_dec(&sdata->u.mesh.mpaths);
801 if (tbl == &mpath->sdata->u.mesh.mpp_paths)
802 mesh_fast_tx_flush_addr(mpath->sdata, mpath->dst);
821 struct ieee80211_sub_if_data *sdata = sta->sdata;
822 struct mesh_table *tbl = &sdata->u.mesh.mesh_paths;
834 static void mpp_flush_by_proxy(struct ieee80211_sub_if_data *sdata,
837 struct mesh_table *tbl = &sdata->u.mesh.mpp_paths;
866 * @sdata: interface data to match
869 void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata)
871 table_flush_by_iface(&sdata->u.mesh.mesh_paths);
872 table_flush_by_iface(&sdata->u.mesh.mpp_paths);
879 * @sdata: local subif
885 struct ieee80211_sub_if_data *sdata,
907 * @sdata: local subif
911 int mesh_path_del(struct ieee80211_sub_if_data *sdata, const u8 *addr)
916 mpp_flush_by_proxy(sdata, addr);
918 err = table_path_del(&sdata->u.mesh.mesh_paths, sdata, addr);
919 sdata->u.mesh.mesh_paths_generation++;
934 ieee80211_add_pending_skbs(mpath->sdata->local,
950 struct ieee80211_sub_if_data *sdata = mpath->sdata;
956 tbl = &sdata->u.mesh.mesh_paths;
961 mpath_dbg(sdata, "Forwarding to %pM\n", gate->dst);
966 mpath_dbg(sdata,
973 mpath_dbg(sdata, "Sending to %pM\n", gate->dst);
985 * @sdata: network subif the frame was to be sent through
989 void mesh_path_discard_frame(struct ieee80211_sub_if_data *sdata,
992 ieee80211_free_txskb(&sdata->local->hw, skb);
993 sdata->u.mesh.mshstats.dropped_frames_no_route++;
1008 mesh_path_discard_frame(mpath->sdata, skb);
1037 void mesh_pathtbl_init(struct ieee80211_sub_if_data *sdata)
1039 mesh_table_init(&sdata->u.mesh.mesh_paths);
1040 mesh_table_init(&sdata->u.mesh.mpp_paths);
1041 mesh_fast_tx_init(sdata);
1045 void mesh_path_tbl_expire(struct ieee80211_sub_if_data *sdata,
1061 void mesh_path_expire(struct ieee80211_sub_if_data *sdata)
1063 mesh_path_tbl_expire(sdata, &sdata->u.mesh.mesh_paths);
1064 mesh_path_tbl_expire(sdata, &sdata->u.mesh.mpp_paths);
1067 void mesh_pathtbl_unregister(struct ieee80211_sub_if_data *sdata)
1069 mesh_fast_tx_deinit(sdata);
1070 mesh_table_free(&sdata->u.mesh.mesh_paths);
1071 mesh_table_free(&sdata->u.mesh.mpp_paths);