18c2ecf20Sopenharmony_ci/** 28c2ecf20Sopenharmony_ci * Copyright (c) 2017 Redpine Signals Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any 58c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 68c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 98c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 108c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 118c2ecf20Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 128c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 138c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 148c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 158c2ecf20Sopenharmony_ci */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#ifndef __RSI_HEADER_H__ 188c2ecf20Sopenharmony_ci#define __RSI_HEADER_H__ 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#include <linux/skbuff.h> 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci/* HAL queue information */ 238c2ecf20Sopenharmony_ci#define RSI_COEX_Q 0x0 248c2ecf20Sopenharmony_ci#define RSI_BT_Q 0x2 258c2ecf20Sopenharmony_ci#define RSI_WLAN_Q 0x3 268c2ecf20Sopenharmony_ci#define RSI_WIFI_MGMT_Q 0x4 278c2ecf20Sopenharmony_ci#define RSI_WIFI_DATA_Q 0x5 288c2ecf20Sopenharmony_ci#define RSI_BT_MGMT_Q 0x6 298c2ecf20Sopenharmony_ci#define RSI_BT_DATA_Q 0x7 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_cienum rsi_coex_queues { 328c2ecf20Sopenharmony_ci RSI_COEX_Q_INVALID = -1, 338c2ecf20Sopenharmony_ci RSI_COEX_Q_COMMON = 0, 348c2ecf20Sopenharmony_ci RSI_COEX_Q_BT, 358c2ecf20Sopenharmony_ci RSI_COEX_Q_WLAN 368c2ecf20Sopenharmony_ci}; 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_cienum rsi_host_intf { 398c2ecf20Sopenharmony_ci RSI_HOST_INTF_SDIO = 0, 408c2ecf20Sopenharmony_ci RSI_HOST_INTF_USB 418c2ecf20Sopenharmony_ci}; 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_cistruct rsi_proto_ops { 448c2ecf20Sopenharmony_ci int (*coex_send_pkt)(void *priv, struct sk_buff *skb, u8 hal_queue); 458c2ecf20Sopenharmony_ci enum rsi_host_intf (*get_host_intf)(void *priv); 468c2ecf20Sopenharmony_ci void (*set_bt_context)(void *priv, void *context); 478c2ecf20Sopenharmony_ci}; 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_cistruct rsi_mod_ops { 508c2ecf20Sopenharmony_ci int (*attach)(void *priv, struct rsi_proto_ops *ops); 518c2ecf20Sopenharmony_ci void (*detach)(void *priv); 528c2ecf20Sopenharmony_ci int (*recv_pkt)(void *priv, const u8 *msg); 538c2ecf20Sopenharmony_ci}; 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ciextern const struct rsi_mod_ops rsi_bt_ops; 568c2ecf20Sopenharmony_ci#endif 57