Index: trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp	(revision 53081)
+++ trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp	(revision 53082)
@@ -2412,5 +2412,4 @@
 
 #define DRIVERHWID _T("sun_VBoxNetAdp")
-#define DRIVERHWID_NDIS6 _T("sun_VBoxNetAdp6")
 
 #define SetErrBreak(strAndArgs) \
@@ -2569,5 +2568,5 @@
                      t += _tcslen (t) + 1)
                 {
-                    if (!_tcsicmp (DRIVERHWID, t) || !_tcsicmp (DRIVERHWID_NDIS6, t))
+                    if (!_tcsicmp (DRIVERHWID, t))
                     {
                           /* get the device instance ID */
@@ -2789,5 +2788,5 @@
                 while (t && *t && t < (TCHAR *) &detailBuf [RT_ELEMENTS(detailBuf)])
                 {
-                    if (!_tcsicmp(t, DRIVERHWID) || !_tcsicmp(t, DRIVERHWID_NDIS6))
+                    if (!_tcsicmp(t, DRIVERHWID))
                         break;
 
Index: trunk/src/VBox/HostDrivers/VBoxNetFlt/win/ndis6/VBoxNetAdp-win.h
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetFlt/win/ndis6/VBoxNetAdp-win.h	(revision 53081)
+++ trunk/src/VBox/HostDrivers/VBoxNetFlt/win/ndis6/VBoxNetAdp-win.h	(revision 53082)
@@ -35,5 +35,5 @@
 #define VBOXNETADPWIN_TAG                    'ANBV'
 
-#define VBOXNETADPWIN_ATTR_FLAGS             NDIS_MINIPORT_ATTRIBUTES_NDIS_WDM
+#define VBOXNETADPWIN_ATTR_FLAGS             NDIS_MINIPORT_ATTRIBUTES_NDIS_WDM | NDIS_MINIPORT_ATTRIBUTES_NO_HALT_ON_SUSPEND
 #define VBOXNETADP_MAC_OPTIONS               NDIS_MAC_OPTION_NO_LOOPBACK
 #define VBOXNETADP_SUPPORTED_FILTERS         (NDIS_PACKET_TYPE_DIRECTED | \
Index: trunk/src/VBox/HostDrivers/VBoxNetFlt/win/ndis6/VBoxNetAdp6.inf
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetFlt/win/ndis6/VBoxNetAdp6.inf	(revision 53081)
+++ trunk/src/VBox/HostDrivers/VBoxNetFlt/win/ndis6/VBoxNetAdp6.inf	(revision 53082)
@@ -32,11 +32,11 @@
 
 [VBox]
-%VBoxNetAdp6_Desc% = VBoxNetAdp6.ndi, sun_VBoxNetAdp6
+%VBoxNetAdp6_Desc% = VBoxNetAdp6.ndi, sun_VBoxNetAdp
 
 [VBox.NTx86]
-%VBoxNetAdp6_Desc% = VBoxNetAdp6.ndi, sun_VBoxNetAdp6
+%VBoxNetAdp6_Desc% = VBoxNetAdp6.ndi, sun_VBoxNetAdp
 
 [VBox.NTamd64]
-%VBoxNetAdp6_Desc% = VBoxNetAdp6.ndi, sun_VBoxNetAdp6
+%VBoxNetAdp6_Desc% = VBoxNetAdp6.ndi, sun_VBoxNetAdp
 
 [VBoxNetAdp6.ndi]
Index: trunk/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp	(revision 53081)
+++ trunk/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp	(revision 53082)
@@ -201,6 +201,5 @@
     if (hr == S_OK)
     {
-        if (!_wcsnicmp(pDevId, L"sun_VBoxNetAdp", sizeof(L"sun_VBoxNetAdp")/2) ||
-            !_wcsnicmp(pDevId, L"sun_VBoxNetAdp6", sizeof(L"sun_VBoxNetAdp6")/2))
+        if (!_wcsnicmp(pDevId, L"sun_VBoxNetAdp", sizeof(L"sun_VBoxNetAdp")/2))
         {
             *pbShouldBind = false;
Index: trunk/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpInstall.cpp
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpInstall.cpp	(revision 53081)
+++ trunk/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpInstall.cpp	(revision 53082)
@@ -22,10 +22,9 @@
 #include <devguid.h>
 
+#define VBOX_NETADP_HWID L"sun_VBoxNetAdp"
 #ifdef NDIS60
 #define VBOX_NETADP_INF L"VBoxNetAdp6.inf"
-#define VBOX_NETADP_HWID L"sun_VBoxNetAdp6"
 #else /* !NDIS60 */
 #define VBOX_NETADP_INF L"VBoxNetAdp.inf"
-#define VBOX_NETADP_HWID L"sun_VBoxNetAdp"
 #endif /* !NDIS60 */
 
@@ -141,4 +140,11 @@
     {
         BOOL fRebootRequired = FALSE;
+        /*
+         * Before we can update the driver for existing adapters we need to remove
+         * all old driver packages from the driver cache. Otherwise we may end up
+         * with both NDIS5 and NDIS6 versions of VBoxNetAdp in the cache which
+         * will cause all sorts of trouble.
+         */
+        VBoxDrvCfgInfUninstallAllF(L"Net", VBOX_NETADP_HWID, SUOI_FORCEDELETE);
         hr = VBoxNetCfgWinUpdateHostOnlyNetworkInterface(VBOX_NETADP_INF, &fRebootRequired, VBOX_NETADP_HWID);
         if (SUCCEEDED(hr))
Index: trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 53081)
+++ trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 53082)
@@ -5178,24 +5178,28 @@
                 CoTaskMemFree(pswzBindName);
 
-                wchar_t * pswzHwId;
-                hrc = pAdaptorComponent->GetId(&pswzHwId);
+                /* Assume we should use the old NDIS5.1 version of driver which uses TRUNKTYPE_NETADP */
+                trunkType = TRUNKTYPE_NETADP;
+
+                HKEY hkParams;
+                hrc = pAdaptorComponent->OpenParamKey(&hkParams);
                 Assert(hrc == S_OK);
                 if (hrc == S_OK)
                 {
-                    if (!_wcsnicmp(pswzHwId, L"sun_VBoxNetAdp6", sizeof(L"sun_VBoxNetAdp6")/2))
+                    WCHAR swzInfSection[16];
+                    DWORD dwSize = sizeof(swzInfSection);
+                    hrc = RegQueryValueExW(hkParams, L"InfSection", NULL, NULL, (LPBYTE)swzInfSection, &dwSize);
+                    if (hrc == S_OK)
                     {
-                        /*
-                         * This is NDIS 6.x miniport, it relies on NetLwf filter to
-                         * run actual traffic. We use netflt attachment instead of
-                         * netadp, which is used in case of NDIS 5.x.
-                         */
-                        InsertConfigInteger(pCfg, "TrunkType", kIntNetTrunkType_NetFlt);
-                        trunkType = TRUNKTYPE_NETFLT;
+                        if (!_wcsnicmp(swzInfSection, L"VBoxNetAdp6.ndi", sizeof(L"VBoxNetAdp6.ndi")/2))
+                        {
+                            /*
+                             * This is NDIS 6.x miniport, it relies on NetLwf filter to
+                             * run actual traffic. We use netflt attachment instead of
+                             * netadp, which is used in case of NDIS 5.x.
+                             */
+                            trunkType = TRUNKTYPE_NETFLT;
+                        }
                     }
-                    else
-                    {
-                        InsertConfigInteger(pCfg, "TrunkType", kIntNetTrunkType_NetAdp);
-                        trunkType = TRUNKTYPE_NETADP;
-                    }
+                    RegCloseKey(hkParams);
                 }
                 else
@@ -5203,8 +5207,7 @@
                     LogRel(("Console::i_configNetwork: INetCfgComponent::GetId(%s) failed, err (0x%x), "
                             "falling back to NDIS5 attachment\n", pszTrunkName, hrc));
-                    InsertConfigInteger(pCfg, "TrunkType", kIntNetTrunkType_NetAdp);
-                    trunkType = TRUNKTYPE_NETADP;
-                }
-                CoTaskMemFree(pswzHwId);
+                    /* Nothing to do here as the trunk type defaults to NETADP */
+                }
+                InsertConfigInteger(pCfg, "TrunkType", trunkType == TRUNKTYPE_NETFLT ? kIntNetTrunkType_NetFlt : kIntNetTrunkType_NetAdp);
 
                 pAdaptorComponent.setNull();
Index: trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/win/NetIf-win.cpp	(revision 53081)
+++ trunk/src/VBox/Main/src-server/win/NetIf-win.cpp	(revision 53082)
@@ -1537,9 +1537,9 @@
                                                         if (hr == S_OK)
                                                         {
-                                                            if (!_wcsnicmp(pId, L"sun_VBoxNetAdp6", sizeof(L"sun_VBoxNetAdp6")/2))
-                                                            {
-                                                                vboxNetWinAddComponent(&list, pMpNcc, HostNetworkInterfaceType_HostOnly, -1);
-                                                            }
-                                                            else
+                                                            /*
+                                                             * Host-only interfaces are ignored here and included into the list
+                                                             * later in netIfListHostAdapters()
+                                                             */
+                                                            if (_wcsnicmp(pId, L"sun_VBoxNetAdp", sizeof(L"sun_VBoxNetAdp")/2))
                                                             {
                                                                 vboxNetWinAddComponent(&list, pMpNcc, HostNetworkInterfaceType_Bridged,
@@ -1577,11 +1577,5 @@
     }
 
-    /*
-     * There are two places where host-only adapters get added to the list.
-     * The following call adds NDIS5 miniports while NDIS6 miniports are
-     * added in the loop above. This is because NDIS6 miniports are in fact
-     * used as bridged adapters, they have netlwf filter installed in their
-     * stack and as a result they show up during bridged adapter enumeration.
-     */
+    /* Add host-only adapters to the list */
     netIfListHostAdapters(list);
 
