Path: blob/main/usr.sbin/bluetooth/ath3kfw/ath3k_hw.h
107769 views
/*-1* Copyright (c) 2013 Adrian Chadd <[email protected]>2* All rights reserved.3*4* Redistribution and use in source and binary forms, with or without5* modification, are permitted provided that the following conditions6* are met:7* 1. Redistributions of source code must retain the above copyright8* notice, this list of conditions and the following disclaimer,9* without modification.10* 2. Redistributions in binary form must reproduce at minimum a disclaimer11* similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any12* redistribution must be conditioned upon including a substantially13* similar Disclaimer requirement for further binary redistribution.14*15* NO WARRANTY16* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS17* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT18* LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY19* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL20* THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,21* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF22* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS23* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER24* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)25* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF26* THE POSSIBILITY OF SUCH DAMAGES.27*/28#ifndef __ATH3K_HW_H__29#define __ATH3K_HW_H__3031#define ATH3K_DNLOAD 0x0132#define ATH3K_GETSTATE 0x0533#define ATH3K_SET_NORMAL_MODE 0x0734#define ATH3K_GETVERSION 0x0935#define USB_REG_SWITCH_VID_PID 0x0a3637#define ATH3K_MODE_MASK 0x3F38#define ATH3K_NORMAL_MODE 0x0E3940#define ATH3K_PATCH_UPDATE 0x8041#define ATH3K_SYSCFG_UPDATE 0x404243#define ATH3K_XTAL_FREQ_26M 0x0044#define ATH3K_XTAL_FREQ_40M 0x0145#define ATH3K_XTAL_FREQ_19P2 0x0246#define ATH3K_NAME_LEN 0xFF4748#define USB_REQ_DFU_DNLOAD 149#define BULK_SIZE 409650#define FW_HDR_SIZE 205152extern int ath3k_load_fwfile(struct libusb_device_handle *hdl,53const struct ath3k_firmware *fw);54extern int ath3k_get_state(struct libusb_device_handle *hdl,55unsigned char *state);56extern int ath3k_get_version(struct libusb_device_handle *hdl,57struct ath3k_version *version);58extern int ath3k_load_patch(libusb_device_handle *hdl, const char *fw_path);59extern int ath3k_load_syscfg(libusb_device_handle *hdl, const char *fw_path);60extern int ath3k_set_normal_mode(libusb_device_handle *hdl);61extern int ath3k_switch_pid(libusb_device_handle *hdl);6263#endif646566