Changeset 243ddb5 in rtems for bsps/sparc/include


Ignore:
Timestamp:
Jun 15, 2018, 12:28:36 PM (20 months ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
master
Children:
aea3134e
Parents:
2fbe2ef3
git-author:
Daniel Hellstrom <daniel@…> (06/15/18 12:28:36)
git-committer:
Daniel Hellstrom <daniel@…> (08/24/18 13:51:39)
Message:

leon,greth: enable MAC filtering (promiscous mode, multicast)

It enabled promiscous mode or sets the multicast filter according
to the configuration and parameters to ioctl(SIOCSIFFLAGS),
ioctl(SIOCADDMULTI) and ioctl(SIOCDELMULTI).
On SIOCADDMULTI/SIOCDELMULTI requests the greth ioctl calls the
Ethernet helper functions ether_addmulti()/ether_delmulti() which
tells the greth driver when its required to update the MAC multicast
filtering.

The interface notifies support for multicast by setting IFF_MULTICAST.

The GRETH has two registers which contains a bit-mask of allowed MAC
addresses. The incomming MAC address is CRC:ed and the CRC is used as
an index into the bit-mask to determine to allow or drop the frame.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/sparc/include/bsp/greth.h

    r2fbe2ef3 r243ddb5  
    2525   volatile uint32_t txdesc;       /* Transmit descriptor pointer */
    2626   volatile uint32_t rxdesc;       /* Receive descriptor pointer */
     27   volatile uint32_t edcl;         /* EDCL IP register */
     28   volatile uint32_t ht_msb;       /* Multicast MSB hash */
     29   volatile uint32_t ht_lsb;       /* Multicast LSB hash */
    2730} greth_regs;
    2831
     
    8487#define GRETH_CTRL_SP           0x00000080 /* 100MBit speed mode */
    8588#define GRETH_CTRL_GB           0x00000100 /* 1GBit speed mode */
     89#define GRETH_CTRL_MCE          0x00000800 /* Multicast Enable */
    8690#define GRETH_CTRL_DD           0x00001000 /* Disable EDCL Duplex Detection */
    8791#define GRETH_CTRL_ED           0x00004000 /* EDCL Disable */
     92#define GRETH_CTRL_MC           0x02000000 /* Multicast available */
     93#define GRETH_CTRL_ME           0x04000000 /* MDIO interrupts enabled */
     94#define GRETH_CTRL_GA           0x08000000 /* Gigabit MAC available */
    8895
    8996/* Status Register */
Note: See TracChangeset for help on using the changeset viewer.