aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros/atlx
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/atheros/atlx
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/atheros/atlx')
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl2.c13
-rw-r--r--drivers/net/ethernet/atheros/atlx/atlx.c13
2 files changed, 16 insertions, 10 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c
index db3f43046d32..071f4c858969 100644
--- a/drivers/net/ethernet/atheros/atlx/atl2.c
+++ b/drivers/net/ethernet/atheros/atlx/atl2.c
@@ -361,7 +361,7 @@ static inline void atl2_irq_disable(struct atl2_adapter *adapter)
361 synchronize_irq(adapter->pdev->irq); 361 synchronize_irq(adapter->pdev->irq);
362} 362}
363 363
364static void __atl2_vlan_mode(u32 features, u32 *ctrl) 364static void __atl2_vlan_mode(netdev_features_t features, u32 *ctrl)
365{ 365{
366 if (features & NETIF_F_HW_VLAN_RX) { 366 if (features & NETIF_F_HW_VLAN_RX) {
367 /* enable VLAN tag insert/strip */ 367 /* enable VLAN tag insert/strip */
@@ -372,7 +372,8 @@ static void __atl2_vlan_mode(u32 features, u32 *ctrl)
372 } 372 }
373} 373}
374 374
375static void atl2_vlan_mode(struct net_device *netdev, u32 features) 375static void atl2_vlan_mode(struct net_device *netdev,
376 netdev_features_t features)
376{ 377{
377 struct atl2_adapter *adapter = netdev_priv(netdev); 378 struct atl2_adapter *adapter = netdev_priv(netdev);
378 u32 ctrl; 379 u32 ctrl;
@@ -391,7 +392,8 @@ static void atl2_restore_vlan(struct atl2_adapter *adapter)
391 atl2_vlan_mode(adapter->netdev, adapter->netdev->features); 392 atl2_vlan_mode(adapter->netdev, adapter->netdev->features);
392} 393}
393 394
394static u32 atl2_fix_features(struct net_device *netdev, u32 features) 395static netdev_features_t atl2_fix_features(struct net_device *netdev,
396 netdev_features_t features)
395{ 397{
396 /* 398 /*
397 * Since there is no support for separate rx/tx vlan accel 399 * Since there is no support for separate rx/tx vlan accel
@@ -405,9 +407,10 @@ static u32 atl2_fix_features(struct net_device *netdev, u32 features)
405 return features; 407 return features;
406} 408}
407 409
408static int atl2_set_features(struct net_device *netdev, u32 features) 410static int atl2_set_features(struct net_device *netdev,
411 netdev_features_t features)
409{ 412{
410 u32 changed = netdev->features ^ features; 413 netdev_features_t changed = netdev->features ^ features;
411 414
412 if (changed & NETIF_F_HW_VLAN_RX) 415 if (changed & NETIF_F_HW_VLAN_RX)
413 atl2_vlan_mode(netdev, features); 416 atl2_vlan_mode(netdev, features);
diff --git a/drivers/net/ethernet/atheros/atlx/atlx.c b/drivers/net/ethernet/atheros/atlx/atlx.c
index aabcf4b5745a..8ff7411094d5 100644
--- a/drivers/net/ethernet/atheros/atlx/atlx.c
+++ b/drivers/net/ethernet/atheros/atlx/atlx.c
@@ -211,7 +211,7 @@ static void atlx_link_chg_task(struct work_struct *work)
211 spin_unlock_irqrestore(&adapter->lock, flags); 211 spin_unlock_irqrestore(&adapter->lock, flags);
212} 212}
213 213
214static void __atlx_vlan_mode(u32 features, u32 *ctrl) 214static void __atlx_vlan_mode(netdev_features_t features, u32 *ctrl)
215{ 215{
216 if (features & NETIF_F_HW_VLAN_RX) { 216 if (features & NETIF_F_HW_VLAN_RX) {
217 /* enable VLAN tag insert/strip */ 217 /* enable VLAN tag insert/strip */
@@ -222,7 +222,8 @@ static void __atlx_vlan_mode(u32 features, u32 *ctrl)
222 } 222 }
223} 223}
224 224
225static void atlx_vlan_mode(struct net_device *netdev, u32 features) 225static void atlx_vlan_mode(struct net_device *netdev,
226 netdev_features_t features)
226{ 227{
227 struct atlx_adapter *adapter = netdev_priv(netdev); 228 struct atlx_adapter *adapter = netdev_priv(netdev);
228 unsigned long flags; 229 unsigned long flags;
@@ -242,7 +243,8 @@ static void atlx_restore_vlan(struct atlx_adapter *adapter)
242 atlx_vlan_mode(adapter->netdev, adapter->netdev->features); 243 atlx_vlan_mode(adapter->netdev, adapter->netdev->features);
243} 244}
244 245
245static u32 atlx_fix_features(struct net_device *netdev, u32 features) 246static netdev_features_t atlx_fix_features(struct net_device *netdev,
247 netdev_features_t features)
246{ 248{
247 /* 249 /*
248 * Since there is no support for separate rx/tx vlan accel 250 * Since there is no support for separate rx/tx vlan accel
@@ -256,9 +258,10 @@ static u32 atlx_fix_features(struct net_device *netdev, u32 features)
256 return features; 258 return features;
257} 259}
258 260
259static int atlx_set_features(struct net_device *netdev, u32 features) 261static int atlx_set_features(struct net_device *netdev,
262 netdev_features_t features)
260{ 263{
261 u32 changed = netdev->features ^ features; 264 netdev_features_t changed = netdev->features ^ features;
262 265
263 if (changed & NETIF_F_HW_VLAN_RX) 266 if (changed & NETIF_F_HW_VLAN_RX)
264 atlx_vlan_mode(netdev, features); 267 atlx_vlan_mode(netdev, features);