Lines Matching refs:msg

55 	struct sk_buff *msg;  member
113 if (nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_ID, p->tz_id) || in thermal_genl_event_tz_create()
114 nla_put_string(p->msg, THERMAL_GENL_ATTR_TZ_NAME, p->name)) in thermal_genl_event_tz_create()
122 if (nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_ID, p->tz_id)) in thermal_genl_event_tz()
130 if (nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_ID, p->tz_id) || in thermal_genl_event_tz_trip_up()
131 nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_TRIP_ID, p->trip_id) || in thermal_genl_event_tz_trip_up()
132 nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_TEMP, p->temp)) in thermal_genl_event_tz_trip_up()
140 if (nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_ID, p->tz_id) || in thermal_genl_event_tz_trip_add()
141 nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_TRIP_ID, p->trip_id) || in thermal_genl_event_tz_trip_add()
142 nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_TRIP_TYPE, p->trip_type) || in thermal_genl_event_tz_trip_add()
143 nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_TRIP_TEMP, p->trip_temp) || in thermal_genl_event_tz_trip_add()
144 nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_TRIP_HYST, p->trip_hyst)) in thermal_genl_event_tz_trip_add()
152 if (nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_ID, p->tz_id) || in thermal_genl_event_tz_trip_delete()
153 nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_TRIP_ID, p->trip_id)) in thermal_genl_event_tz_trip_delete()
161 if (nla_put_string(p->msg, THERMAL_GENL_ATTR_CDEV_NAME, in thermal_genl_event_cdev_add()
163 nla_put_u32(p->msg, THERMAL_GENL_ATTR_CDEV_ID, in thermal_genl_event_cdev_add()
165 nla_put_u32(p->msg, THERMAL_GENL_ATTR_CDEV_MAX_STATE, in thermal_genl_event_cdev_add()
174 if (nla_put_u32(p->msg, THERMAL_GENL_ATTR_CDEV_ID, p->cdev_id)) in thermal_genl_event_cdev_delete()
182 if (nla_put_u32(p->msg, THERMAL_GENL_ATTR_CDEV_ID, in thermal_genl_event_cdev_state_update()
184 nla_put_u32(p->msg, THERMAL_GENL_ATTR_CDEV_CUR_STATE, in thermal_genl_event_cdev_state_update()
193 if (nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_ID, p->tz_id) || in thermal_genl_event_gov_change()
194 nla_put_string(p->msg, THERMAL_GENL_ATTR_GOV_NAME, p->name)) in thermal_genl_event_gov_change()
203 struct sk_buff *msg = p->msg; in thermal_genl_event_cpu_capability_change() local
207 start_cap = nla_nest_start(msg, THERMAL_GENL_ATTR_CPU_CAPABILITY); in thermal_genl_event_cpu_capability_change()
212 if (nla_put_u32(msg, THERMAL_GENL_ATTR_CPU_CAPABILITY_ID, in thermal_genl_event_cpu_capability_change()
216 if (nla_put_u32(msg, THERMAL_GENL_ATTR_CPU_CAPABILITY_PERFORMANCE, in thermal_genl_event_cpu_capability_change()
220 if (nla_put_u32(msg, THERMAL_GENL_ATTR_CPU_CAPABILITY_EFFICIENCY, in thermal_genl_event_cpu_capability_change()
227 nla_nest_end(msg, start_cap); in thermal_genl_event_cpu_capability_change()
231 nla_nest_cancel(msg, start_cap); in thermal_genl_event_cpu_capability_change()
274 struct sk_buff *msg; in thermal_genl_send_event() local
278 msg = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); in thermal_genl_send_event()
279 if (!msg) in thermal_genl_send_event()
281 p->msg = msg; in thermal_genl_send_event()
283 hdr = genlmsg_put(msg, 0, 0, &thermal_gnl_family, 0, event); in thermal_genl_send_event()
291 genlmsg_end(msg, hdr); in thermal_genl_send_event()
293 genlmsg_multicast(&thermal_gnl_family, msg, 0, 1, GFP_KERNEL); in thermal_genl_send_event()
298 genlmsg_cancel(msg, hdr); in thermal_genl_send_event()
300 nlmsg_free(msg); in thermal_genl_send_event()
417 struct sk_buff *msg = data; in __thermal_genl_cmd_tz_get_id() local
419 if (nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_ID, tz->id) || in __thermal_genl_cmd_tz_get_id()
420 nla_put_string(msg, THERMAL_GENL_ATTR_TZ_NAME, tz->type)) in __thermal_genl_cmd_tz_get_id()
428 struct sk_buff *msg = p->msg; in thermal_genl_cmd_tz_get_id() local
432 start_tz = nla_nest_start(msg, THERMAL_GENL_ATTR_TZ); in thermal_genl_cmd_tz_get_id()
436 ret = for_each_thermal_zone(__thermal_genl_cmd_tz_get_id, msg); in thermal_genl_cmd_tz_get_id()
440 nla_nest_end(msg, start_tz); in thermal_genl_cmd_tz_get_id()
445 nla_nest_cancel(msg, start_tz); in thermal_genl_cmd_tz_get_id()
452 struct sk_buff *msg = p->msg; in thermal_genl_cmd_tz_get_trip() local
467 start_trip = nla_nest_start(msg, THERMAL_GENL_ATTR_TZ_TRIP); in thermal_genl_cmd_tz_get_trip()
479 if (nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_TRIP_ID, i) || in thermal_genl_cmd_tz_get_trip()
480 nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_TRIP_TYPE, trip.type) || in thermal_genl_cmd_tz_get_trip()
481 nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_TRIP_TEMP, trip.temperature) || in thermal_genl_cmd_tz_get_trip()
482 nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_TRIP_HYST, trip.hysteresis)) in thermal_genl_cmd_tz_get_trip()
488 nla_nest_end(msg, start_trip); in thermal_genl_cmd_tz_get_trip()
500 struct sk_buff *msg = p->msg; in thermal_genl_cmd_tz_get_temp() local
517 if (nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_ID, id) || in thermal_genl_cmd_tz_get_temp()
518 nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_TEMP, temp)) in thermal_genl_cmd_tz_get_temp()
526 struct sk_buff *msg = p->msg; in thermal_genl_cmd_tz_get_gov() local
541 if (nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_ID, id) || in thermal_genl_cmd_tz_get_gov()
542 nla_put_string(msg, THERMAL_GENL_ATTR_TZ_GOV_NAME, in thermal_genl_cmd_tz_get_gov()
554 struct sk_buff *msg = data; in __thermal_genl_cmd_cdev_get() local
556 if (nla_put_u32(msg, THERMAL_GENL_ATTR_CDEV_ID, cdev->id)) in __thermal_genl_cmd_cdev_get()
559 if (nla_put_string(msg, THERMAL_GENL_ATTR_CDEV_NAME, cdev->type)) in __thermal_genl_cmd_cdev_get()
567 struct sk_buff *msg = p->msg; in thermal_genl_cmd_cdev_get() local
571 start_cdev = nla_nest_start(msg, THERMAL_GENL_ATTR_CDEV); in thermal_genl_cmd_cdev_get()
575 ret = for_each_thermal_cooling_device(__thermal_genl_cmd_cdev_get, msg); in thermal_genl_cmd_cdev_get()
579 nla_nest_end(msg, start_cdev); in thermal_genl_cmd_cdev_get()
583 nla_nest_cancel(msg, start_cdev); in thermal_genl_cmd_cdev_get()
599 struct param p = { .msg = skb }; in thermal_genl_cmd_dumpit()
627 struct sk_buff *msg; in thermal_genl_cmd_doit() local
632 msg = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); in thermal_genl_cmd_doit()
633 if (!msg) in thermal_genl_cmd_doit()
635 p.msg = msg; in thermal_genl_cmd_doit()
637 hdr = genlmsg_put_reply(msg, info, &thermal_gnl_family, 0, cmd); in thermal_genl_cmd_doit()
645 genlmsg_end(msg, hdr); in thermal_genl_cmd_doit()
647 return genlmsg_reply(msg, info); in thermal_genl_cmd_doit()
650 genlmsg_cancel(msg, hdr); in thermal_genl_cmd_doit()
652 nlmsg_free(msg); in thermal_genl_cmd_doit()