staging rtl8723au: rtw_put_smap23a(): Use common SNAP header defines
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
deae03af12
commit
641f39a07c
@ -22,9 +22,6 @@
|
|||||||
#include <usb_ops.h>
|
#include <usb_ops.h>
|
||||||
#include <rtl8723a_xmit.h>
|
#include <rtl8723a_xmit.h>
|
||||||
|
|
||||||
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)
|
static void _init_txservq(struct tx_servq *ptxservq)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1244,23 +1241,14 @@ exit:
|
|||||||
*/
|
*/
|
||||||
s32 rtw_put_snap23a(u8 *data, u16 h_proto)
|
s32 rtw_put_snap23a(u8 *data, u16 h_proto)
|
||||||
{
|
{
|
||||||
struct ieee80211_snap_hdr *snap;
|
if (h_proto == ETH_P_IPX || h_proto == ETH_P_AARP)
|
||||||
u8 *oui;
|
ether_addr_copy(data, bridge_tunnel_header);
|
||||||
|
|
||||||
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;
|
|
||||||
else
|
else
|
||||||
oui = RFC1042_OUI;
|
ether_addr_copy(data, rfc1042_header);
|
||||||
snap->oui[0] = oui[0];
|
|
||||||
snap->oui[1] = oui[1];
|
data += ETH_ALEN;
|
||||||
snap->oui[2] = oui[2];
|
*(__be16 *)data = htons(h_proto);
|
||||||
*(u16 *)(data + SNAP_SIZE) = htons(h_proto);
|
return ETH_ALEN + sizeof(u16);
|
||||||
return SNAP_SIZE + sizeof(u16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_update_protection23a(struct rtw_adapter *padapter, u8 *ie, uint ie_len)
|
void rtw_update_protection23a(struct rtw_adapter *padapter, u8 *ie, uint ie_len)
|
||||||
|
Loading…
Reference in New Issue
Block a user