Lines Matching refs:cur_wr_offset
78 int32_t cur_wr_offset; in pktlog_getbuf_intsafe() local
111 cur_wr_offset = log_buf->wr_offset; in pktlog_getbuf_intsafe()
114 if ((cur_wr_offset <= log_buf->rd_offset) in pktlog_getbuf_intsafe()
115 && (cur_wr_offset + sizeof(struct ath_pktlog_hdr)) > in pktlog_getbuf_intsafe()
121 log_buf->rd_offset = cur_wr_offset; in pktlog_getbuf_intsafe()
124 log_hdr = (struct ath_pktlog_hdr *)(log_buf->log_data + cur_wr_offset); in pktlog_getbuf_intsafe()
138 cur_wr_offset += sizeof(*log_hdr); in pktlog_getbuf_intsafe()
140 if ((buf_size - cur_wr_offset) < log_size) { in pktlog_getbuf_intsafe()
141 while ((cur_wr_offset <= log_buf->rd_offset) in pktlog_getbuf_intsafe()
146 cur_wr_offset = 0; in pktlog_getbuf_intsafe()
149 while ((cur_wr_offset <= log_buf->rd_offset) in pktlog_getbuf_intsafe()
150 && (cur_wr_offset + log_size) > log_buf->rd_offset) { in pktlog_getbuf_intsafe()
154 log_ptr = &(log_buf->log_data[cur_wr_offset]); in pktlog_getbuf_intsafe()
155 cur_wr_offset += log_hdr->size; in pktlog_getbuf_intsafe()
157 log_buf->wr_offset = ((buf_size - cur_wr_offset) >= in pktlog_getbuf_intsafe()
158 sizeof(struct ath_pktlog_hdr)) ? cur_wr_offset : in pktlog_getbuf_intsafe()