net: qualcomm: rmnet: Rename ingress data format to data format
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Sun, 7 Jan 2018 18:36:34 +0000 (11:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jan 2018 18:58:49 +0000 (13:58 -0500)
This is done so that we can use this field for both ingress and
egress flags.

Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c

index cedacddf50fb893e72f69cc5b0990d25cca09c60..7e7704daf5f1e4928d69c1fa397a5f13354af2b8 100644 (file)
@@ -143,7 +143,7 @@ static int rmnet_newlink(struct net *src_net, struct net_device *dev,
                         struct nlattr *tb[], struct nlattr *data[],
                         struct netlink_ext_ack *extack)
 {
-       int ingress_format = RMNET_INGRESS_FORMAT_DEAGGREGATION;
+       u32 data_format = RMNET_INGRESS_FORMAT_DEAGGREGATION;
        struct net_device *real_dev;
        int mode = RMNET_EPMODE_VND;
        struct rmnet_endpoint *ep;
@@ -185,11 +185,11 @@ static int rmnet_newlink(struct net *src_net, struct net_device *dev,
                struct ifla_vlan_flags *flags;
 
                flags = nla_data(data[IFLA_VLAN_FLAGS]);
-               ingress_format = flags->flags & flags->mask;
+               data_format = flags->flags & flags->mask;
        }
 
-       netdev_dbg(dev, "data format [ingress 0x%08X]\n", ingress_format);
-       port->ingress_data_format = ingress_format;
+       netdev_dbg(dev, "data format [0x%08X]\n", data_format);
+       port->data_format = data_format;
 
        return 0;
 
@@ -353,7 +353,7 @@ static int rmnet_changelink(struct net_device *dev, struct nlattr *tb[],
                struct ifla_vlan_flags *flags;
 
                flags = nla_data(data[IFLA_VLAN_FLAGS]);
-               port->ingress_data_format = flags->flags & flags->mask;
+               port->data_format = flags->flags & flags->mask;
        }
 
        return 0;
index 2ea9fe3265715a3f5c7456968e5eb640824c4fbe..00e4634100d35f197b7c8c301b93400ea4981eb8 100644 (file)
@@ -32,7 +32,7 @@ struct rmnet_endpoint {
  */
 struct rmnet_port {
        struct net_device *dev;
-       u32 ingress_data_format;
+       u32 data_format;
        u8 nr_rmnet_devs;
        u8 rmnet_mode;
        struct hlist_head muxed_ep[RMNET_MAX_LOGICAL_EP];
index b2d317e34ee91ecea1f27a31dc77d74921a0890b..8e1f43a69227ceeb0e473464011857b22854b5d0 100644 (file)
@@ -69,8 +69,7 @@ __rmnet_map_ingress_handler(struct sk_buff *skb,
        u16 len;
 
        if (RMNET_MAP_GET_CD_BIT(skb)) {
-               if (port->ingress_data_format
-                   & RMNET_INGRESS_FORMAT_MAP_COMMANDS)
+               if (port->data_format & RMNET_INGRESS_FORMAT_MAP_COMMANDS)
                        return rmnet_map_command(skb, port);
 
                goto free_skb;
@@ -114,7 +113,7 @@ rmnet_map_ingress_handler(struct sk_buff *skb,
                skb_push(skb, ETH_HLEN);
        }
 
-       if (port->ingress_data_format & RMNET_INGRESS_FORMAT_DEAGGREGATION) {
+       if (port->data_format & RMNET_INGRESS_FORMAT_DEAGGREGATION) {
                while ((skbn = rmnet_map_deaggregate(skb)) != NULL)
                        __rmnet_map_ingress_handler(skbn, port);