Commit a6efc5b7 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

mwifiex: declare snap_type as __be16 variable

Actually we are updating snap_type with h_proto (__be16 variable)
in ethernet frame header. Hence endianness conversion is not
required.
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4348d085
...@@ -69,9 +69,9 @@ mwifiex_11n_form_amsdu_pkt(struct sk_buff *skb_aggr, ...@@ -69,9 +69,9 @@ mwifiex_11n_form_amsdu_pkt(struct sk_buff *skb_aggr,
memcpy(&tx_header->eth803_hdr, skb_src->data, dt_offset); memcpy(&tx_header->eth803_hdr, skb_src->data, dt_offset);
/* Copy SNAP header */ /* Copy SNAP header */
snap.snap_type = snap.snap_type = ((struct ethhdr *)skb_src->data)->h_proto;
le16_to_cpu(*(__le16 *) ((u8 *)skb_src->data + dt_offset));
dt_offset += sizeof(u16); dt_offset += sizeof(__be16);
memcpy(&tx_header->rfc1042_hdr, &snap, sizeof(struct rfc_1042_hdr)); memcpy(&tx_header->rfc1042_hdr, &snap, sizeof(struct rfc_1042_hdr));
......
...@@ -30,7 +30,7 @@ struct rfc_1042_hdr { ...@@ -30,7 +30,7 @@ struct rfc_1042_hdr {
u8 llc_ssap; u8 llc_ssap;
u8 llc_ctrl; u8 llc_ctrl;
u8 snap_oui[3]; u8 snap_oui[3];
u16 snap_type; __be16 snap_type;
}; };
struct rx_packet_hdr { struct rx_packet_hdr {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment