mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 10:42:21 +03:00
nvethernet: update code to use new structure
Remove not required members of ifr_data structure. Add structure in exported header file. Add support in code to understand new data structure. Bug 3704251 Change-Id: I495b34edaa6ac324933508c12a3612de4a52175b Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2782590 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Ashutosh Jha <ajha@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
36df82d64b
commit
e7ff48aaad
@@ -55,4 +55,22 @@ struct ether_l2_filter {
|
||||
/** Ethernet MAC address to be added */
|
||||
nveu8_t mac_address[OSI_ETH_ALEN];
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief struct ether_exported_ifr_data - Private data of struct ifreq
|
||||
*/
|
||||
struct ether_exported_ifr_data {
|
||||
/** Flags used for specific ioctl - like enable/disable */
|
||||
nveu32_t if_flags;
|
||||
/** qinx: Queue index to be used for certain ioctls */
|
||||
nveu32_t qinx;
|
||||
/** The private ioctl command number */
|
||||
nveu32_t ifcmd;
|
||||
/** Used to query the connected link speed */
|
||||
nveu32_t connected_speed;
|
||||
/** The return value of IOCTL handler func */
|
||||
nve32_t command_error;
|
||||
/** IOCTL cmd specific structure pointer */
|
||||
void *ptr;
|
||||
};
|
||||
#endif /* ETHER_EXPORT_H */
|
||||
|
||||
@@ -118,7 +118,7 @@ static bool ether_is_bc_addr(unsigned char *bc_addr)
|
||||
* @retval "nagative value" on Failure
|
||||
*/
|
||||
static int ether_set_avb_algo(struct net_device *ndev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(ndev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -174,7 +174,7 @@ static int ether_set_avb_algo(struct net_device *ndev,
|
||||
* @retval "nagative value" on Failure
|
||||
*/
|
||||
static int ether_m2m_tsync(struct net_device *ndev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(ndev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -214,7 +214,7 @@ static int ether_m2m_tsync(struct net_device *ndev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_get_tsc_ptp_cap(struct net_device *ndev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(ndev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -266,7 +266,7 @@ static int ether_get_tsc_ptp_cap(struct net_device *ndev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_get_avb_algo(struct net_device *ndev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(ndev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -315,7 +315,7 @@ static int ether_get_avb_algo(struct net_device *ndev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_ptp_offload(struct ether_priv_data *pdata,
|
||||
struct ether_ifr_data *ifrd_p)
|
||||
struct ether_exported_ifr_data *ifrd_p)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
struct ptp_offload_param param;
|
||||
@@ -415,7 +415,7 @@ static int ether_config_ptp_offload(struct ether_priv_data *pdata,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_arp_offload(struct ether_priv_data *pdata,
|
||||
struct ether_ifr_data *ifrd_p)
|
||||
struct ether_exported_ifr_data *ifrd_p)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
struct arp_offload_param param;
|
||||
@@ -465,7 +465,7 @@ static int ether_config_arp_offload(struct ether_priv_data *pdata,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_frp_cmd(struct net_device *dev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(dev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -541,7 +541,7 @@ static int ether_config_l3_l4_filtering(struct net_device *dev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_l2_filters(struct net_device *dev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(dev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -609,7 +609,7 @@ static int ether_config_l2_filters(struct net_device *dev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_ip4_filters(struct net_device *dev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(dev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -671,7 +671,7 @@ static int ether_config_ip4_filters(struct net_device *dev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_ip6_filters(struct net_device *dev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(dev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -735,7 +735,7 @@ static int ether_config_ip6_filters(struct net_device *dev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_tcp_udp_filters(struct net_device *dev,
|
||||
struct ether_ifr_data *ifdata,
|
||||
struct ether_exported_ifr_data *ifdata,
|
||||
unsigned int tcp_udp)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(dev);
|
||||
@@ -797,7 +797,7 @@ static int ether_config_tcp_udp_filters(struct net_device *dev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_vlan_filter(struct net_device *dev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(dev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -897,7 +897,7 @@ static int ether_config_mc_dmasel(struct net_device *dev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_l2_da_filter(struct net_device *dev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(dev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -1146,7 +1146,7 @@ static int ether_config_ptp_rxq(struct net_device *ndev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_est(struct net_device *dev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(dev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -1193,7 +1193,7 @@ static int ether_config_est(struct net_device *dev,
|
||||
* @retval "negative value" on Failure
|
||||
*/
|
||||
static int ether_config_fpe(struct net_device *dev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(dev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -1241,7 +1241,7 @@ static int ether_config_fpe(struct net_device *dev,
|
||||
* @retval "nagative value" on Failure
|
||||
*/
|
||||
static int ether_debug_intr_config(struct net_device *ndev,
|
||||
struct ether_ifr_data *ifdata)
|
||||
struct ether_exported_ifr_data *ifdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(ndev);
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
@@ -1283,7 +1283,7 @@ int ether_handle_priv_ioctl(struct net_device *ndev,
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(ndev);
|
||||
struct phy_device *phydev = ndev->phydev;
|
||||
struct ether_ifr_data ifdata;
|
||||
struct ether_exported_ifr_data ifdata;
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
#ifdef OSI_DEBUG
|
||||
struct osi_dma_priv_data *osi_dma = pdata->osi_dma;
|
||||
|
||||
@@ -75,36 +75,8 @@
|
||||
#ifdef OSI_DEBUG
|
||||
#define ETHER_DEBUG_INTR_CONFIG 60
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @brief struct ether_ifr_data - Private data of struct ifreq
|
||||
*/
|
||||
struct ether_ifr_data {
|
||||
/** Flags used for specific ioctl - like enable/disable */
|
||||
unsigned int if_flags;
|
||||
/** qinx: Queue index to be used for certain ioctls */
|
||||
unsigned int qinx;
|
||||
/** The private ioctl command number */
|
||||
unsigned int ifcmd;
|
||||
/** Used to indicate if context descriptor needs to be setup to
|
||||
* handle ioctl */
|
||||
unsigned int context_setup;
|
||||
/** Used to query the connected link speed */
|
||||
unsigned int connected_speed;
|
||||
/** Used to set Remote wakeup filters */
|
||||
unsigned int rwk_filter_values[EQOS_RWK_FILTER_LENGTH];
|
||||
/** Number of remote wakeup filters to use */
|
||||
unsigned int rwk_filter_length;
|
||||
/** The return value of IOCTL handler func */
|
||||
int command_error;
|
||||
/** test_done: Not in use, keep for app compatibility */
|
||||
int test_done;
|
||||
/** IOCTL cmd specific structure pointer */
|
||||
void *ptr;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief struct arp_offload_param - Parameter to support ARP offload.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user