Vladislav Mordohovich | e7970c6 | 2013-02-26 19:25:33 +0200 | [diff] [blame] | 1 | /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef _IPA_H_ |
| 14 | #define _IPA_H_ |
| 15 | |
| 16 | #include <linux/msm_ipa.h> |
| 17 | #include <linux/skbuff.h> |
| 18 | #include <linux/types.h> |
| 19 | #include <mach/sps.h> |
| 20 | |
| 21 | /** |
| 22 | * enum ipa_nat_en_type - NAT setting type in IPA end-point |
| 23 | */ |
| 24 | enum ipa_nat_en_type { |
| 25 | IPA_BYPASS_NAT, |
| 26 | IPA_SRC_NAT, |
| 27 | IPA_DST_NAT, |
| 28 | }; |
| 29 | |
| 30 | /** |
| 31 | * enum ipa_mode_type - mode setting type in IPA end-point |
| 32 | * @BASIC: basic mode |
| 33 | * @ENABLE_FRAMING_HDLC: not currently supported |
| 34 | * @ENABLE_DEFRAMING_HDLC: not currently supported |
| 35 | */ |
| 36 | enum ipa_mode_type { |
| 37 | IPA_BASIC, |
| 38 | IPA_ENABLE_FRAMING_HDLC, |
| 39 | IPA_ENABLE_DEFRAMING_HDLC, |
| 40 | IPA_DMA, |
| 41 | }; |
| 42 | |
| 43 | /** |
| 44 | * enum ipa_aggr_en_type - aggregation setting type in IPA |
| 45 | * end-point |
| 46 | */ |
| 47 | enum ipa_aggr_en_type { |
| 48 | IPA_BYPASS_AGGR, |
| 49 | IPA_ENABLE_AGGR, |
| 50 | IPA_ENABLE_DEAGGR, |
| 51 | }; |
| 52 | |
| 53 | /** |
| 54 | * enum ipa_aggr_type - type of aggregation in IPA end-point |
| 55 | */ |
| 56 | enum ipa_aggr_type { |
| 57 | IPA_MBIM_16, |
| 58 | IPA_MBIM_32, |
| 59 | IPA_TLP, |
| 60 | }; |
| 61 | |
| 62 | /** |
| 63 | * enum ipa_aggr_mode - global aggregation mode |
| 64 | */ |
| 65 | enum ipa_aggr_mode { |
| 66 | IPA_MBIM, |
| 67 | IPA_QCNCM, |
| 68 | }; |
| 69 | |
| 70 | /** |
| 71 | * enum ipa_dp_evt_type - type of event client callback is |
| 72 | * invoked for on data path |
| 73 | * @IPA_RECEIVE: data is struct sk_buff |
| 74 | * @IPA_WRITE_DONE: data is struct sk_buff |
| 75 | */ |
| 76 | enum ipa_dp_evt_type { |
| 77 | IPA_RECEIVE, |
| 78 | IPA_WRITE_DONE, |
| 79 | }; |
| 80 | |
| 81 | /** |
| 82 | * struct ipa_ep_cfg_nat - NAT configuration in IPA end-point |
| 83 | * @nat_en: This defines the default NAT mode for the pipe: in case of |
| 84 | * filter miss - the default NAT mode defines the NATing operation |
| 85 | * on the packet. Valid for Input Pipes only (IPA consumer) |
| 86 | */ |
| 87 | struct ipa_ep_cfg_nat { |
| 88 | enum ipa_nat_en_type nat_en; |
| 89 | }; |
| 90 | |
| 91 | /** |
| 92 | * struct ipa_ep_cfg_hdr - header configuration in IPA end-point |
| 93 | * @hdr_len: Header length in bytes to be added/removed. Assuming header len |
| 94 | * is constant per endpoint. Valid for both Input and Output Pipes |
| 95 | * @hdr_ofst_metadata_valid: 0: Metadata_Ofst value is invalid, i.e., no |
| 96 | * metadata within header. |
| 97 | * 1: Metadata_Ofst value is valid, i.e., metadata |
| 98 | * within header is in offset Metadata_Ofst Valid |
| 99 | * for Input Pipes only (IPA Consumer) (for output |
| 100 | * pipes, metadata already set within the header) |
| 101 | * @hdr_ofst_metadata: Offset within header in which metadata resides |
| 102 | * Size of metadata - 4bytes |
| 103 | * Example - Stream ID/SSID/mux ID. |
| 104 | * Valid for Input Pipes only (IPA Consumer) (for output |
| 105 | * pipes, metadata already set within the header) |
| 106 | * @hdr_additional_const_len: Defines the constant length that should be added |
| 107 | * to the payload length in order for IPA to update |
| 108 | * correctly the length field within the header |
| 109 | * (valid only in case Hdr_Ofst_Pkt_Size_Valid=1) |
| 110 | * Valid for Output Pipes (IPA Producer) |
| 111 | * @hdr_ofst_pkt_size_valid: 0: Hdr_Ofst_Pkt_Size value is invalid, i.e., no |
| 112 | * length field within the inserted header |
| 113 | * 1: Hdr_Ofst_Pkt_Size value is valid, i.e., a |
| 114 | * packet length field resides within the header |
| 115 | * Valid for Output Pipes (IPA Producer) |
| 116 | * @hdr_ofst_pkt_size: Offset within header in which packet size reside. Upon |
| 117 | * Header Insertion, IPA will update this field within the |
| 118 | * header with the packet length . Assumption is that |
| 119 | * header length field size is constant and is 2Bytes |
| 120 | * Valid for Output Pipes (IPA Producer) |
| 121 | * @hdr_a5_mux: Determines whether A5 Mux header should be added to the packet. |
| 122 | * This bit is valid only when Hdr_En=01(Header Insertion) |
| 123 | * SW should set this bit for IPA-to-A5 pipes. |
| 124 | * 0: Do not insert A5 Mux Header |
| 125 | * 1: Insert A5 Mux Header |
| 126 | * Valid for Output Pipes (IPA Producer) |
| 127 | */ |
| 128 | struct ipa_ep_cfg_hdr { |
| 129 | u32 hdr_len; |
| 130 | u32 hdr_ofst_metadata_valid; |
| 131 | u32 hdr_ofst_metadata; |
| 132 | u32 hdr_additional_const_len; |
| 133 | u32 hdr_ofst_pkt_size_valid; |
| 134 | u32 hdr_ofst_pkt_size; |
| 135 | u32 hdr_a5_mux; |
| 136 | }; |
| 137 | |
| 138 | /** |
| 139 | * struct ipa_ep_cfg_mode - mode configuration in IPA end-point |
| 140 | * @mode: Valid for Input Pipes only (IPA Consumer) |
| 141 | * @dst: This parameter specifies the output pipe to which the packets |
| 142 | * will be routed to. |
| 143 | * This parameter is valid for Mode=DMA and not valid for |
| 144 | * Mode=Basic |
| 145 | * Valid for Input Pipes only (IPA Consumer) |
| 146 | */ |
| 147 | struct ipa_ep_cfg_mode { |
| 148 | enum ipa_mode_type mode; |
| 149 | enum ipa_client_type dst; |
| 150 | }; |
| 151 | |
| 152 | /** |
| 153 | * struct ipa_ep_cfg_aggr - aggregation configuration in IPA end-point |
| 154 | * @aggr_en: Valid for both Input and Output Pipes |
| 155 | * @aggr: Valid for both Input and Output Pipes |
| 156 | * @aggr_byte_limit: Limit of aggregated packet size in KB (<=32KB) When set |
| 157 | * to 0, there is no size limitation on the aggregation. |
| 158 | * When both, Aggr_Byte_Limit and Aggr_Time_Limit are set |
| 159 | * to 0, there is no aggregation, every packet is sent |
| 160 | * independently according to the aggregation structure |
| 161 | * Valid for Output Pipes only (IPA Producer ) |
| 162 | * @aggr_time_limit: Timer to close aggregated packet (<=32ms) When set to 0, |
| 163 | * there is no time limitation on the aggregation. When |
| 164 | * both, Aggr_Byte_Limit and Aggr_Time_Limit are set to 0, |
| 165 | * there is no aggregation, every packet is sent |
| 166 | * independently according to the aggregation structure |
| 167 | * Valid for Output Pipes only (IPA Producer) |
| 168 | */ |
| 169 | struct ipa_ep_cfg_aggr { |
| 170 | enum ipa_aggr_en_type aggr_en; |
| 171 | enum ipa_aggr_type aggr; |
| 172 | u32 aggr_byte_limit; |
| 173 | u32 aggr_time_limit; |
| 174 | }; |
| 175 | |
| 176 | /** |
| 177 | * struct ipa_ep_cfg_route - route configuration in IPA end-point |
| 178 | * @rt_tbl_hdl: Defines the default routing table index to be used in case there |
| 179 | * is no filter rule matching, valid for Input Pipes only (IPA |
| 180 | * Consumer). Clients should set this to 0 which will cause default |
| 181 | * v4 and v6 routes setup internally by IPA driver to be used for |
| 182 | * this end-point |
| 183 | */ |
| 184 | struct ipa_ep_cfg_route { |
| 185 | u32 rt_tbl_hdl; |
| 186 | }; |
| 187 | |
| 188 | /** |
| 189 | * struct ipa_ep_cfg - configuration of IPA end-point |
| 190 | * @nat: NAT parmeters |
| 191 | * @hdr: Header parameters |
| 192 | * @mode: Mode parameters |
| 193 | * @aggr: Aggregation parameters |
| 194 | * @route: Routing parameters |
| 195 | */ |
| 196 | struct ipa_ep_cfg { |
| 197 | struct ipa_ep_cfg_nat nat; |
| 198 | struct ipa_ep_cfg_hdr hdr; |
| 199 | struct ipa_ep_cfg_mode mode; |
| 200 | struct ipa_ep_cfg_aggr aggr; |
| 201 | struct ipa_ep_cfg_route route; |
| 202 | }; |
| 203 | |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 204 | typedef void (*ipa_notify_cb)(void *priv, enum ipa_dp_evt_type evt, |
| 205 | unsigned long data); |
| 206 | |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 207 | /** |
| 208 | * struct ipa_connect_params - low-level client connect input parameters. Either |
| 209 | * client allocates the data and desc FIFO and specifies that in data+desc OR |
| 210 | * specifies sizes and pipe_mem pref and IPA does the allocation. |
| 211 | * |
| 212 | * @ipa_ep_cfg: IPA EP configuration |
| 213 | * @client: type of "client" |
| 214 | * @client_bam_hdl: client SPS handle |
| 215 | * @client_ep_idx: client PER EP index |
| 216 | * @priv: callback cookie |
| 217 | * @notify: callback |
| 218 | * priv - callback cookie evt - type of event data - data relevant |
| 219 | * to event. May not be valid. See event_type enum for valid |
| 220 | * cases. |
| 221 | * @desc_fifo_sz: size of desc FIFO |
| 222 | * @data_fifo_sz: size of data FIFO |
| 223 | * @pipe_mem_preferred: if true, try to alloc the FIFOs in pipe mem, fallback |
| 224 | * to sys mem if pipe mem alloc fails |
| 225 | * @desc: desc FIFO meta-data when client has allocated it |
| 226 | * @data: data FIFO meta-data when client has allocated it |
| 227 | */ |
| 228 | struct ipa_connect_params { |
| 229 | struct ipa_ep_cfg ipa_ep_cfg; |
| 230 | enum ipa_client_type client; |
| 231 | u32 client_bam_hdl; |
| 232 | u32 client_ep_idx; |
| 233 | void *priv; |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 234 | ipa_notify_cb notify; |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 235 | u32 desc_fifo_sz; |
| 236 | u32 data_fifo_sz; |
| 237 | bool pipe_mem_preferred; |
| 238 | struct sps_mem_buffer desc; |
| 239 | struct sps_mem_buffer data; |
| 240 | }; |
| 241 | |
| 242 | /** |
| 243 | * struct ipa_sps_params - SPS related output parameters resulting from |
| 244 | * low/high level client connect |
| 245 | * @ipa_bam_hdl: IPA SPS handle |
| 246 | * @ipa_ep_idx: IPA PER EP index |
| 247 | * @desc: desc FIFO meta-data |
| 248 | * @data: data FIFO meta-data |
| 249 | */ |
| 250 | struct ipa_sps_params { |
| 251 | u32 ipa_bam_hdl; |
| 252 | u32 ipa_ep_idx; |
| 253 | struct sps_mem_buffer desc; |
| 254 | struct sps_mem_buffer data; |
| 255 | }; |
| 256 | |
| 257 | /** |
| 258 | * struct ipa_tx_intf - interface tx properties |
| 259 | * @num_props: number of tx properties |
| 260 | * @prop: the tx properties array |
| 261 | */ |
| 262 | struct ipa_tx_intf { |
| 263 | u32 num_props; |
| 264 | struct ipa_ioc_tx_intf_prop *prop; |
| 265 | }; |
| 266 | |
| 267 | /** |
| 268 | * struct ipa_rx_intf - interface rx properties |
| 269 | * @num_props: number of rx properties |
| 270 | * @prop: the rx properties array |
| 271 | */ |
| 272 | struct ipa_rx_intf { |
| 273 | u32 num_props; |
| 274 | struct ipa_ioc_rx_intf_prop *prop; |
| 275 | }; |
| 276 | |
| 277 | /** |
| 278 | * struct ipa_sys_connect_params - information needed to setup an IPA end-point |
| 279 | * in system-BAM mode |
| 280 | * @ipa_ep_cfg: IPA EP configuration |
| 281 | * @client: the type of client who "owns" the EP |
| 282 | * @desc_fifo_sz: size of desc FIFO |
| 283 | * @priv: callback cookie |
| 284 | * @notify: callback |
| 285 | * priv - callback cookie |
| 286 | * evt - type of event |
| 287 | * data - data relevant to event. May not be valid. See event_type |
| 288 | * enum for valid cases. |
| 289 | */ |
| 290 | struct ipa_sys_connect_params { |
| 291 | struct ipa_ep_cfg ipa_ep_cfg; |
| 292 | enum ipa_client_type client; |
| 293 | u32 desc_fifo_sz; |
| 294 | void *priv; |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 295 | ipa_notify_cb notify; |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 296 | }; |
| 297 | |
| 298 | /** |
| 299 | * struct ipa_tx_meta - meta-data for the TX packet |
| 300 | * @mbim_stream_id: the stream ID used in NDP signature |
| 301 | * @mbim_stream_id_valid: is above field valid? |
| 302 | */ |
| 303 | struct ipa_tx_meta { |
| 304 | u8 mbim_stream_id; |
| 305 | bool mbim_stream_id_valid; |
| 306 | }; |
| 307 | |
| 308 | /** |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 309 | * typedef ipa_msg_free_fn - callback function |
| 310 | * @param buff - [in] the message payload to free |
| 311 | * @param len - [in] size of message payload |
| 312 | * @param type - [in] the message type |
| 313 | * |
| 314 | * Message callback registered by kernel client with IPA driver to |
| 315 | * free message payload after IPA driver processing is complete |
| 316 | * |
| 317 | * No return value |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 318 | */ |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 319 | typedef void (*ipa_msg_free_fn)(void *buff, u32 len, u32 type); |
| 320 | |
| 321 | /** |
| 322 | * typedef ipa_msg_pull_fn - callback function |
| 323 | * @param buff - [in] where to copy message payload |
| 324 | * @param len - [in] size of buffer to copy payload into |
| 325 | * @param type - [in] the message type |
| 326 | * |
| 327 | * Message callback registered by kernel client with IPA driver for |
| 328 | * IPA driver to pull messages from the kernel client upon demand from |
| 329 | * user-space |
| 330 | * |
| 331 | * Returns how many bytes were copied into the buffer. |
| 332 | */ |
| 333 | typedef int (*ipa_msg_pull_fn)(void *buff, u32 len, u32 type); |
| 334 | |
| 335 | /** |
| 336 | * enum ipa_bridge_dir - direction of the bridge from air interface perspective |
| 337 | * |
| 338 | * IPA bridge direction |
| 339 | */ |
| 340 | enum ipa_bridge_dir { |
| 341 | IPA_BRIDGE_DIR_DL, |
| 342 | IPA_BRIDGE_DIR_UL, |
| 343 | IPA_BRIDGE_DIR_MAX |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 344 | }; |
| 345 | |
| 346 | /** |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 347 | * enum ipa_bridge_type - type of SW bridge |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 348 | * |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 349 | * IPA bridge type |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 350 | */ |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 351 | enum ipa_bridge_type { |
| 352 | IPA_BRIDGE_TYPE_TETHERED, |
| 353 | IPA_BRIDGE_TYPE_EMBEDDED, |
| 354 | IPA_BRIDGE_TYPE_MAX |
| 355 | }; |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 356 | |
Vladislav Mordohovich | e7970c6 | 2013-02-26 19:25:33 +0200 | [diff] [blame] | 357 | /** |
Vladislav Mordohovich | e7970c6 | 2013-02-26 19:25:33 +0200 | [diff] [blame] | 358 | * enum ipa_rm_event - IPA RM events |
| 359 | * |
| 360 | * Indicate the resource state change |
| 361 | */ |
| 362 | enum ipa_rm_event { |
| 363 | IPA_RM_RESOURCE_GRANTED, |
| 364 | IPA_RM_RESOURCE_RELEASED |
| 365 | }; |
| 366 | |
| 367 | typedef void (*ipa_rm_notify_cb)(void *user_data, |
| 368 | enum ipa_rm_event event, |
| 369 | unsigned long data); |
| 370 | /** |
| 371 | * struct ipa_rm_register_params - information needed to |
| 372 | * register IPA RM client with IPA RM |
| 373 | * |
| 374 | * @user_data: IPA RM client provided information |
| 375 | * to be passed to notify_cb callback below |
| 376 | * @notify_cb: callback which is called by resource |
| 377 | * to notify the IPA RM client about its state |
| 378 | * change IPA RM client is expected to perform non |
| 379 | * blocking operations only in notify_cb and |
| 380 | * release notification context as soon as |
| 381 | * possible. |
| 382 | */ |
| 383 | struct ipa_rm_register_params { |
| 384 | void *user_data; |
| 385 | ipa_rm_notify_cb notify_cb; |
| 386 | }; |
| 387 | |
| 388 | /** |
| 389 | * struct ipa_rm_create_params - information needed to initialize |
| 390 | * the resource |
| 391 | * @name: resource name |
| 392 | * @reg_params: register parameters, contains are ignored |
| 393 | * for consumer resource NULL should be provided |
| 394 | * for consumer resource |
| 395 | * @request_resource: function which should be called to request resource, |
| 396 | * NULL should be provided for producer resource |
| 397 | * @release_resource: function which should be called to release resource, |
| 398 | * NULL should be provided for producer resource |
| 399 | * |
| 400 | * IPA RM client is expected to perform non blocking operations only |
| 401 | * in request_resource and release_resource functions and |
| 402 | * release notification context as soon as possible. |
| 403 | */ |
| 404 | struct ipa_rm_create_params { |
| 405 | enum ipa_rm_resource_name name; |
| 406 | struct ipa_rm_register_params reg_params; |
| 407 | int (*request_resource)(void); |
| 408 | int (*release_resource)(void); |
| 409 | }; |
| 410 | |
Vladislav Mordohovich | 7928bc5 | 2013-03-05 09:31:08 +0200 | [diff] [blame] | 411 | #define A2_MUX_HDR_NAME_V4_PREF "dmux_hdr_v4_" |
| 412 | #define A2_MUX_HDR_NAME_V6_PREF "dmux_hdr_v6_" |
| 413 | |
Vladislav Mordohovich | 4028f80 | 2013-03-04 15:16:31 +0200 | [diff] [blame] | 414 | enum a2_mux_event_type { |
| 415 | A2_MUX_RECEIVE, |
| 416 | A2_MUX_WRITE_DONE |
| 417 | }; |
| 418 | |
| 419 | enum a2_mux_logical_channel_id { |
| 420 | A2_MUX_WWAN_0, |
| 421 | A2_MUX_WWAN_1, |
| 422 | A2_MUX_WWAN_2, |
| 423 | A2_MUX_WWAN_3, |
| 424 | A2_MUX_WWAN_4, |
| 425 | A2_MUX_WWAN_5, |
| 426 | A2_MUX_WWAN_6, |
| 427 | A2_MUX_WWAN_7, |
| 428 | A2_MUX_TETHERED_0, |
| 429 | A2_MUX_NUM_CHANNELS |
| 430 | }; |
| 431 | |
| 432 | typedef void (*a2_mux_notify_cb)(void *user_data, |
| 433 | enum a2_mux_event_type event, |
| 434 | unsigned long data); |
| 435 | |
Gidon Studinski | a83ef57 | 2013-03-04 18:38:16 +0200 | [diff] [blame] | 436 | /** |
| 437 | * enum teth_tethering_mode - Tethering mode (Rmnet / MBIM) |
Vladislav Mordohovich | 4028f80 | 2013-03-04 15:16:31 +0200 | [diff] [blame] | 438 | */ |
Gidon Studinski | a83ef57 | 2013-03-04 18:38:16 +0200 | [diff] [blame] | 439 | enum teth_tethering_mode { |
| 440 | TETH_TETHERING_MODE_RMNET, |
| 441 | TETH_TETHERING_MODE_MBIM, |
| 442 | TETH_TETHERING_MODE_MAX, |
| 443 | }; |
Vladislav Mordohovich | 4028f80 | 2013-03-04 15:16:31 +0200 | [diff] [blame] | 444 | |
Gidon Studinski | a83ef57 | 2013-03-04 18:38:16 +0200 | [diff] [blame] | 445 | /** |
| 446 | * struct teth_bridge_connect_params - Parameters used in teth_bridge_connect() |
| 447 | * @ipa_usb_pipe_hdl: IPA to USB pipe handle, returned from ipa_connect() |
| 448 | * @usb_ipa_pipe_hdl: USB to IPA pipe handle, returned from ipa_connect() |
| 449 | * @tethering_mode: Rmnet or MBIM |
| 450 | */ |
| 451 | struct teth_bridge_connect_params { |
| 452 | u32 ipa_usb_pipe_hdl; |
| 453 | u32 usb_ipa_pipe_hdl; |
| 454 | enum teth_tethering_mode tethering_mode; |
| 455 | }; |
Vladislav Mordohovich | 4028f80 | 2013-03-04 15:16:31 +0200 | [diff] [blame] | 456 | |
Gidon Studinski | a83ef57 | 2013-03-04 18:38:16 +0200 | [diff] [blame] | 457 | #ifdef CONFIG_IPA |
Vladislav Mordohovich | 4028f80 | 2013-03-04 15:16:31 +0200 | [diff] [blame] | 458 | |
| 459 | /* |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 460 | * Connect / Disconnect |
| 461 | */ |
| 462 | int ipa_connect(const struct ipa_connect_params *in, struct ipa_sps_params *sps, |
| 463 | u32 *clnt_hdl); |
| 464 | int ipa_disconnect(u32 clnt_hdl); |
| 465 | |
| 466 | /* |
| 467 | * Configuration |
| 468 | */ |
| 469 | int ipa_cfg_ep(u32 clnt_hdl, const struct ipa_ep_cfg *ipa_ep_cfg); |
| 470 | |
| 471 | int ipa_cfg_ep_nat(u32 clnt_hdl, const struct ipa_ep_cfg_nat *ipa_ep_cfg); |
| 472 | |
| 473 | int ipa_cfg_ep_hdr(u32 clnt_hdl, const struct ipa_ep_cfg_hdr *ipa_ep_cfg); |
| 474 | |
| 475 | int ipa_cfg_ep_mode(u32 clnt_hdl, const struct ipa_ep_cfg_mode *ipa_ep_cfg); |
| 476 | |
| 477 | int ipa_cfg_ep_aggr(u32 clnt_hdl, const struct ipa_ep_cfg_aggr *ipa_ep_cfg); |
| 478 | |
| 479 | int ipa_cfg_ep_route(u32 clnt_hdl, const struct ipa_ep_cfg_route *ipa_ep_cfg); |
| 480 | |
| 481 | /* |
| 482 | * Header removal / addition |
| 483 | */ |
| 484 | int ipa_add_hdr(struct ipa_ioc_add_hdr *hdrs); |
| 485 | |
| 486 | int ipa_del_hdr(struct ipa_ioc_del_hdr *hdls); |
| 487 | |
| 488 | int ipa_commit_hdr(void); |
| 489 | |
| 490 | int ipa_reset_hdr(void); |
| 491 | |
| 492 | int ipa_get_hdr(struct ipa_ioc_get_hdr *lookup); |
| 493 | |
| 494 | int ipa_put_hdr(u32 hdr_hdl); |
| 495 | |
| 496 | int ipa_copy_hdr(struct ipa_ioc_copy_hdr *copy); |
| 497 | |
| 498 | /* |
| 499 | * Routing |
| 500 | */ |
| 501 | int ipa_add_rt_rule(struct ipa_ioc_add_rt_rule *rules); |
| 502 | |
| 503 | int ipa_del_rt_rule(struct ipa_ioc_del_rt_rule *hdls); |
| 504 | |
| 505 | int ipa_commit_rt(enum ipa_ip_type ip); |
| 506 | |
| 507 | int ipa_reset_rt(enum ipa_ip_type ip); |
| 508 | |
| 509 | int ipa_get_rt_tbl(struct ipa_ioc_get_rt_tbl *lookup); |
| 510 | |
| 511 | int ipa_put_rt_tbl(u32 rt_tbl_hdl); |
| 512 | |
| 513 | /* |
| 514 | * Filtering |
| 515 | */ |
| 516 | int ipa_add_flt_rule(struct ipa_ioc_add_flt_rule *rules); |
| 517 | |
| 518 | int ipa_del_flt_rule(struct ipa_ioc_del_flt_rule *hdls); |
| 519 | |
| 520 | int ipa_commit_flt(enum ipa_ip_type ip); |
| 521 | |
| 522 | int ipa_reset_flt(enum ipa_ip_type ip); |
| 523 | |
| 524 | /* |
| 525 | * NAT |
| 526 | */ |
| 527 | int allocate_nat_device(struct ipa_ioc_nat_alloc_mem *mem); |
| 528 | |
| 529 | int ipa_nat_init_cmd(struct ipa_ioc_v4_nat_init *init); |
| 530 | |
| 531 | int ipa_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma); |
| 532 | |
| 533 | int ipa_nat_del_cmd(struct ipa_ioc_v4_nat_del *del); |
| 534 | |
| 535 | /* |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 536 | * Messaging |
| 537 | */ |
| 538 | int ipa_send_msg(struct ipa_msg_meta *meta, void *buff, |
| 539 | ipa_msg_free_fn callback); |
| 540 | int ipa_register_pull_msg(struct ipa_msg_meta *meta, ipa_msg_pull_fn callback); |
| 541 | int ipa_deregister_pull_msg(struct ipa_msg_meta *meta); |
| 542 | |
| 543 | /* |
| 544 | * Interface |
| 545 | */ |
| 546 | int ipa_register_intf(const char *name, const struct ipa_tx_intf *tx, |
| 547 | const struct ipa_rx_intf *rx); |
| 548 | int ipa_deregister_intf(const char *name); |
| 549 | |
| 550 | /* |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 551 | * Aggregation |
| 552 | */ |
| 553 | int ipa_set_aggr_mode(enum ipa_aggr_mode mode); |
| 554 | |
| 555 | int ipa_set_qcncm_ndp_sig(char sig[3]); |
| 556 | |
| 557 | int ipa_set_single_ndp_per_mbim(bool enable); |
| 558 | |
| 559 | /* |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 560 | * SW bridge (between IPA and A2) |
| 561 | */ |
| 562 | int ipa_bridge_setup(enum ipa_bridge_dir dir, enum ipa_bridge_type type, |
| 563 | struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl); |
| 564 | int ipa_bridge_teardown(enum ipa_bridge_dir dir, enum ipa_bridge_type type, |
| 565 | u32 clnt_hdl); |
| 566 | |
| 567 | |
| 568 | /* |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 569 | * Data path |
| 570 | */ |
| 571 | int ipa_tx_dp(enum ipa_client_type dst, struct sk_buff *skb, |
| 572 | struct ipa_tx_meta *metadata); |
| 573 | |
| 574 | /* |
| 575 | * System pipes |
| 576 | */ |
| 577 | int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl); |
| 578 | |
| 579 | int ipa_teardown_sys_pipe(u32 clnt_hdl); |
| 580 | |
Vladislav Mordohovich | e7970c6 | 2013-02-26 19:25:33 +0200 | [diff] [blame] | 581 | /* |
| 582 | * Resource manager |
| 583 | */ |
| 584 | int ipa_rm_create_resource(struct ipa_rm_create_params *create_params); |
| 585 | |
| 586 | int ipa_rm_register(enum ipa_rm_resource_name resource_name, |
| 587 | struct ipa_rm_register_params *reg_params); |
| 588 | |
| 589 | int ipa_rm_deregister(enum ipa_rm_resource_name resource_name, |
| 590 | struct ipa_rm_register_params *reg_params); |
| 591 | |
| 592 | int ipa_rm_add_dependency(enum ipa_rm_resource_name resource_name, |
| 593 | enum ipa_rm_resource_name depends_on_name); |
| 594 | |
| 595 | int ipa_rm_delete_dependency(enum ipa_rm_resource_name resource_name, |
| 596 | enum ipa_rm_resource_name depends_on_name); |
| 597 | |
| 598 | int ipa_rm_request_resource(enum ipa_rm_resource_name resource_name); |
| 599 | |
| 600 | int ipa_rm_release_resource(enum ipa_rm_resource_name resource_name); |
| 601 | |
| 602 | int ipa_rm_notify_completion(enum ipa_rm_event event, |
| 603 | enum ipa_rm_resource_name resource_name); |
| 604 | |
| 605 | int ipa_rm_inactivity_timer_init(enum ipa_rm_resource_name resource_name, |
| 606 | unsigned long msecs); |
| 607 | |
| 608 | int ipa_rm_inactivity_timer_destroy(enum ipa_rm_resource_name resource_name); |
| 609 | |
| 610 | int ipa_rm_inactivity_timer_request_resource( |
| 611 | enum ipa_rm_resource_name resource_name); |
| 612 | |
| 613 | int ipa_rm_inactivity_timer_release_resource( |
| 614 | enum ipa_rm_resource_name resource_name); |
| 615 | |
Gidon Studinski | a83ef57 | 2013-03-04 18:38:16 +0200 | [diff] [blame] | 616 | /* |
| 617 | * a2 service |
| 618 | */ |
| 619 | int a2_mux_open_channel(enum a2_mux_logical_channel_id lcid, |
| 620 | void *user_data, |
| 621 | a2_mux_notify_cb notify_cb); |
| 622 | |
| 623 | int a2_mux_close_channel(enum a2_mux_logical_channel_id lcid); |
| 624 | |
| 625 | int a2_mux_write(enum a2_mux_logical_channel_id lcid, struct sk_buff *skb); |
| 626 | |
| 627 | int a2_mux_is_ch_low(enum a2_mux_logical_channel_id lcid); |
| 628 | |
| 629 | int a2_mux_is_ch_full(enum a2_mux_logical_channel_id lcid); |
| 630 | |
| 631 | int a2_mux_get_tethered_client_handles(enum a2_mux_logical_channel_id lcid, |
| 632 | unsigned int *clnt_cons_handle, |
| 633 | unsigned int *clnt_prod_handle); |
| 634 | |
| 635 | /* |
| 636 | * Tethering bridge (Rmnet / MBIM) |
| 637 | */ |
| 638 | int teth_bridge_init(ipa_notify_cb *usb_notify_cb_ptr, void **private_data_ptr); |
| 639 | |
| 640 | int teth_bridge_disconnect(void); |
| 641 | |
| 642 | int teth_bridge_connect(struct teth_bridge_connect_params *connect_params); |
| 643 | |
Gidon Studinski | f5f42bc | 2013-03-17 09:29:53 +0200 | [diff] [blame] | 644 | int teth_bridge_set_aggr_params(struct teth_aggr_params *aggr_params); |
| 645 | |
Talel Atias | 6d842bf | 2012-12-06 16:58:35 +0200 | [diff] [blame] | 646 | #else /* CONFIG_IPA */ |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 647 | |
Vladislav Mordohovich | 4028f80 | 2013-03-04 15:16:31 +0200 | [diff] [blame] | 648 | static inline int a2_mux_open_channel(enum a2_mux_logical_channel_id lcid, |
| 649 | void *user_data, a2_mux_notify_cb notify_cb) |
| 650 | { |
| 651 | return -EPERM; |
| 652 | } |
| 653 | |
| 654 | static inline int a2_mux_close_channel(enum a2_mux_logical_channel_id lcid) |
| 655 | { |
| 656 | return -EPERM; |
| 657 | } |
| 658 | |
| 659 | static inline int a2_mux_write(enum a2_mux_logical_channel_id lcid, |
| 660 | struct sk_buff *skb) |
| 661 | { |
| 662 | return -EPERM; |
| 663 | } |
| 664 | |
| 665 | static inline int a2_mux_is_ch_low(enum a2_mux_logical_channel_id lcid) |
| 666 | { |
| 667 | return -EPERM; |
| 668 | } |
| 669 | |
| 670 | static inline int a2_mux_is_ch_full(enum a2_mux_logical_channel_id lcid) |
| 671 | { |
| 672 | return -EPERM; |
| 673 | } |
| 674 | |
| 675 | static inline int a2_mux_get_tethered_client_handles( |
| 676 | enum a2_mux_logical_channel_id lcid, unsigned int *clnt_cons_handle, |
| 677 | unsigned int *clnt_prod_handle) |
| 678 | { |
| 679 | return -EPERM; |
| 680 | } |
| 681 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 682 | /* |
| 683 | * Connect / Disconnect |
| 684 | */ |
| 685 | static inline int ipa_connect(const struct ipa_connect_params *in, |
| 686 | struct ipa_sps_params *sps, u32 *clnt_hdl) |
| 687 | { |
| 688 | return -EPERM; |
| 689 | } |
| 690 | |
| 691 | static inline int ipa_disconnect(u32 clnt_hdl) |
| 692 | { |
| 693 | return -EPERM; |
| 694 | } |
| 695 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 696 | /* |
| 697 | * Configuration |
| 698 | */ |
| 699 | static inline int ipa_cfg_ep(u32 clnt_hdl, |
| 700 | const struct ipa_ep_cfg *ipa_ep_cfg) |
| 701 | { |
| 702 | return -EPERM; |
| 703 | } |
| 704 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 705 | static inline int ipa_cfg_ep_nat(u32 clnt_hdl, |
| 706 | const struct ipa_ep_cfg_nat *ipa_ep_cfg) |
| 707 | { |
| 708 | return -EPERM; |
| 709 | } |
| 710 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 711 | static inline int ipa_cfg_ep_hdr(u32 clnt_hdl, |
| 712 | const struct ipa_ep_cfg_hdr *ipa_ep_cfg) |
| 713 | { |
| 714 | return -EPERM; |
| 715 | } |
| 716 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 717 | static inline int ipa_cfg_ep_mode(u32 clnt_hdl, |
| 718 | const struct ipa_ep_cfg_mode *ipa_ep_cfg) |
| 719 | { |
| 720 | return -EPERM; |
| 721 | } |
| 722 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 723 | static inline int ipa_cfg_ep_aggr(u32 clnt_hdl, |
| 724 | const struct ipa_ep_cfg_aggr *ipa_ep_cfg) |
| 725 | { |
| 726 | return -EPERM; |
| 727 | } |
| 728 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 729 | static inline int ipa_cfg_ep_route(u32 clnt_hdl, |
| 730 | const struct ipa_ep_cfg_route *ipa_ep_cfg) |
| 731 | { |
| 732 | return -EPERM; |
| 733 | } |
| 734 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 735 | /* |
| 736 | * Header removal / addition |
| 737 | */ |
| 738 | static inline int ipa_add_hdr(struct ipa_ioc_add_hdr *hdrs) |
| 739 | { |
| 740 | return -EPERM; |
| 741 | } |
| 742 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 743 | static inline int ipa_del_hdr(struct ipa_ioc_del_hdr *hdls) |
| 744 | { |
| 745 | return -EPERM; |
| 746 | } |
| 747 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 748 | static inline int ipa_commit_hdr(void) |
| 749 | { |
| 750 | return -EPERM; |
| 751 | } |
| 752 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 753 | static inline int ipa_reset_hdr(void) |
| 754 | { |
| 755 | return -EPERM; |
| 756 | } |
| 757 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 758 | static inline int ipa_get_hdr(struct ipa_ioc_get_hdr *lookup) |
| 759 | { |
| 760 | return -EPERM; |
| 761 | } |
| 762 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 763 | static inline int ipa_put_hdr(u32 hdr_hdl) |
| 764 | { |
| 765 | return -EPERM; |
| 766 | } |
| 767 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 768 | static inline int ipa_copy_hdr(struct ipa_ioc_copy_hdr *copy) |
| 769 | { |
| 770 | return -EPERM; |
| 771 | } |
| 772 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 773 | /* |
| 774 | * Routing |
| 775 | */ |
| 776 | static inline int ipa_add_rt_rule(struct ipa_ioc_add_rt_rule *rules) |
| 777 | { |
| 778 | return -EPERM; |
| 779 | } |
| 780 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 781 | static inline int ipa_del_rt_rule(struct ipa_ioc_del_rt_rule *hdls) |
| 782 | { |
| 783 | return -EPERM; |
| 784 | } |
| 785 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 786 | static inline int ipa_commit_rt(enum ipa_ip_type ip) |
| 787 | { |
| 788 | return -EPERM; |
| 789 | } |
| 790 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 791 | static inline int ipa_reset_rt(enum ipa_ip_type ip) |
| 792 | { |
| 793 | return -EPERM; |
| 794 | } |
| 795 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 796 | static inline int ipa_get_rt_tbl(struct ipa_ioc_get_rt_tbl *lookup) |
| 797 | { |
| 798 | return -EPERM; |
| 799 | } |
| 800 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 801 | static inline int ipa_put_rt_tbl(u32 rt_tbl_hdl) |
| 802 | { |
| 803 | return -EPERM; |
| 804 | } |
| 805 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 806 | /* |
| 807 | * Filtering |
| 808 | */ |
| 809 | static inline int ipa_add_flt_rule(struct ipa_ioc_add_flt_rule *rules) |
| 810 | { |
| 811 | return -EPERM; |
| 812 | } |
| 813 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 814 | static inline int ipa_del_flt_rule(struct ipa_ioc_del_flt_rule *hdls) |
| 815 | { |
| 816 | return -EPERM; |
| 817 | } |
| 818 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 819 | static inline int ipa_commit_flt(enum ipa_ip_type ip) |
| 820 | { |
| 821 | return -EPERM; |
| 822 | } |
| 823 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 824 | static inline int ipa_reset_flt(enum ipa_ip_type ip) |
| 825 | { |
| 826 | return -EPERM; |
| 827 | } |
| 828 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 829 | /* |
| 830 | * NAT |
| 831 | */ |
| 832 | static inline int allocate_nat_device(struct ipa_ioc_nat_alloc_mem *mem) |
| 833 | { |
| 834 | return -EPERM; |
| 835 | } |
| 836 | |
| 837 | |
| 838 | static inline int ipa_nat_init_cmd(struct ipa_ioc_v4_nat_init *init) |
| 839 | { |
| 840 | return -EPERM; |
| 841 | } |
| 842 | |
| 843 | |
| 844 | static inline int ipa_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma) |
| 845 | { |
| 846 | return -EPERM; |
| 847 | } |
| 848 | |
| 849 | |
| 850 | static inline int ipa_nat_del_cmd(struct ipa_ioc_v4_nat_del *del) |
| 851 | { |
| 852 | return -EPERM; |
| 853 | } |
| 854 | |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 855 | /* |
| 856 | * Messaging |
| 857 | */ |
| 858 | static inline int ipa_send_msg(struct ipa_msg_meta *meta, void *buff, |
| 859 | ipa_msg_free_fn callback) |
| 860 | { |
| 861 | return -EPERM; |
| 862 | } |
| 863 | |
| 864 | static inline int ipa_register_pull_msg(struct ipa_msg_meta *meta, |
| 865 | ipa_msg_pull_fn callback) |
| 866 | { |
| 867 | return -EPERM; |
| 868 | } |
| 869 | |
| 870 | static inline int ipa_deregister_pull_msg(struct ipa_msg_meta *meta) |
| 871 | { |
| 872 | return -EPERM; |
| 873 | } |
| 874 | |
| 875 | /* |
| 876 | * Interface |
| 877 | */ |
| 878 | static inline int ipa_register_intf(const char *name, |
| 879 | const struct ipa_tx_intf *tx, |
| 880 | const struct ipa_rx_intf *rx) |
| 881 | { |
| 882 | return -EPERM; |
| 883 | } |
| 884 | |
| 885 | static inline int ipa_deregister_intf(const char *name) |
| 886 | { |
| 887 | return -EPERM; |
| 888 | } |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 889 | |
| 890 | /* |
| 891 | * Aggregation |
| 892 | */ |
| 893 | static inline int ipa_set_aggr_mode(enum ipa_aggr_mode mode) |
| 894 | { |
| 895 | return -EPERM; |
| 896 | } |
| 897 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 898 | static inline int ipa_set_qcncm_ndp_sig(char sig[3]) |
| 899 | { |
| 900 | return -EPERM; |
| 901 | } |
| 902 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 903 | static inline int ipa_set_single_ndp_per_mbim(bool enable) |
| 904 | { |
| 905 | return -EPERM; |
| 906 | } |
| 907 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 908 | /* |
Talel Atias | 9bc5389 | 2013-02-10 15:10:07 +0200 | [diff] [blame] | 909 | * SW bridge (between IPA and A2) |
| 910 | */ |
| 911 | static inline int ipa_bridge_setup(enum ipa_bridge_dir dir, |
| 912 | enum ipa_bridge_type type, |
| 913 | struct ipa_sys_connect_params *sys_in, |
| 914 | u32 *clnt_hdl) |
| 915 | { |
| 916 | return -EPERM; |
| 917 | } |
| 918 | |
| 919 | static inline int ipa_bridge_teardown(enum ipa_bridge_dir dir, |
| 920 | enum ipa_bridge_type type, |
| 921 | u32 clnt_hdl) |
| 922 | { |
| 923 | return -EPERM; |
| 924 | } |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 925 | |
| 926 | /* |
| 927 | * Data path |
| 928 | */ |
| 929 | static inline int ipa_tx_dp(enum ipa_client_type dst, struct sk_buff *skb, |
| 930 | struct ipa_tx_meta *metadata) |
| 931 | { |
| 932 | return -EPERM; |
| 933 | } |
| 934 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 935 | /* |
| 936 | * System pipes |
| 937 | */ |
| 938 | static inline int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, |
| 939 | u32 *clnt_hdl) |
| 940 | { |
| 941 | return -EPERM; |
| 942 | } |
| 943 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 944 | static inline int ipa_teardown_sys_pipe(u32 clnt_hdl) |
| 945 | { |
| 946 | return -EPERM; |
| 947 | } |
| 948 | |
Vladislav Mordohovich | e7970c6 | 2013-02-26 19:25:33 +0200 | [diff] [blame] | 949 | /* |
| 950 | * Resource manager |
| 951 | */ |
| 952 | static inline int ipa_rm_create_resource( |
| 953 | struct ipa_rm_create_params *create_params) |
| 954 | { |
| 955 | return -EPERM; |
| 956 | } |
| 957 | |
| 958 | static inline int ipa_rm_register(enum ipa_rm_resource_name resource_name, |
| 959 | struct ipa_rm_register_params *reg_params) |
| 960 | { |
| 961 | return -EPERM; |
| 962 | } |
| 963 | |
| 964 | static inline int ipa_rm_deregister(enum ipa_rm_resource_name resource_name, |
| 965 | struct ipa_rm_register_params *reg_params) |
| 966 | { |
| 967 | return -EPERM; |
| 968 | } |
| 969 | |
| 970 | static inline int ipa_rm_add_dependency( |
| 971 | enum ipa_rm_resource_name resource_name, |
| 972 | enum ipa_rm_resource_name depends_on_name) |
| 973 | { |
| 974 | return -EPERM; |
| 975 | } |
| 976 | |
| 977 | static inline int ipa_rm_delete_dependency( |
| 978 | enum ipa_rm_resource_name resource_name, |
| 979 | enum ipa_rm_resource_name depends_on_name) |
| 980 | { |
| 981 | return -EPERM; |
| 982 | } |
| 983 | |
| 984 | static inline int ipa_rm_request_resource( |
| 985 | enum ipa_rm_resource_name resource_name) |
| 986 | { |
| 987 | return -EPERM; |
| 988 | } |
| 989 | |
| 990 | static inline int ipa_rm_release_resource( |
| 991 | enum ipa_rm_resource_name resource_name) |
| 992 | { |
| 993 | return -EPERM; |
| 994 | } |
| 995 | |
| 996 | static inline int ipa_rm_notify_completion(enum ipa_rm_event event, |
| 997 | enum ipa_rm_resource_name resource_name) |
| 998 | { |
| 999 | return -EPERM; |
| 1000 | } |
| 1001 | |
| 1002 | static inline int ipa_rm_inactivity_timer_init( |
| 1003 | enum ipa_rm_resource_name resource_name, |
| 1004 | unsigned long msecs) |
| 1005 | { |
| 1006 | return -EPERM; |
| 1007 | } |
| 1008 | |
| 1009 | static inline int ipa_rm_inactivity_timer_destroy( |
| 1010 | enum ipa_rm_resource_name resource_name) |
| 1011 | { |
| 1012 | return -EPERM; |
| 1013 | } |
| 1014 | |
| 1015 | static inline int ipa_rm_inactivity_timer_request_resource( |
| 1016 | enum ipa_rm_resource_name resource_name) |
| 1017 | { |
| 1018 | return -EPERM; |
| 1019 | } |
| 1020 | |
| 1021 | static inline int ipa_rm_inactivity_timer_release_resource( |
| 1022 | enum ipa_rm_resource_name resource_name) |
| 1023 | { |
| 1024 | return -EPERM; |
| 1025 | } |
| 1026 | |
Gidon Studinski | a83ef57 | 2013-03-04 18:38:16 +0200 | [diff] [blame] | 1027 | /* |
| 1028 | * Tethering bridge (Rmnetm / MBIM) |
| 1029 | */ |
| 1030 | static inline int teth_bridge_init(ipa_notify_cb *usb_notify_cb_ptr, |
| 1031 | void **private_data_ptr) |
| 1032 | { |
| 1033 | return -EPERM; |
| 1034 | } |
| 1035 | |
| 1036 | static inline int teth_bridge_disconnect(void) |
| 1037 | { |
| 1038 | return -EPERM; |
| 1039 | } |
| 1040 | |
| 1041 | static inline int teth_bridge_connect(struct teth_bridge_connect_params |
| 1042 | *connect_params) |
| 1043 | { |
| 1044 | return -EPERM; |
| 1045 | } |
| 1046 | |
Gidon Studinski | f5f42bc | 2013-03-17 09:29:53 +0200 | [diff] [blame] | 1047 | static inline int teth_bridge_set_aggr_params(struct teth_aggr_params |
| 1048 | *aggr_params) |
| 1049 | { |
| 1050 | return -EPERM; |
| 1051 | } |
| 1052 | |
Talel Atias | 8a6ec10 | 2012-11-21 20:22:29 +0200 | [diff] [blame] | 1053 | #endif /* CONFIG_IPA*/ |
| 1054 | |
Talel Atias | 8390f26 | 2012-11-15 16:33:18 +0200 | [diff] [blame] | 1055 | #endif /* _IPA_H_ */ |