Lines Matching refs:sdata

53 static void mesh_fast_tx_deinit(struct ieee80211_sub_if_data *sdata)
57 cache = &sdata->u.mesh.tx_cache;
62 static void mesh_fast_tx_init(struct ieee80211_sub_if_data *sdata)
66 cache = &sdata->u.mesh.tx_cache;
127 memcpy(hdr->addr2, mpath->sdata->vif.addr, ETH_ALEN);
128 ieee80211_mps_set_frame_flags(sta->sdata, sta, hdr);
170 memcpy(hdr->addr2, gate_mpath->sdata->vif.addr, ETH_ALEN);
213 mpath_dbg(gate_mpath->sdata, "mpath queue full!\n");
231 mpath_dbg(gate_mpath->sdata, "Mpath queue for gate %pM has %d frames\n",
244 struct ieee80211_sub_if_data *sdata)
260 * @sdata: local subif
268 mesh_path_lookup(struct ieee80211_sub_if_data *sdata, const u8 *dst)
270 return mpath_lookup(&sdata->u.mesh.mesh_paths, dst, sdata);
274 mpp_path_lookup(struct ieee80211_sub_if_data *sdata, const u8 *dst)
276 return mpath_lookup(&sdata->u.mesh.mpp_paths, dst, sdata);
303 * @sdata: local subif, or NULL for all entries
311 mesh_path_lookup_by_idx(struct ieee80211_sub_if_data *sdata, int idx)
313 return __mesh_path_lookup_by_idx(&sdata->u.mesh.mesh_paths, idx);
318 * @sdata: local subif, or NULL for all entries
326 mpp_path_lookup_by_idx(struct ieee80211_sub_if_data *sdata, int idx)
328 return __mesh_path_lookup_by_idx(&sdata->u.mesh.mpp_paths, idx);
343 tbl = &mpath->sdata->u.mesh.mesh_paths;
352 mpath->sdata->u.mesh.num_gates++;
360 mpath_dbg(mpath->sdata,
362 mpath->dst, mpath->sdata->u.mesh.num_gates);
383 mpath->sdata->u.mesh.num_gates--;
386 mpath_dbg(mpath->sdata,
388 mpath->dst, mpath->sdata->u.mesh.num_gates);
393 * @sdata: subif data
397 int mesh_gate_num(struct ieee80211_sub_if_data *sdata)
399 return sdata->u.mesh.num_gates;
403 struct mesh_path *mesh_path_new(struct ieee80211_sub_if_data *sdata,
415 new_mpath->sdata = sdata;
434 mesh_fast_tx_get(struct ieee80211_sub_if_data *sdata,
440 cache = &sdata->u.mesh.tx_cache;
455 mesh_path_refresh(sdata, entry->mpath, NULL);
463 void mesh_fast_tx_cache(struct ieee80211_sub_if_data *sdata,
477 if (sdata->noack_map ||
485 cache = &sdata->u.mesh.tx_cache;
496 mppath = mpp_path_lookup(sdata, meshhdr->eaddr1);
500 if (!ether_addr_equal(meshhdr->eaddr2, sdata->vif.addr))
508 if (!ether_addr_equal(hdr->addr4, sdata->vif.addr))
524 key = rcu_access_pointer(sdata->default_unicast_key);
607 void mesh_fast_tx_gc(struct ieee80211_sub_if_data *sdata)
610 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
626 struct ieee80211_sub_if_data *sdata = mpath->sdata;
627 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
638 void mesh_fast_tx_flush_sta(struct ieee80211_sub_if_data *sdata,
641 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
652 void mesh_fast_tx_flush_addr(struct ieee80211_sub_if_data *sdata,
655 struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
673 * @sdata: local subif
680 struct mesh_path *mesh_path_add(struct ieee80211_sub_if_data *sdata,
686 if (ether_addr_equal(dst, sdata->vif.addr))
693 if (atomic_add_unless(&sdata->u.mesh.mpaths, 1, MESH_MAX_MPATHS) == 0)
696 new_mpath = mesh_path_new(sdata, dst, GFP_ATOMIC);
700 tbl = &sdata->u.mesh.mesh_paths;
718 sdata->u.mesh.mesh_paths_generation++;
722 int mpp_path_add(struct ieee80211_sub_if_data *sdata,
729 if (ether_addr_equal(dst, sdata->vif.addr))
736 new_mpath = mesh_path_new(sdata, dst, GFP_ATOMIC);
742 tbl = &sdata->u.mesh.mpp_paths;
755 mesh_fast_tx_flush_addr(sdata, dst);
757 sdata->u.mesh.mpp_paths_generation++;
772 struct ieee80211_sub_if_data *sdata = sta->sdata;
773 struct mesh_table *tbl = &sdata->u.mesh.mesh_paths;
786 mesh_path_error_tx(sdata,
787 sdata->u.mesh.mshcfg.element_ttl,
798 struct ieee80211_sub_if_data *sdata = mpath->sdata;
805 atomic_dec(&sdata->u.mesh.mpaths);
815 if (tbl == &mpath->sdata->u.mesh.mpp_paths)
816 mesh_fast_tx_flush_addr(mpath->sdata, mpath->dst);
835 struct ieee80211_sub_if_data *sdata = sta->sdata;
836 struct mesh_table *tbl = &sdata->u.mesh.mesh_paths;
848 static void mpp_flush_by_proxy(struct ieee80211_sub_if_data *sdata,
851 struct mesh_table *tbl = &sdata->u.mesh.mpp_paths;
878 * @sdata: interface data to match
882 void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata)
884 table_flush_by_iface(&sdata->u.mesh.mesh_paths);
885 table_flush_by_iface(&sdata->u.mesh.mpp_paths);
892 * @sdata: local subif
898 struct ieee80211_sub_if_data *sdata,
919 * @sdata: local subif
924 int mesh_path_del(struct ieee80211_sub_if_data *sdata, const u8 *addr)
929 mpp_flush_by_proxy(sdata, addr);
931 err = table_path_del(&sdata->u.mesh.mesh_paths, sdata, addr);
932 sdata->u.mesh.mesh_paths_generation++;
947 ieee80211_add_pending_skbs(mpath->sdata->local,
965 struct ieee80211_sub_if_data *sdata = mpath->sdata;
971 tbl = &sdata->u.mesh.mesh_paths;
976 mpath_dbg(sdata, "Forwarding to %pM\n", gate->dst);
981 mpath_dbg(sdata,
988 mpath_dbg(sdata, "Sending to %pM\n", gate->dst);
999 * @sdata: network subif the frame was to be sent through
1004 void mesh_path_discard_frame(struct ieee80211_sub_if_data *sdata,
1007 ieee80211_free_txskb(&sdata->local->hw, skb);
1008 sdata->u.mesh.mshstats.dropped_frames_no_route++;
1020 struct ieee80211_sub_if_data *sdata = mpath->sdata;
1021 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
1026 mesh_path_discard_frame(mpath->sdata, skb);
1065 void mesh_pathtbl_init(struct ieee80211_sub_if_data *sdata)
1067 mesh_table_init(&sdata->u.mesh.mesh_paths);
1068 mesh_table_init(&sdata->u.mesh.mpp_paths);
1069 mesh_fast_tx_init(sdata);
1073 void mesh_path_tbl_expire(struct ieee80211_sub_if_data *sdata,
1089 void mesh_path_expire(struct ieee80211_sub_if_data *sdata)
1091 mesh_path_tbl_expire(sdata, &sdata->u.mesh.mesh_paths);
1092 mesh_path_tbl_expire(sdata, &sdata->u.mesh.mpp_paths);
1095 void mesh_pathtbl_unregister(struct ieee80211_sub_if_data *sdata)
1097 mesh_fast_tx_deinit(sdata);
1098 mesh_table_free(&sdata->u.mesh.mesh_paths);
1099 mesh_table_free(&sdata->u.mesh.mpp_paths);