blob: d78d597d8fe39e5fed268f274504783cbbffafed [file] [log] [blame]
/*
* Linux cfg80211 driver - Android initial functions
*
* Copyright (C) 1999-2016, Broadcom Corporation
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
* following added to such license:
*
* As a special exception, the copyright holders of this software give you
* permission to link this software with independent modules, and to copy and
* distribute the resulting executable under terms of your choice, provided that
* you also meet, for each linked independent module, the terms and conditions of
* the license of that module. An independent module is a module which is not
* derived from this software. The special exception does not apply to any
* modifications of the software.
*
* Notwithstanding the above, under no circumstances may you combine this
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
*
* <<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_ */