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

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

Merge "net: stmmac: copy from user fail handle"

parents 5646e832 b043e42f
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -141,18 +141,21 @@ u16 dwmac_qcom_select_queue(
	return txqueue_select;
}

void dwmac_qcom_program_avb_algorithm(
int dwmac_qcom_program_avb_algorithm(
	struct stmmac_priv *priv, struct ifr_data_struct *req)
{
	struct dwmac_qcom_avb_algorithm l_avb_struct, *u_avb_struct =
		(struct dwmac_qcom_avb_algorithm *)req->ptr;
	struct dwmac_qcom_avb_algorithm_params *avb_params;
	int ret = 0;

	ETHQOSDBG("\n");

	if (copy_from_user(&l_avb_struct, (void __user *)u_avb_struct,
			   sizeof(struct dwmac_qcom_avb_algorithm)))
			   sizeof(struct dwmac_qcom_avb_algorithm))) {
		ETHQOSERR("Failed to fetch AVB Struct\n");
		return -EFAULT;
	}

	if (priv->speed == SPEED_1000)
		avb_params = &l_avb_struct.speed1000params;
@@ -187,6 +190,7 @@ void dwmac_qcom_program_avb_algorithm(
	   l_avb_struct.qinx);

	ETHQOSDBG("\n");
	return ret;
}

unsigned int dwmac_qcom_get_plat_tx_coal_frames(
@@ -252,7 +256,7 @@ int ethqos_handle_prv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
			ret = ppsout_config(pdata, &eth_pps_cfg);
		break;
	case ETHQOS_AVB_ALGORITHM:
		dwmac_qcom_program_avb_algorithm(pdata, &req);
		ret = dwmac_qcom_program_avb_algorithm(pdata, &req);
		break;
	default:
		break;
+1 −1
Original line number Diff line number Diff line
@@ -571,7 +571,7 @@ struct dwmac_qcom_avb_algorithm {
	enum dwmac_qcom_queue_operating_mode op_mode;
};

void dwmac_qcom_program_avb_algorithm(
int dwmac_qcom_program_avb_algorithm(
	struct stmmac_priv *priv, struct ifr_data_struct *req);
unsigned int dwmac_qcom_get_plat_tx_coal_frames(
	struct sk_buff *skb);