Commit 3fcd64cf authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by David S. Miller

bonding: fix 802.3ad support for 14G speed

This patch adds 14 Gbps enum definition, and fixes
aggregated bandwidth calculation based on above slave links.

Fixes: 0d7e2d21 ("IB/ipoib: add get_link_ksettings in ethtool")
Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: default avatarAndy Gospodarek <andy@greyhouse.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7c55067
......@@ -92,6 +92,7 @@ enum ad_link_speed_type {
AD_LINK_SPEED_2500MBPS,
AD_LINK_SPEED_5000MBPS,
AD_LINK_SPEED_10000MBPS,
AD_LINK_SPEED_14000MBPS,
AD_LINK_SPEED_20000MBPS,
AD_LINK_SPEED_25000MBPS,
AD_LINK_SPEED_40000MBPS,
......@@ -263,6 +264,7 @@ static inline int __check_agg_selection_timer(struct port *port)
* %AD_LINK_SPEED_2500MBPS,
* %AD_LINK_SPEED_5000MBPS,
* %AD_LINK_SPEED_10000MBPS
* %AD_LINK_SPEED_14000MBPS,
* %AD_LINK_SPEED_20000MBPS
* %AD_LINK_SPEED_25000MBPS
* %AD_LINK_SPEED_40000MBPS
......@@ -308,6 +310,10 @@ static u16 __get_link_speed(struct port *port)
speed = AD_LINK_SPEED_10000MBPS;
break;
case SPEED_14000:
speed = AD_LINK_SPEED_14000MBPS;
break;
case SPEED_20000:
speed = AD_LINK_SPEED_20000MBPS;
break;
......@@ -725,6 +731,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator)
case AD_LINK_SPEED_10000MBPS:
bandwidth = nports * 10000;
break;
case AD_LINK_SPEED_14000MBPS:
bandwidth = nports * 14000;
break;
case AD_LINK_SPEED_20000MBPS:
bandwidth = nports * 20000;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment