Lines Matching refs:mpath
2154 struct mesh_path *mpath; in ieee80211_add_mpath() local
2166 mpath = mesh_path_add(sdata, dst); in ieee80211_add_mpath()
2167 if (IS_ERR(mpath)) { in ieee80211_add_mpath()
2169 return PTR_ERR(mpath); in ieee80211_add_mpath()
2172 mesh_path_fix_nexthop(mpath, sta); in ieee80211_add_mpath()
2194 struct mesh_path *mpath; in ieee80211_change_mpath() local
2207 mpath = mesh_path_lookup(sdata, dst); in ieee80211_change_mpath()
2208 if (!mpath) { in ieee80211_change_mpath()
2213 mesh_path_fix_nexthop(mpath, sta); in ieee80211_change_mpath()
2219 static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop, in mpath_set_pinfo() argument
2222 struct sta_info *next_hop_sta = rcu_dereference(mpath->next_hop); in mpath_set_pinfo()
2231 pinfo->generation = mpath->sdata->u.mesh.mesh_paths_generation; in mpath_set_pinfo()
2243 pinfo->frame_qlen = mpath->frame_queue.qlen; in mpath_set_pinfo()
2244 pinfo->sn = mpath->sn; in mpath_set_pinfo()
2245 pinfo->metric = mpath->metric; in mpath_set_pinfo()
2246 if (time_before(jiffies, mpath->exp_time)) in mpath_set_pinfo()
2247 pinfo->exptime = jiffies_to_msecs(mpath->exp_time - jiffies); in mpath_set_pinfo()
2249 jiffies_to_msecs(mpath->discovery_timeout); in mpath_set_pinfo()
2250 pinfo->discovery_retries = mpath->discovery_retries; in mpath_set_pinfo()
2251 if (mpath->flags & MESH_PATH_ACTIVE) in mpath_set_pinfo()
2253 if (mpath->flags & MESH_PATH_RESOLVING) in mpath_set_pinfo()
2255 if (mpath->flags & MESH_PATH_SN_VALID) in mpath_set_pinfo()
2257 if (mpath->flags & MESH_PATH_FIXED) in mpath_set_pinfo()
2259 if (mpath->flags & MESH_PATH_RESOLVED) in mpath_set_pinfo()
2261 pinfo->hop_count = mpath->hop_count; in mpath_set_pinfo()
2262 pinfo->path_change_count = mpath->path_change_count; in mpath_set_pinfo()
2270 struct mesh_path *mpath; in ieee80211_get_mpath() local
2275 mpath = mesh_path_lookup(sdata, dst); in ieee80211_get_mpath()
2276 if (!mpath) { in ieee80211_get_mpath()
2280 memcpy(dst, mpath->dst, ETH_ALEN); in ieee80211_get_mpath()
2281 mpath_set_pinfo(mpath, next_hop, pinfo); in ieee80211_get_mpath()
2291 struct mesh_path *mpath; in ieee80211_dump_mpath() local
2296 mpath = mesh_path_lookup_by_idx(sdata, idx); in ieee80211_dump_mpath()
2297 if (!mpath) { in ieee80211_dump_mpath()
2301 memcpy(dst, mpath->dst, ETH_ALEN); in ieee80211_dump_mpath()
2302 mpath_set_pinfo(mpath, next_hop, pinfo); in ieee80211_dump_mpath()
2307 static void mpp_set_pinfo(struct mesh_path *mpath, u8 *mpp, in mpp_set_pinfo() argument
2311 memcpy(mpp, mpath->mpp, ETH_ALEN); in mpp_set_pinfo()
2313 pinfo->generation = mpath->sdata->u.mesh.mpp_paths_generation; in mpp_set_pinfo()
2321 struct mesh_path *mpath; in ieee80211_get_mpp() local
2326 mpath = mpp_path_lookup(sdata, dst); in ieee80211_get_mpp()
2327 if (!mpath) { in ieee80211_get_mpp()
2331 memcpy(dst, mpath->dst, ETH_ALEN); in ieee80211_get_mpp()
2332 mpp_set_pinfo(mpath, mpp, pinfo); in ieee80211_get_mpp()
2342 struct mesh_path *mpath; in ieee80211_dump_mpp() local
2347 mpath = mpp_path_lookup_by_idx(sdata, idx); in ieee80211_dump_mpp()
2348 if (!mpath) { in ieee80211_dump_mpp()
2352 memcpy(dst, mpath->dst, ETH_ALEN); in ieee80211_dump_mpp()
2353 mpp_set_pinfo(mpath, mpp, pinfo); in ieee80211_dump_mpp()