Lines Matching refs:t
438 struct cw1200_txinfo *t) in cw1200_tx_h_calc_link_ids() argument
440 if (t->sta && t->sta_priv->link_id) in cw1200_tx_h_calc_link_ids()
441 t->txpriv.raw_link_id = in cw1200_tx_h_calc_link_ids()
442 t->txpriv.link_id = in cw1200_tx_h_calc_link_ids()
443 t->sta_priv->link_id; in cw1200_tx_h_calc_link_ids()
445 t->txpriv.raw_link_id = in cw1200_tx_h_calc_link_ids()
446 t->txpriv.link_id = 0; in cw1200_tx_h_calc_link_ids()
447 else if (is_multicast_ether_addr(t->da)) { in cw1200_tx_h_calc_link_ids()
449 t->txpriv.raw_link_id = 0; in cw1200_tx_h_calc_link_ids()
450 t->txpriv.link_id = CW1200_LINK_ID_AFTER_DTIM; 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 = 0; in cw1200_tx_h_calc_link_ids()
456 t->txpriv.link_id = cw1200_find_link_id(priv, t->da); in cw1200_tx_h_calc_link_ids()
457 if (!t->txpriv.link_id) in cw1200_tx_h_calc_link_ids()
458 t->txpriv.link_id = cw1200_alloc_link_id(priv, t->da); in cw1200_tx_h_calc_link_ids()
459 if (!t->txpriv.link_id) { in cw1200_tx_h_calc_link_ids()
464 t->txpriv.raw_link_id = t->txpriv.link_id; in cw1200_tx_h_calc_link_ids()
466 if (t->txpriv.raw_link_id) in cw1200_tx_h_calc_link_ids()
467 priv->link_id_db[t->txpriv.raw_link_id - 1].timestamp = in cw1200_tx_h_calc_link_ids()
469 if (t->sta && (t->sta->uapsd_queues & BIT(t->queue))) in cw1200_tx_h_calc_link_ids()
470 t->txpriv.link_id = CW1200_LINK_ID_UAPSD; in cw1200_tx_h_calc_link_ids()
476 struct cw1200_txinfo *t) in cw1200_tx_h_pm() argument
478 if (ieee80211_is_auth(t->hdr->frame_control)) { in cw1200_tx_h_pm()
479 u32 mask = ~BIT(t->txpriv.raw_link_id); in cw1200_tx_h_pm()
489 struct cw1200_txinfo *t) in cw1200_tx_h_calc_tid() argument
491 if (ieee80211_is_data_qos(t->hdr->frame_control)) { in cw1200_tx_h_calc_tid()
492 u8 *qos = ieee80211_get_qos_ctl(t->hdr); in cw1200_tx_h_calc_tid()
493 t->txpriv.tid = qos[0] & IEEE80211_QOS_CTL_TID_MASK; in cw1200_tx_h_calc_tid()
494 } else if (ieee80211_is_data(t->hdr->frame_control)) { in cw1200_tx_h_calc_tid()
495 t->txpriv.tid = 0; in cw1200_tx_h_calc_tid()
501 struct cw1200_txinfo *t) in cw1200_tx_h_crypt() argument
503 if (!t->tx_info->control.hw_key || in cw1200_tx_h_crypt()
504 !ieee80211_has_protected(t->hdr->frame_control)) in cw1200_tx_h_crypt()
507 t->hdrlen += t->tx_info->control.hw_key->iv_len; in cw1200_tx_h_crypt()
508 skb_put(t->skb, t->tx_info->control.hw_key->icv_len); in cw1200_tx_h_crypt()
510 if (t->tx_info->control.hw_key->cipher == WLAN_CIPHER_SUITE_TKIP) in cw1200_tx_h_crypt()
511 skb_put(t->skb, 8); /* MIC space */ in cw1200_tx_h_crypt()
518 struct cw1200_txinfo *t, in cw1200_tx_h_align() argument
521 size_t offset = (size_t)t->skb->data & 3; in cw1200_tx_h_align()
533 if (skb_headroom(t->skb) < offset) { in cw1200_tx_h_align()
536 skb_headroom(t->skb)); in cw1200_tx_h_align()
539 skb_push(t->skb, offset); in cw1200_tx_h_align()
540 t->hdrlen += offset; in cw1200_tx_h_align()
541 t->txpriv.offset += offset; in cw1200_tx_h_align()
549 struct cw1200_txinfo *t) in cw1200_tx_h_action() argument
552 (struct ieee80211_mgmt *)t->hdr; in cw1200_tx_h_action()
553 if (ieee80211_is_action(t->hdr->frame_control) && in cw1200_tx_h_action()
563 struct cw1200_txinfo *t) in cw1200_tx_h_wsm() argument
567 if (skb_headroom(t->skb) < sizeof(struct wsm_tx)) { in cw1200_tx_h_wsm()
570 skb_headroom(t->skb)); in cw1200_tx_h_wsm()
574 wsm = skb_push(t->skb, sizeof(struct wsm_tx)); in cw1200_tx_h_wsm()
575 t->txpriv.offset += sizeof(struct wsm_tx); in cw1200_tx_h_wsm()
577 wsm->hdr.len = __cpu_to_le16(t->skb->len); in cw1200_tx_h_wsm()
579 wsm->queue_id = wsm_queue_id_to_wsm(t->queue); in cw1200_tx_h_wsm()
586 struct cw1200_txinfo *t, in cw1200_tx_h_bt() argument
594 if (ieee80211_is_nullfunc(t->hdr->frame_control)) { in cw1200_tx_h_bt()
596 } else if (ieee80211_is_data(t->hdr->frame_control)) { in cw1200_tx_h_bt()
598 u8 *payload = &t->skb->data[t->hdrlen]; in cw1200_tx_h_bt()
602 } else if (ieee80211_is_assoc_req(t->hdr->frame_control) || in cw1200_tx_h_bt()
603 ieee80211_is_reassoc_req(t->hdr->frame_control)) { in cw1200_tx_h_bt()
605 (struct ieee80211_mgmt *)t->hdr; in cw1200_tx_h_bt()
620 if (ieee80211_is_action(t->hdr->frame_control)) in cw1200_tx_h_bt()
622 else if (ieee80211_is_mgmt(t->hdr->frame_control)) in cw1200_tx_h_bt()
639 struct cw1200_txinfo *t, in cw1200_tx_h_rate_policy() argument
644 t->txpriv.rate_id = tx_policy_get(priv, in cw1200_tx_h_rate_policy()
645 t->tx_info->control.rates, IEEE80211_TX_MAX_RATES, in cw1200_tx_h_rate_policy()
647 if (t->txpriv.rate_id == CW1200_INVALID_RATE_ID) in cw1200_tx_h_rate_policy()
650 wsm->flags |= t->txpriv.rate_id << 4; in cw1200_tx_h_rate_policy()
652 t->rate = cw1200_get_tx_rate(priv, in cw1200_tx_h_rate_policy()
653 &t->tx_info->control.rates[0]); in cw1200_tx_h_rate_policy()
654 wsm->max_tx_rate = t->rate->hw_value; in cw1200_tx_h_rate_policy()
655 if (t->rate->flags & IEEE80211_TX_RC_MCS) { in cw1200_tx_h_rate_policy()
683 struct cw1200_txinfo *t) in cw1200_tx_h_pm_state() argument
687 if (t->txpriv.link_id == CW1200_LINK_ID_AFTER_DTIM && in cw1200_tx_h_pm_state()
695 if (t->txpriv.raw_link_id && t->txpriv.tid < CW1200_MAX_TID) in cw1200_tx_h_pm_state()
696 was_buffered = priv->link_id_db[t->txpriv.raw_link_id - 1].buffered[t->txpriv.tid]++; in cw1200_tx_h_pm_state()
708 struct cw1200_txinfo t = { in cw1200_tx() local
725 t.hdrlen = ieee80211_hdrlen(t.hdr->frame_control); in cw1200_tx()
726 t.da = ieee80211_get_DA(t.hdr); in cw1200_tx()
728 t.sta = control->sta; in cw1200_tx()
729 t.sta_priv = (struct cw1200_sta_priv *)&t.sta->drv_priv; in cw1200_tx()
732 if (WARN_ON(t.queue >= 4)) in cw1200_tx()
735 ret = cw1200_tx_h_calc_link_ids(priv, &t); in cw1200_tx()
740 skb->len, t.queue, t.txpriv.link_id, in cw1200_tx()
741 t.txpriv.raw_link_id); in cw1200_tx()
743 cw1200_tx_h_pm(priv, &t); in cw1200_tx()
744 cw1200_tx_h_calc_tid(priv, &t); in cw1200_tx()
745 ret = cw1200_tx_h_crypt(priv, &t); in cw1200_tx()
748 ret = cw1200_tx_h_align(priv, &t, &flags); in cw1200_tx()
751 ret = cw1200_tx_h_action(priv, &t); in cw1200_tx()
754 wsm = cw1200_tx_h_wsm(priv, &t); in cw1200_tx()
760 cw1200_tx_h_bt(priv, &t, wsm); in cw1200_tx()
761 ret = cw1200_tx_h_rate_policy(priv, &t, wsm); in cw1200_tx()
765 sta = t.sta; in cw1200_tx()
769 tid_update = cw1200_tx_h_pm_state(priv, &t); in cw1200_tx()
770 BUG_ON(cw1200_queue_put(&priv->tx_queue[t.queue], in cw1200_tx()
771 t.skb, &t.txpriv)); in cw1200_tx()
776 ieee80211_sta_set_buffered(sta, t.txpriv.tid, true); in cw1200_tx()
783 cw1200_skb_dtor(priv, skb, &t.txpriv); in cw1200_tx()