Lines Matching refs:tx_msg

84  *     Open: it is marked as active (i2400m->tx_msg is valid) and we
530 * Assumes a TX message is active (i2400m->tx_msg).
537 struct i2400m_msg_hdr *msg_hdr = i2400m->tx_msg;
564 struct i2400m_msg_hdr *tx_msg;
566 BUG_ON(i2400m->tx_msg != NULL);
576 tx_msg = i2400m_tx_fifo_push(i2400m, I2400M_TX_PLD_SIZE,
578 if (tx_msg == NULL)
580 else if (tx_msg == TAIL_FULL) {
586 memset(tx_msg, 0, I2400M_TX_PLD_SIZE);
587 tx_msg->size = I2400M_TX_PLD_SIZE;
589 i2400m->tx_msg = tx_msg;
591 tx_msg, (void *) tx_msg - i2400m->tx_buf);
616 struct i2400m_msg_hdr *tx_msg = i2400m->tx_msg;
622 if (tx_msg->size & I2400M_TX_SKIP) /* a skipper? nothing to do */
624 num_pls = le16_to_cpu(tx_msg->num_pls);
629 tx_msg->size |= I2400M_TX_SKIP;
643 hdr_size = struct_size(tx_msg, pld, le16_to_cpu(tx_msg->num_pls));
645 tx_msg->offset = I2400M_TX_PLD_SIZE - hdr_size;
646 tx_msg_moved = (void *) tx_msg + tx_msg->offset;
647 memmove(tx_msg_moved, tx_msg, hdr_size);
648 tx_msg_moved->size -= tx_msg->offset;
674 if (tx_msg != tx_msg_moved)
675 tx_msg->size += padding;
677 i2400m->tx_msg = NULL;
739 if (unlikely(i2400m->tx_msg == NULL))
742 || (is_singleton && i2400m->tx_msg->num_pls != 0))) {
745 is_singleton, i2400m->tx_msg->num_pls);
749 if (i2400m->tx_msg == NULL)
757 if (i2400m->tx_msg->size + padded_len > I2400M_TX_MSG_SIZE) {
762 if (i2400m->tx_msg == NULL)
778 struct i2400m_msg_hdr *tx_msg = i2400m->tx_msg;
779 unsigned num_pls = le16_to_cpu(tx_msg->num_pls);
782 i2400m_pld_set(&tx_msg->pld[num_pls], buf_len, pl_type);
784 le32_to_cpu(tx_msg->pld[num_pls].val),
786 tx_msg->num_pls = le16_to_cpu(num_pls+1);
787 tx_msg->size += padded_len;
789 padded_len, tx_msg->size, num_pls+1);
792 (void *)tx_msg - i2400m->tx_buf, (size_t)tx_msg->size,
841 struct i2400m_msg_hdr *tx_msg, *tx_msg_moved;
857 tx_msg = i2400m->tx_buf + i2400m->tx_out % I2400M_TX_BUF_SIZE;
858 if (tx_msg->size & I2400M_TX_SKIP) { /* skip? */
861 (size_t) tx_msg->size & ~I2400M_TX_SKIP);
862 i2400m->tx_out += tx_msg->size & ~I2400M_TX_SKIP;
866 if (tx_msg->num_pls == 0) { /* No payloads? */
867 if (tx_msg == i2400m->tx_msg) { /* open, we are done */
870 (void *) tx_msg - i2400m->tx_buf);
871 tx_msg = NULL;
876 (void *) tx_msg - i2400m->tx_buf,
877 (size_t) tx_msg->size);
878 i2400m->tx_out += tx_msg->size & ~I2400M_TX_SKIP;
882 if (tx_msg == i2400m->tx_msg) /* open msg? */
886 tx_msg_moved = (void *) tx_msg + tx_msg->offset;
887 i2400m->tx_msg_size = tx_msg->size;
891 current->pid, (void *) tx_msg - i2400m->tx_buf,
892 (size_t) tx_msg->offset, (size_t) tx_msg->size,
960 * for tx_in, tx_out, tx_msg_size and tx_msg. We reset them since
990 i2400m->tx_msg = NULL;