From: Jes Sorensen Date: Mon, 10 Nov 2014 23:11:38 +0000 (-0500) Subject: staging rtl8723au: rtw_put_smap23a(): Use common SNAP header defines X-Git-Tag: v5.15~16669^2~229 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=641f39a07cee88965c3aedbc4502e82b15b0e058;p=platform%2Fkernel%2Flinux-starfive.git staging rtl8723au: rtw_put_smap23a(): Use common SNAP header defines Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c b/drivers/staging/rtl8723au/core/rtw_xmit.c index b3bf86e..18a9f34 100644 --- a/drivers/staging/rtl8723au/core/rtw_xmit.c +++ b/drivers/staging/rtl8723au/core/rtw_xmit.c @@ -22,9 +22,6 @@ #include #include -static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 }; -static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 }; - static void _init_txservq(struct tx_servq *ptxservq) { @@ -1244,23 +1241,14 @@ exit: */ s32 rtw_put_snap23a(u8 *data, u16 h_proto) { - struct ieee80211_snap_hdr *snap; - u8 *oui; - - snap = (struct ieee80211_snap_hdr *)data; - snap->dsap = 0xaa; - snap->ssap = 0xaa; - snap->ctrl = 0x03; - - if (h_proto == 0x8137 || h_proto == 0x80f3) - oui = P802_1H_OUI; + if (h_proto == ETH_P_IPX || h_proto == ETH_P_AARP) + ether_addr_copy(data, bridge_tunnel_header); else - oui = RFC1042_OUI; - snap->oui[0] = oui[0]; - snap->oui[1] = oui[1]; - snap->oui[2] = oui[2]; - *(u16 *)(data + SNAP_SIZE) = htons(h_proto); - return SNAP_SIZE + sizeof(u16); + ether_addr_copy(data, rfc1042_header); + + data += ETH_ALEN; + *(__be16 *)data = htons(h_proto); + return ETH_ALEN + sizeof(u16); } void rtw_update_protection23a(struct rtw_adapter *padapter, u8 *ie, uint ie_len)