[ipoib] Add support for another mlnx series of GUIDs.
[mirror/winof/.git] / ulp / ipoib / kernel / ipoib_xfr_mgr.h
index 5063643..96c1373 100644 (file)
@@ -207,19 +207,22 @@ ipoib_mac_from_mlx_guid(
 {\r
        const uint8_t   *p_guid = (const uint8_t*)&port_guid;\r
        uint32_t                low24;\r
+       net16_t                 guid_middle;\r
 \r
        /* Port guid is in network byte order.  OUI is in lower 3 bytes. */\r
        ASSERT( p_guid[0] == 0x00 && p_guid[1] == 0x02 && p_guid[2] == 0xc9 );\r
 \r
-       if( (port_guid & CL_HTON64( 0x000000ffff000000 )) !=\r
-               CL_HTON64(0x0000000200000000))\r
-       {\r
+       guid_middle = (net16_t)((port_guid & CL_HTON64( 0x000000ffff000000 )) >>24);\r
+\r
+       if (guid_middle == 2) {\r
+                       p_mac_addr->addr[0] = 0;\r
+       } else if (guid_middle == 3) {\r
+                       p_mac_addr->addr[0] = 2;\r
+       } else {\r
                return IB_INVALID_GUID;\r
        }\r
-\r
        low24 = ((uint32_t)cl_ntoh64( port_guid ) & 0x00FFFFFF);\r
 \r
-       p_mac_addr->addr[0] = p_guid[0];\r
        p_mac_addr->addr[1] = p_guid[1];\r
        p_mac_addr->addr[2] = p_guid[2];\r
        p_mac_addr->addr[3] = (uint8_t)(low24 >> 16);\r