iosm_ipc_wwan.h (1280B)
1/* SPDX-License-Identifier: GPL-2.0-only 2 * 3 * Copyright (C) 2020-21 Intel Corporation. 4 */ 5 6#ifndef IOSM_IPC_WWAN_H 7#define IOSM_IPC_WWAN_H 8 9/** 10 * ipc_wwan_init - Allocate, Init and register WWAN device 11 * @ipc_imem: Pointer to imem data-struct 12 * @dev: Pointer to device structure 13 * 14 * Returns: Pointer to instance on success else NULL 15 */ 16struct iosm_wwan *ipc_wwan_init(struct iosm_imem *ipc_imem, struct device *dev); 17 18/** 19 * ipc_wwan_deinit - Unregister and free WWAN device, clear pointer 20 * @ipc_wwan: Pointer to wwan instance data 21 */ 22void ipc_wwan_deinit(struct iosm_wwan *ipc_wwan); 23 24/** 25 * ipc_wwan_receive - Receive a downlink packet from CP. 26 * @ipc_wwan: Pointer to wwan instance 27 * @skb_arg: Pointer to struct sk_buff 28 * @dss: Set to true if interafce id is from 257 to 261, 29 * else false 30 * @if_id: Interface ID 31 * 32 * Return: 0 on success and failure value on error 33 */ 34int ipc_wwan_receive(struct iosm_wwan *ipc_wwan, struct sk_buff *skb_arg, 35 bool dss, int if_id); 36 37/** 38 * ipc_wwan_tx_flowctrl - Enable/Disable TX flow control 39 * @ipc_wwan: Pointer to wwan instance 40 * @id: Ipc mux channel session id 41 * @on: if true then flow ctrl would be enabled else disable 42 * 43 */ 44void ipc_wwan_tx_flowctrl(struct iosm_wwan *ipc_wwan, int id, bool on); 45#endif