diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2011-11-15 10:29:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-16 17:43:10 -0500 |
commit | c8f44affb7244f2ac3e703cab13d55ede27621bb (patch) | |
tree | 62e7aea2916a8d7cab825fe500670c5113854c0f /drivers/net/ethernet/marvell/sky2.c | |
parent | a59e2ecb859f2ab03bb2e230709f8039472ad2c3 (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/marvell/sky2.c')
-rw-r--r-- | drivers/net/ethernet/marvell/sky2.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 553d1a315b3a..c79dc5447658 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -1275,7 +1275,7 @@ static void rx_set_checksum(struct sky2_port *sky2) | |||
1275 | } | 1275 | } |
1276 | 1276 | ||
1277 | /* Enable/disable receive hash calculation (RSS) */ | 1277 | /* Enable/disable receive hash calculation (RSS) */ |
1278 | static void rx_set_rss(struct net_device *dev, u32 features) | 1278 | static void rx_set_rss(struct net_device *dev, netdev_features_t features) |
1279 | { | 1279 | { |
1280 | struct sky2_port *sky2 = netdev_priv(dev); | 1280 | struct sky2_port *sky2 = netdev_priv(dev); |
1281 | struct sky2_hw *hw = sky2->hw; | 1281 | struct sky2_hw *hw = sky2->hw; |
@@ -1396,7 +1396,7 @@ static int sky2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1396 | 1396 | ||
1397 | #define SKY2_VLAN_OFFLOADS (NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO) | 1397 | #define SKY2_VLAN_OFFLOADS (NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO) |
1398 | 1398 | ||
1399 | static void sky2_vlan_mode(struct net_device *dev, u32 features) | 1399 | static void sky2_vlan_mode(struct net_device *dev, netdev_features_t features) |
1400 | { | 1400 | { |
1401 | struct sky2_port *sky2 = netdev_priv(dev); | 1401 | struct sky2_port *sky2 = netdev_priv(dev); |
1402 | struct sky2_hw *hw = sky2->hw; | 1402 | struct sky2_hw *hw = sky2->hw; |
@@ -4282,7 +4282,8 @@ static int sky2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom | |||
4282 | return sky2_vpd_write(sky2->hw, cap, data, eeprom->offset, eeprom->len); | 4282 | return sky2_vpd_write(sky2->hw, cap, data, eeprom->offset, eeprom->len); |
4283 | } | 4283 | } |
4284 | 4284 | ||
4285 | static u32 sky2_fix_features(struct net_device *dev, u32 features) | 4285 | static netdev_features_t sky2_fix_features(struct net_device *dev, |
4286 | netdev_features_t features) | ||
4286 | { | 4287 | { |
4287 | const struct sky2_port *sky2 = netdev_priv(dev); | 4288 | const struct sky2_port *sky2 = netdev_priv(dev); |
4288 | const struct sky2_hw *hw = sky2->hw; | 4289 | const struct sky2_hw *hw = sky2->hw; |
@@ -4306,13 +4307,13 @@ static u32 sky2_fix_features(struct net_device *dev, u32 features) | |||
4306 | return features; | 4307 | return features; |
4307 | } | 4308 | } |
4308 | 4309 | ||
4309 | static int sky2_set_features(struct net_device *dev, u32 features) | 4310 | static int sky2_set_features(struct net_device *dev, netdev_features_t features) |
4310 | { | 4311 | { |
4311 | struct sky2_port *sky2 = netdev_priv(dev); | 4312 | struct sky2_port *sky2 = netdev_priv(dev); |
4312 | u32 changed = dev->features ^ features; | 4313 | netdev_features_t changed = dev->features ^ features; |
4313 | 4314 | ||
4314 | if (changed & NETIF_F_RXCSUM) { | 4315 | if (changed & NETIF_F_RXCSUM) { |
4315 | u32 on = features & NETIF_F_RXCSUM; | 4316 | int on = !!(features & NETIF_F_RXCSUM); |
4316 | sky2_write32(sky2->hw, Q_ADDR(rxqaddr[sky2->port], Q_CSR), | 4317 | sky2_write32(sky2->hw, Q_ADDR(rxqaddr[sky2->port], Q_CSR), |
4317 | on ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM); | 4318 | on ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM); |
4318 | } | 4319 | } |