Path: blob/master/ALFA-W1F1/RTL8814AU/platform/platform_zte_zx296716_sdio.c
1307 views
/******************************************************************************1*2* Copyright(c) 2016 - 2018 Realtek Corporation.3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of version 2 of the GNU General Public License as6* published by the Free Software Foundation.7*8* This program is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for11* more details.12*13*****************************************************************************/14#include <linux/printk.h> /* pr_info(() */15#include <linux/delay.h> /* msleep() */16#include "platform_zte_zx296716_sdio.h" /* sdio_reinit() and etc */171819/*20* Return:21* 0: power on successfully22* others: power on failed23*/24int platform_wifi_power_on(void)25{26int ret = 0;2728pr_info("######%s: disable--1--\n", __func__);29extern_wifi_set_enable(0);30/*msleep(500);*/ /* add in function:extern_wifi_set_enable */31pr_info("######%s: enable--2---\n", __func__);32extern_wifi_set_enable(1);33/*msleep(500);*/34sdio_reinit();3536return ret;37}3839void platform_wifi_power_off(void)40{41int card_val;4243pr_info("######%s:\n", __func__);44#ifdef CONFIG_A16T03_BOARD45card_val = sdio_host_is_null();46if (card_val)47remove_card();48#endif /* CONFIG_A16T03_BOARD */49extern_wifi_set_enable(0);5051/*msleep(500);*/52}535455