diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2012-06-20 16:48:48 -0700 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-07-13 17:06:37 +0530 |
commit | 7468ce421c2ff16f0881202d87d60936a05acac9 (patch) | |
tree | b34819f7d46feaed61097b47b9a24b76efa61e9c /drivers/net/wireless/bcmdhd/dhd_common.c | |
parent | 938f8b62469d9f4a3de8a02833bb95dea813b525 (diff) |
net: wireless: bcmdhd: Update to version 1.28-4
Change-Id: I5d8dc11cbecc3fba462f9b03f1f1a61f12f236a7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net/wireless/bcmdhd/dhd_common.c')
-rw-r--r-- | drivers/net/wireless/bcmdhd/dhd_common.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_common.c b/drivers/net/wireless/bcmdhd/dhd_common.c index 9b5811ce29a1..bcc7ca66fbe6 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 327331 2012-04-13 01:42:33Z $ + * $Id: dhd_common.c 338571 2012-06-13 14:19:44Z $ */ #include <typedefs.h> #include <osl.h> @@ -93,6 +93,9 @@ extern int dhd_iscan_in_progress(void *h); void dhd_iscan_lock(void); void dhd_iscan_unlock(void); extern int dhd_change_mtu(dhd_pub_t *dhd, int new_mtu, int ifidx); +#if !defined(AP) && defined(WLP2P) +extern bool dhd_concurrent_fw(dhd_pub_t *dhd); +#endif bool ap_cfg_running = FALSE; bool ap_fw_loaded = FALSE; @@ -275,7 +278,7 @@ dhd_wl_ioctl(dhd_pub_t *dhd_pub, int ifindex, wl_ioctl_t *ioc, void *buf, int le dhd_os_proto_block(dhd_pub); ret = dhd_prot_ioctl(dhd_pub, ifindex, ioc, buf, len); - if (!ret) + if (ret) dhd_os_check_hang(dhd_pub, ifindex, ret); dhd_os_proto_unblock(dhd_pub); @@ -1043,7 +1046,8 @@ wl_host_event(dhd_pub_t *dhd_pub, int *ifidx, void *pktdata, DHD_ERROR(("%s: ifidx %d for %s action %d\n", __FUNCTION__, ifevent->ifidx, event->ifname, ifevent->action)); - if (ifevent->action == WLC_E_IF_ADD) + if (ifevent->action == WLC_E_IF_ADD || + ifevent->action == WLC_E_IF_CHANGE) wl_cfg80211_notify_ifchange(); return (BCME_OK); } @@ -1174,8 +1178,11 @@ dhd_print_buf(void *pbuf, int len, int bytes_per_line) #endif /* DHD_DEBUG */ } +#ifndef strtoul #define strtoul(nptr, endptr, base) bcm_strtoul((nptr), (endptr), (base)) +#endif +#ifdef PKT_FILTER_SUPPORT /* Convert user's input in hex pattern to byte-size mask */ static int wl_pattern_atoh(char *src, char *dst) @@ -1411,6 +1418,7 @@ fail: if (buf) MFREE(dhd->osh, buf, BUF_SIZE); } +#endif /* PKT_FILTER_SUPPORT */ /* ========================== */ /* ==== ARP OFFLOAD SUPPORT = */ @@ -1739,7 +1747,7 @@ fail: /* * returns = TRUE if associated, FALSE if not associated */ -bool dhd_is_associated(dhd_pub_t *dhd, void *bss_buf) +bool dhd_is_associated(dhd_pub_t *dhd, void *bss_buf, int *retval) { char bssid[6], zbuf[6]; int ret = -1; @@ -1754,6 +1762,9 @@ bool dhd_is_associated(dhd_pub_t *dhd, void *bss_buf) DHD_TRACE(("%s: not associated! res:%d\n", __FUNCTION__, ret)); } + if (retval) + *retval = ret; + if (ret < 0) return FALSE; @@ -1786,7 +1797,7 @@ dhd_get_dtim_skip(dhd_pub_t *dhd) bcn_li_dtim = dhd->dtim_skip; /* Check if associated */ - if (dhd_is_associated(dhd, NULL) == FALSE) { + if (dhd_is_associated(dhd, NULL, NULL) == FALSE) { DHD_TRACE(("%s NOT assoc ret %d\n", __FUNCTION__, ret)); goto exit; } @@ -1828,6 +1839,10 @@ exit: /* Check if HostAPD or WFD mode setup */ bool dhd_check_ap_wfd_mode_set(dhd_pub_t *dhd) { +#if !defined(AP) && defined(WLP2P) + if ((dhd->op_mode & CONCURRENT_FW_MASK) == CONCURRENT_FW_MASK) + return FALSE; +#endif #ifdef WL_CFG80211 #ifndef WL_ENABLE_P2P_IF /* To be back compatble with ICS MR1 release where p2p interface @@ -1898,7 +1913,7 @@ dhd_pno_enable(dhd_pub_t *dhd, int pfn_enabled) memset(iovbuf, 0, sizeof(iovbuf)); - if ((pfn_enabled) && (dhd_is_associated(dhd, NULL) == TRUE)) { + if ((pfn_enabled) && (dhd_is_associated(dhd, NULL, NULL) == TRUE)) { DHD_ERROR(("%s pno is NOT enable : called in assoc mode , ignore\n", __FUNCTION__)); return ret; } @@ -1935,8 +1950,9 @@ dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t* ssids_local, int nssid, ushort scan_fr, DHD_TRACE(("%s nssid=%d nchan=%d\n", __FUNCTION__, nssid, scan_fr)); - if ((!dhd) && (!ssids_local)) { - DHD_ERROR(("%s error exit\n", __FUNCTION__)); + if ((!dhd) || (!ssids_local)) { + DHD_ERROR(("%s error exit(%s %s)\n", __FUNCTION__, + (!dhd)?"dhd is null":"", (!ssids_local)?"ssid is null":"")); err = -1; return err; } |