d62bc4badc1c1f1549c961cfb8b420e650e1272byz * CDDL HEADER START
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * The contents of this file are subject to the terms of the
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * Common Development and Distribution License (the "License").
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * You may not use this file except in compliance with the License.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * See the License for the specific language governing permissions
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * and limitations under the License.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * When distributing Covered Code, include this CDDL HEADER in each
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * If applicable, add the following below this CDDL HEADER, with the
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * fields enclosed by brackets "[]" replaced with your own identifying
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * information: Portions Copyright [yyyy] [name of copyright owner]
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * CDDL HEADER END
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * Use is subject to license terms.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * Optimize for the most common case.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz return (mp);
d62bc4badc1c1f1549c961cfb8b420e650e1272byz return (mp);
d62bc4badc1c1f1549c961cfb8b420e650e1272byzsoftmac_rput_process_data(softmac_lower_t *slp, mblk_t *mp)
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * When packets arrive, the softmac might not be fully started.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz "copymsg failed");
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer mac_hcksum_get(mp, &start, &stuff, &end, &value, &flags);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer mac_hcksum_set(tmp, start, stuff, end, value, flags);
d62bc4badc1c1f1549c961cfb8b420e650e1272byzsoftmac_output(softmac_lower_t *slp, mblk_t *mp, t_uscalar_t dl_prim,
f1956ffef55a0f859d3974677c90c728e3fc32f5Cathy Zhou mac_perim_enter_by_mh(slp->sl_softmac->smac_mh, &mph);
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * Record the pending DLPI primitive.
d3d50737e566cade9a08d73d2af95105ac7cd960Rafael Vanoni if (cv_reltimedwait(&slp->sl_cv, &slp->sl_mutex, ACKTIMEOUT,
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * If we timed out, sl_ack_mp will still be NULL, but sl_pending_prim
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * won't be set to DL_PRIM_INVAL.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz ASSERT(mp != NULL || slp->sl_pending_prim != DL_PRIM_INVAL);
d62bc4badc1c1f1549c961cfb8b420e650e1272byzsoftmac_ioctl_tx(softmac_lower_t *slp, mblk_t *mp, mblk_t **mpp)
f1956ffef55a0f859d3974677c90c728e3fc32f5Cathy Zhou mac_perim_enter_by_mh(slp->sl_softmac->smac_mh, &mph);
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * Record that ioctl processing is currently in progress.
d62bc4badc1c1f1549c961cfb8b420e650e1272byzsoftmac_mexchange_error_ack(mblk_t **mpp, t_uscalar_t error_primitive,
d62bc4badc1c1f1549c961cfb8b420e650e1272byz if ((*mpp = mexchange(NULL, *mpp, sizeof (dl_error_ack_t), M_PCPROTO,
d62bc4badc1c1f1549c961cfb8b420e650e1272byz return (0);
d62bc4badc1c1f1549c961cfb8b420e650e1272byzsoftmac_proto_tx(softmac_lower_t *slp, mblk_t *mp, mblk_t **mpp)
d62bc4badc1c1f1549c961cfb8b420e650e1272byz dl_prim = ((union DL_primitives *)mp->b_rptr)->dl_primitive;
d62bc4badc1c1f1549c961cfb8b420e650e1272byz err = softmac_output(slp, mp, dl_prim, DL_BIND_ACK, mpp);
d62bc4badc1c1f1549c961cfb8b420e650e1272byz err = softmac_output(slp, mp, dl_prim, DL_NOTIFY_ACK, mpp);
d62bc4badc1c1f1549c961cfb8b420e650e1272byz err = softmac_output(slp, mp, dl_prim, DL_CONTROL_ACK, mpp);