diff options
author | Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> | 2017-10-12 03:43:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-12 06:05:30 +0300 |
commit | 3352e6c45760fd6675468a35ef699ab94617cab4 (patch) | |
tree | f21ae07f293d88668b90cf3e734a8532ad2dde83 /drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | |
parent | 5451237ff7a77ded1d81538e3daa76dc3ee60538 (diff) | |
download | linux-3352e6c45760fd6675468a35ef699ab94617cab4.tar.xz |
net: qualcomm: rmnet: Convert the muxed endpoint to hlist
Rather than using a static array, use a hlist to store the muxed
endpoints and use the mux id to query the rmnet_device.
This is useful as usually very few mux ids are used.
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Cc: Dan Williams <dcbw@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h')
-rw-r--r-- | drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h index 123ccf41fc95..8849986980f8 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h @@ -23,6 +23,7 @@ struct rmnet_endpoint { u8 mux_id; struct net_device *egress_dev; + struct hlist_node hlnode; }; /* One instance of this structure is instantiated for each real_dev associated @@ -30,11 +31,11 @@ struct rmnet_endpoint { */ struct rmnet_port { struct net_device *dev; - struct rmnet_endpoint muxed_ep[RMNET_MAX_LOGICAL_EP]; u32 ingress_data_format; u32 egress_data_format; u8 nr_rmnet_devs; u8 rmnet_mode; + struct hlist_head muxed_ep[RMNET_MAX_LOGICAL_EP]; }; extern struct rtnl_link_ops rmnet_link_ops; @@ -45,5 +46,6 @@ struct rmnet_priv { }; struct rmnet_port *rmnet_get_port(struct net_device *real_dev); +struct rmnet_endpoint *rmnet_get_endpoint(struct rmnet_port *port, u8 mux_id); #endif /* _RMNET_CONFIG_H_ */ |