From 3671bf769f66e538d490880664a2e2799c4fc3c7 Mon Sep 17 00:00:00 2001 From: Greg Goldman Date: Tue, 21 Dec 2010 11:14:17 -0800 Subject: [PATCH] net: wireless: bcm4329: Update to version 4.218.248-18 - Improve BT-coex to differentiate HID and SCO device during DHCP session - Enforce DTIM=1 for any SoftAP settings to optimize internal memory logic Signed-off-by: Dmitry Shmidt --- drivers/net/wireless/bcm4329/dhd_common.c | 21 +++++++--- .../net/wireless/bcm4329/include/epivers.h | 10 ++--- drivers/net/wireless/bcm4329/wl_iw.c | 40 +++++++++++-------- 3 files changed, 44 insertions(+), 27 deletions(-) diff --git a/drivers/net/wireless/bcm4329/dhd_common.c b/drivers/net/wireless/bcm4329/dhd_common.c index b8bab3016115..4331d39a68f1 100644 --- a/drivers/net/wireless/bcm4329/dhd_common.c +++ b/drivers/net/wireless/bcm4329/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,v 1.5.6.8.2.6.6.69.4.16 2010/11/18 03:53:32 Exp $ + * $Id: dhd_common.c,v 1.5.6.8.2.6.6.69.4.20 2010/12/20 23:37:28 Exp $ */ #include #include @@ -71,8 +71,10 @@ extern int dhd_wl_ioctl(dhd_pub_t *dhd, uint cmd, char *buf, uint buflen); void dhd_iscan_lock(void); void dhd_iscan_unlock(void); -#if defined(KEEP_ALIVE) +#if defined(SOFTAP) extern bool ap_fw_loaded; +#endif +#if defined(KEEP_ALIVE) int dhd_keep_alive_onoff(dhd_pub_t *dhd, int ka_on); #endif /* KEEP_ALIVE */ @@ -1227,10 +1229,13 @@ dhd_preinit_ioctls(dhd_pub_t *dhd) uint power_mode = PM_FAST; uint32 dongle_align = DHD_SDALIGN; uint32 glom = 0; - uint bcn_timeout = 3; + uint bcn_timeout = 4; int scan_assoc_time = 40; int scan_unassoc_time = 40; uint32 listen_interval = LISTEN_INTERVAL; /* Default Listen Interval in Beacons */ +#if defined(SOFTAP) + uint dtim = 1; +#endif int ret = 0; #ifdef GET_CUSTOM_MAC_ENABLE struct ether_addr ea_addr; @@ -1322,6 +1327,12 @@ dhd_preinit_ioctls(dhd_pub_t *dhd) bcm_mkiovar("roam_off", (char *)&dhd_roam, 4, iovbuf, sizeof(iovbuf)); dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf)); +#if defined(SOFTAP) + if (ap_fw_loaded == TRUE) { + dhdcdc_set_ioctl(dhd, 0, WLC_SET_DTIMPRD, (char *)&dtim, sizeof(dtim)); + } +#endif + if (dhd_roam == 0) { /* set internal roaming roaming parameters */ @@ -1800,7 +1811,7 @@ fail: return status; } -#endif +#endif /* Function to estimate possible DTIM_SKIP value */ int dhd_get_dtim_skip(dhd_pub_t *dhd) @@ -2309,4 +2320,4 @@ wl_iw_parse_channel_list(char** list_str, uint16* channel_list, int channel_num) return num; } -#endif +#endif diff --git a/drivers/net/wireless/bcm4329/include/epivers.h b/drivers/net/wireless/bcm4329/include/epivers.h index 6d5adf258ef8..23ee514a7b6b 100644 --- a/drivers/net/wireless/bcm4329/include/epivers.h +++ b/drivers/net/wireless/bcm4329/include/epivers.h @@ -33,16 +33,16 @@ #define EPI_RC_NUMBER 248 -#define EPI_INCREMENTAL_NUMBER 17 +#define EPI_INCREMENTAL_NUMBER 18 #define EPI_BUILD_NUMBER 0 -#define EPI_VERSION 4, 218, 248, 17 +#define EPI_VERSION 4, 218, 248, 18 -#define EPI_VERSION_NUM 0x04daf811 +#define EPI_VERSION_NUM 0x04daf812 -#define EPI_VERSION_STR "4.218.248.17" -#define EPI_ROUTER_VERSION_STR "4.219.248.17" +#define EPI_VERSION_STR "4.218.248.18" +#define EPI_ROUTER_VERSION_STR "4.219.248.18" #endif diff --git a/drivers/net/wireless/bcm4329/wl_iw.c b/drivers/net/wireless/bcm4329/wl_iw.c index 8adf2d87ed65..8460804c945a 100644 --- a/drivers/net/wireless/bcm4329/wl_iw.c +++ b/drivers/net/wireless/bcm4329/wl_iw.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: wl_iw.c,v 1.51.4.9.2.6.4.142.4.61 2010/12/03 22:09:41 Exp $ + * $Id: wl_iw.c,v 1.51.4.9.2.6.4.142.4.69 2010/12/21 03:00:08 Exp $ */ @@ -228,7 +228,7 @@ typedef struct iscan_info { wl_iscan_params_t *iscan_ex_params_p; int iscan_ex_param_size; } iscan_info_t; -#define COEX_DHCP 1 +#define COEX_DHCP 1 #define BT_DHCP_eSCO_FIX #define BT_DHCP_USE_FLAGS @@ -749,7 +749,7 @@ static bool btcoex_is_sco_active(struct net_device *dev) if (ioc_res == 0) { WL_TRACE_COEX(("%s: read btc_params[4] = %x\n", __FUNCTION__, temp)); - if (temp > 0xea0) { + if ((temp > 0xea0) && (temp < 0xed8)) { WL_TRACE_COEX(("%s: BT SCO/eSCO is ACTIVE\n", __FUNCTION__)); res = true; } else { @@ -926,7 +926,6 @@ wl_iw_set_btcoex_dhcp( (!dev_wlc_intvar_get_reg(dev, "btc_params", 66, &saved_reg66)) && (!dev_wlc_intvar_get_reg(dev, "btc_params", 41, &saved_reg41)) && (!dev_wlc_intvar_get_reg(dev, "btc_params", 68, &saved_reg68))) { - saved_status = TRUE; WL_TRACE_COEX(("save regs {66,41,68} ->: 0x%x 0x%x 0x%x\n", \ saved_reg66, saved_reg41, saved_reg68)); @@ -934,18 +933,25 @@ wl_iw_set_btcoex_dhcp( dev_wlc_ioctl(dev, WLC_SET_PM, &pm_local, sizeof(pm_local)); #endif - dev_wlc_bufvar_set(dev, "btc_params", \ - (char *)&buf_reg66va_dhcp_on[0], sizeof(buf_reg66va_dhcp_on)); - dev_wlc_bufvar_set(dev, "btc_params", \ - (char *)&buf_reg41va_dhcp_on[0], sizeof(buf_reg41va_dhcp_on)); - dev_wlc_bufvar_set(dev, "btc_params", \ - (char *)&buf_reg68va_dhcp_on[0], sizeof(buf_reg68va_dhcp_on)); + if (btcoex_is_sco_active(dev)) { - if (btcoex_is_sco_active(dev)) { - g_bt->bt_state = BT_DHCP_START; - g_bt->timer_on = 1; - mod_timer(&g_bt->timer, g_bt->timer.expires); - WL_TRACE_COEX(("%s enable BT DHCP Timer\n", \ + dev_wlc_bufvar_set(dev, "btc_params", \ + (char *)&buf_reg66va_dhcp_on[0], \ + sizeof(buf_reg66va_dhcp_on)); + + dev_wlc_bufvar_set(dev, "btc_params", \ + (char *)&buf_reg41va_dhcp_on[0], \ + sizeof(buf_reg41va_dhcp_on)); + + dev_wlc_bufvar_set(dev, "btc_params", \ + (char *)&buf_reg68va_dhcp_on[0], \ + sizeof(buf_reg68va_dhcp_on)); + saved_status = TRUE; + + g_bt->bt_state = BT_DHCP_START; + g_bt->timer_on = 1; + mod_timer(&g_bt->timer, g_bt->timer.expires); + WL_TRACE_COEX(("%s enable BT DHCP Timer\n", \ __FUNCTION__)); } } @@ -976,10 +982,10 @@ wl_iw_set_btcoex_dhcp( } } - dev_wlc_bufvar_set(dev, "btc_flags", \ + if (saved_status == TRUE) { + dev_wlc_bufvar_set(dev, "btc_flags", \ (char *)&buf_flag7_default[0], sizeof(buf_flag7_default)); - if (saved_status) { regaddr = 66; dev_wlc_intvar_set_reg(dev, "btc_params", \ (char *)®addr, (char *)&saved_reg66); -- 2.34.1