18c2ecf20Sopenharmony_ci/*** -*- linux-c -*- **********************************************************
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci     Driver for Atmel at76c502 at76c504 and at76c506 wireless cards.
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci        Copyright 2000-2001 ATMEL Corporation.
68c2ecf20Sopenharmony_ci        Copyright 2003 Simon Kelley.
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci    This code was developed from version 2.1.1 of the Atmel drivers,
98c2ecf20Sopenharmony_ci    released by Atmel corp. under the GPL in December 2002. It also
108c2ecf20Sopenharmony_ci    includes code from the Linux aironet drivers (C) Benjamin Reed,
118c2ecf20Sopenharmony_ci    and the Linux PCMCIA package, (C) David Hinds.
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci    For all queries about this code, please contact the current author,
148c2ecf20Sopenharmony_ci    Simon Kelley <simon@thekelleys.org.uk> and not Atmel Corporation.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci    This program is free software; you can redistribute it and/or modify
178c2ecf20Sopenharmony_ci    it under the terms of the GNU General Public License as published by
188c2ecf20Sopenharmony_ci    the Free Software Foundation; either version 2 of the License, or
198c2ecf20Sopenharmony_ci    (at your option) any later version.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci    This software is distributed in the hope that it will be useful,
228c2ecf20Sopenharmony_ci    but WITHOUT ANY WARRANTY; without even the implied warranty of
238c2ecf20Sopenharmony_ci    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
248c2ecf20Sopenharmony_ci    GNU General Public License for more details.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci    You should have received a copy of the GNU General Public License
278c2ecf20Sopenharmony_ci    along with Atmel wireless lan drivers; if not, see
288c2ecf20Sopenharmony_ci    <http://www.gnu.org/licenses/>.
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci******************************************************************************/
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci#ifdef __IN_PCMCIA_PACKAGE__
338c2ecf20Sopenharmony_ci#include <pcmcia/k_compat.h>
348c2ecf20Sopenharmony_ci#endif
358c2ecf20Sopenharmony_ci#include <linux/kernel.h>
368c2ecf20Sopenharmony_ci#include <linux/module.h>
378c2ecf20Sopenharmony_ci#include <linux/ptrace.h>
388c2ecf20Sopenharmony_ci#include <linux/slab.h>
398c2ecf20Sopenharmony_ci#include <linux/string.h>
408c2ecf20Sopenharmony_ci#include <linux/netdevice.h>
418c2ecf20Sopenharmony_ci#include <linux/moduleparam.h>
428c2ecf20Sopenharmony_ci#include <linux/device.h>
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci#include <pcmcia/cistpl.h>
458c2ecf20Sopenharmony_ci#include <pcmcia/cisreg.h>
468c2ecf20Sopenharmony_ci#include <pcmcia/ds.h>
478c2ecf20Sopenharmony_ci#include <pcmcia/ciscode.h>
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci#include <asm/io.h>
508c2ecf20Sopenharmony_ci#include <linux/wireless.h>
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci#include "atmel.h"
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci/*====================================================================*/
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciMODULE_AUTHOR("Simon Kelley");
588c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("Support for Atmel at76c50x 802.11 wireless ethernet cards.");
598c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL");
608c2ecf20Sopenharmony_ciMODULE_SUPPORTED_DEVICE("Atmel at76c50x PCMCIA cards");
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci/*====================================================================*/
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_cistatic int atmel_config(struct pcmcia_device *link);
658c2ecf20Sopenharmony_cistatic void atmel_release(struct pcmcia_device *link);
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_cistatic void atmel_detach(struct pcmcia_device *p_dev);
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_cistruct local_info {
708c2ecf20Sopenharmony_ci	struct net_device *eth_dev;
718c2ecf20Sopenharmony_ci};
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_cistatic int atmel_probe(struct pcmcia_device *p_dev)
748c2ecf20Sopenharmony_ci{
758c2ecf20Sopenharmony_ci	struct local_info *local;
768c2ecf20Sopenharmony_ci	int ret;
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci	dev_dbg(&p_dev->dev, "atmel_attach()\n");
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci	/* Allocate space for private device-specific data */
818c2ecf20Sopenharmony_ci	local = kzalloc(sizeof(*local), GFP_KERNEL);
828c2ecf20Sopenharmony_ci	if (!local)
838c2ecf20Sopenharmony_ci		return -ENOMEM;
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci	p_dev->priv = local;
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci	ret = atmel_config(p_dev);
888c2ecf20Sopenharmony_ci	if (ret)
898c2ecf20Sopenharmony_ci		goto err_free_priv;
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci	return 0;
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_cierr_free_priv:
948c2ecf20Sopenharmony_ci	kfree(p_dev->priv);
958c2ecf20Sopenharmony_ci	return ret;
968c2ecf20Sopenharmony_ci}
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_cistatic void atmel_detach(struct pcmcia_device *link)
998c2ecf20Sopenharmony_ci{
1008c2ecf20Sopenharmony_ci	dev_dbg(&link->dev, "atmel_detach\n");
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci	atmel_release(link);
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci	kfree(link->priv);
1058c2ecf20Sopenharmony_ci}
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ci/* Call-back function to interrogate PCMCIA-specific information
1088c2ecf20Sopenharmony_ci   about the current existence of the card */
1098c2ecf20Sopenharmony_cistatic int card_present(void *arg)
1108c2ecf20Sopenharmony_ci{
1118c2ecf20Sopenharmony_ci	struct pcmcia_device *link = (struct pcmcia_device *)arg;
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci	if (pcmcia_dev_present(link))
1148c2ecf20Sopenharmony_ci		return 1;
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci	return 0;
1178c2ecf20Sopenharmony_ci}
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_cistatic int atmel_config_check(struct pcmcia_device *p_dev, void *priv_data)
1208c2ecf20Sopenharmony_ci{
1218c2ecf20Sopenharmony_ci	if (p_dev->config_index == 0)
1228c2ecf20Sopenharmony_ci		return -EINVAL;
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci	return pcmcia_request_io(p_dev);
1258c2ecf20Sopenharmony_ci}
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_cistatic int atmel_config(struct pcmcia_device *link)
1288c2ecf20Sopenharmony_ci{
1298c2ecf20Sopenharmony_ci	int ret;
1308c2ecf20Sopenharmony_ci	const struct pcmcia_device_id *did;
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_ci	did = dev_get_drvdata(&link->dev);
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci	dev_dbg(&link->dev, "atmel_config\n");
1358c2ecf20Sopenharmony_ci
1368c2ecf20Sopenharmony_ci	link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP |
1378c2ecf20Sopenharmony_ci		CONF_AUTO_AUDIO | CONF_AUTO_SET_IO;
1388c2ecf20Sopenharmony_ci
1398c2ecf20Sopenharmony_ci	if (pcmcia_loop_config(link, atmel_config_check, NULL))
1408c2ecf20Sopenharmony_ci		goto failed;
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_ci	if (!link->irq) {
1438c2ecf20Sopenharmony_ci		dev_err(&link->dev, "atmel: cannot assign IRQ: check that CONFIG_ISA is set in kernel config.");
1448c2ecf20Sopenharmony_ci		goto failed;
1458c2ecf20Sopenharmony_ci	}
1468c2ecf20Sopenharmony_ci
1478c2ecf20Sopenharmony_ci	ret = pcmcia_enable_device(link);
1488c2ecf20Sopenharmony_ci	if (ret)
1498c2ecf20Sopenharmony_ci		goto failed;
1508c2ecf20Sopenharmony_ci
1518c2ecf20Sopenharmony_ci	((struct local_info *)link->priv)->eth_dev =
1528c2ecf20Sopenharmony_ci		init_atmel_card(link->irq,
1538c2ecf20Sopenharmony_ci				link->resource[0]->start,
1548c2ecf20Sopenharmony_ci				did ? did->driver_info : ATMEL_FW_TYPE_NONE,
1558c2ecf20Sopenharmony_ci				&link->dev,
1568c2ecf20Sopenharmony_ci				card_present,
1578c2ecf20Sopenharmony_ci				link);
1588c2ecf20Sopenharmony_ci	if (!((struct local_info *)link->priv)->eth_dev)
1598c2ecf20Sopenharmony_ci			goto failed;
1608c2ecf20Sopenharmony_ci
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ci	return 0;
1638c2ecf20Sopenharmony_ci
1648c2ecf20Sopenharmony_ci failed:
1658c2ecf20Sopenharmony_ci	atmel_release(link);
1668c2ecf20Sopenharmony_ci	return -ENODEV;
1678c2ecf20Sopenharmony_ci}
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_cistatic void atmel_release(struct pcmcia_device *link)
1708c2ecf20Sopenharmony_ci{
1718c2ecf20Sopenharmony_ci	struct net_device *dev = ((struct local_info *)link->priv)->eth_dev;
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ci	dev_dbg(&link->dev, "atmel_release\n");
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ci	if (dev)
1768c2ecf20Sopenharmony_ci		stop_atmel_card(dev);
1778c2ecf20Sopenharmony_ci	((struct local_info *)link->priv)->eth_dev = NULL;
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_ci	pcmcia_disable_device(link);
1808c2ecf20Sopenharmony_ci}
1818c2ecf20Sopenharmony_ci
1828c2ecf20Sopenharmony_cistatic int atmel_suspend(struct pcmcia_device *link)
1838c2ecf20Sopenharmony_ci{
1848c2ecf20Sopenharmony_ci	struct local_info *local = link->priv;
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_ci	netif_device_detach(local->eth_dev);
1878c2ecf20Sopenharmony_ci
1888c2ecf20Sopenharmony_ci	return 0;
1898c2ecf20Sopenharmony_ci}
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_cistatic int atmel_resume(struct pcmcia_device *link)
1928c2ecf20Sopenharmony_ci{
1938c2ecf20Sopenharmony_ci	struct local_info *local = link->priv;
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_ci	atmel_open(local->eth_dev);
1968c2ecf20Sopenharmony_ci	netif_device_attach(local->eth_dev);
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_ci	return 0;
1998c2ecf20Sopenharmony_ci}
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_ci/*====================================================================*/
2028c2ecf20Sopenharmony_ci/* We use the driver_info field to store the correct firmware type for a card. */
2038c2ecf20Sopenharmony_ci
2048c2ecf20Sopenharmony_ci#define PCMCIA_DEVICE_MANF_CARD_INFO(manf, card, info) { \
2058c2ecf20Sopenharmony_ci	.match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
2068c2ecf20Sopenharmony_ci			PCMCIA_DEV_ID_MATCH_CARD_ID, \
2078c2ecf20Sopenharmony_ci	.manf_id = (manf), \
2088c2ecf20Sopenharmony_ci	.card_id = (card), \
2098c2ecf20Sopenharmony_ci        .driver_info = (kernel_ulong_t)(info), }
2108c2ecf20Sopenharmony_ci
2118c2ecf20Sopenharmony_ci#define PCMCIA_DEVICE_PROD_ID12_INFO(v1, v2, vh1, vh2, info) { \
2128c2ecf20Sopenharmony_ci	.match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
2138c2ecf20Sopenharmony_ci			PCMCIA_DEV_ID_MATCH_PROD_ID2, \
2148c2ecf20Sopenharmony_ci	.prod_id = { (v1), (v2), NULL, NULL }, \
2158c2ecf20Sopenharmony_ci	.prod_id_hash = { (vh1), (vh2), 0, 0 }, \
2168c2ecf20Sopenharmony_ci        .driver_info = (kernel_ulong_t)(info), }
2178c2ecf20Sopenharmony_ci
2188c2ecf20Sopenharmony_cistatic const struct pcmcia_device_id atmel_ids[] = {
2198c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_MANF_CARD_INFO(0x0101, 0x0620, ATMEL_FW_TYPE_502_3COM),
2208c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_MANF_CARD_INFO(0x0101, 0x0696, ATMEL_FW_TYPE_502_3COM),
2218c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_MANF_CARD_INFO(0x01bf, 0x3302, ATMEL_FW_TYPE_502E),
2228c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_MANF_CARD_INFO(0xd601, 0x0007, ATMEL_FW_TYPE_502),
2238c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("11WAVE", "11WP611AL-E", 0x9eb2da1f, 0xc9a0d3f9, ATMEL_FW_TYPE_502E),
2248c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("ATMEL", "AT76C502AR", 0xabda4164, 0x41b37e1f, ATMEL_FW_TYPE_502),
2258c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("ATMEL", "AT76C502AR_D", 0xabda4164, 0x3675d704, ATMEL_FW_TYPE_502D),
2268c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("ATMEL", "AT76C502AR_E", 0xabda4164, 0x4172e792, ATMEL_FW_TYPE_502E),
2278c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("ATMEL", "AT76C504_R", 0xabda4164, 0x917f3d72, ATMEL_FW_TYPE_504_2958),
2288c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("ATMEL", "AT76C504", 0xabda4164, 0x5040670a, ATMEL_FW_TYPE_504),
2298c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("ATMEL", "AT76C504A", 0xabda4164, 0xe15ed87f, ATMEL_FW_TYPE_504A_2958),
2308c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("BT", "Voyager 1020 Laptop Adapter", 0xae49b86a, 0x1e957cd5, ATMEL_FW_TYPE_502),
2318c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("CNet", "CNWLC 11Mbps Wireless PC Card V-5", 0xbc477dde, 0x502fae6b, ATMEL_FW_TYPE_502E),
2328c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("IEEE 802.11b", "Wireless LAN PC Card", 0x5b878724, 0x122f1df6, ATMEL_FW_TYPE_502),
2338c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("IEEE 802.11b", "Wireless LAN Card S", 0x5b878724, 0x5fba533a, ATMEL_FW_TYPE_504_2958),
2348c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("OEM", "11Mbps Wireless LAN PC Card V-3", 0xfea54c90, 0x1c5b0f68, ATMEL_FW_TYPE_502),
2358c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("SMC", "2632W", 0xc4f8b18b, 0x30f38774, ATMEL_FW_TYPE_502D),
2368c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("SMC", "2632W-V2", 0xc4f8b18b, 0x172d1377, ATMEL_FW_TYPE_502),
2378c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("Wireless", "PC_CARD", 0xa407ecdd, 0x119f6314, ATMEL_FW_TYPE_502D),
2388c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("WLAN", "802.11b PC CARD", 0x575c516c, 0xb1f6dbc4, ATMEL_FW_TYPE_502D),
2398c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_PROD_ID12_INFO("LG", "LW2100N", 0xb474d43a, 0x6b1fec94, ATMEL_FW_TYPE_502E),
2408c2ecf20Sopenharmony_ci	PCMCIA_DEVICE_NULL
2418c2ecf20Sopenharmony_ci};
2428c2ecf20Sopenharmony_ci
2438c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(pcmcia, atmel_ids);
2448c2ecf20Sopenharmony_ci
2458c2ecf20Sopenharmony_cistatic struct pcmcia_driver atmel_driver = {
2468c2ecf20Sopenharmony_ci	.owner		= THIS_MODULE,
2478c2ecf20Sopenharmony_ci	.name		= "atmel_cs",
2488c2ecf20Sopenharmony_ci	.probe          = atmel_probe,
2498c2ecf20Sopenharmony_ci	.remove		= atmel_detach,
2508c2ecf20Sopenharmony_ci	.id_table	= atmel_ids,
2518c2ecf20Sopenharmony_ci	.suspend	= atmel_suspend,
2528c2ecf20Sopenharmony_ci	.resume		= atmel_resume,
2538c2ecf20Sopenharmony_ci};
2548c2ecf20Sopenharmony_cimodule_pcmcia_driver(atmel_driver);
2558c2ecf20Sopenharmony_ci
2568c2ecf20Sopenharmony_ci/*
2578c2ecf20Sopenharmony_ci    This program is free software; you can redistribute it and/or
2588c2ecf20Sopenharmony_ci    modify it under the terms of the GNU General Public License
2598c2ecf20Sopenharmony_ci    as published by the Free Software Foundation; either version 2
2608c2ecf20Sopenharmony_ci    of the License, or (at your option) any later version.
2618c2ecf20Sopenharmony_ci
2628c2ecf20Sopenharmony_ci    This program is distributed in the hope that it will be useful,
2638c2ecf20Sopenharmony_ci    but WITHOUT ANY WARRANTY; without even the implied warranty of
2648c2ecf20Sopenharmony_ci    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2658c2ecf20Sopenharmony_ci    GNU General Public License for more details.
2668c2ecf20Sopenharmony_ci
2678c2ecf20Sopenharmony_ci    In addition:
2688c2ecf20Sopenharmony_ci
2698c2ecf20Sopenharmony_ci    Redistribution and use in source and binary forms, with or without
2708c2ecf20Sopenharmony_ci    modification, are permitted provided that the following conditions
2718c2ecf20Sopenharmony_ci    are met:
2728c2ecf20Sopenharmony_ci
2738c2ecf20Sopenharmony_ci    1. Redistributions of source code must retain the above copyright
2748c2ecf20Sopenharmony_ci       notice, this list of conditions and the following disclaimer.
2758c2ecf20Sopenharmony_ci    2. Redistributions in binary form must reproduce the above copyright
2768c2ecf20Sopenharmony_ci       notice, this list of conditions and the following disclaimer in the
2778c2ecf20Sopenharmony_ci       documentation and/or other materials provided with the distribution.
2788c2ecf20Sopenharmony_ci    3. The name of the author may not be used to endorse or promote
2798c2ecf20Sopenharmony_ci       products derived from this software without specific prior written
2808c2ecf20Sopenharmony_ci       permission.
2818c2ecf20Sopenharmony_ci
2828c2ecf20Sopenharmony_ci    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2838c2ecf20Sopenharmony_ci    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2848c2ecf20Sopenharmony_ci    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2858c2ecf20Sopenharmony_ci    ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
2868c2ecf20Sopenharmony_ci    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2878c2ecf20Sopenharmony_ci    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2888c2ecf20Sopenharmony_ci    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2898c2ecf20Sopenharmony_ci    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2908c2ecf20Sopenharmony_ci    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
2918c2ecf20Sopenharmony_ci    IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2928c2ecf20Sopenharmony_ci    POSSIBILITY OF SUCH DAMAGE.
2938c2ecf20Sopenharmony_ci*/
294