aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-11-15 10:29:55 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-16 17:43:10 -0500
commitc8f44affb7244f2ac3e703cab13d55ede27621bb (patch)
tree62e7aea2916a8d7cab825fe500670c5113854c0f /drivers/net/ethernet/qlogic
parenta59e2ecb859f2ab03bb2e230709f8039472ad2c3 (diff)
net: introduce and use netdev_features_t for device features sets
v2: add couple missing conversions in drivers split unexporting netdev_fix_features() implemented %pNF convert sock::sk_route_(no?)caps Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic')
-rw-r--r--drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c6
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic.h5
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c9
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c2
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_main.c10
5 files changed, 19 insertions, 13 deletions
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
index 8cf3173ba488..7dd9a4b107e6 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
@@ -544,7 +544,8 @@ static void netxen_set_multicast_list(struct net_device *dev)
544 adapter->set_multi(dev); 544 adapter->set_multi(dev);
545} 545}
546 546
547static u32 netxen_fix_features(struct net_device *dev, u32 features) 547static netdev_features_t netxen_fix_features(struct net_device *dev,
548 netdev_features_t features)
548{ 549{
549 if (!(features & NETIF_F_RXCSUM)) { 550 if (!(features & NETIF_F_RXCSUM)) {
550 netdev_info(dev, "disabling LRO as RXCSUM is off\n"); 551 netdev_info(dev, "disabling LRO as RXCSUM is off\n");
@@ -555,7 +556,8 @@ static u32 netxen_fix_features(struct net_device *dev, u32 features)
555 return features; 556 return features;
556} 557}
557 558
558static int netxen_set_features(struct net_device *dev, u32 features) 559static int netxen_set_features(struct net_device *dev,
560 netdev_features_t features)
559{ 561{
560 struct netxen_adapter *adapter = netdev_priv(dev); 562 struct netxen_adapter *adapter = netdev_priv(dev);
561 int hw_lro; 563 int hw_lro;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 7ed53dbb8646..60976fc4ccc6 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -1466,8 +1466,9 @@ void qlcnic_advert_link_change(struct qlcnic_adapter *adapter, int linkup);
1466 1466
1467int qlcnic_fw_cmd_set_mtu(struct qlcnic_adapter *adapter, int mtu); 1467int qlcnic_fw_cmd_set_mtu(struct qlcnic_adapter *adapter, int mtu);
1468int qlcnic_change_mtu(struct net_device *netdev, int new_mtu); 1468int qlcnic_change_mtu(struct net_device *netdev, int new_mtu);
1469u32 qlcnic_fix_features(struct net_device *netdev, u32 features); 1469netdev_features_t qlcnic_fix_features(struct net_device *netdev,
1470int qlcnic_set_features(struct net_device *netdev, u32 features); 1470 netdev_features_t features);
1471int qlcnic_set_features(struct net_device *netdev, netdev_features_t features);
1471int qlcnic_config_hw_lro(struct qlcnic_adapter *adapter, int enable); 1472int qlcnic_config_hw_lro(struct qlcnic_adapter *adapter, int enable);
1472int qlcnic_config_bridged_mode(struct qlcnic_adapter *adapter, u32 enable); 1473int qlcnic_config_bridged_mode(struct qlcnic_adapter *adapter, u32 enable);
1473int qlcnic_send_lro_cleanup(struct qlcnic_adapter *adapter); 1474int qlcnic_send_lro_cleanup(struct qlcnic_adapter *adapter);
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
index bcb81e47543a..b528e52a8ee1 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
@@ -817,12 +817,13 @@ int qlcnic_change_mtu(struct net_device *netdev, int mtu)
817} 817}
818 818
819 819
820u32 qlcnic_fix_features(struct net_device *netdev, u32 features) 820netdev_features_t qlcnic_fix_features(struct net_device *netdev,
821 netdev_features_t features)
821{ 822{
822 struct qlcnic_adapter *adapter = netdev_priv(netdev); 823 struct qlcnic_adapter *adapter = netdev_priv(netdev);
823 824
824 if ((adapter->flags & QLCNIC_ESWITCH_ENABLED)) { 825 if ((adapter->flags & QLCNIC_ESWITCH_ENABLED)) {
825 u32 changed = features ^ netdev->features; 826 netdev_features_t changed = features ^ netdev->features;
826 features ^= changed & (NETIF_F_ALL_CSUM | NETIF_F_RXCSUM); 827 features ^= changed & (NETIF_F_ALL_CSUM | NETIF_F_RXCSUM);
827 } 828 }
828 829
@@ -833,10 +834,10 @@ u32 qlcnic_fix_features(struct net_device *netdev, u32 features)
833} 834}
834 835
835 836
836int qlcnic_set_features(struct net_device *netdev, u32 features) 837int qlcnic_set_features(struct net_device *netdev, netdev_features_t features)
837{ 838{
838 struct qlcnic_adapter *adapter = netdev_priv(netdev); 839 struct qlcnic_adapter *adapter = netdev_priv(netdev);
839 u32 changed = netdev->features ^ features; 840 netdev_features_t changed = netdev->features ^ features;
840 int hw_lro = (features & NETIF_F_LRO) ? QLCNIC_LRO_ENABLED : 0; 841 int hw_lro = (features & NETIF_F_LRO) ? QLCNIC_LRO_ENABLED : 0;
841 842
842 if (!(changed & NETIF_F_LRO)) 843 if (!(changed & NETIF_F_LRO))
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 0bd163828e33..823f845ddc04 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -792,7 +792,7 @@ qlcnic_set_netdev_features(struct qlcnic_adapter *adapter,
792 struct qlcnic_esw_func_cfg *esw_cfg) 792 struct qlcnic_esw_func_cfg *esw_cfg)
793{ 793{
794 struct net_device *netdev = adapter->netdev; 794 struct net_device *netdev = adapter->netdev;
795 unsigned long features, vlan_features; 795 netdev_features_t features, vlan_features;
796 796
797 features = (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM | 797 features = (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM |
798 NETIF_F_IPV6_CSUM | NETIF_F_GRO); 798 NETIF_F_IPV6_CSUM | NETIF_F_GRO);
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index c92afcd912e2..1ce4e08037b8 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -2307,7 +2307,7 @@ static int ql_napi_poll_msix(struct napi_struct *napi, int budget)
2307 return work_done; 2307 return work_done;
2308} 2308}
2309 2309
2310static void qlge_vlan_mode(struct net_device *ndev, u32 features) 2310static void qlge_vlan_mode(struct net_device *ndev, netdev_features_t features)
2311{ 2311{
2312 struct ql_adapter *qdev = netdev_priv(ndev); 2312 struct ql_adapter *qdev = netdev_priv(ndev);
2313 2313
@@ -2323,7 +2323,8 @@ static void qlge_vlan_mode(struct net_device *ndev, u32 features)
2323 } 2323 }
2324} 2324}
2325 2325
2326static u32 qlge_fix_features(struct net_device *ndev, u32 features) 2326static netdev_features_t qlge_fix_features(struct net_device *ndev,
2327 netdev_features_t features)
2327{ 2328{
2328 /* 2329 /*
2329 * Since there is no support for separate rx/tx vlan accel 2330 * Since there is no support for separate rx/tx vlan accel
@@ -2337,9 +2338,10 @@ static u32 qlge_fix_features(struct net_device *ndev, u32 features)
2337 return features; 2338 return features;
2338} 2339}
2339 2340
2340static int qlge_set_features(struct net_device *ndev, u32 features) 2341static int qlge_set_features(struct net_device *ndev,
2342 netdev_features_t features)
2341{ 2343{
2342 u32 changed = ndev->features ^ features; 2344 netdev_features_t changed = ndev->features ^ features;
2343 2345
2344 if (changed & NETIF_F_HW_VLAN_RX) 2346 if (changed & NETIF_F_HW_VLAN_RX)
2345 qlge_vlan_mode(ndev, features); 2347 qlge_vlan_mode(ndev, features);