Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nu11secur1ty
GitHub Repository: nu11secur1ty/Kali-Linux
Path: blob/master/ALFA-W1F1/RTL8814AU/platform/platform_arm_act_sdio.c
1307 views
1
/******************************************************************************
2
*
3
* Copyright(c) 2013 - 2017 Realtek Corporation.
4
*
5
* This program is free software; you can redistribute it and/or modify it
6
* under the terms of version 2 of the GNU General Public License as
7
* published by the Free Software Foundation.
8
*
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
* more details.
13
*
14
*****************************************************************************/
15
/*
16
* Description:
17
* This file can be applied to following platforms:
18
* CONFIG_PLATFORM_ACTIONS_ATM703X
19
*/
20
#include <drv_types.h>
21
22
#ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
23
extern int acts_wifi_init(void);
24
extern void acts_wifi_cleanup(void);
25
#endif
26
27
/*
28
* Return:
29
* 0: power on successfully
30
* others: power on failed
31
*/
32
int platform_wifi_power_on(void)
33
{
34
int ret = 0;
35
36
#ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
37
ret = acts_wifi_init();
38
if (unlikely(ret < 0)) {
39
pr_err("%s Failed to register the power control driver.\n", __FUNCTION__);
40
goto exit;
41
}
42
#endif
43
44
exit:
45
return ret;
46
}
47
48
void platform_wifi_power_off(void)
49
{
50
#ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
51
acts_wifi_cleanup();
52
#endif
53
}
54
55