This is done so that we can use this field for both ingress and
egress flags.

Signed-off-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org>
---
 drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c   | 10 +++++-----
 drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h   |  2 +-
 drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c |  5 ++---
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c 
b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
index cedacdd..7e7704d 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
@@ -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;
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h 
b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h
index 2ea9fe3..00e4634 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h
@@ -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];
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c 
b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
index b2d317e3..8e1f43a 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
@@ -69,8 +69,7 @@ static void rmnet_set_skb_proto(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 @@ static void rmnet_set_skb_proto(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);
 
-- 
1.9.1

Reply via email to