Lines Matching refs:ctx
362 struct team_gsetter_ctx *ctx)
366 return opt_inst->option->getter(team, ctx);
371 struct team_gsetter_ctx *ctx)
375 return opt_inst->option->setter(team, ctx);
1377 static int team_mode_option_get(struct team *team, struct team_gsetter_ctx *ctx)
1379 ctx->data.str_val = team->mode->kind;
1383 static int team_mode_option_set(struct team *team, struct team_gsetter_ctx *ctx)
1385 return team_change_mode(team, ctx->data.str_val);
1389 struct team_gsetter_ctx *ctx)
1391 ctx->data.u32_val = team->notify_peers.count;
1396 struct team_gsetter_ctx *ctx)
1398 team->notify_peers.count = ctx->data.u32_val;
1403 struct team_gsetter_ctx *ctx)
1405 ctx->data.u32_val = team->notify_peers.interval;
1410 struct team_gsetter_ctx *ctx)
1412 team->notify_peers.interval = ctx->data.u32_val;
1417 struct team_gsetter_ctx *ctx)
1419 ctx->data.u32_val = team->mcast_rejoin.count;
1424 struct team_gsetter_ctx *ctx)
1426 team->mcast_rejoin.count = ctx->data.u32_val;
1431 struct team_gsetter_ctx *ctx)
1433 ctx->data.u32_val = team->mcast_rejoin.interval;
1438 struct team_gsetter_ctx *ctx)
1440 team->mcast_rejoin.interval = ctx->data.u32_val;
1445 struct team_gsetter_ctx *ctx)
1447 struct team_port *port = ctx->info->port;
1449 ctx->data.bool_val = team_port_enabled(port);
1454 struct team_gsetter_ctx *ctx)
1456 struct team_port *port = ctx->info->port;
1458 if (ctx->data.bool_val)
1466 struct team_gsetter_ctx *ctx)
1468 struct team_port *port = ctx->info->port;
1470 ctx->data.bool_val = port->user.linkup;
1477 struct team_gsetter_ctx *ctx)
1479 struct team_port *port = ctx->info->port;
1481 port->user.linkup = ctx->data.bool_val;
1488 struct team_gsetter_ctx *ctx)
1490 struct team_port *port = ctx->info->port;
1492 ctx->data.bool_val = port->user.linkup_enabled;
1497 struct team_gsetter_ctx *ctx)
1499 struct team_port *port = ctx->info->port;
1501 port->user.linkup_enabled = ctx->data.bool_val;
1508 struct team_gsetter_ctx *ctx)
1510 struct team_port *port = ctx->info->port;
1512 ctx->data.s32_val = port->priority;
1517 struct team_gsetter_ctx *ctx)
1519 struct team_port *port = ctx->info->port;
1520 s32 priority = ctx->data.s32_val;
1530 struct team_gsetter_ctx *ctx)
1532 struct team_port *port = ctx->info->port;
1534 ctx->data.u32_val = port->queue_id;
1539 struct team_gsetter_ctx *ctx)
1541 struct team_port *port = ctx->info->port;
1542 u16 new_queue_id = ctx->data.u32_val;
2361 struct team_gsetter_ctx ctx;
2364 ctx.info = opt_inst_info;
2365 err = team_option_get(team, opt_inst, &ctx);
2388 if (nla_put_u32(skb, TEAM_ATTR_OPTION_DATA, ctx.data.u32_val))
2395 ctx.data.str_val))
2401 if (nla_put(skb, TEAM_ATTR_OPTION_DATA, ctx.data.bin_val.len,
2402 ctx.data.bin_val.ptr))
2408 if (ctx.data.bool_val &&
2415 if (nla_put_s32(skb, TEAM_ATTR_OPTION_DATA, ctx.data.s32_val))
2640 struct team_gsetter_ctx ctx;
2654 ctx.info = opt_inst_info;
2657 ctx.data.u32_val = nla_get_u32(attr_data);
2664 ctx.data.str_val = nla_data(attr_data);
2667 ctx.data.bin_val.len = nla_len(attr_data);
2668 ctx.data.bin_val.ptr = nla_data(attr_data);
2671 ctx.data.bool_val = attr_data ? true : false;
2674 ctx.data.s32_val = nla_get_s32(attr_data);
2679 err = team_option_set(team, opt_inst, &ctx);