summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2012-02-27 14:02:51 -0800
committerOm Prakash Singh <omp@nvidia.com>2012-06-15 14:15:13 +0530
commit55e9aee2025bf4416f79ec17f1cea15112e28b5d (patch)
tree3ec50eff2e5e44ff7f48dee28320803498813933 /drivers/net/wireless
parent70180a701b86c939904d778f109fc6911e667002 (diff)
net: wireless: bcmdhd: Update to Version 5.90.195.30
- Fix STA features if P2P FW is in use - Move ENABLE_P2P_INTERFACE to Makefile - Minor fixes in PNO scan Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/bcmdhd/Makefile1
-rw-r--r--drivers/net/wireless/bcmdhd/dhd.h15
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_cfg80211.c23
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_cfg80211.h2
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_common.c16
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux.c4
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_sdio.c5
-rw-r--r--drivers/net/wireless/bcmdhd/include/epivers.h8
-rw-r--r--drivers/net/wireless/bcmdhd/wl_cfg80211.c131
-rw-r--r--drivers/net/wireless/bcmdhd/wl_cfg80211.h4
10 files changed, 96 insertions, 113 deletions
diff --git a/drivers/net/wireless/bcmdhd/Makefile b/drivers/net/wireless/bcmdhd/Makefile
index ef5e3d5e5f72..d86748a18a1e 100644
--- a/drivers/net/wireless/bcmdhd/Makefile
+++ b/drivers/net/wireless/bcmdhd/Makefile
@@ -8,6 +8,7 @@ DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER \
-DNEW_COMPAT_WIRELESS -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT \
-DKEEP_ALIVE -DPKT_FILTER_SUPPORT \
-DEMBEDDED_PLATFORM \
+ -DENABLE_P2P_INTERFACE \
-Idrivers/net/wireless/bcmdhd -Idrivers/net/wireless/bcmdhd/include
ifeq ($(CONFIG_BCMDHD_WIFI_CONTROL_FUNC),y)
diff --git a/drivers/net/wireless/bcmdhd/dhd.h b/drivers/net/wireless/bcmdhd/dhd.h
index cb27e291c0d7..f72de6fb5084 100644
--- a/drivers/net/wireless/bcmdhd/dhd.h
+++ b/drivers/net/wireless/bcmdhd/dhd.h
@@ -24,7 +24,7 @@
* 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: dhd.h 306879 2012-01-09 21:33:03Z $
+ * $Id: dhd.h 316856 2012-02-23 21:44:34Z $
*/
/****************
@@ -76,9 +76,12 @@ enum dhd_bus_state {
/* Firmware requested operation mode */
#define STA_MASK 0x0001
-#define HOSTAPD_MASK 0x0002
+#define HOSTAPD_MASK 0x0002
#define WFD_MASK 0x0004
-#define SOFTAP_FW_MASK 0x0008
+#define SOFTAP_FW_MASK 0x0008
+#define P2P_GO_ENABLED 0x0010
+#define P2P_GC_ENABLED 0x0020
+#define CONCURENT_MASK 0x00F0
/* max sequential rxcntl timeouts to set HANG event */
#define MAX_CNTL_TIMEOUT 2
@@ -205,6 +208,12 @@ typedef struct dhd_pub {
char eventmask[WL_EVENTING_MASK_LEN];
int op_mode; /* STA, HostAPD, WFD, SoftAP */
+/* Set this to 1 to use a seperate interface (p2p0) for p2p operations.
+ * For ICS MR1 releases it should be disable to be compatable with ICS MR1 Framework
+ * see target dhd-cdc-sdmmc-panda-cfg80211-icsmr1-gpl-debug in Makefile
+ */
+/* #define ENABLE_P2P_INTERFACE 1 */
+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && defined(CONFIG_HAS_WAKELOCK)
struct wake_lock wakelock[WAKE_LOCK_MAX];
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && defined (CONFIG_HAS_WAKELOCK) */
diff --git a/drivers/net/wireless/bcmdhd/dhd_cfg80211.c b/drivers/net/wireless/bcmdhd/dhd_cfg80211.c
index 917b09b35a35..172f25fc578a 100644
--- a/drivers/net/wireless/bcmdhd/dhd_cfg80211.c
+++ b/drivers/net/wireless/bcmdhd/dhd_cfg80211.c
@@ -33,6 +33,12 @@
extern struct wl_priv *wlcfg_drv_priv;
static int dhd_dongle_up = FALSE;
+#include <dngl_stats.h>
+#include <dhd.h>
+#include <dhdioctl.h>
+#include <wlioctl.h>
+#include <dhd_cfg80211.h>
+
static s32 wl_dongle_up(struct net_device *ndev, u32 up);
/**
@@ -57,6 +63,22 @@ s32 dhd_cfg80211_down(struct wl_priv *wl)
return 0;
}
+s32 dhd_cfg80211_set_p2p_info(struct wl_priv *wl, int val)
+{
+ dhd_pub_t *dhd = (dhd_pub_t *)(wl->pub);
+ dhd->op_mode |= val;
+ WL_ERR(("Set : op_mode=%d\n", dhd->op_mode));
+ return 0;
+}
+
+s32 dhd_cfg80211_clean_p2p_info(struct wl_priv *wl)
+{
+ dhd_pub_t *dhd = (dhd_pub_t *)(wl->pub);
+ dhd->op_mode &= ~CONCURENT_MASK;
+ WL_ERR(("Clean : op_mode=%d\n", dhd->op_mode));
+ return 0;
+}
+
static s32 wl_dongle_up(struct net_device *ndev, u32 up)
{
s32 err = 0;
@@ -67,6 +89,7 @@ static s32 wl_dongle_up(struct net_device *ndev, u32 up)
}
return err;
}
+
s32 dhd_config_dongle(struct wl_priv *wl, bool need_lock)
{
#ifndef DHD_SDALIGN
diff --git a/drivers/net/wireless/bcmdhd/dhd_cfg80211.h b/drivers/net/wireless/bcmdhd/dhd_cfg80211.h
index 8dab652c1a2c..6c033259a8d9 100644
--- a/drivers/net/wireless/bcmdhd/dhd_cfg80211.h
+++ b/drivers/net/wireless/bcmdhd/dhd_cfg80211.h
@@ -34,6 +34,8 @@
s32 dhd_cfg80211_init(struct wl_priv *wl);
s32 dhd_cfg80211_deinit(struct wl_priv *wl);
s32 dhd_cfg80211_down(struct wl_priv *wl);
+s32 dhd_cfg80211_set_p2p_info(struct wl_priv *wl, int val);
+s32 dhd_cfg80211_clean_p2p_info(struct wl_priv *wl);
s32 dhd_config_dongle(struct wl_priv *wl, bool need_lock);
int wl_cfg80211_btcoex_init(struct wl_priv *wl);
diff --git a/drivers/net/wireless/bcmdhd/dhd_common.c b/drivers/net/wireless/bcmdhd/dhd_common.c
index 1a8d3e08cf5e..73eeb4bdf3ff 100644
--- a/drivers/net/wireless/bcmdhd/dhd_common.c
+++ b/drivers/net/wireless/bcmdhd/dhd_common.c
@@ -21,7 +21,7 @@
* 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: dhd_common.c 307573 2012-01-12 00:04:39Z $
+ * $Id: dhd_common.c 316272 2012-02-21 22:35:51Z $
*/
#include <typedefs.h>
#include <osl.h>
@@ -134,7 +134,7 @@ enum {
};
const bcm_iovar_t dhd_iovars[] = {
- {"version", IOV_VERSION, 0, IOVT_BUFFER, sizeof(dhd_version) },
+ {"version", IOV_VERSION, 0, IOVT_BUFFER, sizeof(dhd_version) },
#ifdef DHD_DEBUG
{"msglevel", IOV_MSGLEVEL, 0, IOVT_UINT32, 0 },
#endif /* DHD_DEBUG */
@@ -1819,10 +1819,21 @@ exit:
bool dhd_check_ap_wfd_mode_set(dhd_pub_t *dhd)
{
#ifdef WL_CFG80211
+#ifndef ENABLE_P2P_INTERFACE
+ /* To be back compatble with ICS MR1 release where p2p interface disable but wlan0 used for p2p */
if (((dhd->op_mode & HOSTAPD_MASK) == HOSTAPD_MASK) ||
((dhd->op_mode & WFD_MASK) == WFD_MASK))
return TRUE;
else
+#else
+ /* concurent mode with p2p interface for wfd and wlan0 for sta */
+ if (((dhd->op_mode & P2P_GO_ENABLED) == P2P_GO_ENABLED) ||
+ ((dhd->op_mode & P2P_GC_ENABLED) == P2P_GC_ENABLED)) {
+ DHD_ERROR(("%s P2P enabled for mode=%d\n", __FUNCTION__, dhd->op_mode));
+ return TRUE;
+ }
+ else
+#endif
#endif /* WL_CFG80211 */
return FALSE;
}
@@ -2064,6 +2075,7 @@ int dhd_keep_alive_onoff(dhd_pub_t *dhd)
return res;
}
#endif /* defined(KEEP_ALIVE) */
+
/* Android ComboSCAN support */
/*
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index 823c21a4753c..6c65e0163632 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -22,7 +22,7 @@
* 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: dhd_linux.c 314746 2012-02-14 03:45:02Z $
+ * $Id: dhd_linux.c 316856 2012-02-23 21:44:34Z $
*/
#include <typedefs.h>
@@ -2924,7 +2924,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
uint power_mode = PM_FAST;
uint32 dongle_align = DHD_SDALIGN;
uint32 glom = 0;
- uint bcn_timeout = 4;
+ uint bcn_timeout = 10;
uint retry_max = 3;
#if defined(ARP_OFFLOAD_SUPPORT)
int arpoe = 1;
diff --git a/drivers/net/wireless/bcmdhd/dhd_sdio.c b/drivers/net/wireless/bcmdhd/dhd_sdio.c
index c206ab05fdbd..3bef13ea1088 100644
--- a/drivers/net/wireless/bcmdhd/dhd_sdio.c
+++ b/drivers/net/wireless/bcmdhd/dhd_sdio.c
@@ -21,7 +21,7 @@
* 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: dhd_sdio.c 314732 2012-02-14 03:22:42Z $
+ * $Id: dhd_sdio.c 315747 2012-02-18 00:16:06Z $
*/
#include <typedefs.h>
@@ -801,7 +801,8 @@ dhdsdio_clkctl(dhd_bus_t *bus, uint target, bool pendok)
#ifdef DHD_DEBUG
if (dhd_console_ms == 0)
#endif /* DHD_DEBUG */
- dhd_os_wd_timer(bus->dhd, 0);
+ if (bus->poll == 0)
+ dhd_os_wd_timer(bus->dhd, 0);
break;
}
#ifdef DHD_DEBUG
diff --git a/drivers/net/wireless/bcmdhd/include/epivers.h b/drivers/net/wireless/bcmdhd/include/epivers.h
index 0e720456f582..ff386de6737b 100644
--- a/drivers/net/wireless/bcmdhd/include/epivers.h
+++ b/drivers/net/wireless/bcmdhd/include/epivers.h
@@ -33,17 +33,17 @@
#define EPI_RC_NUMBER 195
-#define EPI_INCREMENTAL_NUMBER 28
+#define EPI_INCREMENTAL_NUMBER 30
#define EPI_BUILD_NUMBER 0
-#define EPI_VERSION 5, 90, 195, 28
+#define EPI_VERSION 5, 90, 195, 30
-#define EPI_VERSION_NUM 0x055ac31c
+#define EPI_VERSION_NUM 0x055ac31e
#define EPI_VERSION_DEV 5.90.195
-#define EPI_VERSION_STR "5.90.195.28"
+#define EPI_VERSION_STR "5.90.195.30"
#endif
diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c
index 4373c852fa02..0b0baf001c92 100644
--- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c
+++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c
@@ -76,11 +76,6 @@ u32 wl_dbg_level = WL_DBG_ERR;
#define COEX_DHCP
-/* Set this to 1 to use a seperate interface (p2p0)
- * for p2p operations.
- */
-#define ENABLE_P2P_INTERFACE 1
-
/* This is to override regulatory domains defined in cfg80211 module (reg.c)
* By default world regulatory domain defined in reg.c puts the flags NL80211_RRF_PASSIVE_SCAN
* and NL80211_RRF_NO_IBSS for 5GHz channels (for 36..48 and 149..165).
@@ -516,7 +511,7 @@ static struct ieee80211_supported_band __wl_band_2ghz = {
.n_channels = ARRAY_SIZE(__wl_2ghz_channels),
.bitrates = wl_g_rates,
.n_bitrates = wl_g_rates_size,
-#if ENABLE_P2P_INTERFACE
+#if defined(ENABLE_P2P_INTERFACE)
/* wpa_supplicant sets wmm_enabled based on whether ht_cap
* is present or not. The wmm_enabled is inturn used to
* set the replay counters in the RSN IE. Without this
@@ -539,7 +534,7 @@ static struct ieee80211_supported_band __wl_band_5ghz_a = {
.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
.bitrates = wl_a_rates,
.n_bitrates = wl_a_rates_size,
-#if ENABLE_P2P_INTERFACE
+#if defined(ENABLE_P2P_INTERFACE)
/* wpa_supplicant sets wmm_enabled based on whether ht_cap
* is present or not. The wmm_enabled is inturn used to
* set the replay counters in the RSN IE. Without this
@@ -768,6 +763,7 @@ wl_cfg80211_add_virtual_iface(struct wiphy *wiphy, char *name,
s32 timeout = -1;
s32 wlif_type = -1;
s32 mode = 0;
+ s32 dhd_mode = 0;
chanspec_t chspec;
struct wl_priv *wl = wiphy_priv(wiphy);
struct net_device *_ndev;
@@ -898,8 +894,13 @@ wl_cfg80211_add_virtual_iface(struct wiphy *wiphy, char *name,
}
if (net_attach && !net_attach(wl->pub, _ndev->ifindex)) {
wl_alloc_netinfo(wl, _ndev, vwdev, mode);
- WL_DBG((" virtual interface(%s) is "
+ WL_ERR((" virtual interface(%s) is "
"created net attach done\n", wl->p2p->vir_ifname));
+ if (type == NL80211_IFTYPE_P2P_CLIENT)
+ dhd_mode = P2P_GC_ENABLED;
+ else if (type == NL80211_IFTYPE_P2P_GO)
+ dhd_mode = P2P_GO_ENABLED;
+ DNGL_FUNC(dhd_cfg80211_set_p2p_info, (wl, dhd_mode));
} else {
/* put back the rtnl_lock again */
if (rollback_lock)
@@ -967,6 +968,7 @@ wl_cfg80211_del_virtual_iface(struct wiphy *wiphy, struct net_device *dev)
msecs_to_jiffies(MAX_WAIT_TIME));
if (timeout > 0 && !wl_get_p2p_status(wl, IF_DELETING)) {
WL_DBG(("IFDEL operation done\n"));
+ DNGL_FUNC(dhd_cfg80211_clean_p2p_info, (wl));
} else {
WL_ERR(("IFDEL didn't complete properly\n"));
}
@@ -3186,62 +3188,6 @@ wl_cfg80211_scan_alloc_params(int channel, int nprobes, int *out_params_size)
return params;
}
-s32
-wl_cfg80211_scan_abort(struct wl_priv *wl, struct net_device *ndev)
-{
- wl_scan_params_t *params = NULL;
- s32 params_size = 0;
- s32 err = BCME_OK;
- unsigned long flags;
- struct net_device *dev;
-
- WL_DBG(("Enter\n"));
- if (wl->scan_request) {
- if (wl->scan_request->dev == wl->p2p_net)
- dev = wl_to_prmry_ndev(wl);
- else
- dev = wl->scan_request->dev;
- }
- else {
- WL_ERR(("wl->scan_request is NULL did we already do scan_abort?"
- "Now scan_abort for ndev %p primary %p p2p_net %p",
- ndev, wl_to_prmry_ndev(wl), wl->p2p_net));
- dev = ndev;
- }
-
- /* Our scan params only need space for 1 channel and 0 ssids */
- params = wl_cfg80211_scan_alloc_params(-1, 0, &params_size);
- if (params == NULL) {
- WL_ERR(("scan params allocation failed \n"));
- err = -ENOMEM;
- } else {
- /* Do a scan abort to stop the driver's scan engine */
- err = wldev_ioctl(dev, WLC_SCAN, params, params_size, true);
- if (err < 0) {
- WL_ERR(("scan abort failed \n"));
- }
- }
- del_timer_sync(&wl->scan_timeout);
- spin_lock_irqsave(&wl->cfgdrv_lock, flags);
-
-#ifdef WL_SCHED_SCAN
- if (wl->sched_scan_req && !wl->scan_request) {
- cfg80211_sched_scan_stopped(wl_to_wiphy(wl));
- wl->sched_scan_req = NULL;
- }
-#endif /* WL_SCHED_SCAN */
-
- if (wl->scan_request) {
- cfg80211_scan_done(wl->scan_request, true);
- wl->scan_request = NULL;
- }
- wl_clr_drv_status(wl, SCANNING, dev);
- spin_unlock_irqrestore(&wl->cfgdrv_lock, flags);
- if (params)
- kfree(params);
- return err;
-}
-
static s32
wl_cfg80211_remain_on_channel(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_channel * channel,
@@ -4354,7 +4300,7 @@ int wl_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev)
WL_ERR(("PNO reset failed"));
if (wl->scan_request && wl->sched_scan_running) {
- wl_cfg80211_scan_abort(wl, dev);
+ wl_notify_escan_complete(wl, dev, true, true);
}
wl->sched_scan_req = NULL;
@@ -4586,7 +4532,7 @@ static s32 wl_inform_single_bss(struct wl_priv *wl, struct wl_bss_info *bi)
signal = notif_bss_info->rssi * 100;
-#if defined(WLP2P) && ENABLE_P2P_INTERFACE
+#if defined(WLP2P) && defined(ENABLE_P2P_INTERFACE)
if (wl->p2p_net && wl->scan_request &&
wl->scan_request->dev == wl->p2p_net) {
#else
@@ -5409,10 +5355,8 @@ wl_notify_sched_scan_results(struct wl_priv *wl, struct net_device *ndev,
if (e->event_type == WLC_E_PFN_NET_LOST) {
WL_DBG(("PFN NET LOST event. Do Nothing \n"));
return 0;
- } else {
- WL_DBG(("PFN NET FOUND event. count:%d \n", pfn_result->count));
-
-
+ }
+ WL_DBG(("PFN NET FOUND event. count:%d \n", pfn_result->count));
if (pfn_result->count > 0) {
int i;
@@ -5422,15 +5366,14 @@ wl_notify_sched_scan_results(struct wl_priv *wl, struct net_device *ndev,
pnetinfo = (wl_pfn_net_info_t *)(data + sizeof(wl_pfn_scanresults_t)
- sizeof(wl_pfn_net_info_t));
-
- channel = (struct ieee80211_channel *)kzalloc(
+ channel = (struct ieee80211_channel *)kzalloc(
(sizeof(struct ieee80211_channel) * MAX_PFN_LIST_COUNT),
GFP_KERNEL);
- if (!channel) {
- WL_ERR(("No memory"));
- err = -ENOMEM;
- goto out_err;
- }
+ if (!channel) {
+ WL_ERR(("No memory"));
+ err = -ENOMEM;
+ goto out_err;
+ }
for (i = 0; i < pfn_result->count; i++) {
netinfo = &pnetinfo[i];
@@ -5439,9 +5382,8 @@ wl_notify_sched_scan_results(struct wl_priv *wl, struct net_device *ndev,
err = -EINVAL;
goto out_err;
}
-
WL_DBG(("SSID:%s Channel:%d \n",
- netinfo->pfnsubnet.SSID, netinfo->pfnsubnet.channel));
+ netinfo->pfnsubnet.SSID, netinfo->pfnsubnet.channel));
/* PFN result doesn't have all the info which are required by the supplicant
* (For e.g IEs) Do a target Escan so that sched scan results are reported
* via wl_inform_single_bss in the required format. Escan does require the
@@ -5455,7 +5397,7 @@ wl_notify_sched_scan_results(struct wl_priv *wl, struct net_device *ndev,
channel_req = netinfo->pfnsubnet.channel;
band = (channel_req <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ
- : NL80211_BAND_2GHZ;
+ : NL80211_BAND_5GHZ;
channel[i].center_freq = ieee80211_channel_to_frequency(channel_req, band);
channel[i].band = band;
channel[i].flags |= IEEE80211_CHAN_NO_HT40;
@@ -5469,7 +5411,7 @@ wl_notify_sched_scan_results(struct wl_priv *wl, struct net_device *ndev,
if (wl_get_drv_status_all(wl, SCANNING)) {
/* Abort any on-going scan */
- wl_cfg80211_scan_abort(wl, ndev);
+ wl_notify_escan_complete(wl, ndev, true, true);
}
if (wl_get_p2p_status(wl, DISCOVERY_ON)) {
@@ -5490,15 +5432,11 @@ wl_notify_sched_scan_results(struct wl_priv *wl, struct net_device *ndev,
wl_clr_drv_status(wl, SCANNING, ndev);
goto out_err;
}
- } else {
- WL_ERR(("FALSE PNO Event. (pfn_count == 0) \n"));
- }
wl->sched_scan_running = TRUE;
}
-
- kfree(channel);
- return 0;
-
+ else {
+ WL_ERR(("FALSE PNO Event. (pfn_count == 0) \n"));
+ }
out_err:
if (channel)
kfree(channel);
@@ -5932,7 +5870,6 @@ static s32 wl_notify_escan_complete(struct wl_priv *wl,
WL_DBG(("Enter \n"));
-
if (wl->scan_request) {
if (wl->scan_request->dev == wl->p2p_net)
dev = wl_to_prmry_ndev(wl);
@@ -5965,10 +5902,12 @@ static s32 wl_notify_escan_complete(struct wl_priv *wl,
#ifdef WL_SCHED_SCAN
if (wl->sched_scan_req && wl->sched_scan_running && !wl->scan_request) {
WL_DBG((" REPORTING SCHED SCAN RESULTS \n"));
- cfg80211_sched_scan_results(wl->sched_scan_req->wiphy);
+ if (aborted)
+ cfg80211_sched_scan_stopped(wl->sched_scan_req->wiphy);
+ else
+ cfg80211_sched_scan_results(wl->sched_scan_req->wiphy);
wl->sched_scan_running = FALSE;
wl->sched_scan_req = NULL;
- wl->scan_request = NULL;
}
#endif /* WL_SCHED_SCAN */
@@ -6235,7 +6174,7 @@ static void wl_deinit_priv(struct wl_priv *wl)
unregister_netdevice_notifier(&wl_cfg80211_netdev_notifier);
}
-#if defined(WLP2P) && ENABLE_P2P_INTERFACE
+#if defined(WLP2P) && defined(ENABLE_P2P_INTERFACE)
static s32 wl_cfg80211_attach_p2p(void)
{
struct wl_priv *wl = wlcfg_drv_priv;
@@ -6285,7 +6224,7 @@ s32 wl_cfg80211_attach_post(struct net_device *ndev)
if (wl && !wl_get_drv_status(wl, READY, ndev)) {
if (wl->wdev &&
wl_cfgp2p_supported(wl, ndev)) {
-#if !ENABLE_P2P_INTERFACE
+#if !defined(ENABLE_P2P_INTERFACE)
wl->wdev->wiphy->interface_modes |=
(BIT(NL80211_IFTYPE_P2P_CLIENT)|
BIT(NL80211_IFTYPE_P2P_GO));
@@ -6293,7 +6232,7 @@ s32 wl_cfg80211_attach_post(struct net_device *ndev)
if ((err = wl_cfgp2p_init_priv(wl)) != 0)
goto fail;
-#if defined(WLP2P) && ENABLE_P2P_INTERFACE
+#if defined(WLP2P) && defined(ENABLE_P2P_INTERFACE)
if (wl->p2p_net) {
/* Update MAC addr for p2p0 interface here. */
memcpy(wl->p2p_net->dev_addr, ndev->dev_addr, ETH_ALEN);
@@ -6377,7 +6316,7 @@ s32 wl_cfg80211_attach(struct net_device *ndev, void *data)
wlcfg_drv_priv = wl;
-#if defined(WLP2P) && ENABLE_P2P_INTERFACE
+#if defined(WLP2P) && defined(ENABLE_P2P_INTERFACE)
err = wl_cfg80211_attach_p2p();
if (err)
goto cfg80211_attach_out;
@@ -6403,7 +6342,7 @@ void wl_cfg80211_detach(void *para)
wl_cfg80211_btcoex_deinit(wl);
#endif
-#if defined(WLP2P) && ENABLE_P2P_INTERFACE
+#if defined(WLP2P) && defined(ENABLE_P2P_INTERFACE)
wl_cfg80211_detach_p2p();
#endif
wl_setup_rfkill(wl, FALSE);
diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.h b/drivers/net/wireless/bcmdhd/wl_cfg80211.h
index 435d61833f1a..41e7c678e41b 100644
--- a/drivers/net/wireless/bcmdhd/wl_cfg80211.h
+++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.h
@@ -658,9 +658,5 @@ extern int wl_cfg80211_hang(struct net_device *dev, u16 reason);
extern s32 wl_mode_to_nl80211_iftype(s32 mode);
int wl_cfg80211_do_driver_init(struct net_device *net);
void wl_cfg80211_enable_trace(int level);
-
-/* do scan abort */
-extern s32 wl_cfg80211_scan_abort(struct wl_priv *wl, struct net_device *ndev);
-
extern s32 wl_cfg80211_if_is_group_owner(void);
#endif /* _wl_cfg80211_h_ */