From 9277d4af6104db1c5f261a2828326297d5f9ca48 Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Thu, 20 Dec 2012 17:34:55 +0000 Subject: report flow control mode in the media status callback --- sys/dev/pci/if_ix.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'sys/dev/pci/if_ix.c') diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index 55cc95981c3..1495db45612 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.86 2012/12/20 17:07:37 mikeb Exp $ */ +/* $OpenBSD: if_ix.c,v 1.87 2012/12/20 17:34:54 mikeb Exp $ */ /****************************************************************************** @@ -1037,6 +1037,23 @@ ixgbe_media_status(struct ifnet * ifp, struct ifmediareq * ifmr) break; } } + + switch (sc->hw.fc.current_mode) { + case ixgbe_fc_tx_pause: + ifmr->ifm_active |= IFM_FLOW | IFM_ETH_TXPAUSE; + break; + case ixgbe_fc_rx_pause: + ifmr->ifm_active |= IFM_FLOW | IFM_ETH_RXPAUSE; + break; + case ixgbe_fc_full: + ifmr->ifm_active |= IFM_FLOW | IFM_ETH_RXPAUSE | + IFM_ETH_TXPAUSE; + break; + default: + ifmr->ifm_active &= ~(IFM_FLOW | IFM_ETH_RXPAUSE | + IFM_ETH_TXPAUSE); + break; + } } /********************************************************************* -- cgit v1.2.3