struct task_struct *tx_task_struct;
wait_queue_head_t tx_wait_queue;
u8 free_in_fifo;
- char buffer[MAX_MSG_SIZE];
+ char tx_buffer[MAX_MSG_SIZE];
/* rx related values */
struct pi433_rx_cfg rx_cfg;
if (tx_cfg.enable_address_byte == OPTION_ON)
size++;
- /* prime buffer */
- memset(device->buffer, 0, size);
+ /* prime tx_buffer */
+ memset(device->tx_buffer, 0, size);
position = 0;
/* add length byte, if requested */
* according to spec, length byte itself must be
* excluded from the length calculation
*/
- device->buffer[position++] = size - 1;
+ device->tx_buffer[position++] = size - 1;
/* add adr byte, if requested */
if (tx_cfg.enable_address_byte == OPTION_ON)
- device->buffer[position++] = tx_cfg.address_byte;
+ device->tx_buffer[position++] = tx_cfg.address_byte;
/* finally get message data from fifo */
- retval = kfifo_out(&device->tx_fifo, &device->buffer[position],
- sizeof(device->buffer) - position);
+ retval = kfifo_out(&device->tx_fifo, &device->tx_buffer[position],
+ sizeof(device->tx_buffer) - position);
dev_dbg(device->dev,
"read %d message byte(s) from fifo queue.\n", retval);
device->free_in_fifo = 0;
rf69_write_fifo(spi,
- &device->buffer[position],
+ &device->tx_buffer[position],
write_size);
position += write_size;
} else {
device->free_in_fifo -= size;
repetitions--;
rf69_write_fifo(spi,
- &device->buffer[position],
+ &device->tx_buffer[position],
(size - position));
position = 0; /* reset for next repetition */
}