2 * Samsung modem IPC header verstion 4
4 * Copyright (C) 2010 Samsung Electronics Co.Ltd
5 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
15 * [0:4] - channel, 1 is default
18 * If format is SIPC4_FMT and channel is 0, it transmits only raw datas, so it
19 * is used for special case such as modem boot.
29 #define SIPC4_FORMAT(res) (((res) >> 5) & 0x3)
30 #define SIPC4_CH(res) ((res) & 0x1f)
31 #define SIPC4_RES(format, ch) ((((format) & 0x3) << 5) | ((ch) & 0x1f))
33 #define SIPC4_NOT_HDLC_CH 0
34 #define SIPC4_DEFAULT_CH 1
36 #define SIPC4_RX_HDLC (1 << 0)
37 #define SIPC4_RX_LAST (1 << 1)
39 #define HDLC_START 0x7F
42 #define SIPC4_MAX_HDR_SIZE 48
44 struct sipc4_tx_data {
53 char hdr[SIPC4_MAX_HDR_SIZE];
56 struct sipc4_rx_data {
57 struct net_device *dev;
63 struct sipc_rx_hdr *rx_hdr;
66 struct sipc4_rx_frag {
70 /* Formatted IPC frame */
74 } __attribute__ ((packed));
76 #define FMT_MORE_BIT (1 << 7)
77 #define FMT_MULTI_NR 0x80
78 #define FMT_INFOID_MASK 0x7f
85 } __attribute__ ((packed));
88 * RAW IPC frame channel ID
100 CHID_TRANSFER_SCREEN,
101 CHID_PSD_DATA1, /* 10 */
106 CHID_PSD_DATA6, /* 15 */
111 CHID_PSD_DATA11, /* 20 */
116 CHID_BT_DUN, /* 25 */
117 CHID_CIQ_BRIDGE_DATA,
131 } __attribute__ ((packed));
134 struct rfs_hdr header;
138 extern int sipc4_tx(struct sipc4_tx_data *tx_data);
139 extern int sipc4_rx(struct sipc4_rx_data *rx_data);
140 extern int pdp_netif_rx(struct net_device *parent_ndev, struct sk_buff *skb,