diff --git a/ccid_host/ccid_main_functionfs.c b/ccid_host/ccid_main_functionfs.c index b538e12..dd1e274 100644 --- a/ccid_host/ccid_main_functionfs.c +++ b/ccid_host/ccid_main_functionfs.c @@ -214,7 +214,7 @@ static int ep_out_cb(struct osmo_fd *ofd, unsigned int what) int rc; LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__); - if (what & BSC_FD_READ) { + if (what & OSMO_FD_READ) { rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); if (rc <= 0) { msgb_free(msg); @@ -229,7 +229,7 @@ static int ep_out_cb(struct osmo_fd *ofd, unsigned int what) static int ep_in_cb(struct osmo_fd *ofd, unsigned int what) { LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__); - if (what & BSC_FD_WRITE) { + if (what & OSMO_FD_WRITE) { /* write what we have to write */ } return 0; @@ -287,7 +287,7 @@ static int ep_0_cb(struct osmo_fd *ofd, unsigned int what) struct ufunc_handle *uh = (struct ufunc_handle *) ofd->data; int rc; - if (what & BSC_FD_READ) { + if (what & OSMO_FD_READ) { struct usb_functionfs_event evt; rc = read(ofd->fd, (uint8_t *)&evt, sizeof(evt)); if (rc < sizeof(evt)) @@ -427,7 +427,7 @@ static int ep0_init(struct ufunc_handle *uh) /* open control endpoint and write descriptors to it */ rc = open("ep0", O_RDWR); assert(rc >= 0); - osmo_fd_setup(&uh->ep0, rc, BSC_FD_READ, &ep_0_cb, uh, 0); + osmo_fd_setup(&uh->ep0, rc, OSMO_FD_READ, &ep_0_cb, uh, 0); osmo_fd_register(&uh->ep0); rc = write(uh->ep0.fd, &descriptors, sizeof(descriptors)); if (rc != sizeof(descriptors)) { @@ -451,7 +451,7 @@ static int ep0_init(struct ufunc_handle *uh) rc = open("ep2", O_RDWR); assert(rc >= 0); - osmo_fd_setup(&uh->ep_out, rc, BSC_FD_READ, &ep_out_cb, uh, 2); + osmo_fd_setup(&uh->ep_out, rc, OSMO_FD_READ, &ep_out_cb, uh, 2); #ifdef FUNCTIONFS_SUPPORTS_POLL osmo_fd_register(&uh->ep_out); #endif @@ -477,7 +477,7 @@ static int ep0_init(struct ufunc_handle *uh) /* create an eventfd, which will be marked readable once some AIO completes */ rc = eventfd(0, 0); OSMO_ASSERT(rc >= 0); - osmo_fd_setup(&uh->aio_evfd, rc, BSC_FD_READ, &evfd_cb, uh, 0); + osmo_fd_setup(&uh->aio_evfd, rc, OSMO_FD_READ, &evfd_cb, uh, 0); osmo_fd_register(&uh->aio_evfd); uh->aio_out.iocb = malloc(sizeof(struct iocb)); @@ -499,7 +499,7 @@ static int ccid_ops_send_in(struct ccid_instance *ci, struct msgb *msg) #ifndef FUNCTIONFS_SUPPORTS_POLL dequeue_aio_write_in(uh); #else - uh->ep_in.when |= BSC_FD_WRITE; + uh->ep_in.when |= OSMO_FD_WRITE; #endif return 0; } @@ -515,7 +515,7 @@ static int ccid_ops_send_int(struct ccid_instance *ci, struct msgb *msg) #ifndef FUNCTIONFS_SUPPORTS_POLL dequeue_aio_write_int(uh); #else - uh->ep_int.when |= BSC_FD_WRITE; + uh->ep_int.when |= OSMO_FD_WRITE; #endif return 0; } diff --git a/ccid_host/cuart_driver_tty.c b/ccid_host/cuart_driver_tty.c index 38a6504..f8a1438 100644 --- a/ccid_host/cuart_driver_tty.c +++ b/ccid_host/cuart_driver_tty.c @@ -184,7 +184,7 @@ static int tty_uart_fd_cb(struct osmo_fd *ofd, unsigned int what) /* if no more bytes to transmit, disable OSMO_FD_WRITE */ if (cuart->u.tty.tx_index >= cuart->u.tty.tx_buf_len) { - ofd->when &= ~BSC_FD_WRITE; + ofd->when &= ~OSMO_FD_WRITE; #ifndef CREAD_ACTUALLY_WORKS /* don't immediately notify user; first wait for characters to be received */ #else @@ -212,7 +212,7 @@ static int tty_uart_open(struct card_uart *cuart, const char *device_name) if (rc < 0) return rc; - osmo_fd_setup(&cuart->u.tty.ofd, rc, BSC_FD_READ, tty_uart_fd_cb, cuart, 0); + osmo_fd_setup(&cuart->u.tty.ofd, rc, OSMO_FD_READ, tty_uart_fd_cb, cuart, 0); cuart->u.tty.baudrate = B9600; rc = _init_uart(cuart->u.tty.ofd.fd); diff --git a/ccid_host/hub_main_functionfs.c b/ccid_host/hub_main_functionfs.c index 1776c94..93363a6 100644 --- a/ccid_host/hub_main_functionfs.c +++ b/ccid_host/hub_main_functionfs.c @@ -342,7 +342,7 @@ static int ep_0_cb(struct osmo_fd *ofd, unsigned int what) struct ufunc_handle *uh = (struct ufunc_handle *) ofd->data; int rc; - if (what & BSC_FD_READ) { + if (what & OSMO_FD_READ) { struct usb_functionfs_event evt; rc = read(ofd->fd, (uint8_t *)&evt, sizeof(evt)); if (rc < sizeof(evt)) @@ -425,7 +425,7 @@ static int ep0_init(struct ufunc_handle *uh) /* open control endpoint and write descriptors to it */ rc = open("ep0", O_RDWR); assert(rc >= 0); - osmo_fd_setup(&uh->ep0, rc, BSC_FD_READ, &ep_0_cb, uh, 0); + osmo_fd_setup(&uh->ep0, rc, OSMO_FD_READ, &ep_0_cb, uh, 0); osmo_fd_register(&uh->ep0); rc = write(uh->ep0.fd, &descriptors, sizeof(descriptors)); if (rc != sizeof(descriptors)) { @@ -460,7 +460,7 @@ static int ep0_init(struct ufunc_handle *uh) /* create an eventfd, which will be marked readable once some AIO completes */ rc = eventfd(0, 0); OSMO_ASSERT(rc >= 0); - osmo_fd_setup(&uh->aio_evfd, rc, BSC_FD_READ, &evfd_cb, uh, 0); + osmo_fd_setup(&uh->aio_evfd, rc, OSMO_FD_READ, &evfd_cb, uh, 0); osmo_fd_register(&uh->aio_evfd); uh->aio_int.iocb = malloc(sizeof(struct iocb));