summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ix.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2012-12-20 17:34:55 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2012-12-20 17:34:55 +0000
commit9277d4af6104db1c5f261a2828326297d5f9ca48 (patch)
tree2f05d055bfdc20241097d1ea9f510e68ec3f8e7e /sys/dev/pci/if_ix.c
parent96e9e3201af35da03c6049130df90f2096551b75 (diff)
report flow control mode in the media status callback
Diffstat (limited to 'sys/dev/pci/if_ix.c')
-rw-r--r--sys/dev/pci/if_ix.c19
1 files changed, 18 insertions, 1 deletions
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;
+ }
}
/*********************************************************************