Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268499
b: refs/heads/master
c: 33db085
h: refs/heads/master
i:
  268497: 8c1c5eb
  268495: f78bc56
v: v3
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Sep 26, 2011
1 parent 2c3a6e7 commit e3e0006
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 27 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: 40fbb290119a94434a7fa952d0492f2325663f94
refs/heads/master: 33db085d1e243f6009b3a0220ad8826bebf90bfd
6 changes: 4 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,9 @@ static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr)
/* read 24 bits and return valid 17 bit addr */
int i;
u32 scratch, regdata;
u8 *ptr = (u8 *)&scratch;
__le32 scratch_le;
u8 *ptr = (u8 *)&scratch_le;

for (i = 0; i < 3; i++) {
if ((brcmf_sdioh_card_regread(sdiodev, 0, regaddr, 1,
&regdata)) != SUCCESS)
Expand All @@ -412,7 +414,7 @@ static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr)
}

/* Only the lower 17-bits are valid */
scratch = le32_to_cpu(scratch);
scratch = le32_to_cpu(scratch_le);
scratch &= 0x0001FFFF;
return scratch;
}
Expand Down
23 changes: 13 additions & 10 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
struct net_device *dev;
struct netdev_hw_addr *ha;
u32 allmulti, cnt;
__le32 cnt_le;
__le32 allmulti_le;

struct brcmf_ioctl ioc;
char *buf, *bufp;
Expand Down Expand Up @@ -166,9 +168,9 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
strcpy(bufp, "mcast_list");
bufp += strlen("mcast_list") + 1;

cnt = cpu_to_le32(cnt);
memcpy(bufp, &cnt, sizeof(cnt));
bufp += sizeof(cnt);
cnt_le = cpu_to_le32(cnt);
memcpy(bufp, &cnt_le, sizeof(cnt));
bufp += sizeof(cnt_le);

netdev_for_each_mc_addr(ha, dev) {
if (!cnt)
Expand Down Expand Up @@ -205,10 +207,11 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
brcmf_ifname(&drvr_priv->pub, 0));
return;
}
allmulti = cpu_to_le32(allmulti);
allmulti_le = cpu_to_le32(allmulti);

if (!brcmu_mkiovar
("allmulti", (void *)&allmulti, sizeof(allmulti), buf, buflen)) {
("allmulti", (void *)&allmulti_le,
sizeof(allmulti_le), buf, buflen)) {
brcmf_dbg(ERROR, "%s: mkiovar failed for allmulti, datalen %d buflen %u\n",
brcmf_ifname(&drvr_priv->pub, 0),
(int)sizeof(allmulti), buflen);
Expand All @@ -226,7 +229,7 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
if (ret < 0) {
brcmf_dbg(ERROR, "%s: set allmulti %d failed\n",
brcmf_ifname(&drvr_priv->pub, 0),
le32_to_cpu(allmulti));
le32_to_cpu(allmulti_le));
}

kfree(buf);
Expand All @@ -235,19 +238,19 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
driver does */

allmulti = (dev->flags & IFF_PROMISC) ? true : false;
allmulti = cpu_to_le32(allmulti);
allmulti_le = cpu_to_le32(allmulti);

memset(&ioc, 0, sizeof(ioc));
ioc.cmd = BRCMF_C_SET_PROMISC;
ioc.buf = &allmulti;
ioc.len = sizeof(allmulti);
ioc.buf = &allmulti_le;
ioc.len = sizeof(allmulti_le);
ioc.set = true;

ret = brcmf_proto_ioctl(&drvr_priv->pub, 0, &ioc, ioc.len);
if (ret < 0) {
brcmf_dbg(ERROR, "%s: set promisc %d failed\n",
brcmf_ifname(&drvr_priv->pub, 0),
le32_to_cpu(allmulti));
le32_to_cpu(allmulti_le));
}
}

Expand Down
19 changes: 11 additions & 8 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2361,8 +2361,8 @@ static int brcmf_sdbrcm_txpkt(struct brcmf_bus *bus, struct sk_buff *pkt,

/* Hardware tag: 2 byte len followed by 2 byte ~len check (all LE) */
len = (u16) (pkt->len);
*(u16 *) frame = cpu_to_le16(len);
*(((u16 *) frame) + 1) = cpu_to_le16(~len);
*(__le16 *) frame = cpu_to_le16(len);
*(((__le16 *) frame) + 1) = cpu_to_le16(~len);

/* Software tag: channel, sequence number, data offset */
swheader =
Expand Down Expand Up @@ -2917,16 +2917,17 @@ static int
brcmf_sdbrcm_readshared(struct brcmf_bus *bus, struct sdpcm_shared *sh)
{
u32 addr;
__le32 addr_le;
int rv;

/* Read last word in memory to determine address of
sdpcm_shared structure */
rv = brcmf_sdbrcm_membytes(bus, false, bus->ramsize - 4, (u8 *)&addr,
rv = brcmf_sdbrcm_membytes(bus, false, bus->ramsize - 4, (u8 *)&addr_le,
4);
if (rv < 0)
return rv;

addr = le32_to_cpu(addr);
addr = le32_to_cpu(addr_le);

brcmf_dbg(INFO, "sdpcm_shared address 0x%08X\n", addr);

Expand Down Expand Up @@ -3273,8 +3274,8 @@ brcmf_sdbrcm_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen)
brcmf_sdbrcm_clkctl(bus, CLK_AVAIL, false);

/* Hardware tag: 2 byte len followed by 2 byte ~len check (all LE) */
*(u16 *) frame = cpu_to_le16((u16) msglen);
*(((u16 *) frame) + 1) = cpu_to_le16(~msglen);
*(__le16 *) frame = cpu_to_le16((u16) msglen);
*(((__le16 *) frame) + 1) = cpu_to_le16(~msglen);

/* Software tag: channel, sequence number, data offset */
swheader =
Expand Down Expand Up @@ -3466,6 +3467,7 @@ static int brcmf_sdbrcm_write_vars(struct brcmf_bus *bus)
u32 varaddr;
u8 *vbuffer;
u32 varsizew;
__le32 varsizew_le;
#ifdef BCMDBG
char *nvram_ularray;
#endif /* BCMDBG */
Expand Down Expand Up @@ -3529,18 +3531,19 @@ static int brcmf_sdbrcm_write_vars(struct brcmf_bus *bus)
*/
if (bcmerror) {
varsizew = 0;
varsizew_le = cpu_to_le32(0);
} else {
varsizew = varsize / 4;
varsizew = (~varsizew << 16) | (varsizew & 0x0000FFFF);
varsizew = cpu_to_le32(varsizew);
varsizew_le = cpu_to_le32(varsizew);
}

brcmf_dbg(INFO, "New varsize is %d, length token=0x%08x\n",
varsize, varsizew);

/* Write the length token to the last word */
bcmerror = brcmf_sdbrcm_membytes(bus, true, (bus->orig_ramsize - 4),
(u8 *)&varsizew, 4);
(u8 *)&varsizew_le, 4);

return bcmerror;
}
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ brcmf_dev_intvar_get(struct net_device *dev, s8 *name, s32 *retval)
{
union {
s8 buf[BRCMF_C_IOCTL_SMLEN];
s32 val;
__le32 val;
} var;
u32 len;
u32 data_null;
Expand Down Expand Up @@ -890,11 +890,11 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,

/* Configure Beacon Interval for starter */
if (params->beacon_interval)
bcnprd = cpu_to_le32(params->beacon_interval);
bcnprd = params->beacon_interval;
else
bcnprd = cpu_to_le32(100);
bcnprd = 100;

err = brcmf_dev_ioctl(dev, BRCM_SET_BCNPRD, &bcnprd, sizeof(bcnprd));
err = brcmf_dev_ioctl_u32(dev, BRCM_SET_BCNPRD, &bcnprd);
if (unlikely(err)) {
WL_ERR("WLC_SET_BCNPRD failed (%d)\n", err);
goto done;
Expand Down Expand Up @@ -2029,7 +2029,7 @@ static s32 wl_inform_ibss(struct brcmf_cfg80211_priv *cfg_priv,
goto CleanUp;
}

*(u32 *)buf = cpu_to_le32(WL_BSS_INFO_MAX);
*(__le32 *)buf = cpu_to_le32(WL_BSS_INFO_MAX);

err = brcmf_dev_ioctl(dev, BRCMF_C_GET_BSS_INFO, buf, WL_BSS_INFO_MAX);
if (unlikely(err)) {
Expand Down Expand Up @@ -2098,7 +2098,7 @@ static s32 brcmf_update_bss_info(struct brcmf_cfg80211_priv *cfg_priv)

ssid = (struct brcmf_ssid *)brcmf_read_prof(cfg_priv, WL_PROF_SSID);

*(u32 *)cfg_priv->extra_buf = cpu_to_le32(WL_EXTRA_BUF_MAX);
*(__le32 *)cfg_priv->extra_buf = cpu_to_le32(WL_EXTRA_BUF_MAX);
err = brcmf_dev_ioctl(cfg_to_ndev(cfg_priv), BRCMF_C_GET_BSS_INFO,
cfg_priv->extra_buf, WL_EXTRA_BUF_MAX);
if (unlikely(err)) {
Expand Down

0 comments on commit e3e0006

Please sign in to comment.