Lines Matching refs:cmd
28 struct w1_netlink_cmd *cmd; /* advances as cmds are appened */ member
92 block->cmd = NULL; in w1_reply_make_space()
136 struct w1_netlink_cmd *cmd) in w1_netlink_queue_cmd() argument
140 sizeof(struct w1_netlink_msg) + sizeof(*cmd) + cmd->len); in w1_netlink_queue_cmd()
150 block->cmd = (struct w1_netlink_cmd *)(block->msg->data); in w1_netlink_queue_cmd()
152 space = sizeof(*cmd) + cmd->len; in w1_netlink_queue_cmd()
153 if (block->cmd != cmd) in w1_netlink_queue_cmd()
154 memcpy(block->cmd, cmd, space); in w1_netlink_queue_cmd()
175 struct w1_netlink_cmd *cmd = (struct w1_netlink_cmd *)block->msg->data; in w1_netlink_queue_status() local
176 memcpy(cmd, req_cmd, sizeof(*cmd)); in w1_netlink_queue_status()
177 block->cn->len += sizeof(*cmd); in w1_netlink_queue_status()
178 block->msg->len += sizeof(*cmd); in w1_netlink_queue_status()
179 cmd->len = 0; in w1_netlink_queue_status()
239 struct w1_netlink_cmd *cache_cmd = block->cmd; in w1_send_slave()
245 if (!block->cmd) { in w1_send_slave()
250 data = (u64 *)(block->cmd->data + block->cmd->len); in w1_send_slave()
255 block->cmd->len += sizeof(*data); in w1_send_slave()
274 if (req_cmd->cmd == W1_CMD_LIST_SLAVES) { in w1_get_slaves()
283 w1_search_process_cb(dev, req_cmd->cmd == W1_CMD_ALARM_SEARCH ? in w1_get_slaves()
291 struct w1_netlink_cmd *cmd) in w1_process_command_io() argument
295 switch (cmd->cmd) { in w1_process_command_io()
297 w1_touch_block(dev, cmd->data, cmd->len); in w1_process_command_io()
298 w1_netlink_queue_cmd(dev->priv, cmd); in w1_process_command_io()
301 w1_read_block(dev, cmd->data, cmd->len); in w1_process_command_io()
302 w1_netlink_queue_cmd(dev->priv, cmd); in w1_process_command_io()
305 w1_write_block(dev, cmd->data, cmd->len); in w1_process_command_io()
316 struct w1_netlink_cmd *cmd) in w1_process_command_addremove() argument
322 if (cmd->len != sizeof(*id)) in w1_process_command_addremove()
325 id = (struct w1_reg_num *)cmd->data; in w1_process_command_addremove()
328 switch (cmd->cmd) { in w1_process_command_addremove()
357 switch (req_cmd->cmd) { in w1_process_command_master()
390 struct w1_netlink_cmd *cmd) in w1_process_command_slave() argument
394 sl->reg_num.crc, cmd->cmd, cmd->len); in w1_process_command_slave()
396 return w1_process_command_io(sl->master, cmd); in w1_process_command_slave()
452 struct w1_netlink_cmd *cmd = (struct w1_netlink_cmd *)node->msg->data; in w1_process_cb() local
461 if (cmd->len + sizeof(struct w1_netlink_cmd) > mlen) { in w1_process_cb()
467 err = w1_process_command_slave(sl, cmd); in w1_process_cb()
469 err = w1_process_command_master(dev, cmd); in w1_process_cb()
472 w1_netlink_queue_status(node->block, node->msg, cmd, err); in w1_process_cb()
475 len = sizeof(*cmd) + cmd->len; in w1_process_cb()
476 cmd = (struct w1_netlink_cmd *)((u8 *)cmd + len); in w1_process_cb()
480 if (!cmd || err) in w1_process_cb()
481 w1_netlink_queue_status(node->block, node->msg, cmd, err); in w1_process_cb()
503 struct w1_netlink_cmd *cmd = (struct w1_netlink_cmd *)msg->data; in w1_list_count_cmds() local
508 if (cmd->len + sizeof(struct w1_netlink_cmd) > mlen) in w1_list_count_cmds()
511 switch (cmd->cmd) { in w1_list_count_cmds()
518 len = sizeof(*cmd) + cmd->len; in w1_list_count_cmds()
519 cmd = (struct w1_netlink_cmd *)((u8 *)cmd + len); in w1_list_count_cmds()