Lines Matching refs:cmdnode
891 struct cmd_ctrl_node *cmdnode) in lbs_queue_cmd() argument
896 if (!cmdnode) { in lbs_queue_cmd()
900 if (!cmdnode->cmdbuf->size) { in lbs_queue_cmd()
904 cmdnode->result = 0; in lbs_queue_cmd()
907 if (le16_to_cpu(cmdnode->cmdbuf->command) == CMD_802_11_PS_MODE) { in lbs_queue_cmd()
908 struct cmd_ds_802_11_ps_mode *psm = (void *)cmdnode->cmdbuf; in lbs_queue_cmd()
916 if (le16_to_cpu(cmdnode->cmdbuf->command) == CMD_802_11_WAKEUP_CONFIRM) in lbs_queue_cmd()
922 list_add_tail(&cmdnode->list, &priv->cmdpendingq); in lbs_queue_cmd()
924 list_add(&cmdnode->list, &priv->cmdpendingq); in lbs_queue_cmd()
929 le16_to_cpu(cmdnode->cmdbuf->command)); in lbs_queue_cmd()
933 struct cmd_ctrl_node *cmdnode) in lbs_submit_command() argument
942 cmd = cmdnode->cmdbuf; in lbs_submit_command()
947 priv->cur_cmd = cmdnode; in lbs_submit_command()
959 lbs_deb_hex(LBS_DEB_CMD, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize); in lbs_submit_command()
968 lbs_complete_command(priv, cmdnode, ret); in lbs_submit_command()
977 lbs_complete_command(priv, cmdnode, 0); in lbs_submit_command()
989 struct cmd_ctrl_node *cmdnode) in __lbs_cleanup_and_insert_cmd() argument
991 if (!cmdnode) in __lbs_cleanup_and_insert_cmd()
994 cmdnode->callback = NULL; in __lbs_cleanup_and_insert_cmd()
995 cmdnode->callback_arg = 0; in __lbs_cleanup_and_insert_cmd()
997 memset(cmdnode->cmdbuf, 0, LBS_CMD_BUFFER_SIZE); in __lbs_cleanup_and_insert_cmd()
999 list_add_tail(&cmdnode->list, &priv->cmdfreeq); in __lbs_cleanup_and_insert_cmd()
1231 struct cmd_ctrl_node *cmdnode = NULL; in lbs_execute_next_command() local
1250 cmdnode = list_first_entry(&priv->cmdpendingq, in lbs_execute_next_command()
1256 if (cmdnode) { in lbs_execute_next_command()
1257 cmd = cmdnode->cmdbuf; in lbs_execute_next_command()
1315 lbs_complete_command(priv, cmdnode, 0); in lbs_execute_next_command()
1325 lbs_complete_command(priv, cmdnode, 0); in lbs_execute_next_command()
1337 list_del_init(&cmdnode->list); in lbs_execute_next_command()
1341 lbs_submit_command(priv, cmdnode); in lbs_execute_next_command()
1504 struct cmd_ctrl_node *cmdnode; in __lbs_cmd_async() local
1508 cmdnode = ERR_PTR(-ENOENT); in __lbs_cmd_async()
1518 cmdnode = ERR_PTR(-EBUSY); in __lbs_cmd_async()
1523 cmdnode = lbs_get_free_cmd_node(priv); in __lbs_cmd_async()
1524 if (cmdnode == NULL) { in __lbs_cmd_async()
1529 cmdnode = ERR_PTR(-ENOBUFS); in __lbs_cmd_async()
1533 cmdnode->callback = callback; in __lbs_cmd_async()
1534 cmdnode->callback_arg = callback_arg; in __lbs_cmd_async()
1537 memcpy(cmdnode->cmdbuf, in_cmd, in_cmd_size); in __lbs_cmd_async()
1540 cmdnode->cmdbuf->command = cpu_to_le16(command); in __lbs_cmd_async()
1541 cmdnode->cmdbuf->size = cpu_to_le16(in_cmd_size); in __lbs_cmd_async()
1542 cmdnode->cmdbuf->result = 0; in __lbs_cmd_async()
1546 cmdnode->cmdwaitqwoken = 0; in __lbs_cmd_async()
1547 lbs_queue_cmd(priv, cmdnode); in __lbs_cmd_async()
1551 return cmdnode; in __lbs_cmd_async()
1566 struct cmd_ctrl_node *cmdnode; in __lbs_cmd() local
1570 cmdnode = __lbs_cmd_async(priv, command, in_cmd, in_cmd_size, in __lbs_cmd()
1572 if (IS_ERR(cmdnode)) { in __lbs_cmd()
1573 ret = PTR_ERR(cmdnode); in __lbs_cmd()
1584 wait_event(cmdnode->cmdwait_q, cmdnode->cmdwaitqwoken); in __lbs_cmd()
1587 ret = cmdnode->result; in __lbs_cmd()
1592 __lbs_cleanup_and_insert_cmd(priv, cmdnode); in __lbs_cmd()