@@ -6949,6 +6949,11 @@ static void stmmac_service_task(struct work_struct *work)
clear_bit(STMMAC_SERVICE_SCHED, &priv->state);
}
+static bool stmmac_use_phy_wol(struct stmmac_priv *priv)
+{
+ return priv->plat->flags & STMMAC_FLAG_USE_PHY_WOL;
+}
+
/**
* stmmac_hw_init - Init the MAC device
* @priv: driver private structure
@@ -6983,7 +6988,7 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
*/
priv->plat->enh_desc = priv->dma_cap.enh_desc;
priv->plat->pmt = priv->dma_cap.pmt_remote_wake_up &&
- !(priv->plat->flags & STMMAC_FLAG_USE_PHY_WOL);
+ !stmmac_use_phy_wol(priv);
priv->hw->pmt = priv->plat->pmt;
if (priv->dma_cap.hash_tb_sz) {
priv->hw->multicast_filter_bins =
Add a convenient helper to make it easier to check the STMMAC_FLAG_USE_PHY_WOL flag which is useful for the follow up commit. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> --- Changelog: v4: - new patch drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)