hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c
....@@ -645,7 +645,7 @@
645645 u16 mimo_ctlchbw = PHY_TXC1_BW_20MHZ;
646646 u32 rspec = 0, rspec_fallback = 0;
647647 u32 rts_rspec = 0, rts_rspec_fallback = 0;
648
- u8 plcp0, plcp3, is40, sgi, mcs;
648
+ u8 plcp0, is40, mcs;
649649 u16 mch;
650650 u8 preamble_type = BRCMS_GF_PREAMBLE;
651651 u8 fbr_preamble_type = BRCMS_GF_PREAMBLE;
....@@ -704,15 +704,12 @@
704704 txh->MacTxControlLow = cpu_to_le16(mcl);
705705
706706 fbr = txrate[1].count > 0;
707
- if (!fbr) {
707
+ if (!fbr)
708708 plcp0 = plcp[0];
709
- plcp3 = plcp[3];
710
- } else {
709
+ else
711710 plcp0 = txh->FragPLCPFallback[0];
712
- plcp3 = txh->FragPLCPFallback[3];
713
- }
711
+
714712 is40 = (plcp0 & MIMO_PLCP_40MHZ) ? 1 : 0;
715
- sgi = plcp3_issgi(plcp3) ? 1 : 0;
716713 mcs = plcp0 & ~MIMO_PLCP_40MHZ;
717714
718715 if (is40) {
....@@ -850,10 +847,9 @@
850847 bool ba_recd = false, ack_recd = false;
851848 u8 suc_mpdu = 0, tot_mpdu = 0;
852849 uint supr_status;
853
- bool update_rate = true, retry = true, tx_error = false;
850
+ bool retry = true;
854851 u16 mimoantsel = 0;
855
- u8 antselid = 0;
856
- u8 retry_limit, rr_retry_limit;
852
+ u8 retry_limit;
857853 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p);
858854
859855 #ifdef DEBUG
....@@ -866,15 +862,11 @@
866862
867863 ini = &scb_ampdu->ini[tid];
868864 retry_limit = ampdu->retry_limit_tid[tid];
869
- rr_retry_limit = ampdu->rr_retry_limit_tid[tid];
870865 memset(bitmap, 0, sizeof(bitmap));
871866 queue = txs->frameid & TXFID_QUEUE_MASK;
872867 supr_status = txs->status & TX_STATUS_SUPR_MASK;
873868
874869 if (txs->status & TX_STATUS_ACK_RCV) {
875
- if (TX_STATUS_SUPR_UF == supr_status)
876
- update_rate = false;
877
-
878870 WARN_ON(!(txs->status & TX_STATUS_INTERMEDIATE));
879871 start_seq = txs->sequence >> SEQNUM_SHIFT;
880872 bitmap[0] = (txs->status & TX_STATUS_BA_BMAP03_MASK) >>
....@@ -898,7 +890,6 @@
898890 ba_recd = true;
899891 } else {
900892 if (supr_status) {
901
- update_rate = false;
902893 if (supr_status == TX_STATUS_SUPR_BADCH) {
903894 brcms_dbg_ht(wlc->hw->d11core,
904895 "%s: Pkt tx suppressed, illegal channel possibly %d\n",
....@@ -923,11 +914,9 @@
923914 * if there were underflows, but pre-loading
924915 * is not active, notify rate adaptation.
925916 */
926
- if (brcms_c_ffpld_check_txfunfl(wlc, queue) > 0)
927
- tx_error = true;
917
+ brcms_c_ffpld_check_txfunfl(wlc, queue);
928918 }
929919 } else if (txs->phyerr) {
930
- update_rate = false;
931920 brcms_dbg_ht(wlc->hw->d11core,
932921 "%s: ampdu tx phy error (0x%x)\n",
933922 __func__, txs->phyerr);
....@@ -1023,20 +1012,15 @@
10231012 }
10241013
10251014 /* update rate state */
1026
- antselid = brcms_c_antsel_antsel2id(wlc->asi, mimoantsel);
1015
+ brcms_c_antsel_antsel2id(wlc->asi, mimoantsel);
10271016 }
10281017
10291018 void
10301019 brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
10311020 struct sk_buff *p, struct tx_status *txs)
10321021 {
1033
- struct scb_ampdu *scb_ampdu;
10341022 struct brcms_c_info *wlc = ampdu->wlc;
1035
- struct scb_ampdu_tid_ini *ini;
10361023 u32 s1 = 0, s2 = 0;
1037
- struct ieee80211_tx_info *tx_info;
1038
-
1039
- tx_info = IEEE80211_SKB_CB(p);
10401024
10411025 /* BMAC_NOTE: For the split driver, second level txstatus comes later
10421026 * So if the ACK was received then wait for the second level else just
....@@ -1060,8 +1044,6 @@
10601044 }
10611045
10621046 if (scb) {
1063
- scb_ampdu = &scb->scb_ampdu;
1064
- ini = &scb_ampdu->ini[p->priority];
10651047 brcms_c_ampdu_dotxstatus_complete(ampdu, scb, p, txs, s1, s2);
10661048 } else {
10671049 /* loop through all pkts and free */
....@@ -1069,7 +1051,6 @@
10691051 struct d11txh *txh;
10701052 u16 mcl;
10711053 while (p) {
1072
- tx_info = IEEE80211_SKB_CB(p);
10731054 txh = (struct d11txh *) p->data;
10741055 trace_brcms_txdesc(&wlc->hw->d11core->dev, txh,
10751056 sizeof(*txh));