void announce_802_3_packet( IN VOID *pAdSrc, IN PNDIS_PACKET pPacket, IN UCHAR OpMode) { PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdSrc; /* struct sk_buff *pRxPkt; */ PNDIS_PACKET pRxPkt; #ifdef INF_PPA_SUPPORT int ret = 0; unsigned int ppa_flags = 0; /* reserved for now */ #endif /* INF_PPA_SUPPORT */ pAd = pAd; /* avoid compile warning */ MEM_DBG_PKT_FREE_INC(pPacket); ASSERT(pPacket); /* pRxPkt = RTPKT_TO_OSPKT(pPacket); */ pRxPkt = pPacket; #ifdef CONFIG_STA_SUPPORT #endif /* CONFIG_STA_SUPPORT */ /* Push up the protocol stack */ #ifdef IKANOS_VX_1X0 IKANOS_DataFrameRx(pAd, pRxPkt); return; #endif /* IKANOS_VX_1X0 */ /* mark for bridge fast path, 2009/06/22 */ /* pRxPkt->protocol = eth_type_trans(pRxPkt, pRxPkt->dev); */ #ifdef INF_PPA_SUPPORT if (ppa_hook_directpath_send_fn && pAd->PPAEnable==TRUE ) { RtmpOsPktInfPpaSend(pRxPkt); pRxPkt=NULL; return; } #endif /* INF_PPA_SUPPORT */ { #ifdef CONFIG_RT2880_BRIDGING_ONLY /* pRxPkt->cb[22]=0xa8; */ PACKET_CB_ASSIGN(pRxPkt, 22) = 0xa8; #endif #if defined(CONFIG_RA_CLASSIFIER)||defined(CONFIG_RA_CLASSIFIER_MODULE) if(ra_classifier_hook_rx!= NULL) { unsigned int flags; RTMP_IRQ_LOCK(&pAd->page_lock, flags); ra_classifier_hook_rx(pRxPkt, classifier_cur_cycle); RTMP_IRQ_UNLOCK(&pAd->page_lock, flags); } #endif /* CONFIG_RA_CLASSIFIER */ #if !defined(CONFIG_RA_NAT_NONE) #if defined (CONFIG_RA_HW_NAT) || defined (CONFIG_RA_HW_NAT_MODULE) RtmpOsPktNatMagicTag(pRxPkt); #endif /* bruce+ * ra_sw_nat_hook_rx return 1 --> continue * ra_sw_nat_hook_rx return 0 --> FWD & without netif_rx */ if (ra_sw_nat_hook_rx!= NULL) { unsigned int flags; /* pRxPkt->protocol = eth_type_trans(pRxPkt, pRxPkt->dev); */ RtmpOsPktProtocolAssign(pRxPkt); RTMP_IRQ_LOCK(&pAd->page_lock, flags); if(ra_sw_nat_hook_rx(pRxPkt)) { RtmpOsPktRcvHandle(pRxPkt); } RTMP_IRQ_UNLOCK(&pAd->page_lock, flags); } #else { #if defined (CONFIG_RA_HW_NAT) || defined (CONFIG_RA_HW_NAT_MODULE) RtmpOsPktNatNone(pRxPkt); #endif /* CONFIG_RA_HW_NAT */ } #endif /* CONFIG_RA_NAT_NONE */ } /* pRxPkt->protocol = eth_type_trans(pRxPkt, pRxPkt->dev); */ RtmpOsPktProtocolAssign(pRxPkt); RtmpOsPktRcvHandle(pRxPkt); }
void announce_802_3_packet(void*pAdSrc,PNDIS_PACKET pPacket,unsigned char OpMode) { RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pAdSrc; PNDIS_PACKET pRxPkt = pPacket; ASSERT(pPacket); MEM_DBG_PKT_FREE_INC(pPacket); #ifdef CONFIG_STA_SUPPORT #endif /* CONFIG_STA_SUPPORT */ /* Push up the protocol stack */ #ifdef IKANOS_VX_1X0 { IKANOS_DataFrameRx(pAd, pRxPkt); return; } #endif /* IKANOS_VX_1X0 */ #ifdef INF_PPA_SUPPORT if (ppa_hook_directpath_send_fn && pAd->PPAEnable==TRUE ) { RtmpOsPktInfPpaSend(pRxPkt); pRxPkt=NULL; return; } #endif /* INF_PPA_SUPPORT */ { #ifdef CONFIG_RT2880_BRIDGING_ONLY PACKET_CB_ASSIGN(pRxPkt, 22) = 0xa8; #endif #if defined(CONFIG_RA_CLASSIFIER)||defined(CONFIG_RA_CLASSIFIER_MODULE) if(ra_classifier_hook_rx!= NULL) { unsigned int flags; RTMP_IRQ_LOCK(&pAd->page_lock, flags); ra_classifier_hook_rx(pRxPkt, classifier_cur_cycle); RTMP_IRQ_UNLOCK(&pAd->page_lock, flags); } #endif /* CONFIG_RA_CLASSIFIER */ #if !defined(CONFIG_RA_NAT_NONE) #if defined (CONFIG_RA_HW_NAT) || defined (CONFIG_RA_HW_NAT_MODULE) RtmpOsPktNatMagicTag(pRxPkt); #endif #ifdef RA_NAT_SUPPORT /* bruce+ * ra_sw_nat_hook_rx return 1 --> continue * ra_sw_nat_hook_rx return 0 --> FWD & without netif_rx */ if (ra_sw_nat_hook_rx!= NULL) { unsigned int flags; RtmpOsPktProtocolAssign(pRxPkt); RTMP_IRQ_LOCK(&pAd->page_lock, flags); if(ra_sw_nat_hook_rx(pRxPkt)) { RtmpOsPktRcvHandle(pRxPkt); } RTMP_IRQ_UNLOCK(&pAd->page_lock, flags); } #endif /* RA_NAT_SUPPORT */ #else { #if defined (CONFIG_RA_HW_NAT) || defined (CONFIG_RA_HW_NAT_MODULE) RtmpOsPktNatNone(pRxPkt); #endif /* CONFIG_RA_HW_NAT */ } #endif /* CONFIG_RA_NAT_NONE */ } RtmpOsPktProtocolAssign(pRxPkt); RtmpOsPktRcvHandle(pRxPkt); }