| 15 | #include <rtdbg.h> |
| 16 | |
| 17 | static int __genphy_set_adv(int adv,int advertise) |
| 18 | { |
| 19 | adv &= ~(RT_ADVERTISE_ALL | RT_ADVERTISE_100BASE4 | RT_ADVERTISE_PAUSE_CAP | |
| 20 | RT_ADVERTISE_PAUSE_ASYM); |
| 21 | if (advertise & RT_ADVERTISED__10baseT_Half) |
| 22 | adv |= RT_ADVERTISE_10HALF; |
| 23 | if (advertise & RT_ADVERTISED__10baseT_Full) |
| 24 | adv |= RT_ADVERTISE_10FULL; |
| 25 | if (advertise & RT_ADVERTISED__100baseT_Half) |
| 26 | adv |= RT_ADVERTISE_100HALF; |
| 27 | if (advertise & RT_ADVERTISED__100baseT_Full) |
| 28 | adv |= RT_ADVERTISE_100FULL; |
| 29 | if (advertise & RT_ADVERTISED__Pause) |
| 30 | adv |= RT_ADVERTISE_PAUSE_CAP; |
| 31 | if (advertise & RT_ADVERTISED__Asym_Pause) |
| 32 | adv |= RT_ADVERTISE_PAUSE_ASYM; |
| 33 | if (advertise & RT_ADVERTISED__1000baseX_Half) |
| 34 | adv |= RT_ADVERTISE_1000XHALF; |
| 35 | if (advertise & RT_ADVERTISED__1000baseX_Full) |
| 36 | adv |= RT_ADVERTISE_1000XFULL; |
| 37 | |
| 38 | return adv; |
| 39 | } |
| 40 | static int __genphy_config_advert(struct rt_phy_device *phydev) |
| 41 | { |
| 42 | rt_uint32_t advertise; |
no outgoing calls
no test coverage detected