| /* |
| * Linux cfg80211 driver - Android initial functions |
| * |
| * Copyright 1999-2016, Broadcom Corporation |
| * All rights reserved, |
| * |
| * Redistribution and use in source and binary forms, with or without modification, |
| * are permitted provided that the following conditions are met: |
| * 1. Redistributions of source code must retain the above copyright notice, |
| * this list of conditions and the following disclaimer. |
| * 2. Redistributions in binary form must reproduce the above copyright notice, |
| * this list of conditions and the following disclaimer in the documentation |
| * and/or other materials provided with the distribution. |
| * |
| * This software is provided by the copyright holder "as is" and any express or |
| * implied warranties, including, but not limited to, the implied warranties of |
| * merchantability and fitness for a particular purpose are disclaimed. In no event |
| * shall copyright holder be liable for any direct, indirect, incidental, special, |
| * exemplary, or consequential damages (including, but not limited to, procurement |
| * of substitute goods or services; loss of use, data, or profits; or business |
| * interruption) however caused and on any theory of liability, whether in |
| * contract, strict liability, or tort (including negligence or otherwise) arising |
| * in any way out of the use of this software, even if advised of the possibility |
| * of such damage |
| * |
| * |
| * <<Broadcom-WL-IPTag/Open:>> |
| * |
| * $Id: wl_android.h 608194 2015-12-24 04:34:35Z $ |
| */ |
| |
| #ifndef _wl_android_ |
| #define _wl_android_ |
| |
| #include <linux/module.h> |
| #include <linux/netdevice.h> |
| #include <wldev_common.h> |
| #include <wl_android_cmd.h> |
| |
| /* If any feature uses the Generic Netlink Interface, put it here to enable WL_GENL |
| * automatically |
| */ |
| #if defined(BT_WIFI_HANDOVER) || defined(WL_NAN) |
| #define WL_GENL |
| #endif |
| |
| |
| |
| /** |
| * Android platform dependent functions, feel free to add Android specific functions here |
| * (save the macros in dhd). Please do NOT declare functions that are NOT exposed to dhd |
| * or cfg, define them as static in wl_android.c |
| */ |
| |
| /* message levels */ |
| #define ANDROID_ERROR_LEVEL 0x0001 |
| #define ANDROID_TRACE_LEVEL 0x0002 |
| #define ANDROID_INFO_LEVEL 0x0004 |
| |
| #define ANDROID_ERROR(x) \ |
| do { \ |
| if (android_msg_level & ANDROID_ERROR_LEVEL) { \ |
| printk(KERN_ERR "ANDROID-ERROR) "); \ |
| printk x; \ |
| } \ |
| } while (0) |
| #define ANDROID_TRACE(x) \ |
| do { \ |
| if (android_msg_level & ANDROID_TRACE_LEVEL) { \ |
| printk(KERN_ERR "ANDROID-TRACE) "); \ |
| printk x; \ |
| } \ |
| } while (0) |
| #define ANDROID_INFO(x) \ |
| do { \ |
| if (android_msg_level & ANDROID_INFO_LEVEL) { \ |
| printk(KERN_ERR "ANDROID-INFO) "); \ |
| printk x; \ |
| } \ |
| } while (0) |
| |
| /** |
| * wl_android_init will be called from module init function (dhd_module_init now), similarly |
| * wl_android_exit will be called from module exit function (dhd_module_cleanup now) |
| */ |
| int wl_android_init(void); |
| int wl_android_exit(void); |
| void wl_android_post_init(void); |
| int wl_android_wifi_on(struct net_device *dev); |
| int wl_android_wifi_off(struct net_device *dev, bool on_failure); |
| #ifdef WL_CFG80211 |
| int wl_android_set_roam_offload_bssid_list(struct net_device *dev, const char *cmd); |
| int wl_android_set_ap_mac_list(struct net_device *dev, int macmode, struct maclist *maclist); |
| #endif /* WL_CFG80211 */ |
| #endif /* _wl_android_ */ |