summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNarayan Reddy <narayanr@nvidia.com>2011-10-28 20:20:18 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:52:36 -0800
commitbeceb9b139a6f7a7ed598233380a983f7faf280a (patch)
tree3e9471c322c3653c0c2aabafa9c4a60a14bd3944 /drivers
parentf8a0d126be464a21bb55cafed5285bd4cd9a511e (diff)
drivers: net: bcmdhd: modify firmware path
In order to support bcm4329 and bcm4330 in single binary, driver has to construct firmware path names dynamically. Change-Id: I7bdb0fd51f21494b4cb61c65fe9ba23e0eb5604f Reviewed-on: http://git-master/r/60884 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R4b22880696a239bd16f570156bb013b00d6a2d67
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_sdio.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_sdio.c b/drivers/net/wireless/bcmdhd/dhd_sdio.c
index b43c7422e02c..0b90ed48a0f0 100644
--- a/drivers/net/wireless/bcmdhd/dhd_sdio.c
+++ b/drivers/net/wireless/bcmdhd/dhd_sdio.c
@@ -2209,7 +2209,7 @@ dhdsdio_doiovar(dhd_bus_t *bus, const bcm_iovar_t *vi, uint32 actionid, const ch
int32 int_val = 0;
bool bool_val = 0;
- DHD_TRACE(("%s: Enter, action %d name %s params %p plen %d arg %p len %d val_size %d\n",
+ DHD_ERROR(("%s: Enter, action %d name %s params %p plen %d arg %p len %d val_size %d\n",
__FUNCTION__, actionid, name, params, plen, arg, len, val_size));
if ((bcmerror = bcm_iovar_lencheck(vi, arg, len, IOV_ISSET(actionid))) != 0)
@@ -6048,6 +6048,7 @@ static int
_dhdsdio_download_firmware(struct dhd_bus *bus)
{
int bcmerror = -1;
+ char *p;
bool embed = FALSE; /* download embedded firmware */
bool dlok = FALSE; /* download firmware succeeded */
@@ -6069,6 +6070,19 @@ _dhdsdio_download_firmware(struct dhd_bus *bus)
/* External image takes precedence if specified */
if ((bus->fw_path != NULL) && (bus->fw_path[0] != '\0')) {
+
+ /* replace bcm43xx with bcm4330 or bcm4329 */
+ if ((p = strstr(bus->fw_path, "bcm43xx"))) {
+ if (bus->cl_devid == 0x4329) {
+ *(p + 5)='2';
+ *(p + 6)='9';
+ }
+ if (bus->cl_devid == 0x4330) {
+ *(p + 5)='3';
+ *(p + 6)='0';
+ }
+ }
+
if (dhdsdio_download_code_file(bus, bus->fw_path)) {
DHD_ERROR(("%s: dongle image file download failed\n", __FUNCTION__));
#ifdef BCMEMBEDIMAGE