Lines Matching defs:cmd

360 				PN533_CMD_RESPONSE(dev->cmd->code));
399 struct pn533_cmd *cmd = dev->cmd;
403 if (!cmd) {
404 dev_dbg(dev->dev, "%s: cmd not set\n", __func__);
408 dev_kfree_skb(cmd->req);
410 status = cmd->status;
411 resp = cmd->resp;
414 rc = cmd->complete_cb(dev, cmd->complete_cb_context,
429 rc = cmd->complete_cb(dev, cmd->complete_cb_context, resp);
432 kfree(cmd);
433 dev->cmd = NULL;
442 struct pn533_cmd *cmd;
447 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
448 if (!cmd)
451 cmd->code = cmd_code;
452 cmd->req = req;
453 cmd->complete_cb = complete_cb;
454 cmd->complete_cb_context = complete_cb_context;
461 dev->cmd = cmd;
464 dev->cmd = NULL;
475 INIT_LIST_HEAD(&cmd->queue);
476 list_add_tail(&cmd->queue, &dev->cmd_queue);
481 kfree(cmd);
516 * The function sends a piority cmd directly to the chip omitting the cmd
519 * next cmd from the queue.
526 struct pn533_cmd *cmd;
529 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
530 if (!cmd)
533 cmd->code = cmd_code;
534 cmd->req = req;
535 cmd->complete_cb = complete_cb;
536 cmd->complete_cb_context = complete_cb_context;
540 dev->cmd = cmd;
543 dev->cmd = NULL;
544 kfree(cmd);
563 struct pn533_cmd *cmd;
574 cmd = list_first_entry(&dev->cmd_queue, struct pn533_cmd, queue);
576 list_del(&cmd->queue);
580 dev->cmd = cmd;
581 rc = dev->phy_ops->send_frame(dev, cmd->req);
583 dev->cmd = NULL;
584 dev_kfree_skb(cmd->req);
585 kfree(cmd);
1213 u8 mode, *cmd, comm_mode = NFC_COMM_PASSIVE, *gb;
1223 cmd = &resp->data[1];
1235 gb = cmd + ATR_REQ_GB_OFFSET;
2209 if (!dev->cmd)
2212 dev->cmd->status = status;
2235 dev->cmd->status = -EIO;
2238 dev->cmd->status = -EIO;
2241 dev->cmd->resp = skb;
2849 struct pn533_cmd *cmd, *n;
2859 list_for_each_entry_safe(cmd, n, &priv->cmd_queue, queue) {
2860 list_del(&cmd->queue);
2861 kfree(cmd);