Skip to content

Commit

Permalink
Merge "smdk4412: Update WiFi drivers from 1.61.47 --> 1.61.58" into a…
Browse files Browse the repository at this point in the history
…ndroid-4.4
  • Loading branch information
dmarszk authored and Gerrit Code Review committed Dec 24, 2013
2 parents 20a948b + 01a869c commit e0739aa
Show file tree
Hide file tree
Showing 15 changed files with 578 additions and 111 deletions.
12 changes: 10 additions & 2 deletions drivers/net/wireless/bcmdhd/Makefile
Expand Up @@ -18,7 +18,6 @@ DHDCFLAGS += -Wall -Wstrict-prototypes -Dlinux -DLINUX -DBCMDRIVER \

DHDCFLAGS += -DCUSTOMER_HW4
DHDCFLAGS += -DDEBUGFS_CFG80211
DHDCFLAGS += -DBLOCK_IPV6_PACKET -DPASS_IPV4_SUSPEND
DHDCFLAGS += -DSUPPORT_DEEP_SLEEP
DHDCFLAGS += -DSIMPLE_MAC_PRINT

Expand Down Expand Up @@ -62,6 +61,7 @@ DHDCFLAGS += -DWL_CFG80211
DHDCFLAGS += -DSUPPORT_AUTO_CHANNEL -DSUPPORT_HIDDEN_AP
DHDCFLAGS += -DSUPPORT_SOFTAP_SINGL_DISASSOC
DHDCFLAGS += -DUSE_STAMAC_4SOFTAP
DHDCFLAGS += -DDISABLE_11H_SOFTAP

# DPC priority
DHDCFLAGS += -DCUSTOM_DPC_PRIO_SETTING=49
Expand Down Expand Up @@ -113,14 +113,20 @@ ifneq ($(CONFIG_BCM4335),)
DHDCFLAGS += -DRXFRAME_THREAD
DHDCFLAGS += -DREPEAT_READFRAME
DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0
DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=40
DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64
DHDCFLAGS += -DWL11U
DHDCFLAGS += -DBCMCCX
DHDCFLAGS += -DWES_SUPPORT
DHDCFLAGS += -DOKC_SUPPORT
DHDCFLAGS += -DWLTDLS
# DHDCFLAGS += -DTPUT_DEBUG
DHDCFLAGS += -DWLFBT

DHDCFLAGS += -DSUPPORT_IBSS
DHDCFLAGS += -DSUPPORT_LTECX
ifeq ($(CONFIG_MACH_JF),y)
DHDCFLAGS += -DCUSTOM_TXGLOM_SIZE=32 -DDHD_TXBOUND=32
endif
DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=32
# For BT LOCK
ifeq ($(CONFIG_BCM4335BT),y)
Expand All @@ -142,6 +148,7 @@ ifneq ($(CONFIG_BCM4334),)
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=5 -DENABLE_BCN_LI_BCN_WAKEUP
DHDCFLAGS += -DROAM_AP_ENV_DETECTION
DHDCFLAGS += -DWES_SUPPORT
DHDCFLAGS += -DUSE_WL_FRAMEBURST
DHDCFLAGS :=$(filter-out -DWL_CFG80211_GON_COLLISION,$(DHDCFLAGS))
endif

Expand All @@ -152,6 +159,7 @@ ifneq ($(CONFIG_BCM4330),)
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=0
DHDCFLAGS += -DPASS_ARP_PACKET
DHDCFLAGS += -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST
DHDCFLAGS += -DUSE_WL_FRAMEBURST
endif

ifneq ($(CONFIG_BCM43241),)
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c
Expand Up @@ -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: bcmsdh_sdmmc.c 383350 2013-02-06 12:59:26Z $
* $Id: bcmsdh_sdmmc.c 401625 2013-05-13 03:24:35Z $
*/
#include <typedefs.h>

Expand Down Expand Up @@ -896,9 +896,11 @@ sdioh_request_byte(sdioh_info_t *sd, uint rw, uint func, uint regaddr, uint8 *by
}

if (err_ret) {
if (regaddr != 0x1001F && err_ret != -110)
if ((regaddr == 0x1001F) && (err_ret == -110)) {
} else {
sd_err(("bcmsdh_sdmmc: Failed to %s byte F%d:@0x%05x=%02x, Err: %d\n",
rw ? "Write" : "Read", func, regaddr, *byte, err_ret));
}
}

return ((err_ret == 0) ? SDIOH_API_RC_SUCCESS : SDIOH_API_RC_FAIL);
Expand Down
Empty file modified drivers/net/wireless/bcmdhd/bcmsdspi_linux.c 100755 → 100644
Empty file.
Empty file modified drivers/net/wireless/bcmdhd/bcmspibrcm.c 100755 → 100644
Empty file.
5 changes: 3 additions & 2 deletions drivers/net/wireless/bcmdhd/dhd.h
Expand Up @@ -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 393894 2013-03-29 07:14:35Z $
* $Id: dhd.h 406704 2013-06-10 09:42:09Z $
*/

/****************
Expand Down Expand Up @@ -87,7 +87,8 @@ enum dhd_op_flags {
/* Current P2P mode for P2P connection */
DHD_FLAG_P2P_GC_MODE = (1 << (5)),
DHD_FLAG_P2P_GO_MODE = (1 << (6)),
DHD_FLAG_MBSS_MODE = (1 << (7)) /* MBSS in future */
DHD_FLAG_MBSS_MODE = (1 << (7)), /* MBSS in future */
DHD_FLAG_IBSS_MODE = (1 << (8))
};

#define MANUFACTRING_FW "WLTEST"
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/bcmdhd/dhd_custom_sec.c 100755 → 100644
Expand Up @@ -264,7 +264,6 @@ const struct cntry_locales_custom translate_custom_table[] = {
{"VA", "VA", 2},
{"VE", "VE", 3},
{"VN", "VN", 4},
{"MA", "MA", 1},
{"ZM", "ZM", 2},
{"EC", "EC", 21},
{"SV", "SV", 19},
Expand Down
62 changes: 54 additions & 8 deletions drivers/net/wireless/bcmdhd/dhd_linux.c
Expand Up @@ -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 394719 2013-04-03 13:22:12Z $
* $Id: dhd_linux.c 407072 2013-06-11 15:54:35Z $
*/

#include <typedefs.h>
Expand Down Expand Up @@ -705,6 +705,22 @@ static inline void* dhd_rxf_dequeue(dhd_pub_t *dhdp)
}
#endif /* defined(DHDTHREAD) && defined(RXFRAME_THREAD) */

#if defined(PASS_ARP_PACKET) || defined(SUPPORT_IBSS)
static int
check_pass(dhd_pub_t *dhd)
{
#if defined(SUPPORT_IBSS)
if (dhd->op_mode & DHD_FLAG_IBSS_MODE)
return 0;
#endif
#if defined(PASS_ARP_PACKET)
if (!(dhd->op_mode && (DHD_FLAG_P2P_GC_MODE | DHD_FLAG_P2P_GO_MODE)))
return 1;
#endif
return 1;
}
#endif /* defined(PASS_ARP_PACKET) || defined(SUPPORT_IBSS) */

void dhd_set_packet_filter(dhd_pub_t *dhd)
{
#ifdef PKT_FILTER_SUPPORT
Expand All @@ -731,9 +747,11 @@ void dhd_enable_packet_filter(int value, dhd_pub_t *dhd)
(dhd_support_sta_mode(dhd) && !dhd->dhcp_in_progress)))
{
for (i = 0; i < dhd->pktfilter_count; i++) {
#ifdef PASS_ARP_PACKET

#if !defined(GAN_LITE_NAT_KEEPALIVE_FILTER) && (defined(PASS_ARP_PACKET) || \
defined(SUPPORT_IBSS))
if (value && (i == dhd->pktfilter_count -1) &&
!(dhd->op_mode & (DHD_FLAG_P2P_GC_MODE | DHD_FLAG_P2P_GO_MODE))) {
check_pass(dhd)) {
DHD_TRACE_HW4(("Do not turn on ARP white list pkt filter:"
"val %d, cnt %d, op_mode 0x%x\n",
value, i, dhd->op_mode));
Expand All @@ -747,8 +765,12 @@ void dhd_enable_packet_filter(int value, dhd_pub_t *dhd)
#endif /* PKT_FILTER_SUPPORT */
}

bool wifi_pm = true;
module_param(wifi_pm, bool, 0755);

static int dhd_set_suspend(int value, dhd_pub_t *dhd)
{

#ifndef SUPPORT_PM2_ONLY
int power_mode = PM_MAX;
#endif /* SUPPORT_PM2_ONLY */
Expand Down Expand Up @@ -832,7 +854,10 @@ static int dhd_set_suspend(int value, dhd_pub_t *dhd)
DHD_ERROR(("%s: Remove extra suspend setting \n", __FUNCTION__));

#ifndef SUPPORT_PM2_ONLY
power_mode = PM_FAST;
if (wifi_pm)
power_mode = PM_FAST;
else
power_mode = PM_OFF;
dhd_wl_ioctl_cmd(dhd, WLC_SET_PM, (char *)&power_mode,
sizeof(power_mode), TRUE, 0);
#endif /* SUPPORT_PM2_ONLY */
Expand Down Expand Up @@ -3064,6 +3089,8 @@ dhd_stop(struct net_device *net)
dhd->pub.rxcnt_timeout = 0;
dhd->pub.txcnt_timeout = 0;

dhd->pub.hang_was_sent = 0;

DHD_OS_WAKE_UNLOCK(&dhd->pub);
return 0;
}
Expand Down Expand Up @@ -3923,7 +3950,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
uint32 ampdu_ba_wsize = CUSTOM_AMPDU_BA_WSIZE;
#endif /* CUSTOM_AMPDU_BA_WSIZE */
uint32 lpc = 1;
uint power_mode = PM_FAST;
uint power_mode;
uint32 dongle_align = DHD_SDALIGN;
uint32 glom = CUSTOM_GLOM_SETTING;
#if (defined(CUSTOMER_HW4) || defined(BOARD_PANDA)) && (defined(VSDB) || \
Expand Down Expand Up @@ -4029,6 +4056,10 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
dhd->suspend_bcn_li_dtim = CUSTOM_SUSPEND_BCN_LI_DTIM;
DHD_TRACE(("Enter %s\n", __FUNCTION__));
dhd->op_mode = 0;
if (wifi_pm)
power_mode = PM_FAST;
else
power_mode = PM_OFF;
#ifdef GET_CUSTOM_MAC_ENABLE
ret = dhd_custom_get_mac_address(ea_addr.octet);
if (!ret) {
Expand Down Expand Up @@ -4108,11 +4139,15 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
dhd_pkt_filter_enable = FALSE;
#endif
dhd->op_mode = DHD_FLAG_P2P_MODE;
}
else
} else if (op_mode == DHD_FLAG_IBSS_MODE ||
(!op_mode && strstr(fw_path, "_ibss") != NULL)) {
dhd->op_mode = DHD_FLAG_IBSS_MODE;
} else {
dhd->op_mode = DHD_FLAG_STA_MODE;
}
#if !defined(AP) && defined(WLP2P)
if ((concurrent_mode = dhd_get_concurrent_capabilites(dhd))) {
if (dhd->op_mode != DHD_FLAG_IBSS_MODE &&
(concurrent_mode = dhd_get_concurrent_capabilites(dhd))) {
#if defined(ARP_OFFLOAD_SUPPORT)
arpoe = 1;
#endif
Expand Down Expand Up @@ -4290,7 +4325,14 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)

#ifdef USE_WL_FRAMEBURST
#if defined(CUSTOMER_HW4)
#if defined(BCM4330_CHIP) || defined(BCM4334_CHIP)
if (dhd->op_mode & DHD_FLAG_HOSTAP_MODE)
#endif /* BCM4330_CHIP || BCM4334_CHIP */
frameburst = sec_control_frameburst();
#if defined(BCM4330_CHIP) || defined(BCM4334_CHIP)
else
frameburst = 0;
#endif /* BCM4330_CHIP || BCM4334_CHIP */
#endif /* CUSTOMER_HW4 */
/* Set frameburst to value */
if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_FAKEFRAG, (char *)&frameburst,
Expand Down Expand Up @@ -4355,6 +4397,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
setbit(eventmask, WLC_E_DISASSOC_IND);
setbit(eventmask, WLC_E_DISASSOC);
setbit(eventmask, WLC_E_JOIN);
setbit(eventmask, WLC_E_START);
setbit(eventmask, WLC_E_ASSOC_IND);
setbit(eventmask, WLC_E_PSK_SUP);
setbit(eventmask, WLC_E_LINK);
Expand Down Expand Up @@ -4458,6 +4501,9 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
dhd->pktfilter_count = 5;
dhd->pktfilter[4] = "104 0 0 0 0xFFFFFF 0x01005E";
#endif /* PASS_IPV4_SUSPEND && CUSTOMER_HW4 */
#if defined(PASS_ARP_PACKET) || defined(SUPPORT_IBSS)
dhd->pktfilter[dhd->pktfilter_count++] = "105 0 0 12 0xFFFF 0x0806";
#endif
#endif /* GAN_LITE_NAT_KEEPALIVE_FILTER && CUSTOMER_HW4 */

#if defined(SOFTAP)
Expand Down
39 changes: 27 additions & 12 deletions drivers/net/wireless/bcmdhd/dhd_sdio.c
Expand Up @@ -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 394690 2013-04-03 09:18:44Z $
* $Id: dhd_sdio.c 404381 2013-05-26 05:00:59Z $
*/

#include <typedefs.h>
Expand Down Expand Up @@ -1837,7 +1837,7 @@ dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt, bool queue_on
int ret;
osl_t *osh;
uint8 *frame;
uint16 len, pad1 = 0;
uint16 len, pad1 = 0, act_len = 0;
uint32 swheader;
uint retries = 0;
uint32 real_pad = 0;
Expand Down Expand Up @@ -1923,7 +1923,8 @@ dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt, bool queue_on

#ifdef BCMSDIOH_TXGLOM
if (bus->glom_enable) {
uint32 hwheader1 = 0, hwheader2 = 0, act_len = len;
uint32 hwheader1 = 0, hwheader2 = 0;
act_len = len;

/* Software tag: channel, sequence number, data offset */
swheader = ((chan << SDPCM_CHANNEL_SHIFT) & SDPCM_CHANNEL_MASK) |
Expand Down Expand Up @@ -2004,6 +2005,7 @@ dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt, bool queue_on
#ifdef BCMLXSDMMC
PKTSETLEN(osh, pkt, len);
#endif /* BCMLXSDMMC */

/* Post the frame pointer to sdio glom array */
dhd_bcmsdh_glom_post(bus, frame, pkt, len);
/* Save the pkt pointer in bus glom array */
Expand All @@ -2019,7 +2021,7 @@ dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt, bool queue_on
} else
#endif /* BCMSDIOH_TXGLOM */
{
uint32 act_len = len;
act_len = len;
/* Software tag: channel, sequence number, data offset */
swheader = ((chan << SDPCM_CHANNEL_SHIFT) & SDPCM_CHANNEL_MASK) | bus->tx_seq |
(((pad1 + SDPCM_HDRLEN) << SDPCM_DOFFSET_SHIFT) & SDPCM_DOFFSET_MASK);
Expand Down Expand Up @@ -2064,14 +2066,23 @@ dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt, bool queue_on
DHD_ERROR(("%s: sending unrounded %d-byte packet\n", __FUNCTION__, len));
#endif
}
real_pad = len - act_len;
if (PKTTAILROOM(osh, pkt) < real_pad) {
DHD_INFO(("%s 3: insufficient tailroom %d for %d real_pad\n",
__FUNCTION__, (int)PKTTAILROOM(osh, pkt), real_pad));
if (PKTPADTAILROOM(osh, pkt, real_pad)) {
DHD_ERROR(("padding error size %d\n", real_pad));
real_pad = len - act_len;
if (PKTTAILROOM(osh, pkt) < real_pad) {
DHD_INFO(("%s 3: insufficient tailroom %d for %d real_pad\n",
__FUNCTION__, (int)PKTTAILROOM(osh, pkt), real_pad));
if (PKTPADTAILROOM(osh, pkt, real_pad)) {
DHD_ERROR(("CHK3: padding error size %d\n", real_pad));
ret = BCME_NOMEM;
goto done;
}
#ifndef BCMLXSDMMC
else
PKTSETLEN(osh, pkt, act_len);
#endif
}
}
#ifdef BCMLXSDMMC
PKTSETLEN(osh, pkt, len);
#endif /* BCMLXSDMMC */
}
do {
ret = dhd_bcmsdh_send_buf(bus, bcmsdh_cur_sbwad(sdh), SDIO_FUNC_2, F2SYNC,
Expand Down Expand Up @@ -2150,7 +2161,11 @@ dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt, bool queue_on
} else
#endif /* BCMSDIOH_TXGLOM */
{
PKTPULL(osh, pkt, SDPCM_HDRLEN + pad1);
#ifdef BCMLXSDMMC
if (act_len > 0)
PKTSETLEN(osh, pkt, act_len);
#endif /* BCMLXSDMMC */
PKTPULL(osh, pkt, SDPCM_HDRLEN + pad1);
}
#ifdef PROP_TXSTATUS
if (bus->dhd->wlfc_state) {
Expand Down
Empty file modified drivers/net/wireless/bcmdhd/dhd_sec_feature.h 100755 → 100644
Empty file.
14 changes: 7 additions & 7 deletions drivers/net/wireless/bcmdhd/include/epivers.h
Expand Up @@ -30,26 +30,26 @@

#define EPI_MINOR_VERSION 61

#define EPI_RC_NUMBER 47
#define EPI_RC_NUMBER 58

#define EPI_INCREMENTAL_NUMBER 0

#define EPI_BUILD_NUMBER 0

#define EPI_VERSION 1, 61, 47, 0
#define EPI_VERSION 1, 61, 58, 0

#define EPI_VERSION_NUM 0x013d2f00
#define EPI_VERSION_NUM 0x013d3a00

#define EPI_VERSION_DEV 1.61.47
#define EPI_VERSION_DEV 1.61.58

/* Driver Version String, ASCII, 32 chars max */
#ifdef BCMINTERNAL
#define EPI_VERSION_STR "1.61.47 (r BCMINT)"
#define EPI_VERSION_STR "1.61.58 (r BCMINT)"
#else
#ifdef WLTEST
#define EPI_VERSION_STR "1.61.47 (r WLTEST)"
#define EPI_VERSION_STR "1.61.58 (r WLTEST)"
#else
#define EPI_VERSION_STR "1.61.47 (r)"
#define EPI_VERSION_STR "1.61.58 (r)"
#endif
#endif /* BCMINTERNAL */

Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/bcmdhd/include/wlioctl.h
Expand Up @@ -1819,7 +1819,6 @@ typedef struct {
#else
#define WL_AUTH_OPEN_SHARED 3 /* BCM4334(Phoenix branch) value changed to 3 */
#endif

#endif /* LINUX_POSTMOGRIFY_REMOVAL */

/* Bit masks for radio disabled status - returned by WL_GET_RADIO */
Expand Down

0 comments on commit e0739aa

Please sign in to comment.