aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192cu/trx.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192cu/trx.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
index 3f0cb81c424f..79c98f62175f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
@@ -498,14 +498,14 @@ static void _rtl_tx_desc_checksum(u8 *txdesc)
498void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, 498void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
499 struct ieee80211_hdr *hdr, u8 *pdesc_tx, 499 struct ieee80211_hdr *hdr, u8 *pdesc_tx,
500 struct ieee80211_tx_info *info, struct sk_buff *skb, 500 struct ieee80211_tx_info *info, struct sk_buff *skb,
501 unsigned int queue_index) 501 u8 queue_index,
502 struct rtl_tcb_desc *tcb_desc)
502{ 503{
503 struct rtl_priv *rtlpriv = rtl_priv(hw); 504 struct rtl_priv *rtlpriv = rtl_priv(hw);
504 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); 505 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
505 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); 506 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
506 bool defaultadapter = true; 507 bool defaultadapter = true;
507 struct ieee80211_sta *sta; 508 struct ieee80211_sta *sta = info->control.sta = info->control.sta;
508 struct rtl_tcb_desc tcb_desc;
509 u8 *qc = ieee80211_get_qos_ctl(hdr); 509 u8 *qc = ieee80211_get_qos_ctl(hdr);
510 u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK; 510 u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
511 u16 seq_number; 511 u16 seq_number;
@@ -517,15 +517,15 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
517 u8 *txdesc; 517 u8 *txdesc;
518 518
519 seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; 519 seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
520 rtl_get_tcb_desc(hw, info, skb, &tcb_desc); 520 rtl_get_tcb_desc(hw, info, sta, skb, tcb_desc);
521 txdesc = (u8 *)skb_push(skb, RTL_TX_HEADER_SIZE); 521 txdesc = (u8 *)skb_push(skb, RTL_TX_HEADER_SIZE);
522 memset(txdesc, 0, RTL_TX_HEADER_SIZE); 522 memset(txdesc, 0, RTL_TX_HEADER_SIZE);
523 SET_TX_DESC_PKT_SIZE(txdesc, pktlen); 523 SET_TX_DESC_PKT_SIZE(txdesc, pktlen);
524 SET_TX_DESC_LINIP(txdesc, 0); 524 SET_TX_DESC_LINIP(txdesc, 0);
525 SET_TX_DESC_PKT_OFFSET(txdesc, RTL_DUMMY_OFFSET); 525 SET_TX_DESC_PKT_OFFSET(txdesc, RTL_DUMMY_OFFSET);
526 SET_TX_DESC_OFFSET(txdesc, RTL_TX_HEADER_SIZE); 526 SET_TX_DESC_OFFSET(txdesc, RTL_TX_HEADER_SIZE);
527 SET_TX_DESC_TX_RATE(txdesc, tcb_desc.hw_rate); 527 SET_TX_DESC_TX_RATE(txdesc, tcb_desc->hw_rate);
528 if (tcb_desc.use_shortgi || tcb_desc.use_shortpreamble) 528 if (tcb_desc->use_shortgi || tcb_desc->use_shortpreamble)
529 SET_TX_DESC_DATA_SHORTGI(txdesc, 1); 529 SET_TX_DESC_DATA_SHORTGI(txdesc, 1);
530 if (mac->tids[tid].agg.agg_state == RTL_AGG_ON && 530 if (mac->tids[tid].agg.agg_state == RTL_AGG_ON &&
531 info->flags & IEEE80211_TX_CTL_AMPDU) { 531 info->flags & IEEE80211_TX_CTL_AMPDU) {
@@ -535,21 +535,21 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
535 SET_TX_DESC_AGG_BREAK(txdesc, 1); 535 SET_TX_DESC_AGG_BREAK(txdesc, 1);
536 } 536 }
537 SET_TX_DESC_SEQ(txdesc, seq_number); 537 SET_TX_DESC_SEQ(txdesc, seq_number);
538 SET_TX_DESC_RTS_ENABLE(txdesc, ((tcb_desc.rts_enable && 538 SET_TX_DESC_RTS_ENABLE(txdesc, ((tcb_desc->rts_enable &&
539 !tcb_desc.cts_enable) ? 1 : 0)); 539 !tcb_desc->cts_enable) ? 1 : 0));
540 SET_TX_DESC_HW_RTS_ENABLE(txdesc, ((tcb_desc.rts_enable || 540 SET_TX_DESC_HW_RTS_ENABLE(txdesc, ((tcb_desc->rts_enable ||
541 tcb_desc.cts_enable) ? 1 : 0)); 541 tcb_desc->cts_enable) ? 1 : 0));
542 SET_TX_DESC_CTS2SELF(txdesc, ((tcb_desc.cts_enable) ? 1 : 0)); 542 SET_TX_DESC_CTS2SELF(txdesc, ((tcb_desc->cts_enable) ? 1 : 0));
543 SET_TX_DESC_RTS_STBC(txdesc, ((tcb_desc.rts_stbc) ? 1 : 0)); 543 SET_TX_DESC_RTS_STBC(txdesc, ((tcb_desc->rts_stbc) ? 1 : 0));
544 SET_TX_DESC_RTS_RATE(txdesc, tcb_desc.rts_rate); 544 SET_TX_DESC_RTS_RATE(txdesc, tcb_desc->rts_rate);
545 SET_TX_DESC_RTS_BW(txdesc, 0); 545 SET_TX_DESC_RTS_BW(txdesc, 0);
546 SET_TX_DESC_RTS_SC(txdesc, tcb_desc.rts_sc); 546 SET_TX_DESC_RTS_SC(txdesc, tcb_desc->rts_sc);
547 SET_TX_DESC_RTS_SHORT(txdesc, 547 SET_TX_DESC_RTS_SHORT(txdesc,
548 ((tcb_desc.rts_rate <= DESC92C_RATE54M) ? 548 ((tcb_desc->rts_rate <= DESC92C_RATE54M) ?
549 (tcb_desc.rts_use_shortpreamble ? 1 : 0) 549 (tcb_desc->rts_use_shortpreamble ? 1 : 0)
550 : (tcb_desc.rts_use_shortgi ? 1 : 0))); 550 : (tcb_desc->rts_use_shortgi ? 1 : 0)));
551 if (mac->bw_40) { 551 if (mac->bw_40) {
552 if (tcb_desc.packet_bw) { 552 if (tcb_desc->packet_bw) {
553 SET_TX_DESC_DATA_BW(txdesc, 1); 553 SET_TX_DESC_DATA_BW(txdesc, 1);
554 SET_TX_DESC_DATA_SC(txdesc, 3); 554 SET_TX_DESC_DATA_SC(txdesc, 3);
555 } else { 555 } else {
@@ -590,7 +590,7 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
590 SET_TX_DESC_DATA_RATE_FB_LIMIT(txdesc, 0x1F); 590 SET_TX_DESC_DATA_RATE_FB_LIMIT(txdesc, 0x1F);
591 SET_TX_DESC_RTS_RATE_FB_LIMIT(txdesc, 0xF); 591 SET_TX_DESC_RTS_RATE_FB_LIMIT(txdesc, 0xF);
592 SET_TX_DESC_DISABLE_FB(txdesc, 0); 592 SET_TX_DESC_DISABLE_FB(txdesc, 0);
593 SET_TX_DESC_USE_RATE(txdesc, tcb_desc.use_driver_rate ? 1 : 0); 593 SET_TX_DESC_USE_RATE(txdesc, tcb_desc->use_driver_rate ? 1 : 0);
594 if (ieee80211_is_data_qos(fc)) { 594 if (ieee80211_is_data_qos(fc)) {
595 if (mac->rdg_en) { 595 if (mac->rdg_en) {
596 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, 596 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
@@ -600,11 +600,11 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
600 } 600 }
601 } 601 }
602 if (rtlpriv->dm.useramask) { 602 if (rtlpriv->dm.useramask) {
603 SET_TX_DESC_RATE_ID(txdesc, tcb_desc.ratr_index); 603 SET_TX_DESC_RATE_ID(txdesc, tcb_desc->ratr_index);
604 SET_TX_DESC_MACID(txdesc, tcb_desc.mac_id); 604 SET_TX_DESC_MACID(txdesc, tcb_desc->mac_id);
605 } else { 605 } else {
606 SET_TX_DESC_RATE_ID(txdesc, 0xC + tcb_desc.ratr_index); 606 SET_TX_DESC_RATE_ID(txdesc, 0xC + tcb_desc->ratr_index);
607 SET_TX_DESC_MACID(txdesc, tcb_desc.ratr_index); 607 SET_TX_DESC_MACID(txdesc, tcb_desc->ratr_index);
608 } 608 }
609 if ((!ieee80211_is_data_qos(fc)) && ppsc->leisure_ps && 609 if ((!ieee80211_is_data_qos(fc)) && ppsc->leisure_ps &&
610 ppsc->fwctrl_lps) { 610 ppsc->fwctrl_lps) {
@@ -656,7 +656,7 @@ void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw,
656 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); 656 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data);
657 __le16 fc = hdr->frame_control; 657 __le16 fc = hdr->frame_control;
658 658
659 memset(pdesc, 0, RTL_TX_HEADER_SIZE); 659 memset((void *)pdesc, 0, RTL_TX_HEADER_SIZE);
660 if (firstseg) 660 if (firstseg)
661 SET_TX_DESC_OFFSET(pdesc, RTL_TX_HEADER_SIZE); 661 SET_TX_DESC_OFFSET(pdesc, RTL_TX_HEADER_SIZE);
662 SET_TX_DESC_TX_RATE(pdesc, DESC92C_RATE1M); 662 SET_TX_DESC_TX_RATE(pdesc, DESC92C_RATE1M);