diff options
Diffstat (limited to 'drivers/net/sk98lin/skaddr.c')
-rw-r--r-- | drivers/net/sk98lin/skaddr.c | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/drivers/net/sk98lin/skaddr.c b/drivers/net/sk98lin/skaddr.c index a7e25edc7fc4..6e6c56aa6d6f 100644 --- a/drivers/net/sk98lin/skaddr.c +++ b/drivers/net/sk98lin/skaddr.c | |||
@@ -87,6 +87,21 @@ static const SK_U16 OnesHash[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}; | |||
87 | static int Next0[SK_MAX_MACS] = {0}; | 87 | static int Next0[SK_MAX_MACS] = {0}; |
88 | #endif /* DEBUG */ | 88 | #endif /* DEBUG */ |
89 | 89 | ||
90 | static int SkAddrGmacMcAdd(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber, | ||
91 | SK_MAC_ADDR *pMc, int Flags); | ||
92 | static int SkAddrGmacMcClear(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber, | ||
93 | int Flags); | ||
94 | static int SkAddrGmacMcUpdate(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber); | ||
95 | static int SkAddrGmacPromiscuousChange(SK_AC *pAC, SK_IOC IoC, | ||
96 | SK_U32 PortNumber, int NewPromMode); | ||
97 | static int SkAddrXmacMcAdd(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber, | ||
98 | SK_MAC_ADDR *pMc, int Flags); | ||
99 | static int SkAddrXmacMcClear(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber, | ||
100 | int Flags); | ||
101 | static int SkAddrXmacMcUpdate(SK_AC *pAC, SK_IOC IoC, SK_U32 PortNumber); | ||
102 | static int SkAddrXmacPromiscuousChange(SK_AC *pAC, SK_IOC IoC, | ||
103 | SK_U32 PortNumber, int NewPromMode); | ||
104 | |||
90 | /* functions ******************************************************************/ | 105 | /* functions ******************************************************************/ |
91 | 106 | ||
92 | /****************************************************************************** | 107 | /****************************************************************************** |
@@ -372,7 +387,7 @@ int Flags) /* permanent/non-perm, sw-only */ | |||
372 | * SK_ADDR_SUCCESS | 387 | * SK_ADDR_SUCCESS |
373 | * SK_ADDR_ILLEGAL_PORT | 388 | * SK_ADDR_ILLEGAL_PORT |
374 | */ | 389 | */ |
375 | int SkAddrXmacMcClear( | 390 | static int SkAddrXmacMcClear( |
376 | SK_AC *pAC, /* adapter context */ | 391 | SK_AC *pAC, /* adapter context */ |
377 | SK_IOC IoC, /* I/O context */ | 392 | SK_IOC IoC, /* I/O context */ |
378 | SK_U32 PortNumber, /* Index of affected port */ | 393 | SK_U32 PortNumber, /* Index of affected port */ |
@@ -429,7 +444,7 @@ int Flags) /* permanent/non-perm, sw-only */ | |||
429 | * SK_ADDR_SUCCESS | 444 | * SK_ADDR_SUCCESS |
430 | * SK_ADDR_ILLEGAL_PORT | 445 | * SK_ADDR_ILLEGAL_PORT |
431 | */ | 446 | */ |
432 | int SkAddrGmacMcClear( | 447 | static int SkAddrGmacMcClear( |
433 | SK_AC *pAC, /* adapter context */ | 448 | SK_AC *pAC, /* adapter context */ |
434 | SK_IOC IoC, /* I/O context */ | 449 | SK_IOC IoC, /* I/O context */ |
435 | SK_U32 PortNumber, /* Index of affected port */ | 450 | SK_U32 PortNumber, /* Index of affected port */ |
@@ -519,7 +534,7 @@ int Flags) /* permanent/non-perm, sw-only */ | |||
519 | * Returns: | 534 | * Returns: |
520 | * Hash value of multicast address. | 535 | * Hash value of multicast address. |
521 | */ | 536 | */ |
522 | SK_U32 SkXmacMcHash( | 537 | static SK_U32 SkXmacMcHash( |
523 | unsigned char *pMc) /* Multicast address */ | 538 | unsigned char *pMc) /* Multicast address */ |
524 | { | 539 | { |
525 | SK_U32 Idx; | 540 | SK_U32 Idx; |
@@ -557,7 +572,7 @@ unsigned char *pMc) /* Multicast address */ | |||
557 | * Returns: | 572 | * Returns: |
558 | * Hash value of multicast address. | 573 | * Hash value of multicast address. |
559 | */ | 574 | */ |
560 | SK_U32 SkGmacMcHash( | 575 | static SK_U32 SkGmacMcHash( |
561 | unsigned char *pMc) /* Multicast address */ | 576 | unsigned char *pMc) /* Multicast address */ |
562 | { | 577 | { |
563 | SK_U32 Data; | 578 | SK_U32 Data; |
@@ -672,7 +687,7 @@ int Flags) /* permanent/non-permanent */ | |||
672 | * SK_MC_ILLEGAL_ADDRESS | 687 | * SK_MC_ILLEGAL_ADDRESS |
673 | * SK_MC_RLMT_OVERFLOW | 688 | * SK_MC_RLMT_OVERFLOW |
674 | */ | 689 | */ |
675 | int SkAddrXmacMcAdd( | 690 | static int SkAddrXmacMcAdd( |
676 | SK_AC *pAC, /* adapter context */ | 691 | SK_AC *pAC, /* adapter context */ |
677 | SK_IOC IoC, /* I/O context */ | 692 | SK_IOC IoC, /* I/O context */ |
678 | SK_U32 PortNumber, /* Port Number */ | 693 | SK_U32 PortNumber, /* Port Number */ |
@@ -778,7 +793,7 @@ int Flags) /* permanent/non-permanent */ | |||
778 | * SK_MC_FILTERING_INEXACT | 793 | * SK_MC_FILTERING_INEXACT |
779 | * SK_MC_ILLEGAL_ADDRESS | 794 | * SK_MC_ILLEGAL_ADDRESS |
780 | */ | 795 | */ |
781 | int SkAddrGmacMcAdd( | 796 | static int SkAddrGmacMcAdd( |
782 | SK_AC *pAC, /* adapter context */ | 797 | SK_AC *pAC, /* adapter context */ |
783 | SK_IOC IoC, /* I/O context */ | 798 | SK_IOC IoC, /* I/O context */ |
784 | SK_U32 PortNumber, /* Port Number */ | 799 | SK_U32 PortNumber, /* Port Number */ |
@@ -937,7 +952,7 @@ SK_U32 PortNumber) /* Port Number */ | |||
937 | * SK_MC_FILTERING_INEXACT | 952 | * SK_MC_FILTERING_INEXACT |
938 | * SK_ADDR_ILLEGAL_PORT | 953 | * SK_ADDR_ILLEGAL_PORT |
939 | */ | 954 | */ |
940 | int SkAddrXmacMcUpdate( | 955 | static int SkAddrXmacMcUpdate( |
941 | SK_AC *pAC, /* adapter context */ | 956 | SK_AC *pAC, /* adapter context */ |
942 | SK_IOC IoC, /* I/O context */ | 957 | SK_IOC IoC, /* I/O context */ |
943 | SK_U32 PortNumber) /* Port Number */ | 958 | SK_U32 PortNumber) /* Port Number */ |
@@ -1082,7 +1097,7 @@ SK_U32 PortNumber) /* Port Number */ | |||
1082 | * SK_MC_FILTERING_INEXACT | 1097 | * SK_MC_FILTERING_INEXACT |
1083 | * SK_ADDR_ILLEGAL_PORT | 1098 | * SK_ADDR_ILLEGAL_PORT |
1084 | */ | 1099 | */ |
1085 | int SkAddrGmacMcUpdate( | 1100 | static int SkAddrGmacMcUpdate( |
1086 | SK_AC *pAC, /* adapter context */ | 1101 | SK_AC *pAC, /* adapter context */ |
1087 | SK_IOC IoC, /* I/O context */ | 1102 | SK_IOC IoC, /* I/O context */ |
1088 | SK_U32 PortNumber) /* Port Number */ | 1103 | SK_U32 PortNumber) /* Port Number */ |
@@ -1468,7 +1483,7 @@ int NewPromMode) /* new promiscuous mode */ | |||
1468 | * SK_ADDR_SUCCESS | 1483 | * SK_ADDR_SUCCESS |
1469 | * SK_ADDR_ILLEGAL_PORT | 1484 | * SK_ADDR_ILLEGAL_PORT |
1470 | */ | 1485 | */ |
1471 | int SkAddrXmacPromiscuousChange( | 1486 | static int SkAddrXmacPromiscuousChange( |
1472 | SK_AC *pAC, /* adapter context */ | 1487 | SK_AC *pAC, /* adapter context */ |
1473 | SK_IOC IoC, /* I/O context */ | 1488 | SK_IOC IoC, /* I/O context */ |
1474 | SK_U32 PortNumber, /* port whose promiscuous mode changes */ | 1489 | SK_U32 PortNumber, /* port whose promiscuous mode changes */ |
@@ -1585,7 +1600,7 @@ int NewPromMode) /* new promiscuous mode */ | |||
1585 | * SK_ADDR_SUCCESS | 1600 | * SK_ADDR_SUCCESS |
1586 | * SK_ADDR_ILLEGAL_PORT | 1601 | * SK_ADDR_ILLEGAL_PORT |
1587 | */ | 1602 | */ |
1588 | int SkAddrGmacPromiscuousChange( | 1603 | static int SkAddrGmacPromiscuousChange( |
1589 | SK_AC *pAC, /* adapter context */ | 1604 | SK_AC *pAC, /* adapter context */ |
1590 | SK_IOC IoC, /* I/O context */ | 1605 | SK_IOC IoC, /* I/O context */ |
1591 | SK_U32 PortNumber, /* port whose promiscuous mode changes */ | 1606 | SK_U32 PortNumber, /* port whose promiscuous mode changes */ |