Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nu11secur1ty
GitHub Repository: nu11secur1ty/Kali-Linux
Path: blob/master/ALFA-W1F1/RTL8814AU/platform/platform_zte_zx296716_sdio.c
1307 views
1
/******************************************************************************
2
*
3
* Copyright(c) 2016 - 2018 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
#include <linux/printk.h> /* pr_info(() */
16
#include <linux/delay.h> /* msleep() */
17
#include "platform_zte_zx296716_sdio.h" /* sdio_reinit() and etc */
18
19
20
/*
21
* Return:
22
* 0: power on successfully
23
* others: power on failed
24
*/
25
int platform_wifi_power_on(void)
26
{
27
int ret = 0;
28
29
pr_info("######%s: disable--1--\n", __func__);
30
extern_wifi_set_enable(0);
31
/*msleep(500);*/ /* add in function:extern_wifi_set_enable */
32
pr_info("######%s: enable--2---\n", __func__);
33
extern_wifi_set_enable(1);
34
/*msleep(500);*/
35
sdio_reinit();
36
37
return ret;
38
}
39
40
void platform_wifi_power_off(void)
41
{
42
int card_val;
43
44
pr_info("######%s:\n", __func__);
45
#ifdef CONFIG_A16T03_BOARD
46
card_val = sdio_host_is_null();
47
if (card_val)
48
remove_card();
49
#endif /* CONFIG_A16T03_BOARD */
50
extern_wifi_set_enable(0);
51
52
/*msleep(500);*/
53
}
54
55