mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 00:47:56 -04:00
staging: rtl8712: changed u16 to __be16
Fixed sparse warning. Just changed u16 to __be16 and typecasts. Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
56384ad6d0
commit
16b8852fa3
@@ -408,7 +408,7 @@ static int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe)
|
||||
memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst,
|
||||
ETH_ALEN);
|
||||
} else {
|
||||
u16 len;
|
||||
__be16 len;
|
||||
/* Leave Ethernet header part of hdr and full payload */
|
||||
len = htons(sub_skb->len);
|
||||
memcpy(skb_push(sub_skb, 2), &len, 2);
|
||||
@@ -439,21 +439,21 @@ static int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe)
|
||||
|
||||
void r8712_rxcmd_event_hdl(struct _adapter *padapter, void *prxcmdbuf)
|
||||
{
|
||||
uint voffset;
|
||||
__le32 voffset;
|
||||
u8 *poffset;
|
||||
u16 cmd_len, drvinfo_sz;
|
||||
struct recv_stat *prxstat;
|
||||
|
||||
poffset = (u8 *)prxcmdbuf;
|
||||
voffset = *(uint *)poffset;
|
||||
voffset = *(__le32 *)poffset;
|
||||
prxstat = (struct recv_stat *)prxcmdbuf;
|
||||
drvinfo_sz = (le32_to_cpu(prxstat->rxdw0) & 0x000f0000) >> 16;
|
||||
drvinfo_sz <<= 3;
|
||||
poffset += RXDESC_SIZE + drvinfo_sz;
|
||||
do {
|
||||
voffset = *(uint *)poffset;
|
||||
voffset = *(__le32 *)poffset;
|
||||
cmd_len = (u16)(le32_to_cpu(voffset) & 0xffff);
|
||||
r8712_event_handle(padapter, (uint *)poffset);
|
||||
r8712_event_handle(padapter, (__le32 *)poffset);
|
||||
poffset += (cmd_len + 8);/*8 bytes alignment*/
|
||||
} while (le32_to_cpu(voffset) & BIT(31));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user