summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2012-03-26 13:30:33 -0700
committerOm Prakash Singh <omp@nvidia.com>2012-06-15 14:15:15 +0530
commitf90696b185c2ecebe82c9a1a981aae9e466348c8 (patch)
tree1dc3affb2213d63087be256f19a770525f921329 /drivers/net/wireless
parent572d59e21a1da53e370af3547acdf09fb0ee3b11 (diff)
net: wireless: bcmdhd: Update to Version 5.90.195.46
- Fix WEXT compilation - Start SoftAP in G-band only - Fix IF_DEL timeout due to wrong status check - Fix P2P to pass certification - Enable arpoe in concurrent mode by default - Fail to start sched scan in P2P GO Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c9
-rw-r--r--drivers/net/wireless/bcmdhd/dhd.h8
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_cfg80211.c22
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_cfg80211.h1
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux.c50
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_sdio.c7
-rw-r--r--drivers/net/wireless/bcmdhd/include/epivers.h9
-rw-r--r--drivers/net/wireless/bcmdhd/wl_android.c8
-rw-r--r--drivers/net/wireless/bcmdhd/wl_cfg80211.c69
-rw-r--r--drivers/net/wireless/bcmdhd/wl_cfg80211.h2
-rw-r--r--drivers/net/wireless/bcmdhd/wl_iw.c2
-rw-r--r--drivers/net/wireless/bcmdhd/wl_iw.h2
12 files changed, 128 insertions, 61 deletions
diff --git a/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c b/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c
index b47c9423b635..e67eeca1f99c 100644
--- a/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c
+++ b/drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c
@@ -692,14 +692,9 @@ sdioh_enable_hw_oob_intr(sdioh_info_t *sd, bool enable)
uint8 data;
if (enable)
- data = SDIO_SEPINT_MASK | SDIO_SEPINT_OE; /* enable hw oob interrupt */
+ data = SDIO_SEPINT_MASK | SDIO_SEPINT_OE | SDIO_SEPINT_ACT_HI;
else
- data = SDIO_SEPINT_ACT_HI; /* disable hw oob interrupt */
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
- /* Needed for Android Linux Kernel 2.6.35 */
- data |= SDIO_SEPINT_ACT_HI; /* Active HIGH */
-#endif
+ data = SDIO_SEPINT_ACT_HI;
status = sdioh_request_byte(sd, SDIOH_WRITE, 0, SDIOD_CCCR_BRCM_SEPINT, &data);
return status;
diff --git a/drivers/net/wireless/bcmdhd/dhd.h b/drivers/net/wireless/bcmdhd/dhd.h
index 9f378c6cb1d0..ab3f574c2c80 100644
--- a/drivers/net/wireless/bcmdhd/dhd.h
+++ b/drivers/net/wireless/bcmdhd/dhd.h
@@ -24,12 +24,11 @@
* 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 316856 2012-02-23 21:44:34Z $
+ * $Id: dhd.h 323282 2012-03-23 19:41:57Z $
*/
-/****************
- * Common types *
- */
+
+
#ifndef _dhd_h_
#define _dhd_h_
@@ -511,6 +510,7 @@ extern int dhd_bus_start(dhd_pub_t *dhdp);
extern int dhd_bus_membytes(dhd_pub_t *dhdp, bool set, uint32 address, uint8 *data, uint size);
extern void dhd_print_buf(void *pbuf, int len, int bytes_per_line);
extern bool dhd_is_associated(dhd_pub_t *dhd, void *bss_buf);
+extern uint dhd_bus_chip_id(dhd_pub_t *dhdp);
#if defined(KEEP_ALIVE)
extern int dhd_keep_alive_onoff(dhd_pub_t *dhd);
diff --git a/drivers/net/wireless/bcmdhd/dhd_cfg80211.c b/drivers/net/wireless/bcmdhd/dhd_cfg80211.c
index 172f25fc578a..2503f51ec574 100644
--- a/drivers/net/wireless/bcmdhd/dhd_cfg80211.c
+++ b/drivers/net/wireless/bcmdhd/dhd_cfg80211.c
@@ -41,9 +41,7 @@ static int dhd_dongle_up = FALSE;
static s32 wl_dongle_up(struct net_device *ndev, u32 up);
-/**
- * Function implementations
- */
+
s32 dhd_cfg80211_init(struct wl_priv *wl)
{
@@ -57,6 +55,12 @@ s32 dhd_cfg80211_deinit(struct wl_priv *wl)
return 0;
}
+s32 dhd_cfg80211_get_opmode(struct wl_priv *wl)
+{
+ dhd_pub_t *dhd = (dhd_pub_t *)(wl->pub);
+ return dhd->op_mode;
+}
+
s32 dhd_cfg80211_down(struct wl_priv *wl)
{
dhd_dongle_up = FALSE;
@@ -68,6 +72,12 @@ 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));
+
+#ifdef ARP_OFFLOAD_SUPPORT
+ dhd_arp_offload_set(dhd, 0);
+ dhd_arp_offload_enable(dhd, false);
+#endif
+
return 0;
}
@@ -76,6 +86,12 @@ 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));
+
+#ifdef ARP_OFFLOAD_SUPPORT
+ dhd_arp_offload_set(dhd, dhd_arp_mode);
+ dhd_arp_offload_enable(dhd, true);
+#endif
+
return 0;
}
diff --git a/drivers/net/wireless/bcmdhd/dhd_cfg80211.h b/drivers/net/wireless/bcmdhd/dhd_cfg80211.h
index 6c033259a8d9..ced46dbdb96c 100644
--- a/drivers/net/wireless/bcmdhd/dhd_cfg80211.h
+++ b/drivers/net/wireless/bcmdhd/dhd_cfg80211.h
@@ -33,6 +33,7 @@
s32 dhd_cfg80211_init(struct wl_priv *wl);
s32 dhd_cfg80211_deinit(struct wl_priv *wl);
+s32 dhd_cfg80211_get_opmode(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);
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index 508f0a6e4483..8226ef203ff0 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -50,6 +50,7 @@
#include <epivers.h>
#include <bcmutils.h>
#include <bcmendian.h>
+#include <bcmdevs.h>
#include <proto/ethernet.h>
#include <dngl_stats.h>
@@ -1017,12 +1018,18 @@ dhd_op_if(dhd_if_t *ifp)
DHD_TRACE(("\n%s: got 'DHD_IF_DEL' state\n", __FUNCTION__));
#ifdef WL_CFG80211
if (dhd->dhd_state & DHD_ATTACH_STATE_CFG80211) {
- wl_cfg80211_notify_ifdel(ifp->net);
+ wl_cfg80211_ifdel_ops(ifp->net);
}
#endif
netif_stop_queue(ifp->net);
unregister_netdev(ifp->net);
- ret = DHD_DEL_IF; /* Make sure the free_netdev() is called */
+ ret = DHD_DEL_IF;
+
+#ifdef WL_CFG80211
+ if (dhd->dhd_state & DHD_ATTACH_STATE_CFG80211) {
+ wl_cfg80211_notify_ifdel();
+ }
+#endif
}
break;
case DHD_IF_DELETING:
@@ -2960,13 +2967,14 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
char buf[WLC_IOCTL_SMLEN];
char *ptr;
uint32 listen_interval = LISTEN_INTERVAL; /* Default Listen Interval in Beacons */
+ uint16 chipID;
#if defined(SOFTAP)
uint dtim = 1;
#endif
#if (defined(AP) && !defined(WLP2P)) || (!defined(AP) && defined(WL_CFG80211))
uint32 mpc = 0; /* Turn MPC off for AP/APSTA mode */
#endif
-#if defined(AP) || (defined(WLP2P) && defined(WL_ENABLE_P2P_IF))
+#if defined(AP) || defined(WLP2P)
uint32 apsta = 1; /* Enable APSTA mode */
#endif /* defined(AP) || defined(WLP2P) */
#ifdef GET_CUSTOM_MAC_ENABLE
@@ -2981,7 +2989,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
bcm_mkiovar("cur_etheraddr", (void *)&ea_addr, ETHER_ADDR_LEN, buf, sizeof(buf));
ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, buf, sizeof(buf), TRUE, 0);
if (ret < 0) {
- DHD_ERROR(("%s: can't set MAC address , error=%d\n", __FUNCTION__, ret));
+ DHD_ERROR(("%s: can't set custom MAC address , error=%d\n", __FUNCTION__, ret));
return BCME_NOTUP;
}
memcpy(dhd->mac.octet, ea_addr.octet, ETHER_ADDR_LEN);
@@ -3002,7 +3010,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
#endif /* GET_CUSTOM_MAC_ENABLE */
#ifdef SET_RANDOM_MAC_SOFTAP
- if ((!op_mode && strstr(fw_path, "_apsta") != NULL) || (op_mode == 0x02)) {
+ if ((!op_mode && strstr(fw_path, "_apsta") != NULL) || (op_mode == HOSTAPD_MASK)) {
uint rand_mac;
srandom32((uint)jiffies);
@@ -3023,20 +3031,20 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
}
#endif /* SET_RANDOM_MAC_SOFTAP */
- DHD_TRACE(("Firmware = %s\n", fw_path));
-#if !defined(AP) && defined(WLP2P) && defined(WL_ENABLE_P2P_IF)
+ DHD_ERROR(("Firmware = %s\n", fw_path));
+#if !defined(AP) && defined(WLP2P)
/* Check if firmware with WFD support used */
- if ((!op_mode && strstr(fw_path, "_p2p") != NULL) || (op_mode == 0x04) ||
- (dhd_concurrent_fw(dhd))) {
+ if ((!op_mode && strstr(fw_path, "_p2p") != NULL)
+#if defined(WL_ENABLE_P2P_IF)
+ || (op_mode == 0x04) ||(dhd_concurrent_fw(dhd))
+#endif
+ ) {
bcm_mkiovar("apsta", (char *)&apsta, 4, iovbuf, sizeof(iovbuf));
if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR,
iovbuf, sizeof(iovbuf), TRUE, 0)) < 0) {
DHD_ERROR(("%s APSTA for WFD failed ret= %d\n", __FUNCTION__, ret));
} else {
dhd->op_mode |= WFD_MASK;
-#if defined(ARP_OFFLOAD_SUPPORT)
- arpoe = 0;
-#endif /* (ARP_OFFLOAD_SUPPORT) */
dhd_pkt_filter_enable = FALSE;
}
}
@@ -3044,8 +3052,14 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
#if !defined(AP) && defined(WL_CFG80211)
/* Check if firmware with HostAPD support used */
- if ((!op_mode && strstr(fw_path, "_apsta") != NULL) || (op_mode == 0x02)) {
- /* Turn off wme if we are having only g ONLY firmware */
+ if ((!op_mode && strstr(fw_path, "_apsta") != NULL) || (op_mode == HOSTAPD_MASK)) {
+ uint band = WLC_BAND_2G;
+
+ if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_BAND, (char *)band, sizeof(band),
+ TRUE, 0)) < 0) {
+ DHD_ERROR(("%s:set band failed error (%d)\n", __FUNCTION__, ret));
+ }
+
bcm_mkiovar("nmode", 0, 0, buf, sizeof(buf));
if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_GET_VAR, buf, sizeof(buf),
FALSE, 0)) < 0) {
@@ -3114,8 +3128,12 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0);
/* disable glom option per default */
- bcm_mkiovar("bus:txglom", (char *)&glom, 4, iovbuf, sizeof(iovbuf));
- dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0);
+ chipID = (uint16)dhd_bus_chip_id(dhd);
+ if ((chipID == BCM4330_CHIP_ID) || (chipID == BCM4329_CHIP_ID)) {
+ DHD_INFO(("%s disable glom for chipID=0x%X\n", __FUNCTION__, chipID));
+ bcm_mkiovar("bus:txglom", (char *)&glom, 4, iovbuf, sizeof(iovbuf));
+ dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0);
+ }
/* Setup timeout if Beacons are lost and roam is off to report link down */
bcm_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf, sizeof(iovbuf));
diff --git a/drivers/net/wireless/bcmdhd/dhd_sdio.c b/drivers/net/wireless/bcmdhd/dhd_sdio.c
index 3bef13ea1088..a5f30518c5b2 100644
--- a/drivers/net/wireless/bcmdhd/dhd_sdio.c
+++ b/drivers/net/wireless/bcmdhd/dhd_sdio.c
@@ -6303,6 +6303,13 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
return bcmerror;
}
+uint dhd_bus_chip_id(dhd_pub_t *dhdp)
+{
+ dhd_bus_t *bus = dhdp->bus;
+
+ return bus->sih->chip;
+}
+
int
dhd_bus_membytes(dhd_pub_t *dhdp, bool set, uint32 address, uint8 *data, uint size)
{
diff --git a/drivers/net/wireless/bcmdhd/include/epivers.h b/drivers/net/wireless/bcmdhd/include/epivers.h
index ddb28aed0baf..9fd097ec8b98 100644
--- a/drivers/net/wireless/bcmdhd/include/epivers.h
+++ b/drivers/net/wireless/bcmdhd/include/epivers.h
@@ -23,7 +23,6 @@
*
*/
-
#ifndef _epivers_h_
#define _epivers_h_
@@ -33,17 +32,17 @@
#define EPI_RC_NUMBER 195
-#define EPI_INCREMENTAL_NUMBER 35
+#define EPI_INCREMENTAL_NUMBER 46
#define EPI_BUILD_NUMBER 0
-#define EPI_VERSION 5, 90, 195, 35
+#define EPI_VERSION 5, 90, 195, 46
-#define EPI_VERSION_NUM 0x055ac323
+#define EPI_VERSION_NUM 0x055ac32e
#define EPI_VERSION_DEV 5.90.195
-#define EPI_VERSION_STR "5.90.195.35"
+#define EPI_VERSION_STR "5.90.195.46"
#endif
diff --git a/drivers/net/wireless/bcmdhd/wl_android.c b/drivers/net/wireless/bcmdhd/wl_android.c
index 7b5dd8a0b87c..b98fe1d8f784 100644
--- a/drivers/net/wireless/bcmdhd/wl_android.c
+++ b/drivers/net/wireless/bcmdhd/wl_android.c
@@ -74,6 +74,9 @@
#define CMD_GETBAND "GETBAND"
#define CMD_COUNTRY "COUNTRY"
#define CMD_P2P_SET_NOA "P2P_SET_NOA"
+#if !defined WL_ENABLE_P2P_IF
+#define CMD_P2P_GET_NOA "P2P_GET_NOA"
+#endif
#define CMD_P2P_SET_PS "P2P_SET_PS"
#define CMD_SET_AP_WPS_P2P_IE "SET_AP_WPS_P2P_IE"
@@ -560,6 +563,11 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
bytes_written = wl_cfg80211_set_p2p_noa(net, command + skip,
priv_cmd.total_len - skip);
}
+#if !defined WL_ENABLE_P2P_IF
+ else if (strnicmp(command, CMD_P2P_GET_NOA, strlen(CMD_P2P_GET_NOA)) == 0) {
+ bytes_written = wl_cfg80211_get_p2p_noa(net, command, priv_cmd.total_len);
+ }
+#endif
else if (strnicmp(command, CMD_P2P_SET_PS, strlen(CMD_P2P_SET_PS)) == 0) {
int skip = strlen(CMD_P2P_SET_PS) + 1;
bytes_written = wl_cfg80211_set_p2p_ps(net, command + skip,
diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c
index de5fd674692e..ca4d243e9e31 100644
--- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c
+++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c
@@ -733,7 +733,9 @@ wl_cfg80211_add_virtual_iface(struct wiphy *wiphy, char *name,
s32 timeout = -1;
s32 wlif_type = -1;
s32 mode = 0;
+#if defined(WL_ENABLE_P2P_IF)
s32 dhd_mode = 0;
+#endif
chanspec_t chspec;
struct wl_priv *wl = wiphy_priv(wiphy);
struct net_device *_ndev;
@@ -866,14 +868,14 @@ wl_cfg80211_add_virtual_iface(struct wiphy *wiphy, char *name,
wl_alloc_netinfo(wl, _ndev, vwdev, mode);
WL_ERR((" virtual interface(%s) is "
"created net attach done\n", wl->p2p->vir_ifname));
+#if defined(WL_ENABLE_P2P_IF)
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));
- /* Start the P2P I/F with PM disabled. Enable PM from
- * the framework
- */
+#endif
+
if ((type == NL80211_IFTYPE_P2P_CLIENT) || (
type == NL80211_IFTYPE_P2P_GO))
vwdev->ps = NL80211_PS_DISABLED;
@@ -940,11 +942,13 @@ wl_cfg80211_del_virtual_iface(struct wiphy *wiphy, struct net_device *dev)
/* Wait for any pending scan req to get aborted from the sysioc context */
timeout = wait_event_interruptible_timeout(wl->netif_change_event,
- (wl_get_p2p_status(wl, IF_DELETING) == false),
+ (wl->p2p->vif_created == false),
msecs_to_jiffies(MAX_WAIT_TIME));
- if (timeout > 0 && !wl_get_p2p_status(wl, IF_DELETING)) {
+ if (timeout > 0 && (wl->p2p->vif_created == false)) {
WL_DBG(("IFDEL operation done\n"));
+#if defined(WL_ENABLE_P2P_IF)
DNGL_FUNC(dhd_cfg80211_clean_p2p_info, (wl));
+#endif
} else {
WL_ERR(("IFDEL didn't complete properly\n"));
}
@@ -1067,7 +1071,18 @@ wl_cfg80211_notify_ifadd(struct net_device *ndev, s32 idx, s32 bssidx,
}
s32
-wl_cfg80211_notify_ifdel(struct net_device *ndev)
+wl_cfg80211_notify_ifdel(void)
+{
+ struct wl_priv *wl = wlcfg_drv_priv;
+
+ WL_DBG(("Enter \n"));
+ wl_clr_p2p_status(wl, IF_DELETING);
+
+ return 0;
+}
+
+s32
+wl_cfg80211_ifdel_ops(struct net_device *ndev)
{
struct wl_priv *wl = wlcfg_drv_priv;
bool rollback_lock = false;
@@ -1103,7 +1118,6 @@ wl_cfg80211_notify_ifdel(struct net_device *ndev)
wl->p2p->vif_created = false;
wl_cfgp2p_clear_management_ie(wl,
index);
- wl_clr_p2p_status(wl, IF_DELETING);
WL_DBG(("index : %d\n", index));
}
@@ -3600,11 +3614,12 @@ wl_cfg80211_set_channel(struct wiphy *wiphy, struct net_device *dev,
}
channel = ieee80211_frequency_to_channel(chan->center_freq);
- if (wl_get_drv_status(wl, AP_CREATING, dev) && channel == 14) {
+ if (wl_get_drv_status(wl, AP_CREATING, dev)) {
WL_TRACE(("<0> %s: as!!! in AP creating mode, save chan num:%d\n",
__FUNCTION__, channel));
wl->hostapd_chan = channel;
- return err;
+ if (channel == 14)
+ return err;
}
WL_DBG(("netdev_ifidx(%d), chan_type(%d) target channel(%d) \n",
@@ -4235,10 +4250,12 @@ int wl_cfg80211_sched_scan_start(struct wiphy *wiphy,
WL_DBG(("ssids:%d pno_time:%d pno_repeat:%d pno_freq:%d \n",
request->n_ssids, pno_time, pno_repeat, pno_freq_expo_max));
- if (wl_get_drv_status_all(wl, SCANNING)) {
- WL_ERR(("Scanning already\n"));
- return -EAGAIN;
+#if defined(WL_ENABLE_P2P_IF)
+ if (dhd_cfg80211_get_opmode(wl) & P2P_GO_ENABLED) {
+ WL_DBG(("PNO not enabled! op_mode: P2P GO"));
+ return -1;
}
+#endif
if (!request || !request->n_ssids || !request->n_match_sets) {
WL_ERR(("Invalid sched scan req!! n_ssids:%d \n", request->n_ssids));
@@ -4535,9 +4552,11 @@ static s32 wl_inform_single_bss(struct wl_priv *wl, struct wl_bss_info *bi)
#if defined(WLP2P) && defined(WL_ENABLE_P2P_IF)
if (wl->p2p_net && wl->scan_request &&
- wl->scan_request->dev == wl->p2p_net) {
+ ((wl->scan_request->dev == wl->p2p_net) ||
+ (wl->scan_request->dev == wl_to_p2p_bss_ndev(wl, P2PAPI_BSSCFG_CONNECTION)))){
#else
- if (p2p_is_on(wl) && p2p_scan(wl)) {
+ if (p2p_is_on(wl) && ( p2p_scan(wl) ||
+ (wl->scan_request->dev == wl_to_p2p_bss_ndev(wl, P2PAPI_BSSCFG_CONNECTION)))) {
#endif
/* find the P2PIE, if we do not find it, we will discard this frame */
wifi_p2p_ie_t * p2p_ie;
@@ -5800,7 +5819,7 @@ static void wl_scan_timeout(unsigned long data)
if (wl->scan_request) {
WL_ERR(("timer expired\n"));
if (wl->escan_on)
- wl_notify_escan_complete(wl, wl->escan_info.ndev, true, true);
+ wl_notify_escan_complete(wl, wl->escan_info.ndev, false, true);
else
wl_notify_iscan_complete(wl_to_iscan(wl), true);
}
@@ -5926,7 +5945,7 @@ static s32 wl_notify_escan_complete(struct wl_priv *wl,
spin_lock_irqsave(&wl->cfgdrv_lock, flags);
#ifdef WL_SCHED_SCAN
- if (wl->sched_scan_req && wl->sched_scan_running && !wl->scan_request) {
+ if (wl->sched_scan_req && !wl->scan_request) {
WL_DBG((" REPORTING SCHED SCAN RESULTS \n"));
if (aborted)
cfg80211_sched_scan_stopped(wl->sched_scan_req->wiphy);
@@ -6689,16 +6708,12 @@ s32 wl_update_wiphybands(struct wl_priv *wl)
if ((index >= 0) && nmode) {
wiphy->bands[index]->ht_cap.cap =
- IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_DSSSCCK40
- | IEEE80211_HT_CAP_MAX_AMSDU;
+ IEEE80211_HT_CAP_DSSSCCK40
+ | IEEE80211_HT_CAP_MAX_AMSDU | IEEE80211_HT_CAP_RX_STBC;
wiphy->bands[index]->ht_cap.ht_supported = TRUE;
- wiphy->bands[index]->ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
+ wiphy->bands[index]->ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K;
wiphy->bands[index]->ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_16;
}
-
- if ((index >= 0) && bw_40) {
- wiphy->bands[index]->ht_cap.cap |= IEEE80211_HT_CAP_SGI_40;
- }
}
wiphy_apply_custom_regulatory(wiphy, &brcm_regdom);
@@ -6738,6 +6753,9 @@ static s32 __wl_cfg80211_down(struct wl_priv *wl)
unsigned long flags;
struct net_info *iter, *next;
struct net_device *ndev = wl_to_prmry_ndev(wl);
+#ifdef WL_ENABLE_P2P_IF
+ struct wiphy *wiphy = wl_to_prmry_ndev(wl)->ieee80211_ptr->wiphy;
+#endif
WL_DBG(("In\n"));
/* Check if cfg80211 interface is already down */
@@ -6764,6 +6782,11 @@ static s32 __wl_cfg80211_down(struct wl_priv *wl)
}
wl_to_prmry_ndev(wl)->ieee80211_ptr->iftype =
NL80211_IFTYPE_STATION;
+#ifdef WL_ENABLE_P2P_IF
+ wiphy->interface_modes = (wiphy->interface_modes)
+ & (~(BIT(NL80211_IFTYPE_P2P_CLIENT)|
+ BIT(NL80211_IFTYPE_P2P_GO)));
+#endif
spin_unlock_irqrestore(&wl->cfgdrv_lock, flags);
DNGL_FUNC(dhd_cfg80211_down, (wl));
diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.h b/drivers/net/wireless/bcmdhd/wl_cfg80211.h
index 515443bc3ec2..4cea796fa51f 100644
--- a/drivers/net/wireless/bcmdhd/wl_cfg80211.h
+++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.h
@@ -643,7 +643,7 @@ extern s32 wl_cfg80211_down(void *para);
extern s32 wl_cfg80211_notify_ifadd(struct net_device *ndev, s32 idx, s32 bssidx,
void* _net_attach);
extern s32 wl_cfg80211_ifdel_ops(struct net_device *net);
-extern s32 wl_cfg80211_notify_ifdel(struct net_device *ndev);
+extern s32 wl_cfg80211_notify_ifdel(void);
extern s32 wl_cfg80211_is_progress_ifadd(void);
extern s32 wl_cfg80211_is_progress_ifchange(void);
extern s32 wl_cfg80211_is_progress_ifadd(void);
diff --git a/drivers/net/wireless/bcmdhd/wl_iw.c b/drivers/net/wireless/bcmdhd/wl_iw.c
index 25db3cada652..1b304bd6d1d8 100644
--- a/drivers/net/wireless/bcmdhd/wl_iw.c
+++ b/drivers/net/wireless/bcmdhd/wl_iw.c
@@ -1705,7 +1705,7 @@ wl_iw_send_priv_event(
strcpy(extra, flag);
wrqu.data.length = strlen(extra);
wireless_send_event(dev, cmd, &wrqu, extra);
- net_os_wake_lock_timeout_enable(dev, DHD_EVENT_TIMEOUT_MS);
+ net_os_wake_lock_ctrl_timeout_enable(dev, DHD_EVENT_TIMEOUT_MS);
WL_TRACE(("Send IWEVCUSTOM Event as %s\n", extra));
return 0;
diff --git a/drivers/net/wireless/bcmdhd/wl_iw.h b/drivers/net/wireless/bcmdhd/wl_iw.h
index 273dcf12b89a..20fa24909f87 100644
--- a/drivers/net/wireless/bcmdhd/wl_iw.h
+++ b/drivers/net/wireless/bcmdhd/wl_iw.h
@@ -205,7 +205,7 @@ void wl_iw_detach(void);
extern int net_os_wake_lock(struct net_device *dev);
extern int net_os_wake_unlock(struct net_device *dev);
extern int net_os_wake_lock_timeout(struct net_device *dev);
-extern int net_os_wake_lock_timeout_enable(struct net_device *dev, int val);
+extern int net_os_wake_lock_ctrl_timeout_enable(struct net_device *dev, int val);
extern int net_os_set_suspend_disable(struct net_device *dev, int val);
extern int net_os_set_suspend(struct net_device *dev, int val, int force);
extern int net_os_set_dtim_skip(struct net_device *dev, int val);