Source
134
134
return 0;
135
135
}
136
136
137
137
/**
138
138
* mii_ethtool_get_link_ksettings - get settings that are specified in @cmd
139
139
* @mii: MII interface
140
140
* @cmd: requested ethtool_link_ksettings
141
141
*
142
142
* The @cmd parameter is expected to have been cleared before calling
143
143
* mii_ethtool_get_link_ksettings().
144
-
*
145
-
* Returns 0 for success, negative on error.
146
144
*/
147
-
int mii_ethtool_get_link_ksettings(struct mii_if_info *mii,
148
-
struct ethtool_link_ksettings *cmd)
145
+
void mii_ethtool_get_link_ksettings(struct mii_if_info *mii,
146
+
struct ethtool_link_ksettings *cmd)
149
147
{
150
148
struct net_device *dev = mii->dev;
151
149
u16 bmcr, bmsr, ctrl1000 = 0, stat1000 = 0;
152
150
u32 nego, supported, advertising, lp_advertising;
153
151
154
152
supported = (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |
155
153
SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |
156
154
SUPPORTED_Autoneg | SUPPORTED_TP | SUPPORTED_MII);
157
155
if (mii->supports_gmii)
158
156
supported |= SUPPORTED_1000baseT_Half |
220
218
mii->full_duplex = cmd->base.duplex;
221
219
222
220
ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
223
221
supported);
224
222
ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising,
225
223
advertising);
226
224
ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.lp_advertising,
227
225
lp_advertising);
228
226
229
227
/* ignore maxtxpkt, maxrxpkt for now */
230
-
231
-
return 0;
232
228
}
233
229
234
230
/**
235
231
* mii_ethtool_sset - set settings that are specified in @ecmd
236
232
* @mii: MII interface
237
233
* @ecmd: requested ethtool_cmd
238
234
*
239
235
* Returns 0 for success, negative on error.
240
236
*/
241
237
int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)