From 3f62ba9f89093bf37c40c61e5ec419471b72a3d3 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Tue, 24 Nov 2015 11:29:20 +0800 Subject: [PATCH] ifmedia: Add IFM_ETH_MANUFLOW. This media option ignores the auto-negotiation flow control setting, and force the flow control settings configured by user. --- sys/net/if_media.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/if_media.h b/sys/net/if_media.h index 4a8a81d218..2b077fef88 100644 --- a/sys/net/if_media.h +++ b/sys/net/if_media.h @@ -167,6 +167,7 @@ uint64_t ifmedia_baudrate(int); #define IFM_ETH_MASTER 0x00000100 /* master mode (1000baseT) */ #define IFM_ETH_RXPAUSE 0x00000200 /* receive PAUSE frames */ #define IFM_ETH_TXPAUSE 0x00000400 /* transmit PAUSE frames */ +#define IFM_ETH_MANUFLOW 0x00000800 /* manual flow control setting */ /* * IEEE 802.11 Wireless @@ -267,7 +268,8 @@ uint64_t ifmedia_baudrate(int); #define IFM_MSHIFT 16 /* Mode shift */ #define IFM_GMASK 0x0ff00000 /* Global options */ /* Ethernet flow control mask */ -#define IFM_ETH_FMASK (IFM_FLOW | IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE) +#define IFM_ETH_FCMASK (IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE | IFM_ETH_MANUFLOW) +#define IFM_ETH_FMASK (IFM_FLOW | IFM_ETH_FCMASK) #define IFM_NMIN IFM_ETHER /* lowest Network type */ #define IFM_NMAX IFM_NMASK /* highest Network type */ @@ -376,6 +378,7 @@ struct ifmedia_description { { IFM_ETH_MASTER, "master" }, \ { IFM_ETH_RXPAUSE, "rxpause" }, \ { IFM_ETH_TXPAUSE, "txpause" }, \ + { IFM_ETH_MANUFLOW, "manuflow" }, \ { 0, NULL }, \ } -- 2.11.4.GIT