Lines Matching defs:sup

156 	softmac_upper_t	*sup = buf;
160 mutex_init(&sup->su_mutex, NULL, MUTEX_DEFAULT, NULL);
161 cv_init(&sup->su_cv, NULL, CV_DEFAULT, NULL);
162 mutex_init(&sup->su_disp_mutex, NULL, MUTEX_DEFAULT, NULL);
163 cv_init(&sup->su_disp_cv, NULL, CV_DEFAULT, NULL);
164 list_create(&sup->su_req_list, sizeof (softmac_switch_req_t),
173 softmac_upper_t *sup = buf;
175 ASSERT(sup->su_slp == NULL);
176 ASSERT(sup->su_pending_head == NULL && sup->su_pending_tail == NULL);
177 ASSERT(!sup->su_dlpi_pending);
178 ASSERT(!sup->su_active);
179 ASSERT(!sup->su_closing);
180 ASSERT(sup->su_tx_flow_mp == NULL);
181 ASSERT(sup->su_tx_inprocess == 0);
182 ASSERT(sup->su_mode == SOFTMAC_UNKNOWN);
183 ASSERT(!sup->su_tx_busy);
184 ASSERT(!sup->su_bound);
185 ASSERT(!sup->su_taskq_scheduled);
186 ASSERT(sup->su_tx_notify_func == NULL);
187 ASSERT(sup->su_tx_notify_arg == NULL);
188 ASSERT(list_is_empty(&sup->su_req_list));
190 list_destroy(&sup->su_req_list);
191 mutex_destroy(&sup->su_mutex);
192 cv_destroy(&sup->su_cv);
193 mutex_destroy(&sup->su_disp_mutex);
194 cv_destroy(&sup->su_disp_cv);
516 softmac_upper_t *sup = NULL;
527 sup = kmem_cache_alloc(softmac_upper_cachep, KM_NOSLEEP);
528 if (sup == NULL) {
533 ASSERT(list_is_empty(&sup->su_req_list));
535 if ((sup->su_tx_flow_mp = allocb(1, BPRI_HI)) == NULL) {
540 sup->su_rq = rq;
541 sup->su_wq = WR(rq);
542 sup->su_softmac = softmac;
543 sup->su_mode = SOFTMAC_UNKNOWN;
545 sup->su_rxinfo.slr_arg = sup;
546 sup->su_rxinfo.slr_rx = softmac_dedicated_rx;
547 sup->su_direct_rxinfo.slr_arg = sup;
548 sup->su_direct_rxinfo.slr_rx = softmac_dedicated_rx;
550 if ((err = dld_str_open(rq, devp, sup)) != 0) {
551 freeb(sup->su_tx_flow_mp);
552 sup->su_tx_flow_mp = NULL;
559 if (sup != NULL)
560 kmem_cache_free(softmac_upper_cachep, sup);
568 softmac_upper_t *sup = dld_str_private(rq);
569 softmac_t *softmac = sup->su_softmac;
575 ASSERT(sup->su_tx_inprocess == 0);
580 mutex_enter(&sup->su_disp_mutex);
581 sup->su_closing = B_TRUE;
582 while (sup->su_dlpi_pending)
583 cv_wait(&sup->su_disp_cv, &sup->su_disp_mutex);
584 mutex_exit(&sup->su_disp_mutex);
586 softmac_upperstream_close(sup);
588 if (sup->su_tx_flow_mp != NULL) {
589 freeb(sup->su_tx_flow_mp);
590 sup->su_tx_flow_mp = NULL;
593 if (sup->su_active) {
597 sup->su_active = B_FALSE;
600 sup->su_bound = B_FALSE;
601 sup->su_softmac = NULL;
602 sup->su_closing = B_FALSE;
604 kmem_cache_free(softmac_upper_cachep, sup);
613 softmac_upper_t *sup = dld_str_private(wq);
621 softmac_wput_data(sup, mp);
633 softmac_wput_data(sup, mp);
637 softmac_wput_nondata(sup, mp);
640 softmac_wput_nondata(sup, mp);
648 softmac_upper_t *sup = dld_str_private(wq);
652 mutex_enter(&sup->su_mutex);
653 if (sup->su_mode != SOFTMAC_FASTPATH) {
657 sup->su_tx_inprocess++;
658 mutex_exit(&sup->su_mutex);
660 mutex_enter(&sup->su_mutex);
661 if (--sup->su_tx_inprocess == 0)
662 cv_signal(&sup->su_cv);
663 } else if (sup->su_tx_busy && SOFTMAC_CANPUTNEXT(sup->su_slp->sl_wq)) {
671 if (sup->su_tx_notify_func != NULL) {
672 sup->su_tx_inprocess++;
673 mutex_exit(&sup->su_mutex);
674 sup->su_tx_notify_func(sup->su_tx_notify_arg,
675 (mac_tx_cookie_t)sup);
676 mutex_enter(&sup->su_mutex);
677 if (--sup->su_tx_inprocess == 0)
678 cv_signal(&sup->su_cv);
680 ASSERT(sup->su_tx_flow_mp == NULL);
681 VERIFY((sup->su_tx_flow_mp = getq(wq)) != NULL);
682 sup->su_tx_busy = B_FALSE;
684 mutex_exit(&sup->su_mutex);