@@ -92,36 +92,6 @@ SMapLowLevelOutput(NetIF *pNetIF, PBuf *pOutput)
9292 return result ;
9393}
9494
95- // SMapOutput():
96-
97- // This function is called by the TCP/IP stack when an IP packet should be sent. It'll be invoked in the context of the
98- // tcpip-thread, hence no synchronization is required.
99- // For LWIP versions before v1.3.0.
100- #ifdef PRE_LWIP_130_COMPAT
101- static err_t
102- SMapOutput (NetIF * pNetIF , PBuf * pOutput , IPAddr * pIPAddr )
103- {
104- err_t result ;
105- PBuf * pBuf ;
106-
107- #if USE_GP_REGISTER
108- void * OldGP ;
109-
110- OldGP = SetModuleGP ();
111- #endif
112-
113- pBuf = etharp_output (pNetIF , pIPAddr , pOutput );
114-
115- result = pBuf != NULL ? SMapLowLevelOutput (pNetIF , pBuf ) : ERR_OK ;
116-
117- #if USE_GP_REGISTER
118- SetGP (OldGP );
119- #endif
120-
121- return result ;
122- }
123- #endif
124-
12595// SMapIFInit():
12696
12797// Should be called at the beginning of the program to set up the network interface.
@@ -138,20 +108,12 @@ SMapIFInit(NetIF *pNetIF)
138108 TxHead = NULL ;
139109 TxTail = NULL ;
140110
141- pNetIF -> name [0 ] = IFNAME0 ;
142- pNetIF -> name [1 ] = IFNAME1 ;
143- #ifdef PRE_LWIP_130_COMPAT
144- pNetIF -> output = & SMapOutput ; // For LWIP versions before v1.3.0.
145- #else
146- pNetIF -> output = & etharp_output ; // For LWIP 1.3.0 and later.
147- #endif
111+ pNetIF -> name [0 ] = IFNAME0 ;
112+ pNetIF -> name [1 ] = IFNAME1 ;
113+ pNetIF -> output = & etharp_output ;
148114 pNetIF -> linkoutput = & SMapLowLevelOutput ;
149115 pNetIF -> hwaddr_len = NETIF_MAX_HWADDR_LEN ;
150- #ifdef PRE_LWIP_130_COMPAT
151- pNetIF -> flags |= (NETIF_FLAG_LINK_UP | NETIF_FLAG_BROADCAST ); // For LWIP versions before v1.3.0.
152- #else
153- pNetIF -> flags |= (NETIF_FLAG_ETHARP | NETIF_FLAG_BROADCAST ); // For LWIP v1.3.0 and later.
154- #endif
116+ pNetIF -> flags |= (NETIF_FLAG_ETHARP | NETIF_FLAG_BROADCAST );
155117 pNetIF -> mtu = 1500 ;
156118
157119 // Get MAC address.
0 commit comments