mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 11:46:46 +07:00
staging: vt6656: removed custom definitions of Ethernet packet types
Removed some unused definitions of Ethernet packet types, also replaced two of them with in-kernel counterparts from include/linux/if_ether.h Signed-off-by: Andres More <more.andres@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
bd5dc30e3e
commit
203e4615ee
@ -200,10 +200,9 @@ s_vProcessRxMACHeader (
|
||||
} else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) {
|
||||
cbHeaderSize += 6;
|
||||
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
|
||||
if ((*pwType!= TYPE_PKT_IPX) && (*pwType != cpu_to_le16(0xF380))) {
|
||||
}
|
||||
else {
|
||||
cbHeaderSize -= 8;
|
||||
if ((*pwType == cpu_to_le16(ETH_P_IPX)) ||
|
||||
(*pwType == cpu_to_le16(0xF380))) {
|
||||
cbHeaderSize -= 8;
|
||||
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
|
||||
if (bIsWEP) {
|
||||
if (bExtIV) {
|
||||
|
@ -1701,10 +1701,11 @@ s_bPacketToWirelessUsb(
|
||||
|
||||
// 802.1H
|
||||
if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) {
|
||||
if (pDevice->dwDiagRefCount == 0) {
|
||||
if ( (psEthHeader->wType == TYPE_PKT_IPX) ||
|
||||
(psEthHeader->wType == cpu_to_le16(0xF380))) {
|
||||
memcpy((PBYTE) (pbyPayloadHead), &abySNAP_Bridgetunnel[0], 6);
|
||||
if (pDevice->dwDiagRefCount == 0) {
|
||||
if ((psEthHeader->wType == cpu_to_le16(ETH_P_IPX)) ||
|
||||
(psEthHeader->wType == cpu_to_le16(0xF380))) {
|
||||
memcpy((PBYTE) (pbyPayloadHead),
|
||||
abySNAP_Bridgetunnel, 6);
|
||||
} else {
|
||||
memcpy((PBYTE) (pbyPayloadHead), &abySNAP_RFC1042[0], 6);
|
||||
}
|
||||
@ -2840,9 +2841,10 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
|
||||
Packet_Type = skb->data[ETH_HLEN+1];
|
||||
Descriptor_type = skb->data[ETH_HLEN+1+1+2];
|
||||
Key_info = (skb->data[ETH_HLEN+1+1+2+1] << 8)|(skb->data[ETH_HLEN+1+1+2+2]);
|
||||
if (pDevice->sTxEthHeader.wType == TYPE_PKT_802_1x) {
|
||||
if(((Protocol_Version==1) ||(Protocol_Version==2)) &&
|
||||
(Packet_Type==3)) { //802.1x OR eapol-key challenge frame transfer
|
||||
if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
|
||||
/* 802.1x OR eapol-key challenge frame transfer */
|
||||
if (((Protocol_Version == 1) || (Protocol_Version == 2)) &&
|
||||
(Packet_Type == 3)) {
|
||||
bTxeapol_key = TRUE;
|
||||
if(!(Key_info & BIT3) && //WPA or RSN group-key challenge
|
||||
(Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key
|
||||
@ -2988,7 +2990,7 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
|
||||
}
|
||||
}
|
||||
|
||||
if (pDevice->sTxEthHeader.wType == TYPE_PKT_802_1x) {
|
||||
if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) {
|
||||
if (pDevice->byBBType != BB_TYPE_11A) {
|
||||
pDevice->wCurrentRate = RATE_1M;
|
||||
pDevice->byACKRate = RATE_1M;
|
||||
@ -3016,8 +3018,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
|
||||
|
||||
if (bNeedEncryption == TRUE) {
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType));
|
||||
if ((pDevice->sTxEthHeader.wType) == TYPE_PKT_802_1x) {
|
||||
bNeedEncryption = FALSE;
|
||||
if ((pDevice->sTxEthHeader.wType) == cpu_to_le16(ETH_P_PAE)) {
|
||||
bNeedEncryption = FALSE;
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType));
|
||||
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
|
||||
if (pTransmitKey == NULL) {
|
||||
|
@ -42,22 +42,8 @@
|
||||
|
||||
#ifdef __BIG_ENDIAN
|
||||
|
||||
#define TYPE_PKT_IP 0x0800 //
|
||||
#define TYPE_PKT_ARP 0x0806 //
|
||||
#define TYPE_PKT_RARP 0x8035 //
|
||||
#define TYPE_PKT_IPX 0x8137 //
|
||||
#define TYPE_PKT_802_1x 0x888e
|
||||
#define TYPE_PKT_PreAuth 0x88C7
|
||||
|
||||
#define TYPE_PKT_PING_M_REQ 0x8011 // master reguest
|
||||
#define TYPE_PKT_PING_S_GNT 0x8022 // slave grant
|
||||
#define TYPE_PKT_PING_M 0x8077 // pingpong master packet
|
||||
#define TYPE_PKT_PING_S 0x8088 // pingpong slave packet
|
||||
#define TYPE_PKT_WOL_M_REQ 0x8033 // WOL waker request
|
||||
#define TYPE_PKT_WOL_S_GNT 0x8044 // WOL sleeper grant
|
||||
#define TYPE_MGMT_PROBE_RSP 0x5000
|
||||
#define TYPE_PKT_VNT_DIAG 0x8011 // Diag Pkt
|
||||
#define TYPE_PKT_VNT_PER 0x8888 // Diag PER Pkt
|
||||
|
||||
//
|
||||
// wFrameCtl field in the S802_11Header
|
||||
//
|
||||
@ -94,23 +80,9 @@
|
||||
//
|
||||
// NOTE....
|
||||
// in network byte order, high byte is going first
|
||||
#define TYPE_PKT_IP 0x0008 //
|
||||
#define TYPE_PKT_ARP 0x0608 //
|
||||
#define TYPE_PKT_RARP 0x3580 //
|
||||
#define TYPE_PKT_IPX 0x3781 //
|
||||
|
||||
#define TYPE_PKT_802_1x 0x8e88
|
||||
#define TYPE_PKT_PreAuth 0xC788
|
||||
|
||||
#define TYPE_PKT_PING_M_REQ 0x1180 // master reguest
|
||||
#define TYPE_PKT_PING_S_GNT 0x2280 // slave grant
|
||||
#define TYPE_PKT_PING_M 0x7780 // pingpong master packet
|
||||
#define TYPE_PKT_PING_S 0x8880 // pingpong slave packet
|
||||
#define TYPE_PKT_WOL_M_REQ 0x3380 // WOL waker request
|
||||
#define TYPE_PKT_WOL_S_GNT 0x4480 // WOL sleeper grant
|
||||
#define TYPE_MGMT_PROBE_RSP 0x0050
|
||||
#define TYPE_PKT_VNT_DIAG 0x1180 // Diag Pkt
|
||||
#define TYPE_PKT_VNT_PER 0x8888 // Diag PER Pkt
|
||||
|
||||
//
|
||||
// wFrameCtl field in the S802_11Header
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user