Lines Matching refs:new_state
213 struct phy_link_state new_state = {}; in phy_rt_rtl8211f_get_link() local
233 new_state.is_up = physr & PHY_RT_RTL8211F_PHYSR_LINKSTATUS_MASK; in phy_rt_rtl8211f_get_link()
235 if (!new_state.is_up) { in phy_rt_rtl8211f_get_link()
244 new_state.speed = LINK_FULL_100BASE_T; in phy_rt_rtl8211f_get_link()
246 new_state.speed = LINK_HALF_100BASE_T; in phy_rt_rtl8211f_get_link()
251 new_state.speed = LINK_FULL_1000BASE_T; in phy_rt_rtl8211f_get_link()
253 new_state.speed = LINK_HALF_1000BASE_T; in phy_rt_rtl8211f_get_link()
259 new_state.speed = LINK_FULL_10BASE_T; in phy_rt_rtl8211f_get_link()
261 new_state.speed = LINK_HALF_10BASE_T; in phy_rt_rtl8211f_get_link()
266 if (memcmp(&old_state, &new_state, sizeof(struct phy_link_state)) != 0) { in phy_rt_rtl8211f_get_link()
267 LOG_INF("PHY %d is %s", config->addr, new_state.is_up ? "up" : "down"); in phy_rt_rtl8211f_get_link()
268 if (new_state.is_up) { in phy_rt_rtl8211f_get_link()
270 (PHY_LINK_IS_SPEED_1000M(new_state.speed) ? "1000" : in phy_rt_rtl8211f_get_link()
271 (PHY_LINK_IS_SPEED_100M(new_state.speed) ? "100" : "10")), in phy_rt_rtl8211f_get_link()
272 PHY_LINK_IS_FULL_DUPLEX(new_state.speed) ? "full" : "half"); in phy_rt_rtl8211f_get_link()
276 memcpy(state, &new_state, sizeof(struct phy_link_state)); in phy_rt_rtl8211f_get_link()