net: use eth_hw_addr_random() and reset addr_assign_type
[deliverable/linux.git] / drivers / net / ethernet / broadcom / bnx2x / bnx2x_main.c
index 1527aedd978645e8ca736dd6e37f6a80a11415bd..8e809c1408b48780a4f71153fbb5017246f9fc65 100644 (file)
@@ -9298,6 +9298,11 @@ static void __devinit bnx2x_link_settings_requested(struct bnx2x *bp)
                                        SPEED_AUTO_NEG;
                                bp->port.advertising[idx] |=
                                        bp->port.supported[idx];
+                               if (bp->link_params.phy[EXT_PHY1].type ==
+                                   PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833)
+                                       bp->port.advertising[idx] |=
+                                       (SUPPORTED_100baseT_Half |
+                                        SUPPORTED_100baseT_Full);
                        } else {
                                /* force 10G, no AN */
                                bp->link_params.req_line_speed[idx] =
@@ -9678,7 +9683,7 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp)
 
        if (BP_NOMCP(bp)) {
                BNX2X_ERROR("warning: random MAC workaround active\n");
-               random_ether_addr(bp->dev->dev_addr);
+               eth_hw_addr_random(bp->dev);
        } else if (IS_MF(bp)) {
                val2 = MF_CFG_RD(bp, func_mf_config[func].mac_upper);
                val = MF_CFG_RD(bp, func_mf_config[func].mac_lower);
@@ -11347,17 +11352,6 @@ static void bnx2x_eeh_recover(struct bnx2x *bp)
 
        mutex_init(&bp->port.phy_mutex);
 
-       bp->common.shmem_base = REG_RD(bp, MISC_REG_SHARED_MEM_ADDR);
-       bp->link_params.shmem_base = bp->common.shmem_base;
-       BNX2X_DEV_INFO("shmem offset is 0x%x\n", bp->common.shmem_base);
-
-       if (!bp->common.shmem_base ||
-           (bp->common.shmem_base < 0xA0000) ||
-           (bp->common.shmem_base >= 0xC0000)) {
-               BNX2X_DEV_INFO("MCP not active\n");
-               bp->flags |= NO_MCP_FLAG;
-               return;
-       }
 
        val = SHMEM_RD(bp, validity_map[BP_PORT(bp)]);
        if ((val & (SHR_MEM_VALIDITY_DEV_INFO | SHR_MEM_VALIDITY_MB))
This page took 0.026764 seconds and 5 git commands to generate.