mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
fw-api: CL 16267319 - update fw common interface files
extend enet.h and if_eapol.h defs Change-Id: Idaad91407642ef1941e096e8e2f93564de10ed93 CRs-Fixed: 2262693
This commit is contained in:
parent
431d668328
commit
cfec47fbf3
1 changed files with 62 additions and 12 deletions
74
fw/enet.h
74
fw/enet.h
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2014 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2014, 2017, 2021 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -52,13 +52,13 @@ struct ethernet_hdr_t {
|
|||
#define ETHERNET_MTU (ETHERNET_MAX_LEN - (ETHERNET_HDR_LEN + ETHERNET_CRC_LEN))
|
||||
|
||||
|
||||
struct llc_snap_hdr_t {
|
||||
typedef struct llc_snap_hdr_t {
|
||||
A_UINT8 dsap;
|
||||
A_UINT8 ssap;
|
||||
A_UINT8 cntl;
|
||||
A_UINT8 org_code[3];
|
||||
A_UINT8 ethertype[2];
|
||||
};
|
||||
} LLC_SNAP_HDR;
|
||||
|
||||
#define LLC_SNAP_HDR_LEN (sizeof(struct llc_snap_hdr_t))
|
||||
#define LLC_SNAP_HDR_OFFSET_ETHERTYPE \
|
||||
|
|
@ -74,6 +74,23 @@ struct ethernet_vlan_hdr_t {
|
|||
A_UINT8 ethertype[2];
|
||||
};
|
||||
|
||||
typedef PREPACK struct _wai_hdr {
|
||||
A_UINT8 version[2];
|
||||
A_UINT8 type;
|
||||
A_UINT8 stype;
|
||||
A_UINT8 reserve[2];
|
||||
A_UINT8 length[2];
|
||||
A_UINT8 rxseq[2];
|
||||
A_UINT8 frag_sc;
|
||||
A_UINT8 more_frag;
|
||||
/* followed octets of data */
|
||||
} POSTPACK wai_hdr;
|
||||
|
||||
typedef PREPACK struct {
|
||||
A_UINT16 vlan_tci;
|
||||
A_UINT16 vlan_encap_p;
|
||||
} POSTPACK vlan_hdr_t;
|
||||
|
||||
#define ETHERTYPE_IS_EAPOL_WAPI(typeorlen) \
|
||||
((typeorlen) == ETHERTYPE_PAE || \
|
||||
(typeorlen) == ETHERTYPE_WAI)
|
||||
|
|
@ -136,16 +153,49 @@ struct ethernet_vlan_hdr_t {
|
|||
#define BTEP_SNAP_ORGCODE_2 0xf8
|
||||
|
||||
|
||||
#define IS_SNAP(_llc) ((_llc)->dsap == LLC_SNAP_LSAP && \
|
||||
(_llc)->ssap == LLC_SNAP_LSAP && \
|
||||
(_llc)->cntl == LLC_UI)
|
||||
#define WAI_FRAME_TYPE 0X01
|
||||
#define WAPI_M4_TYPE 0x0c
|
||||
#define WAPI_M2_TYPE 0x09
|
||||
|
||||
#define IS_RFC1042(_llc) ((_llc)->org_code[0] == RFC1042_SNAP_ORGCODE_0 && \
|
||||
(_llc)->org_code[1] == RFC1042_SNAP_ORGCODE_1 && \
|
||||
(_llc)->org_code[2] == RFC1042_SNAP_ORGCODE_2)
|
||||
|
||||
#define IS_BTEP(_llc) ((_llc)->org_code[0] == BTEP_SNAP_ORGCODE_0 && \
|
||||
(_llc)->org_code[1] == BTEP_SNAP_ORGCODE_1 && \
|
||||
(_llc)->org_code[2] == BTEP_SNAP_ORGCODE_2)
|
||||
#define ICMP_PROTOCOL 1
|
||||
#define TCP_PROTOCOL 6
|
||||
#define UDP_PROTOCOL 17
|
||||
#define IGMP_PROTOCOL 2
|
||||
#define ICMPV6_PROTOCOL 58
|
||||
#define BOOTP_SERVER_PORT 67
|
||||
#define BOOTP_CLIENT_PORT 68
|
||||
#define MLD_QUERY 130
|
||||
#define MLD_DONE 132
|
||||
|
||||
|
||||
#define IS_EAPOL(typeorlen) \
|
||||
((typeorlen) == ETHERTYPE_PAE || \
|
||||
(typeorlen) == ETHERTYPE_WAI)
|
||||
|
||||
#define IS_SNAP(_llc) \
|
||||
((_llc)->dsap == LLC_SNAP_LSAP && \
|
||||
(_llc)->ssap == LLC_SNAP_LSAP && \
|
||||
(_llc)->cntl == LLC_UI)
|
||||
|
||||
#define IS_RFC1042(_llc) \
|
||||
((_llc)->org_code[0] == RFC1042_SNAP_ORGCODE_0 && \
|
||||
(_llc)->org_code[1] == RFC1042_SNAP_ORGCODE_1 && \
|
||||
(_llc)->org_code[2] == RFC1042_SNAP_ORGCODE_2)
|
||||
|
||||
#define IS_BTEP(_llc) \
|
||||
((_llc)->org_code[0] == BTEP_SNAP_ORGCODE_0 && \
|
||||
(_llc)->org_code[1] == BTEP_SNAP_ORGCODE_1 && \
|
||||
(_llc)->org_code[2] == BTEP_SNAP_ORGCODE_2)
|
||||
|
||||
#define IS_MULTICAST(_hdr) (*(A_UINT8 *)(_hdr) & 0x1)
|
||||
#define IS_BROADCAST(_hdr) \
|
||||
((*((A_UINT8 *)(_hdr) + 0) == 0xff) && \
|
||||
(*((A_UINT8 *)(_hdr) + 1) == 0xff) && \
|
||||
(*((A_UINT8 *)(_hdr) + 2) == 0xff) && \
|
||||
(*((A_UINT8 *)(_hdr) + 3) == 0xff) && \
|
||||
(*((A_UINT8 *)(_hdr) + 4) == 0xff) && \
|
||||
(*((A_UINT8 *)(_hdr) + 5) == 0xff))
|
||||
|
||||
|
||||
#endif /* _ENET__H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue