X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tools%2Fcarlu%2Fsrc%2Fcarlu.h;h=8849a8bfe3a680eff1481f10afde4026a6664186;hb=ce72b0c6b76cbd571a2f61ba03587f724ca79f05;hp=08fca20f1c1f2f62148c05690dd6f6a5fdda1cec;hpb=13859edfa20c4b84b575f8e872636fd8cdd81d7f;p=carl9170fw.git diff --git a/tools/carlu/src/carlu.h b/tools/carlu/src/carlu.h index 08fca20..8849a8b 100644 --- a/tools/carlu/src/carlu.h +++ b/tools/carlu/src/carlu.h @@ -35,8 +35,39 @@ #include "eeprom.h" #include "ieee80211.h" #include "wlan.h" +#include "usb.h" struct carlu { + libusb_device_handle *dev; + libusb_context *ctx; + + SDL_Thread *event_thread; + bool stop_event_polling; + + struct libusb_transfer *rx_ring[AR9170_RX_BULK_BUFS]; + + struct libusb_transfer *rx_interrupt; + unsigned char irq_buf[AR9170_RX_BULK_IRQ_SIZE]; + + union { + unsigned char buf[CARL9170_MAX_CMD_LEN]; + uint32_t buf4[CARL9170_MAX_CMD_LEN / sizeof(uint32_t)]; + struct carl9170_cmd cmd; + struct carl9170_rsp rsp; + } cmd; + + struct list_head tx_queue; + SDL_mutex *tx_queue_lock; + unsigned int tx_queue_len; + + struct list_head dev_list; + unsigned int idx; + + unsigned int miniboot_size; + unsigned int rx_max; + + int event_pipe[2]; + SDL_cond *resp_pend; SDL_mutex *resp_lock; uint8_t *resp_buf;