• Home
  • Raw
  • Download

Lines Matching refs:ops

262 	const struct ethnl_request_ops	*ops;  member
362 const struct ethnl_request_ops *ops, in ethnl_init_reply_data() argument
365 memset(reply_data, 0, ops->reply_data_size); in ethnl_init_reply_data()
375 const struct ethnl_request_ops *ops; in ethnl_default_doit() local
381 ops = ethnl_default_requests[cmd]; in ethnl_default_doit()
382 if (WARN_ONCE(!ops, "cmd %u has no ethnl_request_ops\n", cmd)) in ethnl_default_doit()
384 if (GENL_REQ_ATTR_CHECK(info, ops->hdr_attr)) in ethnl_default_doit()
387 req_info = kzalloc(ops->req_info_size, GFP_KERNEL); in ethnl_default_doit()
390 reply_data = kmalloc(ops->reply_data_size, GFP_KERNEL); in ethnl_default_doit()
396 ret = ethnl_default_parse(req_info, info, ops, !ops->allow_nodev_do); in ethnl_default_doit()
399 ethnl_init_reply_data(reply_data, ops, req_info->dev); in ethnl_default_doit()
402 ret = ops->prepare_data(req_info, reply_data, info); in ethnl_default_doit()
406 ret = ops->reply_size(req_info, reply_data); in ethnl_default_doit()
412 req_info->dev, ops->reply_cmd, in ethnl_default_doit()
413 ops->hdr_attr, info, &reply_payload); in ethnl_default_doit()
417 ret = ops->fill_reply(rskb, req_info, reply_data); in ethnl_default_doit()
423 if (ops->cleanup_data) in ethnl_default_doit()
424 ops->cleanup_data(reply_data); in ethnl_default_doit()
436 if (ops->cleanup_data) in ethnl_default_doit()
437 ops->cleanup_data(reply_data); in ethnl_default_doit()
454 ctx->ops->reply_cmd); in ethnl_default_dump_one()
458 ethnl_init_reply_data(ctx->reply_data, ctx->ops, dev); in ethnl_default_dump_one()
460 ret = ctx->ops->prepare_data(ctx->req_info, ctx->reply_data, info); in ethnl_default_dump_one()
464 ret = ethnl_fill_reply_header(skb, dev, ctx->ops->hdr_attr); in ethnl_default_dump_one()
467 ret = ctx->ops->fill_reply(skb, ctx->req_info, ctx->reply_data); in ethnl_default_dump_one()
470 if (ctx->ops->cleanup_data) in ethnl_default_dump_one()
471 ctx->ops->cleanup_data(ctx->reply_data); in ethnl_default_dump_one()
521 const struct ethnl_request_ops *ops; in ethnl_default_start() local
529 ops = ethnl_default_requests[ghdr->cmd]; in ethnl_default_start()
530 if (WARN_ONCE(!ops, "cmd %u has no ethnl_request_ops\n", ghdr->cmd)) in ethnl_default_start()
532 req_info = kzalloc(ops->req_info_size, GFP_KERNEL); in ethnl_default_start()
535 reply_data = kmalloc(ops->reply_data_size, GFP_KERNEL); in ethnl_default_start()
541 ret = ethnl_default_parse(req_info, &info->info, ops, false); in ethnl_default_start()
553 ctx->ops = ops; in ethnl_default_start()
581 const struct ethnl_request_ops *ops; in ethnl_default_set_doit() local
586 ops = ethnl_default_requests[cmd]; in ethnl_default_set_doit()
587 if (WARN_ONCE(!ops, "cmd %u has no ethnl_request_ops\n", cmd)) in ethnl_default_set_doit()
589 if (GENL_REQ_ATTR_CHECK(info, ops->hdr_attr)) in ethnl_default_set_doit()
592 ret = ethnl_parse_header_dev_get(&req_info, info->attrs[ops->hdr_attr], in ethnl_default_set_doit()
598 if (ops->set_validate) { in ethnl_default_set_doit()
599 ret = ops->set_validate(&req_info, info); in ethnl_default_set_doit()
610 ret = ops->set(&req_info, info); in ethnl_default_set_doit()
613 ethtool_notify(req_info.dev, ops->set_ntf_cmd, NULL); in ethnl_default_set_doit()
649 const struct ethnl_request_ops *ops; in ethnl_default_notify() local
663 ops = ethnl_default_notify_ops[cmd]; in ethnl_default_notify()
664 req_info = kzalloc(ops->req_info_size, GFP_KERNEL); in ethnl_default_notify()
667 reply_data = kmalloc(ops->reply_data_size, GFP_KERNEL); in ethnl_default_notify()
676 ethnl_init_reply_data(reply_data, ops, dev); in ethnl_default_notify()
677 ret = ops->prepare_data(req_info, reply_data, &info); in ethnl_default_notify()
680 ret = ops->reply_size(req_info, reply_data); in ethnl_default_notify()
690 ret = ethnl_fill_reply_header(skb, dev, ops->hdr_attr); in ethnl_default_notify()
693 ret = ops->fill_reply(skb, req_info, reply_data); in ethnl_default_notify()
696 if (ops->cleanup_data) in ethnl_default_notify()
697 ops->cleanup_data(reply_data); in ethnl_default_notify()
712 if (ops->cleanup_data) in ethnl_default_notify()
713 ops->cleanup_data(reply_data); in ethnl_default_notify()
1143 .ops = ethtool_genl_ops,