@@ -20,7 +20,7 @@ struct qlcnic_stats {
2020 int stat_offset ;
2121};
2222
23- #define QLC_SIZEOF (m ) FIELD_SIZEOF (struct qlcnic_adapter, m)
23+ #define QLC_SIZEOF (m ) sizeof_field (struct qlcnic_adapter, m)
2424#define QLC_OFF (m ) offsetof(struct qlcnic_adapter, m)
2525static const u32 qlcnic_fw_dump_level [] = {
2626 0x3 , 0x7 , 0xf , 0x1f , 0x3f , 0x7f , 0xff
@@ -351,9 +351,9 @@ static int qlcnic_82xx_get_link_ksettings(struct qlcnic_adapter *adapter,
351351 case QLCNIC_BRDTYPE_P3P_REF_QG :
352352 case QLCNIC_BRDTYPE_P3P_4_GB :
353353 case QLCNIC_BRDTYPE_P3P_4_GB_MM :
354-
355354 supported |= SUPPORTED_Autoneg ;
356355 advertising |= ADVERTISED_Autoneg ;
356+ fallthrough ;
357357 case QLCNIC_BRDTYPE_P3P_10G_CX4 :
358358 case QLCNIC_BRDTYPE_P3P_10G_CX4_LP :
359359 case QLCNIC_BRDTYPE_P3P_10000_BASE_T :
@@ -377,6 +377,7 @@ static int qlcnic_82xx_get_link_ksettings(struct qlcnic_adapter *adapter,
377377 supported |= SUPPORTED_TP ;
378378 check_sfp_module = netif_running (adapter -> netdev ) &&
379379 ahw -> has_link_events ;
380+ fallthrough ;
380381 case QLCNIC_BRDTYPE_P3P_10G_XFP :
381382 supported |= SUPPORTED_FIBRE ;
382383 advertising |= ADVERTISED_FIBRE ;
@@ -1047,6 +1048,8 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode)
10471048
10481049 for (i = 0 ; i < QLCNIC_NUM_ILB_PKT ; i ++ ) {
10491050 skb = netdev_alloc_skb (adapter -> netdev , QLCNIC_ILB_PKT_SIZE );
1051+ if (!skb )
1052+ break ;
10501053 qlcnic_create_loopback_buff (skb -> data , adapter -> mac_addr );
10511054 skb_put (skb , QLCNIC_ILB_PKT_SIZE );
10521055 adapter -> ahw -> diag_cnt = 0 ;
@@ -1539,24 +1542,7 @@ static int qlcnic_set_intr_coalesce(struct net_device *netdev,
15391542 if (ethcoal -> rx_coalesce_usecs > 0xffff ||
15401543 ethcoal -> rx_max_coalesced_frames > 0xffff ||
15411544 ethcoal -> tx_coalesce_usecs > 0xffff ||
1542- ethcoal -> tx_max_coalesced_frames > 0xffff ||
1543- ethcoal -> rx_coalesce_usecs_irq ||
1544- ethcoal -> rx_max_coalesced_frames_irq ||
1545- ethcoal -> tx_coalesce_usecs_irq ||
1546- ethcoal -> tx_max_coalesced_frames_irq ||
1547- ethcoal -> stats_block_coalesce_usecs ||
1548- ethcoal -> use_adaptive_rx_coalesce ||
1549- ethcoal -> use_adaptive_tx_coalesce ||
1550- ethcoal -> pkt_rate_low ||
1551- ethcoal -> rx_coalesce_usecs_low ||
1552- ethcoal -> rx_max_coalesced_frames_low ||
1553- ethcoal -> tx_coalesce_usecs_low ||
1554- ethcoal -> tx_max_coalesced_frames_low ||
1555- ethcoal -> pkt_rate_high ||
1556- ethcoal -> rx_coalesce_usecs_high ||
1557- ethcoal -> rx_max_coalesced_frames_high ||
1558- ethcoal -> tx_coalesce_usecs_high ||
1559- ethcoal -> tx_max_coalesced_frames_high )
1545+ ethcoal -> tx_max_coalesced_frames > 0xffff )
15601546 return - EINVAL ;
15611547
15621548 err = qlcnic_config_intr_coalesce (adapter , ethcoal );
@@ -1831,6 +1817,8 @@ qlcnic_set_dump(struct net_device *netdev, struct ethtool_dump *val)
18311817}
18321818
18331819const struct ethtool_ops qlcnic_ethtool_ops = {
1820+ .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
1821+ ETHTOOL_COALESCE_MAX_FRAMES ,
18341822 .get_drvinfo = qlcnic_get_drvinfo ,
18351823 .get_regs_len = qlcnic_get_regs_len ,
18361824 .get_regs = qlcnic_get_regs ,
@@ -1862,6 +1850,8 @@ const struct ethtool_ops qlcnic_ethtool_ops = {
18621850};
18631851
18641852const struct ethtool_ops qlcnic_sriov_vf_ethtool_ops = {
1853+ .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
1854+ ETHTOOL_COALESCE_MAX_FRAMES ,
18651855 .get_drvinfo = qlcnic_get_drvinfo ,
18661856 .get_regs_len = qlcnic_get_regs_len ,
18671857 .get_regs = qlcnic_get_regs ,
0 commit comments