mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[TCPIP] Remove code duplication to get max link speed, MTU and max packet size
This is already done when link goes up, in ReconfigureAdapter() function.
This commit is contained in:
parent
89b685007a
commit
382836f087
1 changed files with 0 additions and 32 deletions
|
@ -1371,38 +1371,6 @@ BOOLEAN BindAdapter(
|
||||||
TI_DbgPrint(DEBUG_DATALINK,("Adapter Description: %wZ\n",
|
TI_DbgPrint(DEBUG_DATALINK,("Adapter Description: %wZ\n",
|
||||||
&IF->Description));
|
&IF->Description));
|
||||||
|
|
||||||
/* Get maximum link speed */
|
|
||||||
NdisStatus = NDISCall(Adapter,
|
|
||||||
NdisRequestQueryInformation,
|
|
||||||
OID_GEN_LINK_SPEED,
|
|
||||||
&IF->Speed,
|
|
||||||
sizeof(UINT));
|
|
||||||
|
|
||||||
if (!NT_SUCCESS(NdisStatus))
|
|
||||||
IF->Speed = IP_DEFAULT_LINK_SPEED;
|
|
||||||
|
|
||||||
Adapter->Speed = IF->Speed * 100L;
|
|
||||||
|
|
||||||
/* Get maximum frame size */
|
|
||||||
NdisStatus = NDISCall(Adapter,
|
|
||||||
NdisRequestQueryInformation,
|
|
||||||
OID_GEN_MAXIMUM_FRAME_SIZE,
|
|
||||||
&Adapter->MTU,
|
|
||||||
sizeof(UINT));
|
|
||||||
if (NdisStatus != NDIS_STATUS_SUCCESS)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
IF->MTU = Adapter->MTU;
|
|
||||||
|
|
||||||
/* Get maximum packet size */
|
|
||||||
NdisStatus = NDISCall(Adapter,
|
|
||||||
NdisRequestQueryInformation,
|
|
||||||
OID_GEN_MAXIMUM_TOTAL_SIZE,
|
|
||||||
&Adapter->MaxPacketSize,
|
|
||||||
sizeof(UINT));
|
|
||||||
if (NdisStatus != NDIS_STATUS_SUCCESS)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/* Register interface with IP layer */
|
/* Register interface with IP layer */
|
||||||
IPRegisterInterface(IF);
|
IPRegisterInterface(IF);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue