Lines Matching refs:cmd

47 	struct w1_netlink_cmd *cmd; /* advances as cmds are appened */  member
109 block->cmd = NULL; in w1_reply_make_space()
153 struct w1_netlink_cmd *cmd) in w1_netlink_queue_cmd() argument
157 sizeof(struct w1_netlink_msg) + sizeof(*cmd) + cmd->len); in w1_netlink_queue_cmd()
167 block->cmd = (struct w1_netlink_cmd *)(block->msg->data); in w1_netlink_queue_cmd()
169 space = sizeof(*cmd) + cmd->len; in w1_netlink_queue_cmd()
170 if (block->cmd != cmd) in w1_netlink_queue_cmd()
171 memcpy(block->cmd, cmd, space); in w1_netlink_queue_cmd()
192 struct w1_netlink_cmd *cmd = (struct w1_netlink_cmd *)block->msg->data; in w1_netlink_queue_status() local
193 memcpy(cmd, req_cmd, sizeof(*cmd)); in w1_netlink_queue_status()
194 block->cn->len += sizeof(*cmd); in w1_netlink_queue_status()
195 block->msg->len += sizeof(*cmd); in w1_netlink_queue_status()
196 cmd->len = 0; in w1_netlink_queue_status()
256 struct w1_netlink_cmd *cache_cmd = block->cmd; in w1_send_slave()
262 if (!block->cmd) { in w1_send_slave()
267 data = (u64 *)(block->cmd->data + block->cmd->len); in w1_send_slave()
272 block->cmd->len += sizeof(*data); in w1_send_slave()
291 if (req_cmd->cmd == W1_CMD_LIST_SLAVES) { in w1_get_slaves()
300 w1_search_process_cb(dev, req_cmd->cmd == W1_CMD_ALARM_SEARCH ? in w1_get_slaves()
308 struct w1_netlink_cmd *cmd) in w1_process_command_io() argument
312 switch (cmd->cmd) { in w1_process_command_io()
314 w1_touch_block(dev, cmd->data, cmd->len); in w1_process_command_io()
315 w1_netlink_queue_cmd(dev->priv, cmd); in w1_process_command_io()
318 w1_read_block(dev, cmd->data, cmd->len); in w1_process_command_io()
319 w1_netlink_queue_cmd(dev->priv, cmd); in w1_process_command_io()
322 w1_write_block(dev, cmd->data, cmd->len); in w1_process_command_io()
333 struct w1_netlink_cmd *cmd) in w1_process_command_addremove() argument
339 if (cmd->len != sizeof(*id)) in w1_process_command_addremove()
342 id = (struct w1_reg_num *)cmd->data; in w1_process_command_addremove()
345 switch (cmd->cmd) { in w1_process_command_addremove()
374 switch (req_cmd->cmd) { in w1_process_command_master()
407 struct w1_netlink_cmd *cmd) in w1_process_command_slave() argument
411 sl->reg_num.crc, cmd->cmd, cmd->len); in w1_process_command_slave()
413 return w1_process_command_io(sl->master, cmd); in w1_process_command_slave()
469 struct w1_netlink_cmd *cmd = (struct w1_netlink_cmd *)node->msg->data; in w1_process_cb() local
478 if (cmd->len + sizeof(struct w1_netlink_cmd) > mlen) { in w1_process_cb()
484 err = w1_process_command_slave(sl, cmd); in w1_process_cb()
486 err = w1_process_command_master(dev, cmd); in w1_process_cb()
489 w1_netlink_queue_status(node->block, node->msg, cmd, err); in w1_process_cb()
492 len = sizeof(*cmd) + cmd->len; in w1_process_cb()
493 cmd = (struct w1_netlink_cmd *)((u8 *)cmd + len); in w1_process_cb()
497 if (!cmd || err) in w1_process_cb()
498 w1_netlink_queue_status(node->block, node->msg, cmd, err); in w1_process_cb()
520 struct w1_netlink_cmd *cmd = (struct w1_netlink_cmd *)msg->data; in w1_list_count_cmds() local
525 if (cmd->len + sizeof(struct w1_netlink_cmd) > mlen) in w1_list_count_cmds()
528 switch (cmd->cmd) { in w1_list_count_cmds()
535 len = sizeof(*cmd) + cmd->len; in w1_list_count_cmds()
536 cmd = (struct w1_netlink_cmd *)((u8 *)cmd + len); in w1_list_count_cmds()