10c7b75f1SBjoern A. Zeeb /*-
20c7b75f1SBjoern A. Zeeb * SPDX-License-Identifier: BSD-2-Clause
30c7b75f1SBjoern A. Zeeb *
40c7b75f1SBjoern A. Zeeb * Copyright (c) 2020 The FreeBSD Foundation
50c7b75f1SBjoern A. Zeeb *
60c7b75f1SBjoern A. Zeeb * This software was developed by Björn Zeeb under sponsorship from
70c7b75f1SBjoern A. Zeeb * the FreeBSD Foundation.
80c7b75f1SBjoern A. Zeeb *
90c7b75f1SBjoern A. Zeeb * Redistribution and use in source and binary forms, with or without
100c7b75f1SBjoern A. Zeeb * modification, are permitted provided that the following conditions
110c7b75f1SBjoern A. Zeeb * are met:
120c7b75f1SBjoern A. Zeeb * 1. Redistributions of source code must retain the above copyright
130c7b75f1SBjoern A. Zeeb * notice, this list of conditions and the following disclaimer.
140c7b75f1SBjoern A. Zeeb * 2. Redistributions in binary form must reproduce the above copyright
150c7b75f1SBjoern A. Zeeb * notice, this list of conditions and the following disclaimer in the
160c7b75f1SBjoern A. Zeeb * documentation and/or other materials provided with the distribution.
170c7b75f1SBjoern A. Zeeb *
180c7b75f1SBjoern A. Zeeb * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
190c7b75f1SBjoern A. Zeeb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
200c7b75f1SBjoern A. Zeeb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
210c7b75f1SBjoern A. Zeeb * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
220c7b75f1SBjoern A. Zeeb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
230c7b75f1SBjoern A. Zeeb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
240c7b75f1SBjoern A. Zeeb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
250c7b75f1SBjoern A. Zeeb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
260c7b75f1SBjoern A. Zeeb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
270c7b75f1SBjoern A. Zeeb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
280c7b75f1SBjoern A. Zeeb * SUCH DAMAGE.
290c7b75f1SBjoern A. Zeeb */
300c7b75f1SBjoern A. Zeeb
31307f78f3SVladimir Kondratyev #ifndef _LINUXKPI_LINUX_CRC32_H
32307f78f3SVladimir Kondratyev #define _LINUXKPI_LINUX_CRC32_H
330c7b75f1SBjoern A. Zeeb
340c7b75f1SBjoern A. Zeeb #include <sys/gsb_crc32.h>
350c7b75f1SBjoern A. Zeeb
360c7b75f1SBjoern A. Zeeb static __inline uint32_t
crc32_le(uint32_t crc,const void * data,size_t len)370c7b75f1SBjoern A. Zeeb crc32_le(uint32_t crc, const void *data, size_t len)
380c7b75f1SBjoern A. Zeeb {
390c7b75f1SBjoern A. Zeeb
400c7b75f1SBjoern A. Zeeb return (crc32_raw(data, len, crc));
410c7b75f1SBjoern A. Zeeb }
420c7b75f1SBjoern A. Zeeb
43307f78f3SVladimir Kondratyev #endif /* _LINUXKPI_LINUX_CRC32_H */
44