Lines Matching refs:wmr

2345 	struct wlan_mesh_route *wmr;  in op_wlan_mesh_route()  local
2353 if ((wmr = wlan_mesh_get_route(&val->var, sub, &wif)) == NULL) in op_wlan_mesh_route()
2358 wmr = wlan_mesh_get_next_route(&val->var, sub, &wif); in op_wlan_mesh_route()
2359 if (wmr == NULL) in op_wlan_mesh_route()
2362 wmr->imroute.imr_dest); in op_wlan_mesh_route()
2377 if ((wmr = wlan_mesh_get_route(&val->var, sub, &wif)) == NULL) in op_wlan_mesh_route()
2380 wlan_mesh_delete_route(wif, wmr) < 0) in op_wlan_mesh_route()
2385 if ((wmr = wlan_mesh_get_route(&val->var, sub, &wif)) == NULL) in op_wlan_mesh_route()
2388 wlan_mesh_delete_route(wif, wmr) < 0) in op_wlan_mesh_route()
2398 return (string_get(val, wmr->imroute.imr_dest, in op_wlan_mesh_route()
2401 return (string_get(val, wmr->imroute.imr_nexthop, in op_wlan_mesh_route()
2404 val->v.integer = wmr->imroute.imr_nhops; in op_wlan_mesh_route()
2407 val->v.integer = wmr->imroute.imr_metric; in op_wlan_mesh_route()
2410 val->v.integer = wmr->imroute.imr_lifetime; in op_wlan_mesh_route()
2413 val->v.integer = wmr->imroute.imr_lastmseq; in op_wlan_mesh_route()
2417 if ((wmr->imroute.imr_flags & in op_wlan_mesh_route()
2420 if ((wmr->imroute.imr_flags & in op_wlan_mesh_route()
2426 val->v.integer = wmr->mroute_status; in op_wlan_mesh_route()
4213 struct wlan_mesh_route *wmr; in wlan_mesh_free_routes() local
4215 while ((wmr = SLIST_FIRST(&wif->mesh_routelist)) != NULL) { in wlan_mesh_free_routes()
4217 free(wmr); in wlan_mesh_free_routes()
4226 struct wlan_mesh_route *wmr; in wlan_mesh_find_route() local
4231 SLIST_FOREACH(wmr, &wif->mesh_routelist, wr) in wlan_mesh_find_route()
4232 if (memcmp(wmr->imroute.imr_dest, dstmac, in wlan_mesh_find_route()
4236 return (wmr); in wlan_mesh_find_route()
4242 struct wlan_mesh_route *wmr; in wlan_mesh_new_route() local
4244 if ((wmr = (struct wlan_mesh_route *)malloc(sizeof(*wmr))) == NULL) in wlan_mesh_new_route()
4247 memset(wmr, 0, sizeof(*wmr)); in wlan_mesh_new_route()
4248 memcpy(wmr->imroute.imr_dest, dstmac, IEEE80211_ADDR_LEN); in wlan_mesh_new_route()
4249 wmr->mroute_status = RowStatus_notReady; in wlan_mesh_new_route()
4251 return (wmr); in wlan_mesh_new_route()
4255 wlan_mesh_free_route(struct wlan_mesh_route *wmr) in wlan_mesh_free_route() argument
4257 free(wmr); in wlan_mesh_free_route()
4261 wlan_mesh_add_rtentry(struct wlan_iface *wif, struct wlan_mesh_route *wmr) in wlan_mesh_add_rtentry() argument
4266 if (memcmp(temp->imroute.imr_dest, wmr->imroute.imr_dest, in wlan_mesh_add_rtentry()
4271 memcmp(wmr->imroute.imr_dest, prev->imroute.imr_dest, in wlan_mesh_add_rtentry()
4273 SLIST_INSERT_HEAD(&wif->mesh_routelist, wmr, wr); in wlan_mesh_add_rtentry()
4278 if (memcmp(wmr->imroute.imr_dest, temp->imroute.imr_dest, in wlan_mesh_add_rtentry()
4284 SLIST_INSERT_AFTER(prev, wmr, wr); in wlan_mesh_add_rtentry()
4289 wlan_mesh_delete_route(struct wlan_iface *wif, struct wlan_mesh_route *wmr) in wlan_mesh_delete_route() argument
4291 if (wmr->mroute_status == RowStatus_active && in wlan_mesh_delete_route()
4292 wlan_mesh_del_route(wif, wmr) < 0) in wlan_mesh_delete_route()
4295 SLIST_REMOVE(&wif->mesh_routelist, wmr, wlan_mesh_route, wr); in wlan_mesh_delete_route()
4296 free(wmr); in wlan_mesh_delete_route()
4305 struct wlan_mesh_route *wmr, *twmr; in wlan_mesh_update_routes() local
4316 SLIST_FOREACH_SAFE(wmr, &wif->mesh_routelist, wr, twmr) in wlan_mesh_update_routes()
4317 if (wmr->mroute_status == RowStatus_active) { in wlan_mesh_update_routes()
4318 SLIST_REMOVE(&wif->mesh_routelist, wmr, in wlan_mesh_update_routes()
4320 wlan_mesh_free_route(wmr); in wlan_mesh_update_routes()
4348 struct wlan_mesh_route *wmr; in wlan_mesh_get_next_route() local
4353 wmr = SLIST_FIRST(&(*wif)->mesh_routelist); in wlan_mesh_get_next_route()
4354 if (wmr != NULL) in wlan_mesh_get_next_route()
4355 return (wmr); in wlan_mesh_get_next_route()
4362 (wmr = wlan_mesh_find_route(*wif, dstmac)) == NULL) in wlan_mesh_get_next_route()
4365 if ((wmr = SLIST_NEXT(wmr, wr)) != NULL) in wlan_mesh_get_next_route()
4366 return (wmr); in wlan_mesh_get_next_route()
4369 if ((wmr = SLIST_FIRST(&(*wif)->mesh_routelist)) != NULL) in wlan_mesh_get_next_route()
4372 return (wmr); in wlan_mesh_get_next_route()
4381 struct wlan_mesh_route *wmr; in wlan_mesh_route_set_status() local
4386 wmr = wlan_mesh_get_route(&val->var, sub, &wif); in wlan_mesh_route_set_status()
4390 if (wmr != NULL) in wlan_mesh_route_set_status()
4394 if (wmr == NULL) in wlan_mesh_route_set_status()
4405 if ((wmr = wlan_mesh_new_route(mac)) == NULL) in wlan_mesh_route_set_status()
4408 if (wlan_mesh_add_rtentry(wif, wmr) < 0) { in wlan_mesh_route_set_status()
4409 wlan_mesh_free_route(wmr); in wlan_mesh_route_set_status()
4414 if (wlan_mesh_add_route(wif, wmr) < 0) { in wlan_mesh_route_set_status()
4415 (void)wlan_mesh_delete_route(wif, wmr); in wlan_mesh_route_set_status()