Lines Matching defs:command
3 * This file contains the handling of command.
4 * It prepares command and sends it to firmware when it is ready.
22 * lbs_cmd_copyback - Simple callback that copies response back into command
25 * @extra: A pointer to the original command structure for which
27 * @resp: A pointer to the command response
45 * Use this if you just want to send a command to the hardware, but don't
62 * is_command_allowed_in_ps - tests if a command is allowed in Power Save mode
64 * @cmd: the command ID
187 * Certain firmware versions do not support EHS_REMOVE_WAKEUP command
791 /* Set command header sizes */
816 * @reg: register command, one of CMD_MAC_REG_ACCESS,
858 * @reg: register command, one of CMD_MAC_REG_ACCESS,
906 /* Exit_PS command needs to be queued in the header always. */
907 if (le16_to_cpu(cmdnode->cmdbuf->command) == CMD_802_11_PS_MODE) {
916 if (le16_to_cpu(cmdnode->cmdbuf->command) == CMD_802_11_WAKEUP_CONFIRM)
928 lbs_deb_host("QUEUE_CMD: inserted command 0x%04x into cmdpendingq\n",
929 le16_to_cpu(cmdnode->cmdbuf->command));
938 uint16_t command;
951 command = le16_to_cpu(cmd->command);
954 if (command == CMD_802_11_SCAN || command == CMD_802_11_ASSOCIATE)
957 lbs_deb_cmd("DNLD_CMD: command 0x%04x, seq %d, size %d\n",
958 command, le16_to_cpu(cmd->seqnum), cmdsize);
971 if (command == CMD_802_11_DEEP_SLEEP) {
979 /* Setup the timer after transmit command */
985 * This function inserts command node to cmdfreeq
1018 * where the command is still pending. Make sure the command really
1107 * lbs_allocate_cmd_buffer - allocates the command buffer and links
1108 * it to command free queue
1121 /* Allocate and initialize the command array */
1130 /* Allocate and initialize each command buffer in the command array */
1151 * lbs_free_cmd_buffer - free the command buffer
1189 * lbs_get_free_cmd_node - gets a free command node if available in
1190 * command free queue
1222 * lbs_execute_next_command - execute next command in command
1243 "EXEC_NEXT_CMD: already processing command!\n");
1259 if (is_command_allowed_in_ps(le16_to_cpu(cmd->command))) {
1264 le16_to_cpu(cmd->command),
1269 lbs_deb_host("EXEC_NEXT_CMD: OK to send command "
1271 le16_to_cpu(cmd->command), priv->psstate);
1274 * 1. Non-PS command:
1277 * 2. PS command but not EXIT_PS:
1279 * 3. PS command EXIT_PS:
1281 * otherwise send this command down to firmware
1284 if (cmd->command != cpu_to_le16(CMD_802_11_PS_MODE)) {
1286 * this non PS command will be sent later */
1303 * PS command. Ignore it if it is not Exit_PS.
1339 lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n",
1340 le16_to_cpu(cmd->command));
1396 * send sleep confirm command to firmware if ok
1413 /* In-progress command? */
1419 /* Pending events or command responses? */
1422 lbs_deb_host("pending events or command responses\n");
1500 uint16_t command, struct cmd_header *in_cmd, int in_cmd_size,
1517 lbs_deb_cmd("command not allowed in deep sleep\n");
1527 /* Wake up main thread to execute next command */
1536 /* Copy the incoming command to the buffer */
1539 /* Set command, clean result, move to buffer */
1540 cmdnode->cmdbuf->command = cpu_to_le16(command);
1544 lbs_deb_host("PREP_CMD: command 0x%04x\n", command);
1554 void lbs_cmd_async(struct lbs_private *priv, uint16_t command,
1557 __lbs_cmd_async(priv, command, in_cmd, in_cmd_size,
1561 int __lbs_cmd(struct lbs_private *priv, uint16_t command,
1570 cmdnode = __lbs_cmd_async(priv, command, in_cmd, in_cmd_size,
1582 * command, so we perform an uninterruptible sleep.
1589 netdev_info(priv->dev, "PREP_CMD: command 0x%04x failed: %d\n",
1590 command, ret);