Lines Matching refs:cmd
28 struct w1_netlink_cmd *cmd; /* advances as cmds are appened */ member
90 block->cmd = NULL; in w1_reply_make_space()
134 struct w1_netlink_cmd *cmd) in w1_netlink_queue_cmd() argument
138 sizeof(struct w1_netlink_msg) + sizeof(*cmd) + cmd->len); in w1_netlink_queue_cmd()
148 block->cmd = (struct w1_netlink_cmd *)(block->msg->data); in w1_netlink_queue_cmd()
150 space = sizeof(*cmd) + cmd->len; in w1_netlink_queue_cmd()
151 if (block->cmd != cmd) in w1_netlink_queue_cmd()
152 memcpy(block->cmd, cmd, space); in w1_netlink_queue_cmd()
173 struct w1_netlink_cmd *cmd = (struct w1_netlink_cmd *)block->msg->data; in w1_netlink_queue_status() local
174 memcpy(cmd, req_cmd, sizeof(*cmd)); in w1_netlink_queue_status()
175 block->cn->len += sizeof(*cmd); in w1_netlink_queue_status()
176 block->msg->len += sizeof(*cmd); in w1_netlink_queue_status()
177 cmd->len = 0; in w1_netlink_queue_status()
237 struct w1_netlink_cmd *cache_cmd = block->cmd; in w1_send_slave()
243 if (!block->cmd) { in w1_send_slave()
248 data = (u64 *)(block->cmd->data + block->cmd->len); in w1_send_slave()
253 block->cmd->len += sizeof(*data); in w1_send_slave()
272 if (req_cmd->cmd == W1_CMD_LIST_SLAVES) { in w1_get_slaves()
281 w1_search_process_cb(dev, req_cmd->cmd == W1_CMD_ALARM_SEARCH ? in w1_get_slaves()
289 struct w1_netlink_cmd *cmd) in w1_process_command_io() argument
293 switch (cmd->cmd) { in w1_process_command_io()
295 w1_touch_block(dev, cmd->data, cmd->len); in w1_process_command_io()
296 w1_netlink_queue_cmd(dev->priv, cmd); in w1_process_command_io()
299 w1_read_block(dev, cmd->data, cmd->len); in w1_process_command_io()
300 w1_netlink_queue_cmd(dev->priv, cmd); in w1_process_command_io()
303 w1_write_block(dev, cmd->data, cmd->len); in w1_process_command_io()
314 struct w1_netlink_cmd *cmd) in w1_process_command_addremove() argument
320 if (cmd->len != sizeof(*id)) in w1_process_command_addremove()
323 id = (struct w1_reg_num *)cmd->data; in w1_process_command_addremove()
326 switch (cmd->cmd) { in w1_process_command_addremove()
355 switch (req_cmd->cmd) { in w1_process_command_master()
388 struct w1_netlink_cmd *cmd) in w1_process_command_slave() argument
392 sl->reg_num.crc, cmd->cmd, cmd->len); in w1_process_command_slave()
394 return w1_process_command_io(sl->master, cmd); in w1_process_command_slave()
450 struct w1_netlink_cmd *cmd = (struct w1_netlink_cmd *)node->msg->data; in w1_process_cb() local
459 if (cmd->len + sizeof(struct w1_netlink_cmd) > mlen) { in w1_process_cb()
465 err = w1_process_command_slave(sl, cmd); in w1_process_cb()
467 err = w1_process_command_master(dev, cmd); in w1_process_cb()
470 w1_netlink_queue_status(node->block, node->msg, cmd, err); in w1_process_cb()
473 len = sizeof(*cmd) + cmd->len; in w1_process_cb()
474 cmd = (struct w1_netlink_cmd *)((u8 *)cmd + len); in w1_process_cb()
478 if (!cmd || err) in w1_process_cb()
479 w1_netlink_queue_status(node->block, node->msg, cmd, err); in w1_process_cb()
501 struct w1_netlink_cmd *cmd = (struct w1_netlink_cmd *)msg->data; in w1_list_count_cmds() local
506 if (cmd->len + sizeof(struct w1_netlink_cmd) > mlen) in w1_list_count_cmds()
509 switch (cmd->cmd) { in w1_list_count_cmds()
516 len = sizeof(*cmd) + cmd->len; in w1_list_count_cmds()
517 cmd = (struct w1_netlink_cmd *)((u8 *)cmd + len); in w1_list_count_cmds()