Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268501
b: refs/heads/master
c: bd370bd
h: refs/heads/master
i:
  268499: e3e0006
v: v3
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Sep 26, 2011
1 parent 3795a6b commit ffe0754
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6e8e1264eef6a1907d75ea49cd5498bdf328d61c
refs/heads/master: bd370bd7319469bd1a4317361b92b7adb37a1f2a
31 changes: 22 additions & 9 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,17 @@ struct sdpcm_shared {
u8 tag[32];
};

struct sdpcm_shared_le {
__le32 flags;
__le32 trap_addr;
__le32 assert_exp_addr;
__le32 assert_file_addr;
__le32 assert_line;
__le32 console_addr; /* Address of struct rte_console */
__le32 msgtrace_addr;
u8 tag[32];
};


/* misc chip info needed by some of the routines */
struct chip_info {
Expand Down Expand Up @@ -2919,6 +2930,7 @@ brcmf_sdbrcm_readshared(struct brcmf_bus *bus, struct sdpcm_shared *sh)
u32 addr;
__le32 addr_le;
int rv;
struct sdpcm_shared_le sh_le;

/* Read last word in memory to determine address of
sdpcm_shared structure */
Expand All @@ -2942,19 +2954,20 @@ brcmf_sdbrcm_readshared(struct brcmf_bus *bus, struct sdpcm_shared *sh)
}

/* Read rte_shared structure */
rv = brcmf_sdbrcm_membytes(bus, false, addr, (u8 *) sh,
sizeof(struct sdpcm_shared));
rv = brcmf_sdbrcm_membytes(bus, false, addr, (u8 *) &sh_le,
sizeof(struct sdpcm_shared_le));
if (rv < 0)
return rv;

/* Endianness */
sh->flags = le32_to_cpu(sh->flags);
sh->trap_addr = le32_to_cpu(sh->trap_addr);
sh->assert_exp_addr = le32_to_cpu(sh->assert_exp_addr);
sh->assert_file_addr = le32_to_cpu(sh->assert_file_addr);
sh->assert_line = le32_to_cpu(sh->assert_line);
sh->console_addr = le32_to_cpu(sh->console_addr);
sh->msgtrace_addr = le32_to_cpu(sh->msgtrace_addr);
sh->flags = le32_to_cpu(sh_le.flags);
sh->trap_addr = le32_to_cpu(sh_le.trap_addr);
sh->assert_exp_addr = le32_to_cpu(sh_le.assert_exp_addr);
sh->assert_file_addr = le32_to_cpu(sh_le.assert_file_addr);
sh->assert_line = le32_to_cpu(sh_le.assert_line);
sh->console_addr = le32_to_cpu(sh_le.console_addr);
sh->msgtrace_addr = le32_to_cpu(sh_le.msgtrace_addr);
memcpy(sh->tag, sh_le.tag, sizeof(sh->tag));

if ((sh->flags & SDPCM_SHARED_VERSION_MASK) != SDPCM_SHARED_VERSION) {
brcmf_dbg(ERROR, "sdpcm_shared version %d in brcmf is different than sdpcm_shared version %d in dongle\n",
Expand Down

0 comments on commit ffe0754

Please sign in to comment.