File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,11 @@ pub enum EthernetPhy<M: Miim> {
252
252
253
253
impl < M : Miim > Phy < M > for EthernetPhy < M > {
254
254
fn best_supported_advertisement ( & self ) -> ieee802_3_miim:: AutoNegotiationAdvertisement {
255
- unimplemented ! ( )
255
+ match self {
256
+ EthernetPhy :: LAN8720A ( phy) => phy. best_supported_advertisement ( ) ,
257
+ EthernetPhy :: LAN8742A ( phy) => phy. best_supported_advertisement ( ) ,
258
+ EthernetPhy :: KSZ8081R ( phy) => phy. best_supported_advertisement ( ) ,
259
+ }
256
260
}
257
261
258
262
fn get_miim ( & mut self ) -> & mut M {
@@ -309,4 +313,13 @@ impl<M: Miim> EthernetPhy<M> {
309
313
}
310
314
}
311
315
}
316
+
317
+ #[ allow( dead_code) ]
318
+ pub fn speed ( & mut self ) -> Option < ieee802_3_miim:: phy:: PhySpeed > {
319
+ match self {
320
+ EthernetPhy :: LAN8720A ( phy) => phy. link_speed ( ) ,
321
+ EthernetPhy :: LAN8742A ( phy) => phy. link_speed ( ) ,
322
+ EthernetPhy :: KSZ8081R ( phy) => phy. link_speed ( ) ,
323
+ }
324
+ }
312
325
}
You can’t perform that action at this time.
0 commit comments