#if !defined(SDIO_DEVICE_ID_BROADCOM_4334)
#define SDIO_DEVICE_ID_BROADCOM_4334 0x4334
#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_4334) */
+#if !defined(SDIO_DEVICE_ID_BROADCOM_4324)
+#define SDIO_DEVICE_ID_BROADCOM_4324 0x4324
+#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_4324) */
#if !defined(SDIO_DEVICE_ID_BROADCOM_43239)
#define SDIO_DEVICE_ID_BROADCOM_43239 43239
#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_43239) */
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4319) },
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4330) },
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4334) },
+ { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4324) },
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_43239) },
{ SDIO_DEVICE_CLASS(SDIO_CLASS_NONE) },
{ /* end: all zeroes */ },
* 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 323282 2012-03-23 19:41:57Z $
+ * $Id: dhd.h 325862 2012-04-04 22:59:48Z $
*/
#define P2P_GC_ENABLED 0x0020
#define CONCURENT_MASK 0x00F0
+#define MANUFACTRING_FW "WLTEST"
+
/* max sequential rxcntl timeouts to set HANG event */
#define MAX_CNTL_TIMEOUT 2
DHD_IF_DELETING
} dhd_if_state_t;
-
#if defined(CONFIG_DHD_USE_STATIC_BUF)
uint8* dhd_os_prealloc(void *osh, int section, uint size);
#define DHD_OS_WAKE_LOCK_TIMEOUT(pub) dhd_os_wake_lock_timeout(pub)
#define DHD_OS_WAKE_LOCK_RX_TIMEOUT_ENABLE(pub, val) dhd_os_wake_lock_rx_timeout_enable(pub, val)
#define DHD_OS_WAKE_LOCK_CTRL_TIMEOUT_ENABLE(pub, val) dhd_os_wake_lock_ctrl_timeout_enable(pub, val)
-
#define DHD_PACKET_TIMEOUT_MS 1000
#define DHD_EVENT_TIMEOUT_MS 1500
* 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_cdc.c 303389 2011-12-16 09:30:48Z $
+ * $Id: dhd_cdc.c 324280 2012-03-28 19:01:17Z $
*
* BDC is like CDC, except it includes a header for data packets to convey
* packet priority over the bus, and flags (e.g. to indicate checksum status
* 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 319136 2012-03-07 03:10:36Z $
+ * $Id: dhd_linux.c 325862 2012-04-04 22:59:48Z $
*/
#include <typedefs.h>
#if defined(OOB_INTR_ONLY)
extern void dhd_enable_oob_intr(struct dhd_bus *bus, bool enable);
#endif /* defined(OOB_INTR_ONLY) */
-
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
static void dhd_hang_process(struct work_struct *work);
-
+#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0))
MODULE_LICENSE("GPL v2");
#endif /* LinuxVer */
bool dhd_tasklet_create;
#endif /* DHDTHREAD */
tsk_ctl_t thr_sysioc_ctl;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
struct work_struct work_hang;
+#endif
/* Wakelocks */
#if defined(CONFIG_HAS_WAKELOCK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
dhd->thr_sysioc_ctl.thr_pid = -1;
}
dhd_state |= DHD_ATTACH_STATE_THREADS_CREATED;
-
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
INIT_WORK(&dhd->work_hang, dhd_hang_process);
-
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) */
/*
* Save the dhd_info into the priv
*/
}
#endif /* SET_RANDOM_MAC_SOFTAP */
- DHD_ERROR(("Firmware = %s\n", fw_path));
+ DHD_TRACE(("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)
#if !defined(AP) && defined(WL_CFG80211)
/* Check if firmware with HostAPD support used */
if ((!op_mode && strstr(fw_path, "_apsta") != NULL) || (op_mode == HOSTAPD_MASK)) {
+ /* Disable A-band for HostAPD */
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));
}
+ /* Turn off wme if we are having only g ONLY firmware */
bcm_mkiovar("nmode", 0, 0, buf, sizeof(buf));
if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_GET_VAR, buf, sizeof(buf),
FALSE, 0)) < 0) {
bcm_mkiovar("bus:txglomalign", (char *)&dongle_align, 4, iovbuf, sizeof(iovbuf));
dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0);
- /* disable glom option per default */
+ /* disable glom option for some chips */
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));
bcmstrtok(&ptr, "\n", 0);
/* Print fw version info */
DHD_ERROR(("Firmware version = %s\n", buf));
+
DHD_BLOG(buf, strlen(buf) + 1);
DHD_BLOG(dhd_version, strlen(dhd_version) + 1);
+
+ /* Check and adjust IOCTL response timeout for Manufactring firmware */
+ if (strstr(buf, MANUFACTRING_FW) != NULL) {
+ dhd_os_set_ioctl_resp_timeout(IOCTL_RESP_TIMEOUT * 10);
+ DHD_ERROR(("%s : adjust IOCTL response time for Manufactring Firmware\n", __FUNCTION__));
+ }
}
done:
}
#endif /* defined(CONFIG_HAS_EARLYSUSPEND) */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
cancel_work_sync(&dhd->work_hang);
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) */
#if defined(WL_WIRELESS_EXT)
if (dhd->dhd_state & DHD_ATTACH_STATE_WL_ATTACH) {
#endif /* PNO_SUPPORT */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
static void dhd_hang_process(struct work_struct *work)
{
dhd_info_t *dhd;
}
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
int net_os_send_hang_message(struct net_device *dev)
{
dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev);
* 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 324417 2012-03-29 03:15:15Z $
+ * $Id: dhd_sdio.c 325395 2012-04-03 03:57:43Z $
*/
#include <typedefs.h>
uint oldstate = bus->clkstate;
#endif /* DHD_DEBUG */
- DHD_TRACE(("%s: Enter bus->clkstate %u target %u\n", __FUNCTION__,
- bus->clkstate, target));
+ DHD_TRACE(("%s: Enter\n", __FUNCTION__));
/* Early exit if we're already there */
if (bus->clkstate == target) {
dhd_os_sdunlock(bus->dhd);
#endif /* DHD_DEBUG */
} else if (pending == TRUE) {
- DHD_CTL(("%s: canceled\n", __FUNCTION__));
- return -ERESTARTSYS;
+ /* possibly fw hangs so never responsed back */
+ DHD_ERROR(("%s: pending or timeout \n", __FUNCTION__));
+ return -ETIMEDOUT;
} else {
DHD_CTL(("%s: resumed for unknown reason?\n", __FUNCTION__));
#ifdef DHD_DEBUG
bcmsdh_intr_enable(sdh);
}
+#if defined(OOB_INTR_ONLY) && !defined(HW_OOB)
+ /* In case of SW-OOB(using edge trigger),
+ * Check interrupt status in the dongle again after enable irq on the host.
+ * and rechedule dpc if interrupt is pended in the dongle.
+ * There is a chance to miss OOB interrupt while irq is disabled on the host.
+ * No need to do this with HW-OOB(level trigger)
+ */
+ R_SDREG(newstatus, ®s->intstatus, retries);
+ if (bcmsdh_regfail(bus->sdh))
+ newstatus = 0;
+ if (newstatus & bus->hostintmask) {
+ bus->ipend = TRUE;
+ resched = TRUE;
+ }
+#endif /* defined(OOB_INTR_ONLY) && !defined(HW_OOB) */
+
if (TXCTLOK(bus) && bus->ctrl_frame_stat && (bus->clkstate == CLK_AVAIL)) {
int ret, i;
uint8* frame_seq = bus->ctrl_frame_buf + SDPCM_FRAMETAG_LEN;
if (((bus->sih->chip == BCM4329_CHIP_ID) || /* limit to 4329 & 4330 for now */
(bus->sih->chip == BCM4330_CHIP_ID)) && (*frame_seq != bus->tx_seq)) {
- DHD_ERROR(("%s IOCTL frame seq lag detected!"
+ DHD_INFO(("%s IOCTL frame seq lag detected!"
" frm_seq:%d != bus->tx_seq:%d, corrected\n",
__FUNCTION__, *frame_seq, bus->tx_seq));
*frame_seq = bus->tx_seq;
uint
dhd_bus_chip(struct dhd_bus *bus)
{
+ ASSERT(bus);
ASSERT(bus->sih != NULL);
return bus->sih->chip;
}
void *
dhd_bus_pub(struct dhd_bus *bus)
{
+ ASSERT(bus);
return bus->dhd;
}
bus->dhd->dongle_reset = TRUE;
bus->dhd->up = FALSE;
dhd_os_sdunlock(dhdp);
-
DHD_TRACE(("%s: WLAN OFF DONE\n", __FUNCTION__));
/* App can now remove power from device */
} else
#define BCM_DNGL_BL_PID_43239 0xbd1b
#define BCM_DNGL_BDC_PID 0x0bdc
#define BCM_DNGL_JTAG_PID 0x4a44
+#define BCM_DNGL_BL_PID_4324 0xbd1c
#define BCM_HWUSB_PID_43239 43239
* 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: bcmsdstd.h 281604 2011-09-02 18:58:49Z $
+ * $Id: bcmsdstd.h 324819 2012-03-30 12:15:19Z $
*/
#ifndef _BCM_SD_STD_H
#define _BCM_SD_STD_H
#define DATA_TRANSFER_IDLE 0
#define DATA_TRANSFER_ONGOING 1
+#define CHECK_TUNING_PRE_DATA 1
+#define CHECK_TUNING_POST_DATA 2
+
/************************************************************
* Internal interfaces: per-port references into bcmsdstd.c
extern void sdstd_3_enable_retuning_int(sdioh_info_t *sd);
extern void sdstd_3_disable_retuning_int(sdioh_info_t *sd);
extern bool sdstd_3_is_retuning_int_set(sdioh_info_t *sd);
+extern void sdstd_3_check_and_do_tuning(sdioh_info_t *sd, int tuning_param);
extern bool sdstd_3_check_and_set_retuning(sdioh_info_t *sd);
extern int sdstd_3_get_tune_state(sdioh_info_t *sd);
extern int sdstd_3_get_data_state(sdioh_info_t *sd);
extern void sdstd_3_set_tune_state(sdioh_info_t *sd, int state);
+extern void sdstd_3_set_data_state(sdioh_info_t *sd, int state);
extern uint8 sdstd_3_get_tuning_exp(sdioh_info_t *sd);
extern uint32 sdstd_3_get_uhsi_clkmode(sdioh_info_t *sd);
extern int sdstd_3_clk_tuning(sdioh_info_t *sd, uint32 sd3ClkMode);
* 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: dhdioctl.h 307573 2012-01-12 00:04:39Z $
+ * $Id: dhdioctl.h 323572 2012-03-26 06:28:14Z $
*/
#ifndef _dhdioctl_h_
#define DHD_BTA_VAL 0x1000
#define DHD_ISCAN_VAL 0x2000
#define DHD_ARPOE_VAL 0x4000
-#define DHD_WL_VAL 0x8000
+#define DHD_REORDER_VAL 0x8000
+#define DHD_WL_VAL 0x10000
#ifdef SDTEST
/* For pktgen iovar */
#define EPI_RC_NUMBER 195
-#define EPI_INCREMENTAL_NUMBER 46
+#define EPI_INCREMENTAL_NUMBER 53
#define EPI_BUILD_NUMBER 0
-#define EPI_VERSION 5, 90, 195, 46
+#define EPI_VERSION 5, 90, 195, 53
-#define EPI_VERSION_NUM 0x055ac32e
+#define EPI_VERSION_NUM 0x055ac335
#define EPI_VERSION_DEV 5.90.195
-#define EPI_VERSION_STR "5.90.195.46"
+#define EPI_VERSION_STR "5.90.195.53"
#endif
{
int ret = 0;
- dhd_msg_level = DHD_ERROR_VAL;
+ dhd_msg_level |= DHD_ERROR_VAL;
#ifdef ENABLE_INSMOD_NO_FW_LOAD
dhd_download_fw_on_driverload = FALSE;
#endif /* ENABLE_INSMOD_NO_FW_LOAD */
}
}
-void *wl_android_prealloc(int section, unsigned long size)
+void* wl_android_prealloc(int section, unsigned long size)
{
void *alloc_ptr = NULL;
if (wifi_control_data && wifi_control_data->mem_prealloc) {
wifi_p2p_action_frame_t *p2p_act_frm = NULL;
wifi_p2psd_gas_pub_act_frame_t *sd_act_frm = NULL;
s8 eabuf[ETHER_ADDR_STR_LEN];
+ int retry_cnt = 0;
WL_DBG(("Enter \n"));
}
wl_cfgp2p_print_actframe(true, action_frame->data, action_frame->len);
- /*
- * To make sure to send successfully action frame, we have to turn off mpc
- */
+ /*
+ * To make sure to send successfully action frame, we have to turn off mpc
+ */
if (act_frm && ((act_frm->subtype == P2P_PAF_GON_REQ) ||
(act_frm->subtype == P2P_PAF_GON_RSP) ||
(act_frm->subtype == P2P_PAF_PROVDIS_REQ))) {
wldev_iovar_setint(dev, "mpc", 0);
}
+ if (act_frm->subtype == P2P_PAF_GON_RSP)
+ retry_cnt = 1;
+ else retry_cnt = WL_ACT_FRAME_RETRY;
if (act_frm && act_frm->subtype == P2P_PAF_DEVDIS_REQ) {
af_params->dwell_time = WL_LONG_DWELL_TIME;
} else {
ack = (wl_cfgp2p_tx_action_frame(wl, dev, af_params, bssidx)) ? false : true;
if (!ack) {
- if (wl_to_p2p_bss_saved_ie(wl, P2PAPI_BSSCFG_DEVICE).p2p_probe_req_ie_len) {
- /* if the NO ACK occurs, the peer device will be on
- * listen channel of the peer
- * So, we have to find the peer and send action frame on
- * that channel.
- */
- ack = wl_cfg80211_send_at_common_channel(wl, dev, af_params);
- } else {
- for (retry = 0; retry < WL_CHANNEL_SYNC_RETRY; retry++) {
+ for (retry = 1; retry < WL_CHANNEL_SYNC_RETRY; retry++) {
ack = (wl_cfgp2p_tx_action_frame(wl, dev,
af_params, bssidx)) ? false : true;
if (ack)
break;
}
-
- }
-
}
}
__FUNCTION__, channel));
wl->hostapd_chan = channel;
if (channel == 14)
- return err;
+ return err; /* hostapd requested ch auto-select, will be done later */
}
WL_DBG(("netdev_ifidx(%d), chan_type(%d) target channel(%d) \n",
request->n_ssids, pno_time, pno_repeat, pno_freq_expo_max));
#if defined(WL_ENABLE_P2P_IF)
+ /* While GO is operational, PNO is not supported */
if (dhd_cfg80211_get_opmode(wl) & P2P_GO_ENABLED) {
WL_DBG(("PNO not enabled! op_mode: P2P GO"));
return -1;
err = wldev_ioctl(wl_to_prmry_ndev(wl), WLC_GET_BANDLIST, bandlist,
sizeof(bandlist), false);
if (unlikely(err)) {
- WL_ERR(("error (%d)\n", err));
+ WL_ERR(("error read bandlist (%d)\n", err));
return err;
}
wiphy = wl_to_wiphy(wl);
err = wldev_iovar_getint(wl_to_prmry_ndev(wl), "nmode", &nmode);
if (unlikely(err)) {
- WL_ERR(("error (%d)\n", err));
+ WL_ERR(("error reading nmode (%d)\n", err));
}
-
- err = wldev_iovar_getint(wl_to_prmry_ndev(wl), "mimo_bw_cap", &bw_40);
- if (unlikely(err)) {
- WL_ERR(("error (%d)\n", err));
+ else {
+ /* For nmodeonly check bw cap */
+ err = wldev_iovar_getint(wl_to_prmry_ndev(wl), "mimo_bw_cap", &bw_40);
+ if (unlikely(err)) {
+ WL_ERR(("error get mimo_bw_cap (%d)\n", err));
+ }
}
for (i = 1; i <= nband && i < sizeof(bandlist); i++) {
&__wl_band_2ghz;
index = IEEE80211_BAND_2GHZ;
}
-
+#if defined WL_ENABLE_P2P_IF
if ((index >= 0) && nmode) {
wiphy->bands[index]->ht_cap.cap =
IEEE80211_HT_CAP_DSSSCCK40
wiphy->bands[index]->ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K;
wiphy->bands[index]->ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_16;
}
+#endif
}
wiphy_apply_custom_regulatory(wiphy, &brcm_regdom);
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;
+ struct net_device *p2p_net = wl->p2p_net;
#endif
WL_DBG(("In\n"));
wiphy->interface_modes = (wiphy->interface_modes)
& (~(BIT(NL80211_IFTYPE_P2P_CLIENT)|
BIT(NL80211_IFTYPE_P2P_GO)));
-#endif
+ if ((p2p_net) && (p2p_net->flags & IFF_UP)) {
+ /* p2p0 interface is still UP. Bring it down */
+ p2p_net->flags &= ~IFF_UP;
+ }
+#endif /* WL_ENABLE_P2P_IF */
spin_unlock_irqrestore(&wl->cfgdrv_lock, flags);
DNGL_FUNC(dhd_cfg80211_down, (wl));
static void wl_delay(u32 ms)
{
- if (ms < 1000 / HZ) {
- cond_resched();
+ if (in_atomic() || ms < 1000 / HZ) {
mdelay(ms);
} else {
msleep(ms);
#define IFACE_MAX_CNT 2
#define WL_SCAN_TIMER_INTERVAL_MS 8000 /* Scan timeout */
-#define WL_CHANNEL_SYNC_RETRY 5
+#define WL_CHANNEL_SYNC_RETRY 1
+#define WL_ACT_FRAME_RETRY 5
+
#define WL_INVALID -1
/* driver status */
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);
-extern int net_os_send_hang_message(struct net_device *dev);
extern void get_customized_country_code(char *country_iso_code, wl_country_t *cspec);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)