]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
net: eqos: replace api as per k-4.4
authorJeetesh Burman <jburman@nvidia.com>
Tue, 3 May 2016 03:47:17 +0000 (09:17 +0530)
committerBhadram Varka <vbhadram@nvidia.com>
Fri, 16 Dec 2016 19:09:14 +0000 (00:39 +0530)
Bug 200195187

Change-Id: Ia0fa5f26856f387cea39dcf0bcdf6d2ead57cf8e
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/1140061
GVS: Gerrit_Virtual_Submit

drivers/net/ethernet/nvidia/eqos/drv.c
drivers/net/ethernet/nvidia/eqos/ptp.c

index 96c99f4056fb1e009257daee6734cdd96be9be31..617027371ea68747222844b4c31c7c263f1b74fd 100644 (file)
@@ -1712,9 +1712,13 @@ static int eqos_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 #ifdef EQOS_ENABLE_VLAN_TAG
        ptx_ring->vlan_tag_present = 0;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
        if (vlan_tx_tag_present(skb)) {
                USHORT vlan_tag = vlan_tx_tag_get(skb);
-
+#else
+       if (skb_vlan_tag_present(skb)) {
+               USHORT vlan_tag = skb_vlan_tag_get(skb);
+#endif
                vlan_tag |= (skb->priority << 13);
                ptx_ring->vlan_tag_present = 1;
                if (vlan_tag != ptx_ring->vlan_tag_id ||
index 5e5279c85eb264ff76637c9b453e31138a13ceaa..724ce64b55948634484c14810b7a267c9f671b02 100644 (file)
@@ -252,8 +252,13 @@ static struct ptp_clock_info eqos_ptp_clock_ops = {
        .pps = 0,       /* indicates whether the clk supports a PPS callback */
        .adjfreq = eqos_adjust_freq,
        .adjtime = eqos_adjust_time,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
        .gettime = eqos_get_time,
        .settime = eqos_set_time,
+#else
+       .gettime64 = eqos_get_time,
+       .settime64 = eqos_set_time,
+#endif
        .enable = eqos_enable,
 };