diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2013-12-02 23:17:51 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-12-09 15:35:28 -0500 |
commit | c613d16fa77fb7738a436ba23979ecf60ec82494 (patch) | |
tree | d6fcfe4c45cb1217708c20713da244558fce8e93 | |
parent | 1bf947a79177643f33b875586642b61cb175782a (diff) |
mwifiex: fix an issue with Appletalk devices
SNAP/LLC header in the AARP packet is being stripped off while
preparing an EthernetII header.
Annex M, Table M.3 in 802.11 spec says that some header
(ex. AppleTalk AARP(2)) should pass through untouched.
This patch modifies the check to exclude/include EthernetII
header translation for special cases.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_rx.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/uap_txrx.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_rx.c b/drivers/net/wireless/mwifiex/sta_rx.c index 241c0e5fc8f..45238995952 100644 --- a/drivers/net/wireless/mwifiex/sta_rx.c +++ b/drivers/net/wireless/mwifiex/sta_rx.c @@ -94,8 +94,12 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv, rx_pkt_hdr = (void *)local_rx_pd + le16_to_cpu(local_rx_pd->rx_pkt_offset); - if (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header, - sizeof(rfc1042_header))) { + if ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header, + sizeof(bridge_tunnel_header))) || + (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header, + sizeof(rfc1042_header)) && + ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_AARP && + ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX)) { /* * Replace the 803 header and rfc1042 header (llc/snap) with an * EthernetII header, keep the src/dst and snap_type diff --git a/drivers/net/wireless/mwifiex/uap_txrx.c b/drivers/net/wireless/mwifiex/uap_txrx.c index 0d4b7d62ebc..a0bd954b3ab 100644 --- a/drivers/net/wireless/mwifiex/uap_txrx.c +++ b/drivers/net/wireless/mwifiex/uap_txrx.c @@ -111,8 +111,12 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv, return; } - if (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header, - sizeof(rfc1042_header))) { + if ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header, + sizeof(bridge_tunnel_header))) || + (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header, + sizeof(rfc1042_header)) && + ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_AARP && + ntohs(rx_pkt_hdr->rfc1042_hdr.snap_type) != ETH_P_IPX)) { /* Replace the 803 header and rfc1042 header (llc/snap) with * an Ethernet II header, keep the src/dst and snap_type * (ethertype). |