162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci * 362306a36Sopenharmony_ci * Copyright (C) 2020-21 Intel Corporation. 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#ifndef IOSM_IPC_WWAN_H 762306a36Sopenharmony_ci#define IOSM_IPC_WWAN_H 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci/** 1062306a36Sopenharmony_ci * ipc_wwan_init - Allocate, Init and register WWAN device 1162306a36Sopenharmony_ci * @ipc_imem: Pointer to imem data-struct 1262306a36Sopenharmony_ci * @dev: Pointer to device structure 1362306a36Sopenharmony_ci * 1462306a36Sopenharmony_ci * Returns: Pointer to instance on success else NULL 1562306a36Sopenharmony_ci */ 1662306a36Sopenharmony_cistruct iosm_wwan *ipc_wwan_init(struct iosm_imem *ipc_imem, struct device *dev); 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci/** 1962306a36Sopenharmony_ci * ipc_wwan_deinit - Unregister and free WWAN device, clear pointer 2062306a36Sopenharmony_ci * @ipc_wwan: Pointer to wwan instance data 2162306a36Sopenharmony_ci */ 2262306a36Sopenharmony_civoid ipc_wwan_deinit(struct iosm_wwan *ipc_wwan); 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci/** 2562306a36Sopenharmony_ci * ipc_wwan_receive - Receive a downlink packet from CP. 2662306a36Sopenharmony_ci * @ipc_wwan: Pointer to wwan instance 2762306a36Sopenharmony_ci * @skb_arg: Pointer to struct sk_buff 2862306a36Sopenharmony_ci * @dss: Set to true if interafce id is from 257 to 261, 2962306a36Sopenharmony_ci * else false 3062306a36Sopenharmony_ci * @if_id: Interface ID 3162306a36Sopenharmony_ci * 3262306a36Sopenharmony_ci * Return: 0 on success and failure value on error 3362306a36Sopenharmony_ci */ 3462306a36Sopenharmony_ciint ipc_wwan_receive(struct iosm_wwan *ipc_wwan, struct sk_buff *skb_arg, 3562306a36Sopenharmony_ci bool dss, int if_id); 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci/** 3862306a36Sopenharmony_ci * ipc_wwan_tx_flowctrl - Enable/Disable TX flow control 3962306a36Sopenharmony_ci * @ipc_wwan: Pointer to wwan instance 4062306a36Sopenharmony_ci * @id: Ipc mux channel session id 4162306a36Sopenharmony_ci * @on: if true then flow ctrl would be enabled else disable 4262306a36Sopenharmony_ci * 4362306a36Sopenharmony_ci */ 4462306a36Sopenharmony_civoid ipc_wwan_tx_flowctrl(struct iosm_wwan *ipc_wwan, int id, bool on); 4562306a36Sopenharmony_ci#endif 46