Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7356cdef authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: stmmac: Add check for HWTSTAMP_FILTER_ALL filter"

parents 2170285e 53b6970e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1768,6 +1768,14 @@ static int ethqos_set_early_eth_param(struct stmmac_priv *priv,
	return ret;
}

bool qcom_ethqos_ipa_enabled(void)
{
#ifdef CONFIG_ETH_IPA_OFFLOAD
	return pethqos->ipa_enabled;
#endif
	return false;
}

static int qcom_ethqos_probe(struct platform_device *pdev)
{
	struct device_node *np = pdev->dev.of_node;
+1 −0
Original line number Diff line number Diff line
@@ -194,5 +194,6 @@ int stmmac_dvr_probe(struct device *device,
		     struct stmmac_resources *res);
void stmmac_disable_eee_mode(struct stmmac_priv *priv);
bool stmmac_eee_init(struct stmmac_priv *priv);
bool qcom_ethqos_ipa_enabled(void);

#endif /* __STMMAC_H__ */
+7 −0
Original line number Diff line number Diff line
@@ -539,6 +539,13 @@ static int stmmac_hwtstamp_ioctl(struct net_device *dev, struct ifreq *ifr)
			   sizeof(struct hwtstamp_config)))
		return -EFAULT;

	if (qcom_ethqos_ipa_enabled() &&
	    config.rx_filter == HWTSTAMP_FILTER_ALL) {
		netdev_alert(priv->dev,
			     "No hw timestamping since ipa is enabled\n");
		return -EOPNOTSUPP;
	}

	netdev_dbg(priv->dev, "%s config flags:0x%x, tx_type:0x%x, rx_filter:0x%x\n",
		   __func__, config.flags, config.tx_type, config.rx_filter);