diff options
Diffstat (limited to 'drivers/net/ixgb/ixgb_ethtool.c')
-rw-r--r-- | drivers/net/ixgb/ixgb_ethtool.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c index 45ddf804fe5e..8464d8a013b0 100644 --- a/drivers/net/ixgb/ixgb_ethtool.c +++ b/drivers/net/ixgb/ixgb_ethtool.c | |||
@@ -185,7 +185,7 @@ ixgb_set_pauseparam(struct net_device *netdev, | |||
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
187 | 187 | ||
188 | static uint32_t | 188 | static u32 |
189 | ixgb_get_rx_csum(struct net_device *netdev) | 189 | ixgb_get_rx_csum(struct net_device *netdev) |
190 | { | 190 | { |
191 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 191 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
@@ -194,7 +194,7 @@ ixgb_get_rx_csum(struct net_device *netdev) | |||
194 | } | 194 | } |
195 | 195 | ||
196 | static int | 196 | static int |
197 | ixgb_set_rx_csum(struct net_device *netdev, uint32_t data) | 197 | ixgb_set_rx_csum(struct net_device *netdev, u32 data) |
198 | { | 198 | { |
199 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 199 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
200 | 200 | ||
@@ -209,14 +209,14 @@ ixgb_set_rx_csum(struct net_device *netdev, uint32_t data) | |||
209 | return 0; | 209 | return 0; |
210 | } | 210 | } |
211 | 211 | ||
212 | static uint32_t | 212 | static u32 |
213 | ixgb_get_tx_csum(struct net_device *netdev) | 213 | ixgb_get_tx_csum(struct net_device *netdev) |
214 | { | 214 | { |
215 | return (netdev->features & NETIF_F_HW_CSUM) != 0; | 215 | return (netdev->features & NETIF_F_HW_CSUM) != 0; |
216 | } | 216 | } |
217 | 217 | ||
218 | static int | 218 | static int |
219 | ixgb_set_tx_csum(struct net_device *netdev, uint32_t data) | 219 | ixgb_set_tx_csum(struct net_device *netdev, u32 data) |
220 | { | 220 | { |
221 | if (data) | 221 | if (data) |
222 | netdev->features |= NETIF_F_HW_CSUM; | 222 | netdev->features |= NETIF_F_HW_CSUM; |
@@ -227,7 +227,7 @@ ixgb_set_tx_csum(struct net_device *netdev, uint32_t data) | |||
227 | } | 227 | } |
228 | 228 | ||
229 | static int | 229 | static int |
230 | ixgb_set_tso(struct net_device *netdev, uint32_t data) | 230 | ixgb_set_tso(struct net_device *netdev, u32 data) |
231 | { | 231 | { |
232 | if(data) | 232 | if(data) |
233 | netdev->features |= NETIF_F_TSO; | 233 | netdev->features |= NETIF_F_TSO; |
@@ -236,7 +236,7 @@ ixgb_set_tso(struct net_device *netdev, uint32_t data) | |||
236 | return 0; | 236 | return 0; |
237 | } | 237 | } |
238 | 238 | ||
239 | static uint32_t | 239 | static u32 |
240 | ixgb_get_msglevel(struct net_device *netdev) | 240 | ixgb_get_msglevel(struct net_device *netdev) |
241 | { | 241 | { |
242 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 242 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
@@ -244,7 +244,7 @@ ixgb_get_msglevel(struct net_device *netdev) | |||
244 | } | 244 | } |
245 | 245 | ||
246 | static void | 246 | static void |
247 | ixgb_set_msglevel(struct net_device *netdev, uint32_t data) | 247 | ixgb_set_msglevel(struct net_device *netdev, u32 data) |
248 | { | 248 | { |
249 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 249 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
250 | adapter->msg_enable = data; | 250 | adapter->msg_enable = data; |
@@ -254,7 +254,7 @@ ixgb_set_msglevel(struct net_device *netdev, uint32_t data) | |||
254 | static int | 254 | static int |
255 | ixgb_get_regs_len(struct net_device *netdev) | 255 | ixgb_get_regs_len(struct net_device *netdev) |
256 | { | 256 | { |
257 | #define IXGB_REG_DUMP_LEN 136*sizeof(uint32_t) | 257 | #define IXGB_REG_DUMP_LEN 136*sizeof(u32) |
258 | return IXGB_REG_DUMP_LEN; | 258 | return IXGB_REG_DUMP_LEN; |
259 | } | 259 | } |
260 | 260 | ||
@@ -264,9 +264,9 @@ ixgb_get_regs(struct net_device *netdev, | |||
264 | { | 264 | { |
265 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 265 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
266 | struct ixgb_hw *hw = &adapter->hw; | 266 | struct ixgb_hw *hw = &adapter->hw; |
267 | uint32_t *reg = p; | 267 | u32 *reg = p; |
268 | uint32_t *reg_start = reg; | 268 | u32 *reg_start = reg; |
269 | uint8_t i; | 269 | u8 i; |
270 | 270 | ||
271 | /* the 1 (one) below indicates an attempt at versioning, if the | 271 | /* the 1 (one) below indicates an attempt at versioning, if the |
272 | * interface in ethtool or the driver changes, this 1 should be | 272 | * interface in ethtool or the driver changes, this 1 should be |
@@ -395,7 +395,7 @@ ixgb_get_regs(struct net_device *netdev, | |||
395 | *reg++ = IXGB_GET_STAT(adapter, xofftxc); /* 134 */ | 395 | *reg++ = IXGB_GET_STAT(adapter, xofftxc); /* 134 */ |
396 | *reg++ = IXGB_GET_STAT(adapter, rjc); /* 135 */ | 396 | *reg++ = IXGB_GET_STAT(adapter, rjc); /* 135 */ |
397 | 397 | ||
398 | regs->len = (reg - reg_start) * sizeof(uint32_t); | 398 | regs->len = (reg - reg_start) * sizeof(u32); |
399 | } | 399 | } |
400 | 400 | ||
401 | static int | 401 | static int |
@@ -407,7 +407,7 @@ ixgb_get_eeprom_len(struct net_device *netdev) | |||
407 | 407 | ||
408 | static int | 408 | static int |
409 | ixgb_get_eeprom(struct net_device *netdev, | 409 | ixgb_get_eeprom(struct net_device *netdev, |
410 | struct ethtool_eeprom *eeprom, uint8_t *bytes) | 410 | struct ethtool_eeprom *eeprom, u8 *bytes) |
411 | { | 411 | { |
412 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 412 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
413 | struct ixgb_hw *hw = &adapter->hw; | 413 | struct ixgb_hw *hw = &adapter->hw; |
@@ -445,7 +445,7 @@ ixgb_get_eeprom(struct net_device *netdev, | |||
445 | eeprom_buff[i] = ixgb_get_eeprom_word(hw, (first_word + i)); | 445 | eeprom_buff[i] = ixgb_get_eeprom_word(hw, (first_word + i)); |
446 | } | 446 | } |
447 | 447 | ||
448 | memcpy(bytes, (uint8_t *)eeprom_buff + (eeprom->offset & 1), | 448 | memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 1), |
449 | eeprom->len); | 449 | eeprom->len); |
450 | kfree(eeprom_buff); | 450 | kfree(eeprom_buff); |
451 | 451 | ||
@@ -455,14 +455,14 @@ geeprom_error: | |||
455 | 455 | ||
456 | static int | 456 | static int |
457 | ixgb_set_eeprom(struct net_device *netdev, | 457 | ixgb_set_eeprom(struct net_device *netdev, |
458 | struct ethtool_eeprom *eeprom, uint8_t *bytes) | 458 | struct ethtool_eeprom *eeprom, u8 *bytes) |
459 | { | 459 | { |
460 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 460 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
461 | struct ixgb_hw *hw = &adapter->hw; | 461 | struct ixgb_hw *hw = &adapter->hw; |
462 | uint16_t *eeprom_buff; | 462 | u16 *eeprom_buff; |
463 | void *ptr; | 463 | void *ptr; |
464 | int max_len, first_word, last_word; | 464 | int max_len, first_word, last_word; |
465 | uint16_t i; | 465 | u16 i; |
466 | 466 | ||
467 | if(eeprom->len == 0) | 467 | if(eeprom->len == 0) |
468 | return -EINVAL; | 468 | return -EINVAL; |
@@ -563,12 +563,12 @@ ixgb_set_ringparam(struct net_device *netdev, | |||
563 | if(netif_running(adapter->netdev)) | 563 | if(netif_running(adapter->netdev)) |
564 | ixgb_down(adapter, true); | 564 | ixgb_down(adapter, true); |
565 | 565 | ||
566 | rxdr->count = max(ring->rx_pending,(uint32_t)MIN_RXD); | 566 | rxdr->count = max(ring->rx_pending,(u32)MIN_RXD); |
567 | rxdr->count = min(rxdr->count,(uint32_t)MAX_RXD); | 567 | rxdr->count = min(rxdr->count,(u32)MAX_RXD); |
568 | rxdr->count = ALIGN(rxdr->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE); | 568 | rxdr->count = ALIGN(rxdr->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE); |
569 | 569 | ||
570 | txdr->count = max(ring->tx_pending,(uint32_t)MIN_TXD); | 570 | txdr->count = max(ring->tx_pending,(u32)MIN_TXD); |
571 | txdr->count = min(txdr->count,(uint32_t)MAX_TXD); | 571 | txdr->count = min(txdr->count,(u32)MAX_TXD); |
572 | txdr->count = ALIGN(txdr->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); | 572 | txdr->count = ALIGN(txdr->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); |
573 | 573 | ||
574 | if(netif_running(adapter->netdev)) { | 574 | if(netif_running(adapter->netdev)) { |
@@ -624,7 +624,7 @@ ixgb_led_blink_callback(unsigned long data) | |||
624 | } | 624 | } |
625 | 625 | ||
626 | static int | 626 | static int |
627 | ixgb_phys_id(struct net_device *netdev, uint32_t data) | 627 | ixgb_phys_id(struct net_device *netdev, u32 data) |
628 | { | 628 | { |
629 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 629 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
630 | 630 | ||
@@ -660,7 +660,7 @@ ixgb_get_sset_count(struct net_device *netdev, int sset) | |||
660 | 660 | ||
661 | static void | 661 | static void |
662 | ixgb_get_ethtool_stats(struct net_device *netdev, | 662 | ixgb_get_ethtool_stats(struct net_device *netdev, |
663 | struct ethtool_stats *stats, uint64_t *data) | 663 | struct ethtool_stats *stats, u64 *data) |
664 | { | 664 | { |
665 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 665 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
666 | int i; | 666 | int i; |
@@ -669,12 +669,12 @@ ixgb_get_ethtool_stats(struct net_device *netdev, | |||
669 | for(i = 0; i < IXGB_STATS_LEN; i++) { | 669 | for(i = 0; i < IXGB_STATS_LEN; i++) { |
670 | char *p = (char *)adapter+ixgb_gstrings_stats[i].stat_offset; | 670 | char *p = (char *)adapter+ixgb_gstrings_stats[i].stat_offset; |
671 | data[i] = (ixgb_gstrings_stats[i].sizeof_stat == | 671 | data[i] = (ixgb_gstrings_stats[i].sizeof_stat == |
672 | sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; | 672 | sizeof(u64)) ? *(u64 *)p : *(u32 *)p; |
673 | } | 673 | } |
674 | } | 674 | } |
675 | 675 | ||
676 | static void | 676 | static void |
677 | ixgb_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) | 677 | ixgb_get_strings(struct net_device *netdev, u32 stringset, u8 *data) |
678 | { | 678 | { |
679 | int i; | 679 | int i; |
680 | 680 | ||