diff options
author | Tobias Waldekranz <tobias@waldekranz.com> | 2013-08-26 11:18:06 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-26 22:10:38 +0400 |
commit | cfcd926ea2bc46aaca4e9ca3f0a3b8ac35b9d691 (patch) | |
tree | 21e91fa792b19a4e6eb3f31f9fff5509f7cbab66 /drivers/net/wireless/mwifiex/sdio.c | |
parent | d4c04ba141d4c5981aebc0aa0ecadc0f16f99387 (diff) | |
download | linux-cfcd926ea2bc46aaca4e9ca3f0a3b8ac35b9d691.tar.xz |
mwifiex: add missing endian conversions
Fixes multiple locations where a little endian host is assumed during
ser/des of messages sent to/received from the chip.
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/sdio.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/sdio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index 0e2070f72fed..1576104e3d95 100644 --- a/drivers/net/wireless/mwifiex/sdio.c +++ b/drivers/net/wireless/mwifiex/sdio.c @@ -1062,7 +1062,7 @@ static int mwifiex_decode_rx_packet(struct mwifiex_adapter *adapter, case MWIFIEX_TYPE_EVENT: dev_dbg(adapter->dev, "info: --- Rx: Event ---\n"); - adapter->event_cause = *(u32 *) skb->data; + adapter->event_cause = le32_to_cpu(*(__le32 *) skb->data); if ((skb->len > 0) && (skb->len < MAX_EVENT_SIZE)) memcpy(adapter->event_body, @@ -1207,8 +1207,8 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter, for (pind = 0; pind < card->mpa_rx.pkt_cnt; pind++) { /* get curr PKT len & type */ - pkt_len = *(u16 *) &curr_ptr[0]; - pkt_type = *(u16 *) &curr_ptr[2]; + pkt_len = le16_to_cpu(*(__le16 *) &curr_ptr[0]); + pkt_type = le16_to_cpu(*(__le16 *) &curr_ptr[2]); /* copy pkt to deaggr buf */ skb_deaggr = card->mpa_rx.skb_arr[pind]; |