1 /*
2 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 /**
20 * DOC: osif_dp_lro.h
21 *
22 * WLAN Host Device Driver file for DP LRO support.
23 *
24 */
25
26 #ifndef _OSIF_DP_LRO_H_
27 #define _OSIF_DP_LRO_H_
28
29 #include <qdf_types.h>
30 #include <wlan_objmgr_vdev_obj.h>
31
32 #if defined(FEATURE_LRO)
33 /**
34 * osif_dp_lro_rx() - Handle Rx processing via LRO
35 * @dev: netdev
36 * @nbuf: network buffer
37 *
38 * Return: QDF_STATUS_SUCCESS if processed via LRO or non zero return code
39 */
40 QDF_STATUS osif_dp_lro_rx(qdf_netdev_t dev, qdf_nbuf_t nbuf);
41
42 void osif_dp_lro_display_stats(struct wlan_objmgr_vdev *vdev);
43
44 /**
45 * osif_dp_lro_set_reset() - vendor command for Disable/Enable LRO
46 * @vdev: Vdev obj mgr
47 * @enable_flag: enable or disable LRO.
48 *
49 * Return: none
50 */
51 QDF_STATUS
52 osif_dp_lro_set_reset(struct wlan_objmgr_vdev *vdev, uint8_t enable_flag);
53
54 #else
55 static inline
osif_dp_lro_rx(qdf_netdev_t dev,qdf_nbuf_t nbuf)56 QDF_STATUS osif_dp_lro_rx(qdf_netdev_t dev, qdf_nbuf_t nbuf)
57 {
58 return QDF_STATUS_E_NOSUPPORT;
59 }
60
osif_dp_lro_display_stats(struct wlan_objmgr_vdev * vdev)61 static inline void osif_dp_lro_display_stats(struct wlan_objmgr_vdev *vdev)
62 {
63 }
64
65 static inline QDF_STATUS
osif_dp_lro_set_reset(struct wlan_objmgr_vdev * vdev,uint8_t enable_flag)66 osif_dp_lro_set_reset(struct wlan_objmgr_vdev *vdev, uint8_t enable_flag)
67 {
68 return 0;
69 }
70 #endif /* FEATURE_LRO */
71
72 #endif /* _OSIF_DP_LRO_H_ */
73