Path: blob/main/usr.sbin/bluetooth/ath3kfw/ath3k_fw.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_FW_H__29#define __ATH3K_FW_H__3031/*32* XXX TODO: ensure that the endian-ness of this stuff is33* correct!34*/35struct ath3k_version {36unsigned int rom_version;37unsigned int build_version;38unsigned int ram_version;39unsigned char ref_clock;40unsigned char reserved[0x07];41};4243struct ath3k_firmware {44char *fwname;45int len; /* firmware length */46int size; /* buffer size */47unsigned char *buf;48};4950extern int ath3k_fw_read(struct ath3k_firmware *fw, const char *fwname);51extern void ath3k_fw_free(struct ath3k_firmware *fw);5253#endif545556