diff options
author | <Eric.Cheng@Sun.COM> | 2009-11-09 20:01:32 -0800 |
---|---|---|
committer | <Eric.Cheng@Sun.COM> | 2009-11-09 20:01:32 -0800 |
commit | 8d4cf8d8d2965ea43bccdc838f15c18634fee02d (patch) | |
tree | 87ace970c3bc9c66d8b1d5fbe22559f3bc858ba4 /usr/src/uts/common/io/mac/mac_client.c | |
parent | bd9f6899328e19cbb74e3ad02f5c32002285887e (diff) | |
download | illumos-gate-8d4cf8d8d2965ea43bccdc838f15c18634fee02d.tar.gz |
6890826 DLPI consumers using IP receive only broadcast messages
6888482 failure to initialize link props should not be ignored
Diffstat (limited to 'usr/src/uts/common/io/mac/mac_client.c')
-rw-r--r-- | usr/src/uts/common/io/mac/mac_client.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/usr/src/uts/common/io/mac/mac_client.c b/usr/src/uts/common/io/mac/mac_client.c index 0d1669b40e..421c3e9bbd 100644 --- a/usr/src/uts/common/io/mac/mac_client.c +++ b/usr/src/uts/common/io/mac/mac_client.c @@ -1394,7 +1394,7 @@ mac_client_close(mac_client_handle_t mch, uint16_t flags) } /* - * Enable bypass for the specified MAC client. + * Set the rx bypass receive callback. */ boolean_t mac_rx_bypass_set(mac_client_handle_t mch, mac_direct_rx_t rx_fn, void *arg1) @@ -1418,11 +1418,25 @@ mac_rx_bypass_set(mac_client_handle_t mch, mac_direct_rx_t rx_fn, void *arg1) */ mcip->mci_direct_rx_fn = rx_fn; mcip->mci_direct_rx_arg = arg1; - mcip->mci_state_flags |= MCIS_CLIENT_POLL_CAPABLE; return (B_TRUE); } /* + * Enable/Disable rx bypass. By default, bypass is assumed to be enabled. + */ +void +mac_rx_bypass_enable(mac_client_handle_t mch) +{ + ((mac_client_impl_t *)mch)->mci_state_flags &= ~MCIS_RX_BYPASS_DISABLE; +} + +void +mac_rx_bypass_disable(mac_client_handle_t mch) +{ + ((mac_client_impl_t *)mch)->mci_state_flags |= MCIS_RX_BYPASS_DISABLE; +} + +/* * Set the receive callback for the specified MAC client. There can be * at most one such callback per MAC client. */ @@ -3141,9 +3155,6 @@ mac_resource_set_common(mac_client_handle_t mch, mac_resource_add_t add, mcip->mci_resource_restart = restart; mcip->mci_resource_bind = bind; mcip->mci_resource_arg = arg; - - if (arg == NULL) - mcip->mci_state_flags &= ~MCIS_CLIENT_POLL_CAPABLE; } void @@ -3168,6 +3179,7 @@ mac_client_poll_enable(mac_client_handle_t mch) flent = mcip->mci_flent; ASSERT(flent != NULL); + mcip->mci_state_flags |= MCIS_CLIENT_POLL_CAPABLE; for (i = 0; i < flent->fe_rx_srs_cnt; i++) { mac_srs = (mac_soft_ring_set_t *)flent->fe_rx_srs[i]; ASSERT(mac_srs->srs_mcip == mcip); @@ -3190,6 +3202,7 @@ mac_client_poll_disable(mac_client_handle_t mch) flent = mcip->mci_flent; ASSERT(flent != NULL); + mcip->mci_state_flags &= ~MCIS_CLIENT_POLL_CAPABLE; for (i = 0; i < flent->fe_rx_srs_cnt; i++) { mac_srs = (mac_soft_ring_set_t *)flent->fe_rx_srs[i]; ASSERT(mac_srs->srs_mcip == mcip); |