Lines Matching refs:t

441 			  struct cw1200_txinfo *t)  in cw1200_tx_h_calc_link_ids()  argument
443 if (t->sta && t->sta_priv->link_id) in cw1200_tx_h_calc_link_ids()
444 t->txpriv.raw_link_id = in cw1200_tx_h_calc_link_ids()
445 t->txpriv.link_id = in cw1200_tx_h_calc_link_ids()
446 t->sta_priv->link_id; in cw1200_tx_h_calc_link_ids()
448 t->txpriv.raw_link_id = in cw1200_tx_h_calc_link_ids()
449 t->txpriv.link_id = 0; in cw1200_tx_h_calc_link_ids()
450 else if (is_multicast_ether_addr(t->da)) { in cw1200_tx_h_calc_link_ids()
452 t->txpriv.raw_link_id = 0; in cw1200_tx_h_calc_link_ids()
453 t->txpriv.link_id = CW1200_LINK_ID_AFTER_DTIM; in cw1200_tx_h_calc_link_ids()
455 t->txpriv.raw_link_id = 0; in cw1200_tx_h_calc_link_ids()
456 t->txpriv.link_id = 0; in cw1200_tx_h_calc_link_ids()
459 t->txpriv.link_id = cw1200_find_link_id(priv, t->da); in cw1200_tx_h_calc_link_ids()
460 if (!t->txpriv.link_id) in cw1200_tx_h_calc_link_ids()
461 t->txpriv.link_id = cw1200_alloc_link_id(priv, t->da); in cw1200_tx_h_calc_link_ids()
462 if (!t->txpriv.link_id) { in cw1200_tx_h_calc_link_ids()
467 t->txpriv.raw_link_id = t->txpriv.link_id; in cw1200_tx_h_calc_link_ids()
469 if (t->txpriv.raw_link_id) in cw1200_tx_h_calc_link_ids()
470 priv->link_id_db[t->txpriv.raw_link_id - 1].timestamp = in cw1200_tx_h_calc_link_ids()
472 if (t->sta && (t->sta->uapsd_queues & BIT(t->queue))) in cw1200_tx_h_calc_link_ids()
473 t->txpriv.link_id = CW1200_LINK_ID_UAPSD; in cw1200_tx_h_calc_link_ids()
479 struct cw1200_txinfo *t) in cw1200_tx_h_pm() argument
481 if (ieee80211_is_auth(t->hdr->frame_control)) { in cw1200_tx_h_pm()
482 u32 mask = ~BIT(t->txpriv.raw_link_id); in cw1200_tx_h_pm()
492 struct cw1200_txinfo *t) in cw1200_tx_h_calc_tid() argument
494 if (ieee80211_is_data_qos(t->hdr->frame_control)) { in cw1200_tx_h_calc_tid()
495 u8 *qos = ieee80211_get_qos_ctl(t->hdr); in cw1200_tx_h_calc_tid()
496 t->txpriv.tid = qos[0] & IEEE80211_QOS_CTL_TID_MASK; in cw1200_tx_h_calc_tid()
497 } else if (ieee80211_is_data(t->hdr->frame_control)) { in cw1200_tx_h_calc_tid()
498 t->txpriv.tid = 0; in cw1200_tx_h_calc_tid()
504 struct cw1200_txinfo *t) in cw1200_tx_h_crypt() argument
506 if (!t->tx_info->control.hw_key || in cw1200_tx_h_crypt()
507 !ieee80211_has_protected(t->hdr->frame_control)) in cw1200_tx_h_crypt()
510 t->hdrlen += t->tx_info->control.hw_key->iv_len; in cw1200_tx_h_crypt()
511 skb_put(t->skb, t->tx_info->control.hw_key->icv_len); in cw1200_tx_h_crypt()
513 if (t->tx_info->control.hw_key->cipher == WLAN_CIPHER_SUITE_TKIP) in cw1200_tx_h_crypt()
514 skb_put(t->skb, 8); /* MIC space */ in cw1200_tx_h_crypt()
521 struct cw1200_txinfo *t, in cw1200_tx_h_align() argument
524 size_t offset = (size_t)t->skb->data & 3; in cw1200_tx_h_align()
536 if (skb_headroom(t->skb) < offset) { in cw1200_tx_h_align()
539 skb_headroom(t->skb)); in cw1200_tx_h_align()
542 skb_push(t->skb, offset); in cw1200_tx_h_align()
543 t->hdrlen += offset; in cw1200_tx_h_align()
544 t->txpriv.offset += offset; in cw1200_tx_h_align()
552 struct cw1200_txinfo *t) in cw1200_tx_h_action() argument
555 (struct ieee80211_mgmt *)t->hdr; in cw1200_tx_h_action()
556 if (ieee80211_is_action(t->hdr->frame_control) && in cw1200_tx_h_action()
566 struct cw1200_txinfo *t) in cw1200_tx_h_wsm() argument
570 if (skb_headroom(t->skb) < sizeof(struct wsm_tx)) { in cw1200_tx_h_wsm()
573 skb_headroom(t->skb)); in cw1200_tx_h_wsm()
577 wsm = (struct wsm_tx *)skb_push(t->skb, sizeof(struct wsm_tx)); in cw1200_tx_h_wsm()
578 t->txpriv.offset += sizeof(struct wsm_tx); in cw1200_tx_h_wsm()
580 wsm->hdr.len = __cpu_to_le16(t->skb->len); in cw1200_tx_h_wsm()
582 wsm->queue_id = wsm_queue_id_to_wsm(t->queue); in cw1200_tx_h_wsm()
589 struct cw1200_txinfo *t, in cw1200_tx_h_bt() argument
597 if (ieee80211_is_nullfunc(t->hdr->frame_control)) { in cw1200_tx_h_bt()
599 } else if (ieee80211_is_data(t->hdr->frame_control)) { in cw1200_tx_h_bt()
601 u8 *payload = &t->skb->data[t->hdrlen]; in cw1200_tx_h_bt()
605 } else if (ieee80211_is_assoc_req(t->hdr->frame_control) || in cw1200_tx_h_bt()
606 ieee80211_is_reassoc_req(t->hdr->frame_control)) { in cw1200_tx_h_bt()
608 (struct ieee80211_mgmt *)t->hdr; in cw1200_tx_h_bt()
623 if (ieee80211_is_action(t->hdr->frame_control)) in cw1200_tx_h_bt()
625 else if (ieee80211_is_mgmt(t->hdr->frame_control)) in cw1200_tx_h_bt()
642 struct cw1200_txinfo *t, in cw1200_tx_h_rate_policy() argument
647 t->txpriv.rate_id = tx_policy_get(priv, in cw1200_tx_h_rate_policy()
648 t->tx_info->control.rates, IEEE80211_TX_MAX_RATES, in cw1200_tx_h_rate_policy()
650 if (t->txpriv.rate_id == CW1200_INVALID_RATE_ID) in cw1200_tx_h_rate_policy()
653 wsm->flags |= t->txpriv.rate_id << 4; in cw1200_tx_h_rate_policy()
655 t->rate = cw1200_get_tx_rate(priv, in cw1200_tx_h_rate_policy()
656 &t->tx_info->control.rates[0]), in cw1200_tx_h_rate_policy()
657 wsm->max_tx_rate = t->rate->hw_value; in cw1200_tx_h_rate_policy()
658 if (t->rate->flags & IEEE80211_TX_RC_MCS) { in cw1200_tx_h_rate_policy()
686 struct cw1200_txinfo *t) in cw1200_tx_h_pm_state() argument
690 if (t->txpriv.link_id == CW1200_LINK_ID_AFTER_DTIM && in cw1200_tx_h_pm_state()
698 if (t->txpriv.raw_link_id && t->txpriv.tid < CW1200_MAX_TID) in cw1200_tx_h_pm_state()
699 was_buffered = priv->link_id_db[t->txpriv.raw_link_id - 1].buffered[t->txpriv.tid]++; in cw1200_tx_h_pm_state()
711 struct cw1200_txinfo t = { in cw1200_tx() local
728 t.hdrlen = ieee80211_hdrlen(t.hdr->frame_control); in cw1200_tx()
729 t.da = ieee80211_get_DA(t.hdr); in cw1200_tx()
731 t.sta = control->sta; in cw1200_tx()
732 t.sta_priv = (struct cw1200_sta_priv *)&t.sta->drv_priv; in cw1200_tx()
735 if (WARN_ON(t.queue >= 4)) in cw1200_tx()
738 ret = cw1200_tx_h_calc_link_ids(priv, &t); in cw1200_tx()
743 skb->len, t.queue, t.txpriv.link_id, in cw1200_tx()
744 t.txpriv.raw_link_id); in cw1200_tx()
746 cw1200_tx_h_pm(priv, &t); in cw1200_tx()
747 cw1200_tx_h_calc_tid(priv, &t); in cw1200_tx()
748 ret = cw1200_tx_h_crypt(priv, &t); in cw1200_tx()
751 ret = cw1200_tx_h_align(priv, &t, &flags); in cw1200_tx()
754 ret = cw1200_tx_h_action(priv, &t); in cw1200_tx()
757 wsm = cw1200_tx_h_wsm(priv, &t); in cw1200_tx()
763 cw1200_tx_h_bt(priv, &t, wsm); in cw1200_tx()
764 ret = cw1200_tx_h_rate_policy(priv, &t, wsm); in cw1200_tx()
769 sta = rcu_dereference(t.sta); in cw1200_tx()
773 tid_update = cw1200_tx_h_pm_state(priv, &t); in cw1200_tx()
774 BUG_ON(cw1200_queue_put(&priv->tx_queue[t.queue], in cw1200_tx()
775 t.skb, &t.txpriv)); in cw1200_tx()
780 ieee80211_sta_set_buffered(sta, t.txpriv.tid, true); in cw1200_tx()
789 cw1200_skb_dtor(priv, skb, &t.txpriv); in cw1200_tx()