aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ipg.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2008-01-24 05:01:17 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:05:52 -0500
commit9893ba16c8fb9c94729061a88bdee40ecf3a3899 (patch)
tree40c11f7346f522504fe9ab1d72efeab2259d8b4e /drivers/net/ipg.c
parentdea4a87cabc4ba0c09123c6e8392aa68fe437b31 (diff)
ipg: naming convention fixes
This changes some camel-case names to follow proper kernel naming convention. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Sorbica Shieh <sorbica@icplus.com.tw> Cc: Jesse Huang <jesse@icplus.com.tw> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipg.c')
-rw-r--r--drivers/net/ipg.c174
1 files changed, 87 insertions, 87 deletions
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index 6b64bc58053f..3099a7b15ecc 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -382,13 +382,13 @@ static void ipg_set_led_mode(struct net_device *dev)
382 mode = ipg_r32(ASIC_CTRL); 382 mode = ipg_r32(ASIC_CTRL);
383 mode &= ~(IPG_AC_LED_MODE_BIT_1 | IPG_AC_LED_MODE | IPG_AC_LED_SPEED); 383 mode &= ~(IPG_AC_LED_MODE_BIT_1 | IPG_AC_LED_MODE | IPG_AC_LED_SPEED);
384 384
385 if ((sp->LED_Mode & 0x03) > 1) 385 if ((sp->led_mode & 0x03) > 1)
386 mode |= IPG_AC_LED_MODE_BIT_1; /* Write Asic Control Bit 29 */ 386 mode |= IPG_AC_LED_MODE_BIT_1; /* Write Asic Control Bit 29 */
387 387
388 if ((sp->LED_Mode & 0x01) == 1) 388 if ((sp->led_mode & 0x01) == 1)
389 mode |= IPG_AC_LED_MODE; /* Write Asic Control Bit 14 */ 389 mode |= IPG_AC_LED_MODE; /* Write Asic Control Bit 14 */
390 390
391 if ((sp->LED_Mode & 0x08) == 8) 391 if ((sp->led_mode & 0x08) == 8)
392 mode |= IPG_AC_LED_SPEED; /* Write Asic Control Bit 27 */ 392 mode |= IPG_AC_LED_SPEED; /* Write Asic Control Bit 27 */
393 393
394 ipg_w32(mode, ASIC_CTRL); 394 ipg_w32(mode, ASIC_CTRL);
@@ -402,7 +402,7 @@ static void ipg_set_phy_set(struct net_device *dev)
402 402
403 physet = ipg_r8(PHY_SET); 403 physet = ipg_r8(PHY_SET);
404 physet &= ~(IPG_PS_MEM_LENB9B | IPG_PS_MEM_LEN9 | IPG_PS_NON_COMPDET); 404 physet &= ~(IPG_PS_MEM_LENB9B | IPG_PS_MEM_LEN9 | IPG_PS_NON_COMPDET);
405 physet |= ((sp->LED_Mode & 0x70) >> 4); 405 physet |= ((sp->led_mode & 0x70) >> 4);
406 ipg_w8(physet, PHY_SET); 406 ipg_w8(physet, PHY_SET);
407} 407}
408 408
@@ -733,7 +733,7 @@ static int ipg_get_rxbuff(struct net_device *dev, int entry)
733 733
734 skb = netdev_alloc_skb(dev, IPG_RXSUPPORT_SIZE + NET_IP_ALIGN); 734 skb = netdev_alloc_skb(dev, IPG_RXSUPPORT_SIZE + NET_IP_ALIGN);
735 if (!skb) { 735 if (!skb) {
736 sp->RxBuff[entry] = NULL; 736 sp->rx_buff[entry] = NULL;
737 return -ENOMEM; 737 return -ENOMEM;
738 } 738 }
739 739
@@ -746,7 +746,7 @@ static int ipg_get_rxbuff(struct net_device *dev, int entry)
746 skb->dev = dev; 746 skb->dev = dev;
747 747
748 /* Save the address of the sk_buff structure. */ 748 /* Save the address of the sk_buff structure. */
749 sp->RxBuff[entry] = skb; 749 sp->rx_buff[entry] = skb;
750 750
751 rxfd->frag_info = cpu_to_le64(pci_map_single(sp->pdev, skb->data, 751 rxfd->frag_info = cpu_to_le64(pci_map_single(sp->pdev, skb->data,
752 sp->rx_buf_sz, PCI_DMA_FROMDEVICE)); 752 sp->rx_buf_sz, PCI_DMA_FROMDEVICE));
@@ -769,12 +769,12 @@ static int init_rfdlist(struct net_device *dev)
769 for (i = 0; i < IPG_RFDLIST_LENGTH; i++) { 769 for (i = 0; i < IPG_RFDLIST_LENGTH; i++) {
770 struct ipg_rx *rxfd = sp->rxd + i; 770 struct ipg_rx *rxfd = sp->rxd + i;
771 771
772 if (sp->RxBuff[i]) { 772 if (sp->rx_buff[i]) {
773 pci_unmap_single(sp->pdev, 773 pci_unmap_single(sp->pdev,
774 le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN, 774 le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN,
775 sp->rx_buf_sz, PCI_DMA_FROMDEVICE); 775 sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
776 dev_kfree_skb_irq(sp->RxBuff[i]); 776 dev_kfree_skb_irq(sp->rx_buff[i]);
777 sp->RxBuff[i] = NULL; 777 sp->rx_buff[i] = NULL;
778 } 778 }
779 779
780 /* Clear out the RFS field. */ 780 /* Clear out the RFS field. */
@@ -825,9 +825,9 @@ static void init_tfdlist(struct net_device *dev)
825 825
826 txfd->tfc = cpu_to_le64(IPG_TFC_TFDDONE); 826 txfd->tfc = cpu_to_le64(IPG_TFC_TFDDONE);
827 827
828 if (sp->TxBuff[i]) { 828 if (sp->tx_buff[i]) {
829 dev_kfree_skb_irq(sp->TxBuff[i]); 829 dev_kfree_skb_irq(sp->tx_buff[i]);
830 sp->TxBuff[i] = NULL; 830 sp->tx_buff[i] = NULL;
831 } 831 }
832 832
833 txfd->next_desc = cpu_to_le64(sp->txd_map + 833 txfd->next_desc = cpu_to_le64(sp->txd_map +
@@ -844,7 +844,7 @@ static void init_tfdlist(struct net_device *dev)
844 ipg_w32((u32) sp->txd_map, TFD_LIST_PTR_0); 844 ipg_w32((u32) sp->txd_map, TFD_LIST_PTR_0);
845 ipg_w32(0x00000000, TFD_LIST_PTR_1); 845 ipg_w32(0x00000000, TFD_LIST_PTR_1);
846 846
847 sp->ResetCurrentTFD = 1; 847 sp->reset_current_tfd = 1;
848} 848}
849 849
850/* 850/*
@@ -862,7 +862,7 @@ static void ipg_nic_txfree(struct net_device *dev)
862 dirty = sp->tx_dirty % IPG_TFDLIST_LENGTH; 862 dirty = sp->tx_dirty % IPG_TFDLIST_LENGTH;
863 863
864 for (released = 0; released < pending; released++) { 864 for (released = 0; released < pending; released++) {
865 struct sk_buff *skb = sp->TxBuff[dirty]; 865 struct sk_buff *skb = sp->tx_buff[dirty];
866 struct ipg_tx *txfd = sp->txd + dirty; 866 struct ipg_tx *txfd = sp->txd + dirty;
867 867
868 IPG_DEBUG_MSG("TFC = %16.16lx\n", (unsigned long) txfd->tfc); 868 IPG_DEBUG_MSG("TFC = %16.16lx\n", (unsigned long) txfd->tfc);
@@ -883,7 +883,7 @@ static void ipg_nic_txfree(struct net_device *dev)
883 883
884 dev_kfree_skb_irq(skb); 884 dev_kfree_skb_irq(skb);
885 885
886 sp->TxBuff[dirty] = NULL; 886 sp->tx_buff[dirty] = NULL;
887 } 887 }
888 dirty = (dirty + 1) % IPG_TFDLIST_LENGTH; 888 dirty = (dirty + 1) % IPG_TFDLIST_LENGTH;
889 } 889 }
@@ -1056,7 +1056,7 @@ static int ipg_nic_rxrestore(struct net_device *dev)
1056 unsigned int entry = dirty % IPG_RFDLIST_LENGTH; 1056 unsigned int entry = dirty % IPG_RFDLIST_LENGTH;
1057 1057
1058 /* rx_copybreak may poke hole here and there. */ 1058 /* rx_copybreak may poke hole here and there. */
1059 if (sp->RxBuff[entry]) 1059 if (sp->rx_buff[entry])
1060 continue; 1060 continue;
1061 1061
1062 /* Generate a new receive buffer to replace the 1062 /* Generate a new receive buffer to replace the
@@ -1087,15 +1087,15 @@ static int ipg_nic_rxrestore(struct net_device *dev)
1087 previous receiving and need to continue dumping the current one 1087 previous receiving and need to continue dumping the current one
1088*/ 1088*/
1089enum { 1089enum {
1090 NormalPacket, 1090 NORMAL_PACKET,
1091 ErrorPacket 1091 ERROR_PACKET
1092}; 1092};
1093 1093
1094enum { 1094enum {
1095 Frame_NoStart_NoEnd = 0, 1095 FRAME_NO_START_NO_END = 0,
1096 Frame_WithStart = 1, 1096 FRAME_WITH_START = 1,
1097 Frame_WithEnd = 10, 1097 FRAME_WITH_END = 10,
1098 Frame_WithStart_WithEnd = 11 1098 FRAME_WITH_START_WITH_END = 11
1099}; 1099};
1100 1100
1101inline void ipg_nic_rx_free_skb(struct net_device *dev) 1101inline void ipg_nic_rx_free_skb(struct net_device *dev)
@@ -1103,14 +1103,14 @@ inline void ipg_nic_rx_free_skb(struct net_device *dev)
1103 struct ipg_nic_private *sp = netdev_priv(dev); 1103 struct ipg_nic_private *sp = netdev_priv(dev);
1104 unsigned int entry = sp->rx_current % IPG_RFDLIST_LENGTH; 1104 unsigned int entry = sp->rx_current % IPG_RFDLIST_LENGTH;
1105 1105
1106 if (sp->RxBuff[entry]) { 1106 if (sp->rx_buff[entry]) {
1107 struct ipg_rx *rxfd = sp->rxd + entry; 1107 struct ipg_rx *rxfd = sp->rxd + entry;
1108 1108
1109 pci_unmap_single(sp->pdev, 1109 pci_unmap_single(sp->pdev,
1110 le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN), 1110 le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN),
1111 sp->rx_buf_sz, PCI_DMA_FROMDEVICE); 1111 sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
1112 dev_kfree_skb_irq(sp->RxBuff[entry]); 1112 dev_kfree_skb_irq(sp->rx_buff[entry]);
1113 sp->RxBuff[entry] = NULL; 1113 sp->rx_buff[entry] = NULL;
1114 } 1114 }
1115} 1115}
1116 1116
@@ -1118,12 +1118,12 @@ inline int ipg_nic_rx_check_frame_type(struct net_device *dev)
1118{ 1118{
1119 struct ipg_nic_private *sp = netdev_priv(dev); 1119 struct ipg_nic_private *sp = netdev_priv(dev);
1120 struct ipg_rx *rxfd = sp->rxd + (sp->rx_current % IPG_RFDLIST_LENGTH); 1120 struct ipg_rx *rxfd = sp->rxd + (sp->rx_current % IPG_RFDLIST_LENGTH);
1121 int type = Frame_NoStart_NoEnd; 1121 int type = FRAME_NO_START_NO_END;
1122 1122
1123 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_FRAMESTART) 1123 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_FRAMESTART)
1124 type += Frame_WithStart; 1124 type += FRAME_WITH_START;
1125 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_FRAMEEND) 1125 if (le64_to_cpu(rxfd->rfs) & IPG_RFS_FRAMEEND)
1126 type += Frame_WithEnd; 1126 type += FRAME_WITH_END;
1127 return type; 1127 return type;
1128} 1128}
1129 1129
@@ -1172,39 +1172,39 @@ inline int ipg_nic_rx_check_error(struct net_device *dev)
1172 * buffer since it is erroneous and we will 1172 * buffer since it is erroneous and we will
1173 * not pass it to higher layer processes. 1173 * not pass it to higher layer processes.
1174 */ 1174 */
1175 if (sp->RxBuff[entry]) { 1175 if (sp->rx_buff[entry]) {
1176 pci_unmap_single(sp->pdev, 1176 pci_unmap_single(sp->pdev,
1177 le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN), 1177 le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN),
1178 sp->rx_buf_sz, PCI_DMA_FROMDEVICE); 1178 sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
1179 1179
1180 dev_kfree_skb_irq(sp->RxBuff[entry]); 1180 dev_kfree_skb_irq(sp->rx_buff[entry]);
1181 sp->RxBuff[entry] = NULL; 1181 sp->rx_buff[entry] = NULL;
1182 } 1182 }
1183 return ErrorPacket; 1183 return ERROR_PACKET;
1184 } 1184 }
1185 return NormalPacket; 1185 return NORMAL_PACKET;
1186} 1186}
1187 1187
1188static void ipg_nic_rx_with_start_and_end(struct net_device *dev, 1188static void ipg_nic_rx_with_start_and_end(struct net_device *dev,
1189 struct ipg_nic_private *sp, 1189 struct ipg_nic_private *sp,
1190 struct ipg_rx *rxfd, unsigned entry) 1190 struct ipg_rx *rxfd, unsigned entry)
1191{ 1191{
1192 struct SJumbo *jumbo = &sp->Jumbo; 1192 struct ipg_jumbo *jumbo = &sp->jumbo;
1193 struct sk_buff *skb; 1193 struct sk_buff *skb;
1194 int framelen; 1194 int framelen;
1195 1195
1196 if (jumbo->FoundStart) { 1196 if (jumbo->found_start) {
1197 dev_kfree_skb_irq(jumbo->skb); 1197 dev_kfree_skb_irq(jumbo->skb);
1198 jumbo->FoundStart = 0; 1198 jumbo->found_start = 0;
1199 jumbo->CurrentSize = 0; 1199 jumbo->current_size = 0;
1200 jumbo->skb = NULL; 1200 jumbo->skb = NULL;
1201 } 1201 }
1202 1202
1203 // 1: found error, 0 no error 1203 // 1: found error, 0 no error
1204 if (ipg_nic_rx_check_error(dev) != NormalPacket) 1204 if (ipg_nic_rx_check_error(dev) != NORMAL_PACKET)
1205 return; 1205 return;
1206 1206
1207 skb = sp->RxBuff[entry]; 1207 skb = sp->rx_buff[entry];
1208 if (!skb) 1208 if (!skb)
1209 return; 1209 return;
1210 1210
@@ -1218,27 +1218,27 @@ static void ipg_nic_rx_with_start_and_end(struct net_device *dev,
1218 skb->ip_summed = CHECKSUM_NONE; 1218 skb->ip_summed = CHECKSUM_NONE;
1219 netif_rx(skb); 1219 netif_rx(skb);
1220 dev->last_rx = jiffies; 1220 dev->last_rx = jiffies;
1221 sp->RxBuff[entry] = NULL; 1221 sp->rx_buff[entry] = NULL;
1222} 1222}
1223 1223
1224static void ipg_nic_rx_with_start(struct net_device *dev, 1224static void ipg_nic_rx_with_start(struct net_device *dev,
1225 struct ipg_nic_private *sp, 1225 struct ipg_nic_private *sp,
1226 struct ipg_rx *rxfd, unsigned entry) 1226 struct ipg_rx *rxfd, unsigned entry)
1227{ 1227{
1228 struct SJumbo *jumbo = &sp->Jumbo; 1228 struct ipg_jumbo *jumbo = &sp->jumbo;
1229 struct pci_dev *pdev = sp->pdev; 1229 struct pci_dev *pdev = sp->pdev;
1230 struct sk_buff *skb; 1230 struct sk_buff *skb;
1231 1231
1232 // 1: found error, 0 no error 1232 // 1: found error, 0 no error
1233 if (ipg_nic_rx_check_error(dev) != NormalPacket) 1233 if (ipg_nic_rx_check_error(dev) != NORMAL_PACKET)
1234 return; 1234 return;
1235 1235
1236 // accept this frame and send to upper layer 1236 // accept this frame and send to upper layer
1237 skb = sp->RxBuff[entry]; 1237 skb = sp->rx_buff[entry];
1238 if (!skb) 1238 if (!skb)
1239 return; 1239 return;
1240 1240
1241 if (jumbo->FoundStart) 1241 if (jumbo->found_start)
1242 dev_kfree_skb_irq(jumbo->skb); 1242 dev_kfree_skb_irq(jumbo->skb);
1243 1243
1244 pci_unmap_single(pdev, le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN), 1244 pci_unmap_single(pdev, le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN),
@@ -1246,11 +1246,11 @@ static void ipg_nic_rx_with_start(struct net_device *dev,
1246 1246
1247 skb_put(skb, IPG_RXFRAG_SIZE); 1247 skb_put(skb, IPG_RXFRAG_SIZE);
1248 1248
1249 jumbo->FoundStart = 1; 1249 jumbo->found_start = 1;
1250 jumbo->CurrentSize = IPG_RXFRAG_SIZE; 1250 jumbo->current_size = IPG_RXFRAG_SIZE;
1251 jumbo->skb = skb; 1251 jumbo->skb = skb;
1252 1252
1253 sp->RxBuff[entry] = NULL; 1253 sp->rx_buff[entry] = NULL;
1254 dev->last_rx = jiffies; 1254 dev->last_rx = jiffies;
1255} 1255}
1256 1256
@@ -1258,21 +1258,21 @@ static void ipg_nic_rx_with_end(struct net_device *dev,
1258 struct ipg_nic_private *sp, 1258 struct ipg_nic_private *sp,
1259 struct ipg_rx *rxfd, unsigned entry) 1259 struct ipg_rx *rxfd, unsigned entry)
1260{ 1260{
1261 struct SJumbo *jumbo = &sp->Jumbo; 1261 struct ipg_jumbo *jumbo = &sp->jumbo;
1262 1262
1263 //1: found error, 0 no error 1263 //1: found error, 0 no error
1264 if (ipg_nic_rx_check_error(dev) == NormalPacket) { 1264 if (ipg_nic_rx_check_error(dev) == NORMAL_PACKET) {
1265 struct sk_buff *skb = sp->RxBuff[entry]; 1265 struct sk_buff *skb = sp->rx_buff[entry];
1266 1266
1267 if (!skb) 1267 if (!skb)
1268 return; 1268 return;
1269 1269
1270 if (jumbo->FoundStart) { 1270 if (jumbo->found_start) {
1271 int framelen, endframelen; 1271 int framelen, endframelen;
1272 1272
1273 framelen = le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFRAMELEN; 1273 framelen = le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFRAMELEN;
1274 1274
1275 endframeLen = framelen - jumbo->CurrentSize; 1275 endframeLen = framelen - jumbo->current_size;
1276 /* 1276 /*
1277 if (framelen > IPG_RXFRAG_SIZE) 1277 if (framelen > IPG_RXFRAG_SIZE)
1278 framelen=IPG_RXFRAG_SIZE; 1278 framelen=IPG_RXFRAG_SIZE;
@@ -1292,15 +1292,15 @@ static void ipg_nic_rx_with_end(struct net_device *dev,
1292 } 1292 }
1293 1293
1294 dev->last_rx = jiffies; 1294 dev->last_rx = jiffies;
1295 jumbo->FoundStart = 0; 1295 jumbo->found_start = 0;
1296 jumbo->CurrentSize = 0; 1296 jumbo->current_size = 0;
1297 jumbo->skb = NULL; 1297 jumbo->skb = NULL;
1298 1298
1299 ipg_nic_rx_free_skb(dev); 1299 ipg_nic_rx_free_skb(dev);
1300 } else { 1300 } else {
1301 dev_kfree_skb_irq(jumbo->skb); 1301 dev_kfree_skb_irq(jumbo->skb);
1302 jumbo->FoundStart = 0; 1302 jumbo->found_start = 0;
1303 jumbo->CurrentSize = 0; 1303 jumbo->current_size = 0;
1304 jumbo->skb = NULL; 1304 jumbo->skb = NULL;
1305 } 1305 }
1306} 1306}
@@ -1309,16 +1309,16 @@ static void ipg_nic_rx_no_start_no_end(struct net_device *dev,
1309 struct ipg_nic_private *sp, 1309 struct ipg_nic_private *sp,
1310 struct ipg_rx *rxfd, unsigned entry) 1310 struct ipg_rx *rxfd, unsigned entry)
1311{ 1311{
1312 struct SJumbo *jumbo = &sp->Jumbo; 1312 struct ipg_jumbo *jumbo = &sp->jumbo;
1313 1313
1314 //1: found error, 0 no error 1314 //1: found error, 0 no error
1315 if (ipg_nic_rx_check_error(dev) == NormalPacket) { 1315 if (ipg_nic_rx_check_error(dev) == NORMAL_PACKET) {
1316 struct sk_buff *skb = sp->RxBuff[entry]; 1316 struct sk_buff *skb = sp->rx_buff[entry];
1317 1317
1318 if (skb) { 1318 if (skb) {
1319 if (jumbo->FoundStart) { 1319 if (jumbo->found_start) {
1320 jumbo->CurrentSize += IPG_RXFRAG_SIZE; 1320 jumbo->current_size += IPG_RXFRAG_SIZE;
1321 if (jumbo->CurrentSize <= IPG_RXSUPPORT_SIZE) { 1321 if (jumbo->current_size <= IPG_RXSUPPORT_SIZE) {
1322 memcpy(skb_put(jumbo->skb, 1322 memcpy(skb_put(jumbo->skb,
1323 IPG_RXFRAG_SIZE), 1323 IPG_RXFRAG_SIZE),
1324 skb->data, IPG_RXFRAG_SIZE); 1324 skb->data, IPG_RXFRAG_SIZE);
@@ -1329,8 +1329,8 @@ static void ipg_nic_rx_no_start_no_end(struct net_device *dev,
1329 } 1329 }
1330 } else { 1330 } else {
1331 dev_kfree_skb_irq(jumbo->skb); 1331 dev_kfree_skb_irq(jumbo->skb);
1332 jumbo->FoundStart = 0; 1332 jumbo->found_start = 0;
1333 jumbo->CurrentSize = 0; 1333 jumbo->current_size = 0;
1334 jumbo->skb = NULL; 1334 jumbo->skb = NULL;
1335 } 1335 }
1336} 1336}
@@ -1352,16 +1352,16 @@ static int ipg_nic_rx(struct net_device *dev)
1352 break; 1352 break;
1353 1353
1354 switch (ipg_nic_rx_check_frame_type(dev)) { 1354 switch (ipg_nic_rx_check_frame_type(dev)) {
1355 case Frame_WithStart_WithEnd: 1355 case FRAME_WITH_START_WITH_END:
1356 ipg_nic_rx_with_start_and_end(dev, tp, rxfd, entry); 1356 ipg_nic_rx_with_start_and_end(dev, tp, rxfd, entry);
1357 break; 1357 break;
1358 case Frame_WithStart: 1358 case FRAME_WITH_START:
1359 ipg_nic_rx_with_start(dev, tp, rxfd, entry); 1359 ipg_nic_rx_with_start(dev, tp, rxfd, entry);
1360 break; 1360 break;
1361 case Frame_WithEnd: 1361 case FRAME_WITH_END:
1362 ipg_nic_rx_with_end(dev, tp, rxfd, entry); 1362 ipg_nic_rx_with_end(dev, tp, rxfd, entry);
1363 break; 1363 break;
1364 case Frame_NoStart_NoEnd: 1364 case FRAME_NO_START_NO_END:
1365 ipg_nic_rx_no_start_no_end(dev, tp, rxfd, entry); 1365 ipg_nic_rx_no_start_no_end(dev, tp, rxfd, entry);
1366 break; 1366 break;
1367 } 1367 }
@@ -1400,7 +1400,7 @@ static int ipg_nic_rx(struct net_device *dev)
1400 1400
1401 for (i = 0; i < IPG_MAXRFDPROCESS_COUNT; i++, curr++) { 1401 for (i = 0; i < IPG_MAXRFDPROCESS_COUNT; i++, curr++) {
1402 unsigned int entry = curr % IPG_RFDLIST_LENGTH; 1402 unsigned int entry = curr % IPG_RFDLIST_LENGTH;
1403 struct sk_buff *skb = sp->RxBuff[entry]; 1403 struct sk_buff *skb = sp->rx_buff[entry];
1404 unsigned int framelen; 1404 unsigned int framelen;
1405 1405
1406 rxfd = sp->rxd + entry; 1406 rxfd = sp->rxd + entry;
@@ -1502,7 +1502,7 @@ static int ipg_nic_rx(struct net_device *dev)
1502 } 1502 }
1503 1503
1504 /* Assure RX buffer is not reused by IPG. */ 1504 /* Assure RX buffer is not reused by IPG. */
1505 sp->RxBuff[entry] = NULL; 1505 sp->rx_buff[entry] = NULL;
1506 } 1506 }
1507 1507
1508 /* 1508 /*
@@ -1536,15 +1536,15 @@ static int ipg_nic_rx(struct net_device *dev)
1536 * buffer since it is erroneous and we will 1536 * buffer since it is erroneous and we will
1537 * not pass it to higher layer processes. 1537 * not pass it to higher layer processes.
1538 */ 1538 */
1539 if (sp->RxBuff[entry]) { 1539 if (sp->rx_buff[entry]) {
1540 pci_unmap_single(sp->pdev, 1540 pci_unmap_single(sp->pdev,
1541 le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN, 1541 le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN,
1542 sp->rx_buf_sz, PCI_DMA_FROMDEVICE); 1542 sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
1543 dev_kfree_skb_irq(sp->RxBuff[entry]); 1543 dev_kfree_skb_irq(sp->rx_buff[entry]);
1544 } 1544 }
1545 1545
1546 /* Assure RX buffer is not reused by IPG. */ 1546 /* Assure RX buffer is not reused by IPG. */
1547 sp->RxBuff[entry] = NULL; 1547 sp->rx_buff[entry] = NULL;
1548 } 1548 }
1549 1549
1550 sp->rx_current = curr; 1550 sp->rx_current = curr;
@@ -1710,11 +1710,11 @@ static void ipg_rx_clear(struct ipg_nic_private *sp)
1710 unsigned int i; 1710 unsigned int i;
1711 1711
1712 for (i = 0; i < IPG_RFDLIST_LENGTH; i++) { 1712 for (i = 0; i < IPG_RFDLIST_LENGTH; i++) {
1713 if (sp->RxBuff[i]) { 1713 if (sp->rx_buff[i]) {
1714 struct ipg_rx *rxfd = sp->rxd + i; 1714 struct ipg_rx *rxfd = sp->rxd + i;
1715 1715
1716 dev_kfree_skb_irq(sp->RxBuff[i]); 1716 dev_kfree_skb_irq(sp->rx_buff[i]);
1717 sp->RxBuff[i] = NULL; 1717 sp->rx_buff[i] = NULL;
1718 pci_unmap_single(sp->pdev, 1718 pci_unmap_single(sp->pdev,
1719 le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN, 1719 le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN,
1720 sp->rx_buf_sz, PCI_DMA_FROMDEVICE); 1720 sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
@@ -1727,16 +1727,16 @@ static void ipg_tx_clear(struct ipg_nic_private *sp)
1727 unsigned int i; 1727 unsigned int i;
1728 1728
1729 for (i = 0; i < IPG_TFDLIST_LENGTH; i++) { 1729 for (i = 0; i < IPG_TFDLIST_LENGTH; i++) {
1730 if (sp->TxBuff[i]) { 1730 if (sp->tx_buff[i]) {
1731 struct ipg_tx *txfd = sp->txd + i; 1731 struct ipg_tx *txfd = sp->txd + i;
1732 1732
1733 pci_unmap_single(sp->pdev, 1733 pci_unmap_single(sp->pdev,
1734 le64_to_cpu(txfd->frag_info) & ~IPG_TFI_FRAGLEN, 1734 le64_to_cpu(txfd->frag_info) & ~IPG_TFI_FRAGLEN,
1735 sp->TxBuff[i]->len, PCI_DMA_TODEVICE); 1735 sp->tx_buff[i]->len, PCI_DMA_TODEVICE);
1736 1736
1737 dev_kfree_skb_irq(sp->TxBuff[i]); 1737 dev_kfree_skb_irq(sp->tx_buff[i]);
1738 1738
1739 sp->TxBuff[i] = NULL; 1739 sp->tx_buff[i] = NULL;
1740 } 1740 }
1741 } 1741 }
1742} 1742}
@@ -1807,9 +1807,9 @@ static int ipg_nic_open(struct net_device *dev)
1807 1807
1808#ifdef JUMBO_FRAME 1808#ifdef JUMBO_FRAME
1809 /* initialize JUMBO Frame control variable */ 1809 /* initialize JUMBO Frame control variable */
1810 sp->Jumbo.FoundStart = 0; 1810 sp->jumbo.found_start = 0;
1811 sp->Jumbo.CurrentSize = 0; 1811 sp->jumbo.current_size = 0;
1812 sp->Jumbo.skb = 0; 1812 sp->jumbo.skb = 0;
1813 dev->mtu = IPG_TXFRAG_SIZE; 1813 dev->mtu = IPG_TXFRAG_SIZE;
1814#endif 1814#endif
1815 1815
@@ -1884,14 +1884,14 @@ static int ipg_nic_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
1884 if (sp->tenmbpsmode) 1884 if (sp->tenmbpsmode)
1885 netif_stop_queue(dev); 1885 netif_stop_queue(dev);
1886 1886
1887 if (sp->ResetCurrentTFD) { 1887 if (sp->reset_current_tfd) {
1888 sp->ResetCurrentTFD = 0; 1888 sp->reset_current_tfd = 0;
1889 entry = 0; 1889 entry = 0;
1890 } 1890 }
1891 1891
1892 txfd = sp->txd + entry; 1892 txfd = sp->txd + entry;
1893 1893
1894 sp->TxBuff[entry] = skb; 1894 sp->tx_buff[entry] = skb;
1895 1895
1896 /* Clear all TFC fields, except TFDDONE. */ 1896 /* Clear all TFC fields, except TFDDONE. */
1897 txfd->tfc = cpu_to_le64(IPG_TFC_TFDDONE); 1897 txfd->tfc = cpu_to_le64(IPG_TFC_TFDDONE);
@@ -2072,7 +2072,7 @@ static int ipg_hw_init(struct net_device *dev)
2072 2072
2073 /* Read/Write and Reset EEPROM Value */ 2073 /* Read/Write and Reset EEPROM Value */
2074 /* Read LED Mode Configuration from EEPROM */ 2074 /* Read LED Mode Configuration from EEPROM */
2075 sp->LED_Mode = read_eeprom(dev, 6); 2075 sp->led_mode = read_eeprom(dev, 6);
2076 2076
2077 /* Reset all functions within the IPG. Do not assert 2077 /* Reset all functions within the IPG. Do not assert
2078 * RST_OUT as not compatible with some PHYs. 2078 * RST_OUT as not compatible with some PHYs.