}
        }
 
-       pr_debug("Port %d Received link speed %d update from adapter\n",
-                port->actor_port_number, speed);
+       netdev_dbg(slave->bond->dev, "Port %d Received link speed %d update from adapter\n",
+                  port->actor_port_number, speed);
        return speed;
 }
 
                switch (slave->duplex) {
                case DUPLEX_FULL:
                        retval = 0x1;
-                       pr_debug("Port %d Received status full duplex update from adapter\n",
-                                port->actor_port_number);
+                       netdev_dbg(slave->bond->dev, "Port %d Received status full duplex update from adapter\n",
+                                  port->actor_port_number);
                        break;
                case DUPLEX_HALF:
                default:
                        retval = 0x0;
-                       pr_debug("Port %d Received status NOT full duplex update from adapter\n",
-                                port->actor_port_number);
+                       netdev_dbg(slave->bond->dev, "Port %d Received status NOT full duplex update from adapter\n",
+                                  port->actor_port_number);
                        break;
                }
        }
                        /* detect loopback situation */
                        if (MAC_ADDRESS_EQUAL(&(lacpdu->actor_system),
                                              &(port->actor_system))) {
-                               pr_err("%s: An illegal loopback occurred on adapter (%s)\n"
+                               netdev_err(port->slave->bond->dev, "An illegal loopback occurred on adapter (%s)\n"
                                       "Check the configuration to verify that all adapters are connected to 802.3ad compliant switch ports\n",
-                                      port->slave->bond->dev->name,
                                       port->slave->dev->name);
                                return;
                        }
                                port->next_port_in_aggregator = NULL;
                                port->actor_port_aggregator_identifier = 0;
 
-                               pr_debug("Port %d left LAG %d\n",
-                                        port->actor_port_number,
-                                        temp_aggregator->aggregator_identifier);
+                               netdev_dbg(bond->dev, "Port %d left LAG %d\n",
+                                          port->actor_port_number,
+                                          temp_aggregator->aggregator_identifier);
                                /* if the aggregator is empty, clear its
                                 * parameters, and set it ready to be attached
                                 */
                        /* meaning: the port was related to an aggregator
                         * but was not on the aggregator port list
                         */
-                       pr_warn_ratelimited("%s: Warning: Port %d (on %s) was related to aggregator %d but was not on its port list\n",
-                                           port->slave->bond->dev->name,
-                                           port->actor_port_number,
-                                           port->slave->dev->name,
-                                           port->aggregator->aggregator_identifier);
+                       net_warn_ratelimited("%s: Warning: Port %d (on %s) was related to aggregator %d but was not on its port list\n",
+                                            port->slave->bond->dev->name,
+                                            port->actor_port_number,
+                                            port->slave->dev->name,
+                                            port->aggregator->aggregator_identifier);
                }
        }
        /* search on all aggregators for a suitable aggregator for this port */
                        port->next_port_in_aggregator = aggregator->lag_ports;
                        port->aggregator->num_of_ports++;
                        aggregator->lag_ports = port;
-                       pr_debug("Port %d joined LAG %d(existing LAG)\n",
-                                port->actor_port_number,
-                                port->aggregator->aggregator_identifier);
+                       netdev_dbg(bond->dev, "Port %d joined LAG %d(existing LAG)\n",
+                                  port->actor_port_number,
+                                  port->aggregator->aggregator_identifier);
 
                        /* mark this port as selected */
                        port->sm_vars |= AD_PORT_SELECTED;
                        /* mark this port as selected */
                        port->sm_vars |= AD_PORT_SELECTED;
 
-                       pr_debug("Port %d joined LAG %d(new LAG)\n",
-                                port->actor_port_number,
-                                port->aggregator->aggregator_identifier);
+                       netdev_dbg(bond->dev, "Port %d joined LAG %d(new LAG)\n",
+                                  port->actor_port_number,
+                                  port->aggregator->aggregator_identifier);
                } else {
-                       pr_err("%s: Port %d (on %s) did not find a suitable aggregator\n",
-                              port->slave->bond->dev->name,
+                       netdev_err(bond->dev, "Port %d (on %s) did not find a suitable aggregator\n",
                               port->actor_port_number, port->slave->dev->name);
                }
        }
                break;
 
        default:
-               pr_warn_ratelimited("%s: Impossible agg select mode %d\n",
-                                   curr->slave->bond->dev->name,
-                                   __get_agg_selection_mode(curr->lag_ports));
+               net_warn_ratelimited("%s: Impossible agg select mode %d\n",
+                                    curr->slave->bond->dev->name,
+                                    __get_agg_selection_mode(curr->lag_ports));
                break;
        }
 
 
        /* if there is new best aggregator, activate it */
        if (best) {
-               pr_debug("best Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
-                        best->aggregator_identifier, best->num_of_ports,
-                        best->actor_oper_aggregator_key,
-                        best->partner_oper_aggregator_key,
-                        best->is_individual, best->is_active);
-               pr_debug("best ports %p slave %p %s\n",
-                        best->lag_ports, best->slave,
-                        best->slave ? best->slave->dev->name : "NULL");
+               netdev_dbg(bond->dev, "best Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
+                          best->aggregator_identifier, best->num_of_ports,
+                          best->actor_oper_aggregator_key,
+                          best->partner_oper_aggregator_key,
+                          best->is_individual, best->is_active);
+               netdev_dbg(bond->dev, "best ports %p slave %p %s\n",
+                          best->lag_ports, best->slave,
+                          best->slave ? best->slave->dev->name : "NULL");
 
                bond_for_each_slave_rcu(bond, slave, iter) {
                        agg = &(SLAVE_AD_INFO(slave)->aggregator);
 
-                       pr_debug("Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
-                                agg->aggregator_identifier, agg->num_of_ports,
-                                agg->actor_oper_aggregator_key,
-                                agg->partner_oper_aggregator_key,
-                                agg->is_individual, agg->is_active);
+                       netdev_dbg(bond->dev, "Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
+                                  agg->aggregator_identifier, agg->num_of_ports,
+                                  agg->actor_oper_aggregator_key,
+                                  agg->partner_oper_aggregator_key,
+                                  agg->is_individual, agg->is_active);
                }
 
                /* check if any partner replys */
                if (best->is_individual) {
-                       pr_warn_ratelimited("%s: Warning: No 802.3ad response from the link partner for any adapters in the bond\n",
-                                           best->slave ?
-                                           best->slave->bond->dev->name : "NULL");
+                       net_warn_ratelimited("%s: Warning: No 802.3ad response from the link partner for any adapters in the bond\n",
+                                            best->slave ?
+                                            best->slave->bond->dev->name : "NULL");
                }
 
                best->is_active = 1;
-               pr_debug("LAG %d chosen as the active LAG\n",
-                        best->aggregator_identifier);
-               pr_debug("Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
-                        best->aggregator_identifier, best->num_of_ports,
-                        best->actor_oper_aggregator_key,
-                        best->partner_oper_aggregator_key,
-                        best->is_individual, best->is_active);
+               netdev_dbg(bond->dev, "LAG %d chosen as the active LAG\n",
+                          best->aggregator_identifier);
+               netdev_dbg(bond->dev, "Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
+                          best->aggregator_identifier, best->num_of_ports,
+                          best->actor_oper_aggregator_key,
+                          best->partner_oper_aggregator_key,
+                          best->is_individual, best->is_active);
 
                /* disable the ports that were related to the former
                 * active_aggregator
 
        /* if slave is null, the whole port is not initialized */
        if (!port->slave) {
-               pr_warn("Warning: %s: Trying to unbind an uninitialized port on %s\n",
-                       slave->bond->dev->name, slave->dev->name);
+               netdev_warn(bond->dev, "Trying to unbind an uninitialized port on %s\n",
+                           slave->dev->name);
                return;
        }
 
-       pr_debug("Unbinding Link Aggregation Group %d\n",
-                aggregator->aggregator_identifier);
+       netdev_dbg(bond->dev, "Unbinding Link Aggregation Group %d\n",
+                  aggregator->aggregator_identifier);
 
        /* Tell the partner that this port is not suitable for aggregation */
        port->actor_oper_port_state &= ~AD_STATE_AGGREGATION;
                         * new aggregator
                         */
                        if ((new_aggregator) && ((!new_aggregator->lag_ports) || ((new_aggregator->lag_ports == port) && !new_aggregator->lag_ports->next_port_in_aggregator))) {
-                               pr_debug("Some port(s) related to LAG %d - replacing with LAG %d\n",
-                                        aggregator->aggregator_identifier,
-                                        new_aggregator->aggregator_identifier);
+                               netdev_dbg(bond->dev, "Some port(s) related to LAG %d - replacing with LAG %d\n",
+                                          aggregator->aggregator_identifier,
+                                          new_aggregator->aggregator_identifier);
 
                                if ((new_aggregator->lag_ports == port) &&
                                    new_aggregator->is_active) {
-                                       pr_info("%s: Removing an active aggregator\n",
-                                               aggregator->slave->bond->dev->name);
+                                       netdev_info(bond->dev, "Removing an active aggregator\n");
                                         select_new_active_agg = 1;
                                }
 
                                if (select_new_active_agg)
                                        ad_agg_selection_logic(__get_first_agg(port));
                        } else {
-                               pr_warn("%s: Warning: unbinding aggregator, and could not find a new aggregator for its ports\n",
-                                       slave->bond->dev->name);
+                               netdev_warn(bond->dev, "unbinding aggregator, and could not find a new aggregator for its ports\n");
                        }
                } else {
                        /* in case that the only port related to this
                        select_new_active_agg = aggregator->is_active;
                        ad_clear_agg(aggregator);
                        if (select_new_active_agg) {
-                               pr_info("%s: Removing an active aggregator\n",
-                                       slave->bond->dev->name);
+                               netdev_info(bond->dev, "Removing an active aggregator\n");
                                /* select new active aggregator */
                                temp_aggregator = __get_first_agg(port);
                                if (temp_aggregator)
                }
        }
 
-       pr_debug("Unbinding port %d\n", port->actor_port_number);
+       netdev_dbg(bond->dev, "Unbinding port %d\n", port->actor_port_number);
 
        /* find the aggregator that this port is connected to */
        bond_for_each_slave(bond, slave_iter, iter) {
                                        select_new_active_agg = temp_aggregator->is_active;
                                        ad_clear_agg(temp_aggregator);
                                        if (select_new_active_agg) {
-                                               pr_info("%s: Removing an active aggregator\n",
-                                                       slave->bond->dev->name);
+                                               netdev_info(bond->dev, "Removing an active aggregator\n");
                                                /* select new active aggregator */
                                                ad_agg_selection_logic(__get_first_agg(port));
                                        }
                /* select the active aggregator for the bond */
                if (port) {
                        if (!port->slave) {
-                               pr_warn_ratelimited("%s: Warning: bond's first port is uninitialized\n",
-                                                   bond->dev->name);
+                               net_warn_ratelimited("%s: Warning: bond's first port is uninitialized\n",
+                                                    bond->dev->name);
                                goto re_arm;
                        }
 
        bond_for_each_slave_rcu(bond, slave, iter) {
                port = &(SLAVE_AD_INFO(slave)->port);
                if (!port->slave) {
-                       pr_warn_ratelimited("%s: Warning: Found an uninitialized port\n",
+                       net_warn_ratelimited("%s: Warning: Found an uninitialized port\n",
                                            bond->dev->name);
                        goto re_arm;
                }
                port = &(SLAVE_AD_INFO(slave)->port);
 
                if (!port->slave) {
-                       pr_warn_ratelimited("%s: Warning: port of slave %s is uninitialized\n",
-                                           slave->dev->name, slave->bond->dev->name);
+                       net_warn_ratelimited("%s: Warning: port of slave %s is uninitialized\n",
+                                            slave->dev->name, slave->bond->dev->name);
                        return ret;
                }
 
                switch (lacpdu->subtype) {
                case AD_TYPE_LACPDU:
                        ret = RX_HANDLER_CONSUMED;
-                       pr_debug("Received LACPDU on port %d\n",
-                                port->actor_port_number);
+                       netdev_dbg(slave->bond->dev, "Received LACPDU on port %d\n",
+                                  port->actor_port_number);
                        /* Protect against concurrent state machines */
                        __get_state_machine_lock(port);
                        ad_rx_machine(lacpdu, port);
 
                        switch (((struct bond_marker *)lacpdu)->tlv_type) {
                        case AD_MARKER_INFORMATION_SUBTYPE:
-                               pr_debug("Received Marker Information on port %d\n",
-                                        port->actor_port_number);
+                               netdev_dbg(slave->bond->dev, "Received Marker Information on port %d\n",
+                                          port->actor_port_number);
                                ad_marker_info_received((struct bond_marker *)lacpdu, port);
                                break;
 
                        case AD_MARKER_RESPONSE_SUBTYPE:
-                               pr_debug("Received Marker Response on port %d\n",
-                                        port->actor_port_number);
+                               netdev_dbg(slave->bond->dev, "Received Marker Response on port %d\n",
+                                          port->actor_port_number);
                                ad_marker_response_received((struct bond_marker *)lacpdu, port);
                                break;
 
                        default:
-                               pr_debug("Received an unknown Marker subtype on slot %d\n",
-                                        port->actor_port_number);
+                               netdev_dbg(slave->bond->dev, "Received an unknown Marker subtype on slot %d\n",
+                                          port->actor_port_number);
                        }
                }
        }
 
        /* if slave is null, the whole port is not initialized */
        if (!port->slave) {
-               pr_warn("Warning: %s: speed changed for uninitialized port on %s\n",
-                       slave->bond->dev->name, slave->dev->name);
+               netdev_warn(slave->bond->dev, "speed changed for uninitialized port on %s\n",
+                           slave->dev->name);
                return;
        }
 
        port->actor_admin_port_key &= ~AD_SPEED_KEY_BITS;
        port->actor_oper_port_key = port->actor_admin_port_key |=
                (__get_link_speed(port) << 1);
-       pr_debug("Port %d changed speed\n", port->actor_port_number);
+       netdev_dbg(slave->bond->dev, "Port %d changed speed\n", port->actor_port_number);
        /* there is no need to reselect a new aggregator, just signal the
         * state machines to reinitialize
         */
 
        /* if slave is null, the whole port is not initialized */
        if (!port->slave) {
-               pr_warn("%s: Warning: duplex changed for uninitialized port on %s\n",
-                       slave->bond->dev->name, slave->dev->name);
+               netdev_warn(slave->bond->dev, "duplex changed for uninitialized port on %s\n",
+                           slave->dev->name);
                return;
        }
 
        port->actor_admin_port_key &= ~AD_DUPLEX_KEY_BITS;
        port->actor_oper_port_key = port->actor_admin_port_key |=
                __get_duplex(port);
-       pr_debug("Port %d changed duplex\n", port->actor_port_number);
+       netdev_dbg(slave->bond->dev, "Port %d changed duplex\n", port->actor_port_number);
        /* there is no need to reselect a new aggregator, just signal the
         * state machines to reinitialize
         */
 
        /* if slave is null, the whole port is not initialized */
        if (!port->slave) {
-               pr_warn("Warning: %s: link status changed for uninitialized port on %s\n",
-                       slave->bond->dev->name, slave->dev->name);
+               netdev_warn(slave->bond->dev, "link status changed for uninitialized port on %s\n",
+                           slave->dev->name);
                return;
        }
 
                port->actor_oper_port_key = (port->actor_admin_port_key &=
                                             ~AD_SPEED_KEY_BITS);
        }
-       pr_debug("Port %d changed link status to %s\n",
-                port->actor_port_number,
-                link == BOND_LINK_UP ? "UP" : "DOWN");
+       netdev_dbg(slave->bond->dev, "Port %d changed link status to %s\n",
+                  port->actor_port_number,
+                  link == BOND_LINK_UP ? "UP" : "DOWN");
        /* there is no need to reselect a new aggregator, just signal the
         * state machines to reinitialize
         */
        int agg_id;
 
        if (__bond_3ad_get_active_agg_info(bond, &ad_info)) {
-               pr_debug("%s: Error: __bond_3ad_get_active_agg_info failed\n",
-                        dev->name);
+               netdev_dbg(dev, "__bond_3ad_get_active_agg_info failed\n");
                goto err_free;
        }
 
        agg_id = ad_info.aggregator_id;
 
        if (slaves_in_agg == 0) {
-               pr_debug("%s: Error: active aggregator is empty\n", dev->name);
+               netdev_dbg(dev, "active aggregator is empty\n");
                goto err_free;
        }
 
        }
 
        if (slave_agg_no >= 0) {
-               pr_err("%s: Error: Couldn't find a slave to tx on for aggregator ID %d\n",
-                      dev->name, agg_id);
+               netdev_err(dev, "Couldn't find a slave to tx on for aggregator ID %d\n",
+                          agg_id);
                goto err_free;
        }