Lines Matching refs:monbuf
105 struct mon_buf *monbuf; in monwrite_new_hdr() local
112 monbuf = NULL; in monwrite_new_hdr()
114 monbuf = monwrite_find_hdr(monpriv, monhdr); in monwrite_new_hdr()
115 if (monbuf) { in monwrite_new_hdr()
117 monhdr->datalen = monbuf->hdr.datalen; in monwrite_new_hdr()
118 rc = monwrite_diag(monhdr, monbuf->data, in monwrite_new_hdr()
120 list_del(&monbuf->list); in monwrite_new_hdr()
122 kfree(monbuf->data); in monwrite_new_hdr()
123 kfree(monbuf); in monwrite_new_hdr()
124 monbuf = NULL; in monwrite_new_hdr()
129 monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL); in monwrite_new_hdr()
130 if (!monbuf) in monwrite_new_hdr()
132 monbuf->data = kzalloc(monhdr->datalen, in monwrite_new_hdr()
134 if (!monbuf->data) { in monwrite_new_hdr()
135 kfree(monbuf); in monwrite_new_hdr()
138 monbuf->hdr = *monhdr; in monwrite_new_hdr()
139 list_add_tail(&monbuf->list, &monpriv->list); in monwrite_new_hdr()
143 monpriv->current_buf = monbuf; in monwrite_new_hdr()
150 struct mon_buf *monbuf = monpriv->current_buf; in monwrite_new_data() local
155 if (!monbuf->diag_done) { in monwrite_new_data()
156 rc = monwrite_diag(monhdr, monbuf->data, in monwrite_new_data()
158 monbuf->diag_done = 1; in monwrite_new_data()
162 if (!monbuf->diag_done) { in monwrite_new_data()
163 rc = monwrite_diag(monhdr, monbuf->data, in monwrite_new_data()
165 monbuf->diag_done = 1; in monwrite_new_data()
169 rc = monwrite_diag(monhdr, monbuf->data, in monwrite_new_data()