struct device_attribute *attr,
char *buf)
{
- int count;
+ int count = 0;
struct bonding *bond = to_bond(d);
- if ((bond->params.mode != BOND_MODE_XOR) &&
- (bond->params.mode != BOND_MODE_8023AD)) {
- // Not Applicable
- count = sprintf(buf, "NA\n");
- } else {
+ if ((bond->params.mode == BOND_MODE_XOR) ||
+ (bond->params.mode == BOND_MODE_8023AD)) {
count = sprintf(buf, "%s %d\n",
xmit_hashtype_tbl[bond->params.xmit_policy].modename,
bond->params.xmit_policy);
if (bond->primary_slave)
count = sprintf(buf, "%s\n", bond->primary_slave->dev->name);
- else
- count = sprintf(buf, "\n");
return count;
}
{
struct slave *curr;
struct bonding *bond = to_bond(d);
- int count;
+ int count = 0;
read_lock(&bond->curr_slave_lock);
curr = bond->curr_active_slave;
if (USES_PRIMARY(bond->params.mode) && curr)
count = sprintf(buf, "%s\n", curr->dev->name);
- else
- count = sprintf(buf, "\n");
return count;
}
struct ad_info ad_info;
count = sprintf(buf, "%d\n", (bond_3ad_get_active_agg_info(bond, &ad_info)) ? 0 : ad_info.aggregator_id);
}
- else
- count = sprintf(buf, "\n");
return count;
}
struct ad_info ad_info;
count = sprintf(buf, "%d\n", (bond_3ad_get_active_agg_info(bond, &ad_info)) ? 0: ad_info.ports);
}
- else
- count = sprintf(buf, "\n");
return count;
}
struct ad_info ad_info;
count = sprintf(buf, "%d\n", (bond_3ad_get_active_agg_info(bond, &ad_info)) ? 0 : ad_info.actor_key);
}
- else
- count = sprintf(buf, "\n");
return count;
}
struct ad_info ad_info;
count = sprintf(buf, "%d\n", (bond_3ad_get_active_agg_info(bond, &ad_info)) ? 0 : ad_info.partner_key);
}
- else
- count = sprintf(buf, "\n");
return count;
}
print_mac(mac, ad_info.partner_system));
}
}
- else
- count = sprintf(buf, "\n");
return count;
}