Back to home page

OSCL-LXR

 
 

    


0001 /**
0002  * Copyright (c) 2017 Redpine Signals Inc.
0003  *
0004  * Permission to use, copy, modify, and/or distribute this software for any
0005  * purpose with or without fee is hereby granted, provided that the above
0006  * copyright notice and this permission notice appear in all copies.
0007  *
0008  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
0009  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
0010  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
0011  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
0012  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
0013  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
0014  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0015  */
0016 
0017 #ifndef __RSI_HEADER_H__
0018 #define __RSI_HEADER_H__
0019 
0020 #include <linux/skbuff.h>
0021 
0022 /* HAL queue information */
0023 #define RSI_COEX_Q          0x0
0024 #define RSI_BT_Q            0x2
0025 #define RSI_WLAN_Q                      0x3
0026 #define RSI_WIFI_MGMT_Q                 0x4
0027 #define RSI_WIFI_DATA_Q                 0x5
0028 #define RSI_BT_MGMT_Q           0x6
0029 #define RSI_BT_DATA_Q           0x7
0030 
0031 enum rsi_coex_queues {
0032     RSI_COEX_Q_INVALID = -1,
0033     RSI_COEX_Q_COMMON = 0,
0034     RSI_COEX_Q_BT,
0035     RSI_COEX_Q_WLAN
0036 };
0037 
0038 enum rsi_host_intf {
0039     RSI_HOST_INTF_SDIO = 0,
0040     RSI_HOST_INTF_USB
0041 };
0042 
0043 struct rsi_proto_ops {
0044     int (*coex_send_pkt)(void *priv, struct sk_buff *skb, u8 hal_queue);
0045     enum rsi_host_intf (*get_host_intf)(void *priv);
0046     void (*set_bt_context)(void *priv, void *context);
0047 };
0048 
0049 struct rsi_mod_ops {
0050     int (*attach)(void *priv, struct rsi_proto_ops *ops);
0051     void (*detach)(void *priv);
0052     int (*recv_pkt)(void *priv, const u8 *msg);
0053 };
0054 
0055 extern const struct rsi_mod_ops rsi_bt_ops;
0056 #endif