Lines Matching refs:mpath
2237 struct mesh_path *mpath; in ieee80211_add_mpath() local
2249 mpath = mesh_path_add(sdata, dst); in ieee80211_add_mpath()
2250 if (IS_ERR(mpath)) { in ieee80211_add_mpath()
2252 return PTR_ERR(mpath); in ieee80211_add_mpath()
2255 mesh_path_fix_nexthop(mpath, sta); in ieee80211_add_mpath()
2277 struct mesh_path *mpath; in ieee80211_change_mpath() local
2290 mpath = mesh_path_lookup(sdata, dst); in ieee80211_change_mpath()
2291 if (!mpath) { in ieee80211_change_mpath()
2296 mesh_path_fix_nexthop(mpath, sta); in ieee80211_change_mpath()
2302 static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop, in mpath_set_pinfo() argument
2305 struct sta_info *next_hop_sta = rcu_dereference(mpath->next_hop); in mpath_set_pinfo()
2314 pinfo->generation = mpath->sdata->u.mesh.mesh_paths_generation; in mpath_set_pinfo()
2326 pinfo->frame_qlen = mpath->frame_queue.qlen; in mpath_set_pinfo()
2327 pinfo->sn = mpath->sn; in mpath_set_pinfo()
2328 pinfo->metric = mpath->metric; in mpath_set_pinfo()
2329 if (time_before(jiffies, mpath->exp_time)) in mpath_set_pinfo()
2330 pinfo->exptime = jiffies_to_msecs(mpath->exp_time - jiffies); in mpath_set_pinfo()
2332 jiffies_to_msecs(mpath->discovery_timeout); in mpath_set_pinfo()
2333 pinfo->discovery_retries = mpath->discovery_retries; in mpath_set_pinfo()
2334 if (mpath->flags & MESH_PATH_ACTIVE) in mpath_set_pinfo()
2336 if (mpath->flags & MESH_PATH_RESOLVING) in mpath_set_pinfo()
2338 if (mpath->flags & MESH_PATH_SN_VALID) in mpath_set_pinfo()
2340 if (mpath->flags & MESH_PATH_FIXED) in mpath_set_pinfo()
2342 if (mpath->flags & MESH_PATH_RESOLVED) in mpath_set_pinfo()
2344 pinfo->hop_count = mpath->hop_count; in mpath_set_pinfo()
2345 pinfo->path_change_count = mpath->path_change_count; in mpath_set_pinfo()
2353 struct mesh_path *mpath; in ieee80211_get_mpath() local
2358 mpath = mesh_path_lookup(sdata, dst); in ieee80211_get_mpath()
2359 if (!mpath) { in ieee80211_get_mpath()
2363 memcpy(dst, mpath->dst, ETH_ALEN); in ieee80211_get_mpath()
2364 mpath_set_pinfo(mpath, next_hop, pinfo); in ieee80211_get_mpath()
2374 struct mesh_path *mpath; in ieee80211_dump_mpath() local
2379 mpath = mesh_path_lookup_by_idx(sdata, idx); in ieee80211_dump_mpath()
2380 if (!mpath) { in ieee80211_dump_mpath()
2384 memcpy(dst, mpath->dst, ETH_ALEN); in ieee80211_dump_mpath()
2385 mpath_set_pinfo(mpath, next_hop, pinfo); in ieee80211_dump_mpath()
2390 static void mpp_set_pinfo(struct mesh_path *mpath, u8 *mpp, in mpp_set_pinfo() argument
2394 memcpy(mpp, mpath->mpp, ETH_ALEN); in mpp_set_pinfo()
2396 pinfo->generation = mpath->sdata->u.mesh.mpp_paths_generation; in mpp_set_pinfo()
2404 struct mesh_path *mpath; in ieee80211_get_mpp() local
2409 mpath = mpp_path_lookup(sdata, dst); in ieee80211_get_mpp()
2410 if (!mpath) { in ieee80211_get_mpp()
2414 memcpy(dst, mpath->dst, ETH_ALEN); in ieee80211_get_mpp()
2415 mpp_set_pinfo(mpath, mpp, pinfo); in ieee80211_get_mpp()
2425 struct mesh_path *mpath; in ieee80211_dump_mpp() local
2430 mpath = mpp_path_lookup_by_idx(sdata, idx); in ieee80211_dump_mpp()
2431 if (!mpath) { in ieee80211_dump_mpp()
2435 memcpy(dst, mpath->dst, ETH_ALEN); in ieee80211_dump_mpp()
2436 mpp_set_pinfo(mpath, mpp, pinfo); in ieee80211_dump_mpp()