2 * Copyright (C) 2011-2014 MediaTek Inc.
4 * This program is free software: you can redistribute it and/or modify it under the terms of the
5 * GNU General Public License version 2 as published by the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 * See the GNU General Public License for more details.
11 * You should have received a copy of the GNU General Public License along with this program.
12 * If not, see <http://www.gnu.org/licenses/>.
18 #define DFT_TAG "[WLAN-MOD-INIT]"
20 #include "wmt_detect.h"
21 #include "wlan_drv_init.h"
23 int __weak
mtk_wcn_wlan_soc_init(void)
25 WMT_DETECT_ERR_FUNC("mtk_wcn_wlan_soc_init is not define!\n");
29 int do_wlan_drv_init(int chip_id
)
34 #ifdef CONFIG_MTK_COMBO_WIFI
35 WMT_DETECT_INFO_FUNC("start to do wlan module init 0x%x\n", chip_id
);
41 /* WMT-WIFI char dev init */
42 ret
= mtk_wcn_wmt_wifi_init();
43 WMT_DETECT_INFO_FUNC("WMT-WIFI char dev init, ret:%d\n", ret
);
47 ret
= mtk_wcn_wlan_6620_init();
48 WMT_DETECT_INFO_FUNC("WLAN driver init, ret:%d\n", ret
);
51 WMT_DETECT_ERR_FUNC("MT6620 is not supported, please check kernel makefile or project config\n");
58 /* WMT-WIFI char dev init */
59 ret
= mtk_wcn_wmt_wifi_init();
60 WMT_DETECT_INFO_FUNC("WMT-WIFI char dev init, ret:%d\n", ret
);
64 ret
= mtk_wcn_wlan_6628_init();
65 WMT_DETECT_INFO_FUNC("WLAN driver init, ret:%d\n", ret
);
68 WMT_DETECT_ERR_FUNC("MT6628 is not supported, please check kernel makefile or project config\n");
74 /* WMT-WIFI char dev init */
75 ret
= mtk_wcn_wmt_wifi_init();
76 WMT_DETECT_INFO_FUNC("WMT-WIFI char dev init, ret:%d\n", ret
);
80 ret
= mtk_wcn_wlan_6630_init();
81 WMT_DETECT_INFO_FUNC("WLAN driver init, ret:%d\n", ret
);
84 WMT_DETECT_ERR_FUNC("MT6630 is not supported, please check kernel makefile or project config\n");
95 #ifdef MTK_WCN_SOC_CHIP_SUPPORT
96 /* WMT-WIFI char dev init */
97 ret
= mtk_wcn_wmt_wifi_soc_init();
98 WMT_DETECT_INFO_FUNC("WMT-WIFI char dev init, ret:%d\n", ret
);
101 /* WLAN driver init*/
102 ret
= mtk_wcn_wlan_soc_init();
103 WMT_DETECT_INFO_FUNC("WLAN driver init, ret:%d\n", ret
);
106 WMT_DETECT_ERR_FUNC("SOC is not supported, please check kernel makefile or project config\n");
112 WMT_DETECT_INFO_FUNC("finish wlan module init\n");
116 WMT_DETECT_INFO_FUNC("WLAN function not supported, skip\n");