1 /* 2 * Copyright (c) 2017 The Linux Foundation. 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: Public unit-test related APIs for triggering WoW suspend/resume while 21 * the application processor is still up. 22 */ 23 24 #ifndef _HIF_UNIT_TEST_SUSPEND_H_ 25 #define _HIF_UNIT_TEST_SUSPEND_H_ 26 27 #ifdef WLAN_SUSPEND_RESUME_TEST 28 29 #include "qdf_status.h" 30 #include "hif.h" 31 32 typedef void (*hif_ut_resume_callback)(void); 33 34 /** 35 * hif_ut_apps_suspend() - Setup unit-test related suspend state. 36 * @opaque_scn: The HIF context to operate on 37 * @callback: The function to call when unit-test resume is triggered 38 * 39 * Call after a normal WoW suspend has been completed. 40 * 41 * Return: QDF_STATUS 42 */ 43 QDF_STATUS hif_ut_apps_suspend(struct hif_opaque_softc *opaque_scn, 44 hif_ut_resume_callback callback); 45 46 /** 47 * hif_ut_apps_resume() - Cleanup unit-test related suspend state. 48 * @opaque_scn: The HIF context to operate on 49 * 50 * Call before doing a normal WoW resume if suspend was initiated via 51 * unit-test suspend. 52 * 53 * Return: QDF_STATUS 54 */ 55 QDF_STATUS hif_ut_apps_resume(struct hif_opaque_softc *opaque_scn); 56 57 #endif /* WLAN_SUSPEND_RESUME_TEST */ 58 59 #endif /* _HIF_UNIT_TEST_SUSPEND_H_ */ 60