1 /* SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2020-21 Intel Corporation.
6 #ifndef IOSM_IPC_WWAN_H
7 #define IOSM_IPC_WWAN_H
10 * ipc_wwan_init - Allocate, Init and register WWAN device
11 * @ipc_imem: Pointer to imem data-struct
12 * @dev: Pointer to device structure
14 * Returns: Pointer to instance on success else NULL
16 struct iosm_wwan *ipc_wwan_init(struct iosm_imem *ipc_imem, struct device *dev);
19 * ipc_wwan_deinit - Unregister and free WWAN device, clear pointer
20 * @ipc_wwan: Pointer to wwan instance data
22 void ipc_wwan_deinit(struct iosm_wwan *ipc_wwan);
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,
30 * @if_id: Interface ID
32 * Return: 0 on success and failure value on error
34 int ipc_wwan_receive(struct iosm_wwan *ipc_wwan, struct sk_buff *skb_arg,
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
44 void ipc_wwan_tx_flowctrl(struct iosm_wwan *ipc_wwan, int id, bool on);
47 * ipc_wwan_is_tx_stopped - Checks if Tx stopped for a Interface id.
48 * @ipc_wwan: Pointer to wwan instance
49 * @id: Ipc mux channel session id
51 * Return: true if stopped, false otherwise
53 bool ipc_wwan_is_tx_stopped(struct iosm_wwan *ipc_wwan, int id);