diff options
Diffstat (limited to 'drivers/net/wireless/bcmdhd/wl_linux_mon.c')
-rw-r--r-- | drivers/net/wireless/bcmdhd/wl_linux_mon.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/net/wireless/bcmdhd/wl_linux_mon.c b/drivers/net/wireless/bcmdhd/wl_linux_mon.c index 243850ce85e..ab6d6f4d113 100644 --- a/drivers/net/wireless/bcmdhd/wl_linux_mon.c +++ b/drivers/net/wireless/bcmdhd/wl_linux_mon.c @@ -1,9 +1,9 @@ /* * Broadcom Dongle Host Driver (DHD), Linux monitor network interface * - * Copyright (C) 1999-2011, Broadcom Corporation + * Copyright (C) 1999-2012, Broadcom Corporation * - * Unless you and Broadcom execute a separate written software license + * 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 @@ -21,9 +21,10 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * - * $Id: wl_linux_mon.c 303266 2011-12-16 00:15:23Z $ + * $Id: dhd_linux_mon.c 280623 2011-08-30 14:49:39Z $ */ +#include <osl.h> #include <linux/string.h> #include <linux/module.h> #include <linux/netdevice.h> @@ -35,7 +36,6 @@ #include <wlioctl.h> #include <bcmutils.h> -#include <linux_osl.h> #include <dhd_dbg.h> #include <dngl_stats.h> #include <dhd.h> @@ -47,11 +47,18 @@ typedef enum monitor_states MONITOR_STATE_INTERFACE_ADDED = 0x2, MONITOR_STATE_INTERFACE_DELETED = 0x4 } monitor_states_t; +int dhd_add_monitor(char *name, struct net_device **new_ndev); extern int dhd_start_xmit(struct sk_buff *skb, struct net_device *net); +int dhd_del_monitor(struct net_device *ndev); +int dhd_monitor_init(void *dhd_pub); +int dhd_monitor_uninit(void); /** * Local declarations and defintions (not exposed) */ +#ifndef DHD_MAX_IFS +#define DHD_MAX_IFS 16 +#endif #define MON_PRINT(format, ...) printk("DHD-MON: %s " format, __func__, ##__VA_ARGS__) #define MON_TRACE MON_PRINT @@ -82,8 +89,12 @@ static const struct net_device_ops dhd_mon_if_ops = { .ndo_open = dhd_mon_if_open, .ndo_stop = dhd_mon_if_stop, .ndo_start_xmit = dhd_mon_if_subif_start_xmit, - .ndo_set_rx_mode = dhd_mon_if_set_multicast_list, - .ndo_set_mac_address = dhd_mon_if_change_mac, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) + .ndo_set_rx_mode = dhd_mon_if_set_multicast_list, +#else + .ndo_set_multicast_list = dhd_mon_if_set_multicast_list, +#endif + .ndo_set_mac_address = dhd_mon_if_change_mac, }; /** @@ -95,11 +106,12 @@ static const struct net_device_ops dhd_mon_if_ops = { */ static struct net_device* lookup_real_netdev(char *name) { + struct net_device *ndev_found = NULL; + int i; int len = 0; int last_name_len = 0; struct net_device *ndev; - struct net_device *ndev_found = NULL; /* We need to find interface "p2p-p2p-0" corresponding to monitor interface "mon-p2p-0", * Once mon iface name reaches IFNAMSIZ, it is reset to p2p0-0 and corresponding mon |