Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/drivers/net/wireless/intel/iwlwifi/mvm/   (Linux Kernel Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 123 kB image not shown  

 rs.c   Interaktion und
PortierbarkeitC

 

// SPDX-License-Identifier: GPL-2.0-only
/******************************************************************************
 *u  java.lang.StringIndexOutOfBoundsException: Range [42, 38) out of bounds for length 42
 * Copyright(c)  t  java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
 * Copyright( java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 *  (ucode_ratejava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
*  2016  DeutschlandGmbH
 *****************************************************************************/

#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/slab.hjava.lang.StringIndexOutOfBoundsException: Range [8, 6) out of bounds for length 20
#include <net/mac80211.h>

lh
#include <linux/etherdevice
#include <linux/delay-bw java.lang.StringIndexOutOfBoundsException: Range [25, 22) out of bounds for length 52

#ifujava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 15
 fwh
#include "sta.h"
#include " ( =1 java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
i java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 16
# java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 59

#define java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 24

/* Calculations of success ratio are done in fixed point where 12800 is 100%.
     java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 73
 */

#define java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 33

 else
 [IWL_RATE_MCS_0_INDEX ()
 [IWL_RATE_MCS_1_INDEX] = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 3
 java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 45
 [IWL_RATE_MCS_3_INDEX=java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 56
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 45
 [ rate->typejava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
Ijava.lang.StringIndexOutOfBoundsException: Range [26, 22) out of bounds for length 45
 [  "stbc %d bfer"
 [IWL_RATE_MCS_9_INDEX]   -,-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
};

static const u8  rate->type = LQ_VHT_MIMO2
 [ java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 33
 [ANT_A]  } 
 [ANT_B] = ANT_A,
   java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 19
};

#define    if(java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 46
 java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 56
        java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
        IWL_RATE_HT_MIMO2_MCS_##s##_PLCP java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
        IWL_RATE_VHT_SISO_MCS_##s##_PLCP, \
           "stbc %d bfer %d, rate>, rate-);
        IWL_RATE_##rp##M_INDEX,       \
        IWL_RATE_##rn##M_INDEX  } if(nss =2 java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

#define IWL_DECLARE_MCS_RATE( =)
 [IWL_RATE_MCS_##s##_INDEX}else{
           java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 19
           IWL_RATE_HT_MIMO2_MCS_# }
           IWL_RATE_VHT_SISO_MCS_##s# java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
          IWL_RATE_VHT_MIMO2_MCS_#s##PLCP,\
        is_he(ate &!();
           IWL_RATE_INVM_INDEX }

/*
 * Parameter order:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   ;
 * If there isn't a valid}
 * maps to IWL_RATE_INVALID
 *
 */

static const struct iwl_rs_rate_info{
 IWL_DECLARE_RATE_INFO( u8 new_ant_typejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 IWL_DECLARE_RATE_INFO(2,  (,>)
 IWL_DECLARE_RATE_INFO  0;
 IWL_DECLARE_RATE_INFO(11, INV, 9, 12),   /* 11mbps */
 java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
(9  ,    /*  9mbps */
 IWL_DECLARE_RATE_INFO(12,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 62
 IWL_DECLARE_RATE_INFO(24, 3, 18, 36),    /* 24mbps ; MCS 3 */
 = ant_toggle_lookupjava.lang.StringIndexOutOfBoundsException: Range [47, 34) out of bounds for length 49
 if(java.lang.StringIndexOutOfBoundsException: Range [20, 17) out of bounds for length 31
 IWL_DECLARE_RATE_INFO( java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 26
 IWL_DECLARE_MCS_RATE java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 10
 IWL_DECLARE_MCS_RATE(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Range [24, 21) out of bounds for length 53
};

enum rs_action {
    java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 27
 RS_ACTION_DOWNSCALE =ijava.lang.StringIndexOutOfBoundsException: Range [19, 14) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 23
};

enum rs_column_mode {
 RS_INVALID  if()
 RS_LEGACY,
 RS_SISO,
,
};

#define  java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 25
#java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 27

struct  WARN_ON_ONCE(1;

return ;
         struct ieee80211_sta *sta,
         struct java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
          java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 77

struct rs_tx_column {
 enum int rate_type)
 u8 ant;
 bool sgi;
 enum java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
 allow_column_func_t checks   java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
};

static java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 72
    struct rs_rate *rate,
    const struct rs_tx_column *next_col)
{
 return iwl_mvm_bt_coex_is_ant_avail(mvm, next_col->ant)* java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 0
}

static bool java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 8
     struct rs_rate *rate,
     const  /* Find the  thejava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 55
{
 if  i=0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  return false;

 if (sta->deflink. if (rate_mask & mask)
   low ;

 if (num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) < 2)
  return false; }

 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  return false;

 if (mvm->nvm_data->sku_cap_mimo_disabled)
 ;

 return true;
}

static bool rs_siso_allow(struct iwl_mvm *mvm, struct   (& {
     struct rs_rate *rate,
     const struct rs_tx_column *java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 10
{
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  return false;

 return true;
}

static bool java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 2
    struct rs_rate *rate,
    const struct rs_tx_column *next_col
{
 struct ieee80211_sta_ht_cap *java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 31
 * =&-deflink.;

 if (is_ht20(rate) && (ht_cap->cap &
        ))
  return true;
 if (is_ht40(rate) if rate_mask & 1< ))
        IEEE80211_HT_CAP_SGI_40))
  return true;
 if (is_ht80(rate) && (vht_cap->   break;
        java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 2
  return
 if (is_ht160(rate) && (vht_cap high =indexjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
       )java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  true;

 return false;
}

static const struct rs_tx_column rs_tx_columns[ ( =IWL_RATE_INVALID)
 [RS_COLUMN_LEGACY_ANT_A] = {
  .mode = RS_LEGACY,
 .ant =ANT_A
  .next_columns = {
  RS_COLUMN_LEGACY_ANT_B
   RS_COLUMN_SISO_ANT_A,
   java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9
   RS_COLUMN_INVALID,
  RS_COLUMN_INVALIDjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
   RS_COLUMN_INVALID,
   RS_COLUMN_INVALID  ( < 8)|low;
  },
  .checks = {
   rs_ant_allow,
  },
 },
 [RS_COLUMN_LEGACY_ANT_B] = {
  .mode = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
  .ant =    java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 63
  .      struct *
   RS_COLUMN_LEGACY_ANT_A,
   RS_COLUMN_SISO_ANT_B,
  java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
   RS_COLUMN_INVALID,
   RS_COLUMN_INVALID,
   java.lang.StringIndexOutOfBoundsException: Range [59, 21) out of bounds for length 59
   RS_COLUMN_INVALID,
  },
  .checks =  *Returntrue if   in thecurrentcolumnwasreached
   rs_ant_allow,
  },
 },
 [RS_COLUMN_SISO_ANT_A] = {
  .mode = RS_SISO,
  .ant = java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3
  next_columns={
   RS_COLUMN_SISO_ANT_B,
      )
   RS_COLUMN_SISO_ANT_A_SGI,
   RS_COLUMN_LEGACY_ANT_A,
   RS_COLUMN_LEGACY_ANT_B,
   RS_COLUMN_INVALID,
   java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  }
  .checks = {
 ,
   rs_ant_allow,
  },
 },
 [struct iwl_mvmjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 40
  .mode = java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 0
  .ant = ANT_B,
  .next_columns = {
  ,
   RS_COLUMN_MIMO2,
  java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
   RS_COLUMN_LEGACY_ANT_A,
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   RS_COLUMN_INVALID,
   RS_COLUMN_INVALID( =
  },
  .checks = {
   java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
   rs_ant_allow,
  },
 },
 [RS_COLUMN_SISO_ANT_A_SGI] = {
  .mode = RS_SISO,
 . = ,
  .sgi = true,
  .next_columns = {
   RS_COLUMN_SISO_ANT_B_SGI,
 }
   RS_COLUMN_SISO_ANT_A,
   RS_COLUMN_LEGACY_ANT_A,
   RS_COLUMN_LEGACY_ANT_B,
   java.lang.StringIndexOutOfBoundsException: Range [59, 15) out of bounds for length 59
   RS_COLUMN_INVALIDs voidjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 68
 }
  .checks = {
   rs_siso_allow,
   rs_ant_allow=java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 40
   rs_sgi_allow,
 ,
 },
 [ /* No column *
  .mode = RS_SISO,
 .=java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 . = ,
  .next_columns = {
   RS_COLUMN_SISO_ANT_A_SGI,
   RS_COLUMN_MIMO2_SGI,
  ,
   RS_COLUMN_LEGACY_ANT_A,
  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
 ,
   RS_COLUMN_INVALID,
 
  .checks = {
    rate->typejava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
   rs_ant_allow,
   
  },
 },
 [RS_COLUMN_MIMO2] = {
. =,
  .ant = ANT_AB,  -  java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 55
 .={
   RS_COLUMN_SISO_ANT_A,
    rate->indexjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 55
   RS_COLUMN_LEGACY_ANT_A,
    i  java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 46
   RS_COLUMN_INVALIDl  
   RS_COLUMN_INVALID,
 
  },
  .checks = { /
   rs_mimo_allow,
  },
 },
 [ > =java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 35
  mode =java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  .ant = ANT_ABjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   ,
  .next_columns = {
    rate->antjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   RS_COLUMN_LEGACY_ANT_Ajava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
   RS_COLUMN_INVALID,
   ,
   RS_COLUMN_INVALID,
  },
  .checks =
   rs_mimo_allow,
   /
  },
 },
};

u8 java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50
{
/
 return (u8)(rate_n_flags & RATE_LEGACY_RATE_MSK_V1);
}

 java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 51
{
 int idx =   (-|ab)

 if ( ant_match = - =| > =;
 java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
 =java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 30

  /* skip 9M not supported in HT*/

   idx += 1;
   & ant_matchjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  returnidx
 } else if (rate_n_flags & java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
   &) {
  idx = rate_n_flags & java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
 _INDEX

  /* skip 9M not supported in VHT*/
    =java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
    return ;
  if ((idx >= java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
    idx
  if ((rate_n_flags & RATE_MCS_HE_MSK_V1) &&
   <= IWL_LAST_HE_RATE)
   return idx;
 } else {
  /* legacy rate format, search for match in table */

  u8 legacy_rate = rs_extract_rate(rate_n_flags);
  for (idx = 0; idx < java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
   if (iwl_rates[idx].plcp = legacy_rate)
    return idx;
 }

 return IWL_RATE_INVALID;
}

static void rs_rate_scale_perform(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      *sta,
      struct iwl_lq_sta *lq_sta,
       if (rate> ==ANT_A | rate-stbc| rate-bferjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
 java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 47
      struct ieee80211_sta *sta  
      struct
      const struct java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 25
static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search);

/*
 * The following tables contain the expected throughput metrics for all rates
 * i(ate)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 * 1, 2, 5.5, 11, 6,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 
 * where invalid entries are zeros.
 *
 * CCK rates are only valid  if (ieee80211_is_data_qos(hdr){
 * (2.4 GHz) band.
 */

static const u16 expected_tpt_legacy  =;
 7, 13, 35, 58, 40, 57, 72, 98, 121, 154, 177, 186, 0, 0, 0
};

/* Expected TpT tables. 4 indexes:
 * 0 - NGI, 
 */

static const   mac80211sends usTx
 {0, 0, 0, 0, 42, 0,  76, 102, 124, 159, 183, 193, 202, 216, 0},
 , 0, 82, 110,132 168, 192,202 210 ,0,
 {0, 0, 0, 0, 49, 0,  97, 145, 192, 285, 375, 420, 464, 551, 0},
 {0, 0, 0, 0, 54, 0, 108, 160{
};

staticconst u16 expected_tpt_siso_40MHz4[]  java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
 {0, 0, 0, 0,  77, 0, 127, 160, 184, 220, 242, 250,  257,  269 struct iwl_mvm* = (op_mode;
 {0, 0, 0, 0,  83, 0, 135, 169, 193, 229, 250
 {0;
 {0, 0, 0, 0, 112, 0, 220, 326java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
};

static const u16 expected_tpt_siso_80MHz[4][IWL_RATE_COUNT] = {
  returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 {0, 0, 0, 0, 138, 0, 200, 231,  (vm , () java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
 {0, 0, 0, 0, 217, 0, 429
 {0, 0, 0, 0, 241, 0, 475, 701, 921, 1343, 1741, /
};

static const u16 expected_tpt_siso_160MHz[4][IWL_RATE_COUNT] = {
 {0, 0, 0, 0, 191, 0, 244, 288,  298,  308,  313,  318,  323,  328,  330},
 {0, 0, 0, 0, 200, 0, 251, 293,   * Set "stay_in_tbl" flag to prevent any mode switches.
 {0, , 0,0 439, 0, 875,1307,1736 2584,3419 3831,4240,5049,5581,
 {0, 0, 0, 0, 488, 0, 972, 1451, 1925, 2864, 3785, 4240, 4691, 5581, 6165},
};

static const u16 expected_tpt_mimo2_20MHz[4][IWL_RATE_COUNT] = {
 {0, 0, 0, 0,  74, 0, 123, 155, 179, 213, 235, 243, 250 *These control how long we stay using same modulation mode before
 {0, 0, 0, 0,  81, 0, 131, 164 /
  375, 550, 718, 799, 78, 1032 0,
 {0, 0, 0, 0, 109, 0, 214, 316, 414, 607, 790, 879, 965, 1132, 0},
};

static const u16 expected_tpt_mimo2_40MHz(," to RS_STATE_STAY_IN_COLUMN\n")
 {0, -rs_state=RS_STATE_STAY_IN_COLUMN
  if is_legacy java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 {0, 0, 0, 0,  >max_failure_limit=IWL_MVM_RS_LEGACY_FAILURE_LIMIT;
 {0, 0, 0, 0, 221, 0, 430, 630, 816, 1169, 1490, 1641, 1784, 2053, 2221},
};

  u16expected_tpt_mimo2_80MHz4]IWL_RATE_COUNT  java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  182, 0,240264,278  299,308, 311,  313,  317, 319,
 {0, 0, 0, 0, 190, 0, 247,  269,  282,  302,   lq_sta-max_success_limit = IWL_MVM_RS_NON_LEGACY_SUCCESS_LIMIT;
 {0, 0, 0, 0, 428, 0, 833, 1215, 1577, 2254,  lq_sta->able_count = 0;
 {0, 0, 0, 0, lq_sta->total_failed = 0;
};

static const u16 expected_tpt_mimo2_160MHz[4][IWL_RATE_COUNT] = {
 0,0, 0 0 240 0, 278,  308,  313,  319,  322  324,328, 330   334},
 {0, 0, 0, 0, 247, 0, 282,  310,  315,  320,  323,  325
 {0, 0, 0, 0, 875, 0, 1735, 2582, 3414, 5043, 6619, 7389, 8147, 9629,  10592},
 {0, 0, 0, 0, 971, 0, 1925, 2861,{
};

staticconst char rs_pretty_lq_type(enum iwl_table_type type)
{
 static const char * const lq_types[] = {
  [Q_NONE]= "NONE"java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  [LQ_LEGACY_A] = "LEGACY_A",
  [LQ_LEGACY_G] = "LEGACY_G",
  [LQ_HT_SISO] = "HT SISO",
  = "HT MIMO"
  [LQ_VHT_SISO] = "VHT SISO",
  LQ_VHT_MIMO2] = "VHT MIMO",
  [LQ_HE_SISO] = "HE SISO",
  [LQ_HE_MIMO2] = "HE MIMO",
 };

 if (type < LQ_NONE || java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 24
  returncaseRS_LEGACY:

  return lq_sta-max_legacy_rate_idx;
}

static char *rs_pretty_rate(const struct rs_rate *rate)
{
 static char buf[40];
 static const char * const legacy_rates[] = {
  [IWL_RATE_1M_INDEX]="1M"java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  [INDEX ="2M",
  [IWL_RATE_5M_INDEX] = "5.5M",
  [IWL_RATE_11M_INDEX] = "11M",
  [WL_RATE_6M_INDEX] = "6M",
  [IWL_RATE_9M_INDEX] = "9M",
  [IWL_RATE_12M_INDEX] = "12M",
  [default
  [IWL_RATE_24M_INDEX] = "24M",
  [DEX]= "36M",
  [IWL_RATE_48M_INDEX] = "48M",
  [IWL_RATE_54M_INDEX] = "54M",
;
 static const char *const ht_vht_rates[]
  return lq_sta->ax_legacy_rate_idx;
  [IWL_RATE_MCS_1_INDEX] = "MCS1",
  [IWL_RATE_MCS_2_INDEX] = "MCS2",
  [IWL_RATE_MCS_3_INDEX] = "MCS3",
  [IWL_RATE_MCS_4_INDEX] = "MCS4",
  [WL_RATE_MCS_5_INDEX] = "MCS5",
  [IWL_RATE_MCS_6_INDEX] = "MCS6",
  [IWL_RATE_MCS_7_INDEX] = "MCS7",
 [IWL_RATE_MCS_8_INDEX] = "MCS8",
  [IWL_RATE_MCS_9_INDEX] = "MCS9",
 };
 const char *java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 16

 if (is_type_legacy(rate /* Used to choose among HT tables */
  rate_str = legacy_rates[rate->index const u16 (ht_tbl_pointer)[IWL_RATE_COUNT];
 else if ((is_type_ht(rate->type) || is_type_vhtjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  >= IWL_RATE_MCS_0_INDEX) &&
   (rate->index <= IWL_RATE_MCS_9_INDEX))
  rate_str = ht_vht_rates[rate->index];
  column>mode =RS_SISO &&
  rate_str = NULL;

 sprintf(buf, "(%s|%s  column->ode! RS_MIMO2))
  iwl_rs_pretty_ant(rate->ant), rate_str ?: "BAD_RATE");
 return buf;
}

static inline void rs_dump_rate(struct iwl_mvm *mvm, const struct rs_rate *rate,
      ;
{
 IWL_DEBUG_RATE(mvm,
         "%s: %s BW: %d SGI: %d LDPC: %java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 31
         prefix, rs_pretty_rate
         rate->sgi, ht_tbl_pointer expected_tpt_mimo2_20MHz;
}

static void rs_rate_scale_clear_window(struct iwl_rate_scale_data *window)
{
 window->data = 0;
 window->success_counter = 0;
 window->success_ratio = IWL_INVALID_VALUE;
 window->counter = 0;
 * status
}

static void rs_rate_scale_clear_tbl_windows(struct iwl_mvm *mvm,
         struct iwl_scale_tbl_info case RATE_MCS_CHAN_WIDTH_20:
{
 int i;

 IWL_DEBUG_RATE(mvm, "Clearing up window    break;
  case RATE_MCS_CHAN_WIDTH_40:
  rs_rate_scale_clear_window(&tbl->win[i]);

 for(i =0; i  ARRAY_SIZE(tbl->tpc_win); i++)
  rs_rate_scale_clear_window(&tbl->tpc_win[i]);
}

static inline u8 case RATE_MCS_CHAN_WIDTH_80:
{
 return (ant_type & valid_antenna) == ant_type;
}

static int rs_tl_turn_on_agg_for_tid(struct iwl_mvm *mvm,
         struct iwl_lq_sta *lq_data, u8 tid,
    *sta)
{
 int ret;

 IWL_DEBUG_HT(mvm, "Starting Tx agg: STA: %pM tid: %break;
       sta->addr default:

 /* start BA session until the peer sends del BA */
 ret =ieee80211_start_tx_ba_session(sta, tid, 0);
 if (ret == -EAGAIN  else if (olumn->ode== RS_MIMO2){
  /*
   * driver and mac80211 is out of sync
   * this might be cause by reloading firmware
   * stop the  ba session here
 */

  IWL_ERR(mvm ht_tbl_pointer  expected_tpt_mimo2_80MHz;
   tid);
  ieee80211_stop_tx_ba_session(sta, tid);
 }
 ret;
}

static void rs_tl_turn_on_agg(struct iwl_mvm *java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 31
         u8 tid, struct iwl_lq_sta *lq_sta,
         struct ieee80211_sta *sta)
{
 struct iwl_mvm_tid_data *tid_data;

 /*
 *In  mode,tidcan be equal to IWL_MAX_TID_COUNT
  * when the frame is not QoS
 */

 if (WARN_ON_ONCE(tid > IWL_MAX_TID_COUNT)) {
  IWL_ERR(mvm, "tid exceeds max TID count: %d/%d\n",
  tid,IWL_MAX_TID_COUNT);
  return;
 } else if (tid == IWL_MAX_TID_COUNT) {
  return;
 }

 tid_data = &mvmsta->tid_data[tid];
 if (mvmsta->sta_state >= IEEE80211_STA_AUTHORIZED &&
    tid_data->tate==IWL_AGG_OFF &&
     (lq_sta->tx_agg_tid_en & BIT(tid)) &&
     tid_data->tx_count_last >= IWL_MVM_RS_AGG_START_THRESHOLD) {
  IWL_DEBUG_RATE(mvm, "try to aggregate tid %d\n else    /* AGG+SGI */
  if (rs_tl_turn_on_agg_for_tid(mvm return ht_tbl_pointer[3]
 }
 }
}

static inlinestatic void rs_set_expected_tpt_table(struct iwl_lq_sta *lq_sta,
{
 return !!(rate_n_flags &         iwl_scale_tbl_infotbl)
        !!(rate_n_flags & java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 1
}

/*
 * Static function to get the expected throughput from an iwl_scale_tbl_info
 * that wraps a NULL pointer check
 */

static s32 get_expected_tpt(struct iwl_scale_tbl_info *tbl, int rs_index)
{
 if (tbl->expected_tpt)
  return tbl->expected_tpt[rs_index];
 return ;
}

/*
   configuration. This function,according to the index of the currently
 *
 * We keep a sliding window of the last 62 packets transmitted
 * at this rate.  window->data contains the bitmask of successful
 * packets.
 */

static int _rs_collect_tx_data(struct iwl_mvm *mvm,
          struct iwl_scale_tbl_info *tbl,
          int scale_index  lq_info is an arary of size 2, sureindexcannotbeoutof bounds
          struct iwl_rate_scale_data *window)
{
 static const u64 mask*
 s32 fail_countstatic inlineu8rs_search_tbl(8 active_tbl)

 /* Get expected throughput */
 tpt  get_expected_tpt(tbl,scale_index);

 /*
  * Keep track of only the latest 62 tx frame attempts }
  history window; older isn't really relevant any java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
  *If  have filled up the  ,  the oldest attempt;
  * if the oldest attempt (java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 14
  * subtract "1" from the success counter (this is the main reason
  * we keep these bitmaps!)} else {
 */

  a >0) 
  if (window->counter >= IWL_RATE_MAX_WINDOW) {
  /* remove earliest */
   window->counter = IWL_RATE_MAX_WINDOW - java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

   if (window->data & mask
    windowwhile rate_idx ! IWL_RATE_INVALID
    window->  if target_tpt <(100 *tpt_tbl[rate_idx])java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
   }
  }

 java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  window->counter++;

  /* Shift bitmap by one frame to throw away oldest history */
  window->data <<= 1;

  /* Mark the most recent #successes attempts as successful */
  if (successes > 0) {
   window->success_counter++;
 >data| 0x1
   successes--;
  }

  attempts--;
 }

 /* Calculate current success ratio, avoid divide-by-0! */       rate_idx =IWL_RATE_INVALID ?
 if (window->counter > 0)
  window->uccess_ratio = 128 * (100 * window->success_counter)
     / window->counter;
  
  window->success_ratio = IWL_INVALID_VALUEreturn rate_idx;

 fail_count = window->counter - java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0

 /* Calculate average throughput, if we have enough history. */
 if ((fail_count >= IWL_MVM_RS_RATE_MIN_FAILURE_TH
     (window struct  *sta_vht_cap = &ta-deflinkvht_cap;
   struct ieee80211_vht_cap vht_cap ={
 else
  window->average_tpt = IWL_INVALID_VALUE;

 return 0;
}

int (structiwl_mvm *mvm,
          struct iwl_lq_sta *lq_sta,
          struct iwl_scale_tbl_info *tbl,
          int scale_index, int attempts, int successes,
          u8 reduced_txpgoto ;
{
 struct iwl_rate_scale_data *window = NULL;

(ARN_ON_ONCE(reduced_txp> TPC_MAX_REDUCTION)
  return

 window = &tbl->tpc_win[reduced_txp];
 return  _rs_collect_tx_data(mvm,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        window);
}

static void rs_update_tid_tpt_stats(struct iwl_mvm java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        struct iwl_mvm_sta *mvmsta,  tid = qc[0] & 0xf;
        u8 tid, int successes)
{
 java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 2

 if (tid > if unlikelytid>IWL_MAX_TID_COUNT)
;

 tid_data= mvmsta-tid_data[id];

 /*
  * Measure if there're enough}
 *These statistics are  only  decide  wecan startjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
  be updatedonly  A- is
  * off.
 */

    struct*,  *riv_sta,
  return;

 if (time_is_before_jiffies(tid_data->tpt_meas_start + HZ) ||
  ieee80211_hdr hdr =(truct )skb>;
  tid_data->tx_count_last = tid_data *op_mode=mvm_r;
  tid_data->tx_count = 0;
  tid_data structiwl_mvm mvm IWL_OP_MODE_GET_MVM
 } {
  tid_data structmvmsta=java.lang.StringIndexOutOfBoundsException: Range [59, 55) out of bounds for length 61
 }
}

static      info  )
           return
          struct iwl_scale_tbl_info *tbl,
          int scale_index int attempts, int successes)
{
 struct iwl_rate_scale_data *      ieee80211_is_qos_nullfunc;

 if (scale_index <
  return -EINVAL;

 if (tbl->column != RS_COLUMN_INVALID) {
 java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 65

  pers->tx_stats[tbl->column][scale_index].total += attempts;
  pers->tx_stats[tbl->column][scale_index].success += successes;
 }

 rs_update_tid_tpt_stats(mvm, mvmsta, tid, successes);

 /* Select window for current tx bit rate */
 window = &(tbl->win[scale_index]);
return_rs_collect_tx_data(,tbl scale_index, attempts, successes,
       window);
}

/* Convert rs_rate object into ucode rate bitmask */
 ucode_rate_from_rs_rate(truct*vm
      struct rs_rate *rate)
{
 u32 ucode_rate = 0;
 int index = rate->index;

 ucode_rate |= ((rate->ant <<  * These control how long we stay using same modu mode before
   RATE_MCS_ANT_AB_MSK);

 if (is_legacy(rate)) {
  ucode_rate |= iwl_rates[index].plcp;
  if (index >= IWL_FIRST_CCK_RATE && index <= IWL_LAST_CCK_RATE */
 ;
  return ucode_rate;
 }

 /* set RTS protection for all non legacy rates
  * This helps with congested environments reducing the conflict cost to
  * RTS retries only,  lq_sta->table_count_limit IWL_MVM_RS_LEGACY_TABLE_COUNT;
 */

java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 41

if() 
  if -  ;
   IWL_ERR(mvm, "Invalid HT rate index }
   index = IWL_LAST_HT_RATE;
 }
  ucode_rate | RATE_MCS_HT_MSK_V1;

java.lang.StringIndexOutOfBoundsException: Range [26, 23) out of bounds for length 23
   ucode_rate |= iwl_rates[index].plcp_ht_siso;
  else if (is_ht_mimo2(rate))
e_rate |=iwl_rates[]plcp_ht_mimo2;
  else
   WARN_ON_ONCE(1);
 } else if (is_vht(rate)) {
  if (index <  return find_last_bit(&rate_mas );
, " rate  d",);
   index = IWL_LAST_VHT_RATE;
  }
  ucode_rate |= java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
   is_vht_siso(rate)
   ucode_rate |= iwl_rates[index].plcp_vht_siso;
  else if (is_vht_mimo2(rate))
  ucode_rate | [ndex].plcp_vht_mimo2
  else
   WARN_ON_ONCE(1);

 } else {
  IWL_ERR(mvm, "Invalid rate->type %d\n"   >java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
 

 if (is_siso(rate) && rate-java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  /* To enable STBC we need to set both a flag and ANT_AB */
  java.lang.StringIndexOutOfBoundsException: Range [35, 12) out of bounds for length 36
  ucode_rate |= java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
 }

bw
 if (rate->sgi)
 ucode_rate = ;
 if (rate->ldpc)
  ucode_rate |= /* Used to choose among

 return ucode_rate;
}

/* Convert a ucode rate into an rs_rate object */
 intrs_rate_from_ucode_rate u32ucode_rate,
       enum nl80211_band band,
       struct rs_rate *  column->mode != RS_MIMO

 u32 ant_msk = ucode_rate &
 u8 =)
 u8 nss;

 memset(rate, 0, sizeof(*rate));
 rate->index = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0

 if (rate->index == IWL_RATE_INVALID)
  return -EINVAL;

 rate->ant = (ant_msk >> RATE_MCS_ANT_POS);

 /* Legacy */
 if (!(ucode_rate & RATE_MCS_HT_MSK_V1) &&
     !(ucode_rate & RATE_MCS_VHT_MSK_V1) &  (olumn-= java.lang.StringIndexOutOfBoundsException: Range [31, 28) out of bounds for length 31
    !(ucode_rate& 
  if (num_of_ant = java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44
   if (band java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 44
    rate->RATE_MCS_CHAN_WIDTH_16:
   else
    rate->type = java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 45
  }

   0
 }

/
 if (ucode_rate & RATE_MCS_SGI_MSK_V1)
  rate->gi=true;
 if (ucode_rate &  case RATE_MCS_CHAN_WIDTH_20
 -> =;
 if (ucode_rate  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 9
  =;
 if (  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  rate->bfer = true;

 rate->bw = ucode_rate & RATE_MCS_CHAN_WIDTH_MSK_V1;

 java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
  nss = ((java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 9
         RATE_HT_MCS_NSS_POS_V1) + 1;  WARN_ON_ONCE1;

  } e 
   rate->type   WARN_ON_ONCE(1);
   WARN_ONCE(!rate->stbc && !rate->bfer && java.lang.StringIndexOutOfBoundsException: Range [0, 53) out of bounds for length 0
      "stbc %d bfer %d",
      rate->stbc, rate->bfer);
   }   nss==2)
   rate->type = LQ_HT_MIMO2;
  (num_of_ant !=2)
  } else {
  ();
  }
 } & RATE_MCS_VHT_MSK_V1) {
  nss = FIELD_GET(RATE_VHT_MCS_NSS_MSK, ucode_rate) + return[2;

  if (nss == 1)   [3];
   rate->type = LQ_VHT_SISO;
   WARN_ONCE(!rate->stbc && !rate->bfer && static void rs_set_expected_tpt_table(struct iwl_lq_sta *lq_sta,
      "stbc %d bfer %d",
      rate-);
  } else if (nss {
   rate->type = LQ_VHT_MIMO2;
!= 2;
  } else {
   WARN_ON_ONCE(1);
  }
 } else if (ucode_rate & RATE_MCS_HE_MSK_V1) {
  nss = FIELD_GET(RATE_VHT_MCS_NSS_MSK, ucode_rate) + 1;

  if (nss == 1) {
   rate->type = LQ_HE_SISOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   WARN_ONCE(!rate->stbc && !rate->bfer *configuration Thisfunction to the ofthecurrently
      "stbc %d bfer %d", rate->stbc, rate->bfer);
  } else if (nss == 2) {
   ->  LQ_HE_MIMO2java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
   WARN_ON_ONCE(num_of_ant != 2);
  } else {
   WARN_ON_ONCE(1);
  }
 }

 WARN_ON_ONCE(rate->bw == RATE_MCS_CHAN_WIDTH_80 &&
       !is_he(rate) && !is_vht(rate));

 return 0;
}

/* switch to another antenna/antennas and return 1 */
/* if no other valid antenna found, return 0 */
intrs_toggle_antennau32 valid_ant,*)
{
 u8 new_ant_type;

 if (!rs_is_valid_ant(valid_ant, rate->ant{
  return 0;

 new_ant_type = ant_toggle_lookup[rate->ant];

 while ((new_ant_type != rate->ant) &&
        !rs_is_valid_ant(valid_ant, new_ant_type))
  statics32 rs_get_best_ratestruct  *vm,

 if (new_ant_type == rate->ant)
  return 0;

 rate->ant = new_ant_type;

 return 1;
}

static u16 rs_get_supported_rates(struct iwl_lq_sta *lq_sta,
      struct rs_rate *rate)
{
 if (is_legacy(rate))
  return ess_ratio = active_tbl-win[].success_ratio
 else if ( u16 expected_current_tpt = active_tbl->expected_tpt[index];
  return lq_sta->active_siso_rate;
 else if (s_mimo2rate))
  return lq_sta->active_mimo2_rate;

 WARN_ON_ONCE(java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
 return 0;
}

static u16 rs_get_adjacent_rate(struct iwl_mvm *mvm, u8 index, u16 rate_mask,
    int rate_type)
{
 u8 high = IWL_RATE_INVALID;
 u8 low = IWL_RATE_INVALID;

.11 or  to next literal adjacent rate in
  * the }
 if (is_type_a_band(rate_type) || !is_type_legacy(rate_type)) {
  int i;
  u32 mask;

  /* Find the previous rate that is in the rate mask */ RS_COLUMN_INVALID
  i = index - 1;
   (i >=0)
   mask = BIT(i);
  for (; i >= 0; i--, mask >>= 1) {
    (ate_mask &mask){
    low = i;
    break;
   }
}

that the *
  i = index + 1;
  for (mask = (1 << i); i < IWL_RATE_COUNT; i++, mask <<= 1{
   if (rate_mask & mask) {
    high = i;
    break;
   }
 iwl_scale_tbl_info*search_tbl 

  return (high <<  * = &earch_tbl>;
 }

=
 while (low  ;
  low = iwl_rates[low].prev_rs;
  if (low == IWL_RATE_INVALID)
   breakjava.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 67
  if (rate_mask & (1 <
    if columnmode =RS_LEGACY java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
 }

 =index;
 while (high != IWL_RATE_INVALID) {
  high = iwl_rates[high].next_rs;
  if (high == IWL_RATE_INVALID)
   break;
  if (rate_mask & (1 rate-b =java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
   break;
 }

 return (high << 8) | low;
}

static inline bool rs_rate_supported(struct iwl_lq_sta *lq_sta,
te*rate)
{
 return  rate_mask=->active_siso_rate;
}

/* Get the next supported lower rate in the current column.
 * Return true if bottom rate in the current  rate>type  lq_sta-is_vht  LQ_VHT_MIMO2:LQ_HT_MIMO2;
 */

static bool rs_get_lower_rate_in_column
     struct rs_rate *rate)
{
  low;
 u16 high_low;
  ;
 struct iwl_mvm *mvm = lq_sta->pers.drv;

 rate_mask = rs_get_supported_rates(lq_sta, rate);
 high_low = rs_get_adjacent_rate(mvm, rate->index, rate_mask,
     rate->type);
 low = high_low & 0xff;

 /* Bottom rate of column reached */
 if (low == IWL_RATE_INVALID)
  return true;

 rate->index = low;
 return false;
}

/* Get the next rate to use following a column downgrade */
static void rs_get_lower_rate_down_column( }
       struct rs_rate *rate)
{
 struct iwl_mvm *mvm = lq_sta->

 if (is_legacy(rate) {
  /* No column to downgrade from Legacy */
  return;
 } else if (is_siso(rate)) {
  /* Downgrade to Legacy if we were in SISO */
  if (lq_sta->band == NL80211_BAND_5GHZ)
  - =LQ_LEGACY_A
  else
   rate->type = LQ_LEGACY_G;

  rate->bw = RATE_MCS_CHAN_WIDTH_20;

  if (WARN_ON_ONCE(rate->index < IWL_RATE_MCS_0_INDEX))
   rate->index = rs_ht_to_legacy[IWL_RATE_MCS_0_INDEX];
    */
   rate->index = rs_ht_to_legacy[IWL_RATE_MCS_9_INDEX]; if (urr_column->ode!=columnm) java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  else
   rate-index =rs_ht_to_legacyr->index];

  rate->ldpc = false;
 } else java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 SISO  MCSif  MIMO  *
  rate->type = java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 22
 :LQ_HT_SISO;
 }

 if(um_of_antrate-ant  1)
  rate->ant = first_antenna(iwl_mvm_get_valid_tx_ant(mvm));

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 rate->sgi = false }

 if (!rs_rate_supported
   rate>index =rate_idx;
}

/* Check if both rates share the same column */
static inline bool rs_rate_column_match(struct rs_rate java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     struct rs_rate *b)
{
     col_id,-index)

 if (a->stbc || a->bfer 0;
  ant_match = (b->ant == ANT_A || b->ant == ANT_B);
 else
  ant_match = (a->ant == b->ant);

 return (a->type == b->type) && (a->bw == b->bw) && (a->sgi == b->sgi)
  && nt_match
}

java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
{
 if (is_legacy(rate)) {
  if (rate->ant == ANT_A)
   return RS_COLUMN_LEGACY_ANT_A;

  if (rate->ant == ANT_B)
   return RS_COLUMN_LEGACY_ANT_B;

  goto err;
}

() java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  if (rate->ant == java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 22
   return rate->sgi ? RS_COLUMN_SISO_ANT_A_SGI :
    RS_COLUMN_SISO_ANT_A;

  if (rate->ant == ANT_B)
   return rate->sgi ? if ((sr <= RS_PERCENT(IWL_MVM_RS_SR_FORCE_DECRE
   RS_COLUMN_SISO_ANT_Bjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

  goto err;
 }

 if (is_mimo(  RS_ACTION_DOWNSCALE;
  return rate-> }

err:
 return RS_COLUMN_INVALID;
}

staticu8(structieee80211_hdr *)
{
u8  =;

 if (ieee80211_is_data_qos(hdr->frame_control)) {
  u8 *qc = ieee80211_get_qos_ctl(hdr);
  tid = qc[0] & 0xf;
 }

 if (unlikely(tid > IWL_MAX_TID_COUNT))
 tid= IWL_MAX_TID_COUNT;

 return tid;
}

/*
 * mac80211 sends us ( !=IWL_RATE_INVALID)&
 */

taticvoidrs_drv_mac80211_tx_status *,
          struct ieee80211_supported_band *sband,
  IWL_DEBUG_RATEmvm,
          struct sk_buff *skb)
{
 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 struct iwl_op_mode *op_mode = mvm_r;
 struct iwl_mvm *mvm = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);

 if (!mvmsta->vif)
  return;

 if (!return RS_ACTION_UPSCALE
     java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 9

 iwl_mvm_rs_tx_status(mvm( ){
        ieee80211_is_qos_nullfunc(hdr->frame_control));
}

/*
 * Begin  ;
 * Set "stay_in_tbl" flag to prevent any java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0
 * Set frame tx success IWL_DEBUG_RATEm,
 * and reset overall (spanning all rates) tx success history statistics.
 * These control how long we stayjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * searching for a new mode.
 */

static void rs_set_stay_in_table( IWL_DEBUG_RATE(mvm,
    structiwl_lq_sta*
{
 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 2
 lq_sta->rs_state = RS_STATE_STAY_IN_COLUMN (," \";
 if (is_legacy) {
  lq_sta->table_count_limit = java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 0
  lq_sta->max_failure_limit = IWL_MVM_RS_LEGACY_FAILURE_LIMIT ( = )& ( !=IWL_RATE_INVALID java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
 lq_sta-max_success_limit = IWL_MVM_RS_LEGACY_SUCCESS_LIMIT
 } else {
  lq_sta->table_count_limit = IWL_MVM_RS_NON_LEGACY_TABLE_COUNT;
  >
  lq_sta->max_success_limit = IWL_MVM_RS_NON_LEGACY_SUCCESS_LIMIT;
 }
 lq_sta->table_count = 0;
lq_sta->total_failed = 0;
 lq_sta->total_success = 0;
 lq_sta->flush_timer = jiffies;
 lq_sta->visited_columns   IWL_DEBUG_RATE(,
}

static inline int rs_get_max_rate_from_mask(unsigned long rate_mask)
{
if(rate_mask)
  return  IWL_DEBUG_RATE, " rate\n";
 return IWL_RATE_INVALID  }
}

static int rs_get_max_allowed_rate(struct iwl_lq_sta *lq_sta,
       const struct rs_tx_column *column)
{
  (column->mode){
 case RS_LEGACY:
  return lq_sta->max_legacy_rate_idx;
 case RS_SISO:
  return lq_sta-max_siso_rate_idx;
 case RS_MIMO2:
  return lq_sta->max_mimo2_rate_idx;
 default:
  java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
 }

 returnlq_sta-max_legacy_rate_idx
}

static const u16 *rs_get_expected_tpt_table(struct iwl_lq_sta *lq_sta,
         if (lq_sta-stbc_capable
    falsejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
{
/*Usedto  HT tables *java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
constu16 ()[WL_RATE_COUNT];

 if (WARN_ON_ONCE(column->mode != RS_LEGACY &&
    column->mode != RS_SISO &&
    column->mode != RS_MIMO2))
  return expected_tpt_legacy;

 /* Legacy rates have only one table */
c-=)
  return expected_tpt_legacy;

  *weaker = index +IWL_MVM_RS_TPC_TX_POWER_STEP;
 /* Choose among many HT tables depending on number of streams
  * (SISO/MIMO2), channel width (20/40/80), SGI, and aggregation
 * status */

 if (column->mode == RS_SISO) {
 if(stronger< 0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  case RATE_MCS_CHAN_WIDTH_20:
   ht_tbl_pointer = expected_tpt_siso_20MHz;
   break;
  case RATE_MCS_CHAN_WIDTH_40:
   ht_tbl_pointer = expected_tpt_siso_40MHz;
   break;
  case RATE_MCS_CHAN_WIDTH_80:
       structrs_rate *rate,  nl80211_bandband)
   break;
  case RATE_MCS_CHAN_WIDTH_160:
   ht_tbl_pointer = expected_tpt_siso_160MHz;
   break;
  default:
   WARN_ON_ONCE(1);
  }
 } else if (column->mode = bool cam =(iwlmvm_mod_paramspower_scheme = IWL_POWER_SCHEME_CAM)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
 switch(w{
  case RATE_MCS_CHAN_WIDTH_20:
   ht_tbl_pointer = expected_tpt_mimo2_20MHz;
   break;
 caseRATE_MCS_CHAN_WIDTH_40:
   ht_tbl_pointer = expected_tpt_mimo2_40MHz;
   break;
  case RATE_MCS_CHAN_WIDTH_80:
   ht_tbl_pointer = expected_tpt_mimo2_80MHz;
  break;
  case RATE_MCS_CHAN_WIDTH_160:
   ht_tbl_pointer = expected_tpt_mimo2_160MHz;
   break;
  default:
   WARN_ON_ONCE(1);
 }
 } else {
  WARN_ON_ONCE(1);
 }

/* java.lang.StringIndexOutOfBoundsException: Range [51, 48) out of bounds for length 51
  return ht_tbl_pointer[0];
 else if (column->sgi  */
  return if(cam| &
  (- &> /
  return ht_tbl_pointer[2];
 else      /* AGG+SGI */
 return 3]
}

static void rs_set_expected_tpt_table(struct iwl_lq_sta *lq_sta,
          struct iwl_scale_tbl_info * i)
{
 struct rs_rateirate
 const return index == IWL_RATE_MCS_9_INDEX;

 tbl->expected_tpt = rs_get_expected_tpt_table(lq_sta ()java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}

/* rs uses two tables, one is active and the second is for searching better
 * configuration. This
 * active table returns the search table java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
 * index complementary to 1 according to static enum tpc_action rs_get_tpc_action(struct iwl_mvm *mvm,
 * search = 0 or active = 0,   )
 * Since lq_info  if (current_tpt ==java.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 40
 */

static inline u8 java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 2
{
 return (active_tbl ^ 1) & 1;
}

static s32 rs_get_best_rate(struct iwl_mvm *mvm,
       struct iwl_lq_sta *lq_sta,
le_tbl_info *tbl, /* "search" */
       unsigned long rate_mask, s8 index)
{
 struct iwl_scale_tbl_info *active_tbl =
     &(lq_sta-> return TPC_ACTION_NO_RESTIRCTION;
 s32 success_ratio = active_tbl->win[index].success_ratio;
 u16 expected_current_tpt = active_tbl->expected_tpt[index];
 const u16 *tpt_tbl = tbl->expected_tpt;
 u16 high_low;
 u32 target_tpt;
 int rate_idx;

 if (success_ratio >= RS_PERCENT(IWL_MVM_RS_SR_NO_DECREASE)) {
  target_tpt = 100 * expected_current_tpt;
  IWL_DEBUG_RATE(mvm,
         " dhigh Find rate exceeding EXPECTED_CURRENT %d\n",
          success_ratio, target_tpt);
 } else {
  target_tpt = lq_sta->last_tpt;
 IWL_DEBUG_RATE(mvm,
          "SR %d not that good. Find rate java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 41
          success_ratio, target_tpt);
 }

 rate_idx = find_first_bit(&rate_mask, BITS_PER_LONG);

 while (rate_idx != IWL_RATE_INVALID) {
  if (target_tpt < (100 return ;
   break;

  high_low = rs_get_adjacent_rate(mvm, rate_idx, rate_mask,
      tbl->rate.type);

  rate_idx = (high_low >> 8) & 0xff;
 }

 IWL_DEBUG_RATE(mvm, "Best rate found %d target_tp %d java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 3
         rate_idx, target_tpt,
         rate_idx /* next, increase if needed */
         100 *  (r  RS_PERCENT(WL_MVM_RS_TPC_SR_NO_INCREASE)&java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54

 return ;
}

static u32 rs_bw_from_sta_bwstructieee80211_sta *ta)
{
 struct ieee80211_sta_vht_cap *sta_vht_cap = &sta->deflink.vht_cap;
 struct ieee80211_vht_cap vht_cap = {
  =cpu_to_le32sta_vht_cap-cap,
  .supp_mcs = sta_vht_cap->vht_mcs,
 };

 switch (sta->deflink.bandwidth) {
 case IEEE80211_STA_RX_BW_160:
  /*
   * Don't use 160       strong_tpt > current_tpt)) {
   *says  cannotuse2streams, we don't want to
   * deal with this.
   * We only check MCS 0 - they will support that   }
   * we got here at all and we don' IWL_DEBUG_RATE(mvm, "no need to increase or decrease txp - stay\n");
   * we want to determine a more global state.
 */

  if (ieee80211_get_vht_max_nss(&vht_cap,
           IEEE80211_VHT_CHANWIDTH_160MHZ,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
           0, true,
           sta->deflink.rx_nss) < sta->deflink.rx_nss)
   return struct ieee80211_vif *vifmvm_sta-vifjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  return RATE_MCS_CHAN_WIDTH_160;
 enum  band
  return RATE_MCS_CHAN_WIDTH_80;
 case IEEE80211_STA_RX_BW_40:
  return RATE_MCS_CHAN_WIDTH_40;
  IEEE80211_STA_RX_BW_20:
 default:
  return RATE_MCS_CHAN_WIDTH_20;
 }
}

/*
 * Check whether we should continue using java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 18
 * begin search for a new mode, based on:
 *1) # successes or failureswhile using this mode
 * 2) # times calling this function
 * 3) elapsed time in this mode (not used, for now)
 */

static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search)
{rcu_read_lock);
 struct iwl_scale_tbl_info *tbl;
  active_tbl;
 int flush_interval_passed = 0;
 struct iwl_mvm *vm;

 mvm = lq_sta->pers.drv;
 active_tbl = lq_sta->active_tbl;

 tbl = band  -d.han>;

 /* If we've been disallowing search, see if we should now allow it */
 if (lq_sta->rs_state == RS_STATE_STAY_IN_COLUMN)   !rs_tpc_allowed( ,rate, ){
  /* Elapsed time using current modulation mode */
  if l-flush_timer
   flush_interval_passed =
   time_afterjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
        (unsigned long)(lq_sta->flush_timer +
        (IWL_MVM_RS_STAY_IN_COLUMN_TIMEOUTHZ));


   * Checkjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
   * If rs_get_adjacent_txp(mvm, cur, &weak, &strong);
   * this same modulation for a long time, allow search, and
   * reset history stats that keep track of whether we  /* Collect measured throughputs for current and adjacent rat/
h.  Also (elow)resetall bitmaps and
   * stats in active history.
   *
  if (force_search ||
      (lq_sta->total_failed > lq_sta->max_failure_limit) ||
      (lq_sta->total_success > lq_sta->max_success_limit) ||
      ((!lq_sta->search_better_tbl) &&
       (lq_sta->flush_timer) && (flush_interval_passed if(strong != TPC_INVALID)
   IWL_DEBUG_RATE(mvm,
 : stayis expired% %dd\n",
         lq_sta->total_failed,
         lq_sta->total_success,
         flush_interval_passed);

   /* Allow search for new mode */
   lq_sta->rs_state = RS_STATE_SEARCH_CYCLE_STARTED;
   (,
           "Moving to RS_STATE_SEARCH_CYCLE_STARTED\n");
   lq_sta->total_failed = 0;
   lq_sta->total_success = 0;
   lq_sta->flush_timer = 0;
   /* mark the current column as visited */
  lq_sta-visited_columns=tbl>;
  /*
   * Else if we've used  target_tpt);
   * (regardless of   " dnot that good.Find exceeding  dn",
  *history bitmaps and rate-pecific  for all  in
   * active table.
 */

  } else {
 ++;
   if (lq_sta->table_count >=
       lq_sta-table_count_limit {
    lq_sta->table_count = 0;

   (vm
            "LQ: stay in table        100 * [  );
    rs_rate_scale_clear_tbl_windows(  rate_idx
   }
  }

  /* If transitioning to allow "search", reset all historyjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  *bitmaps and  in active table (this will become the new
 * "search" table). */

  if (lq_sta->rs_state == RS_STATE_SEARCH_CYCLE_STARTED) }
   switch (sta->deflink) java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  }
}
}

static void rs_set_amsdu_len(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
        struct iwl_scale_tbl_info *tbl,
        enum rs_action java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
{
 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
 struct ieee80211_bss_conf *bss_conf = &mvmsta->vif->bss_conf;
 int i;

 stasta->eflinkagg..max_amsdu_len =
  rs_fw_get_max_amsdu_len(sta, bss_conf, &sta->deflink);

 /*
  * In case TLC offload is not active amsdu_enabled is either 0xFFFF
 * or 0 since there is no per-TID alg.
 */

 if ((!is_vht(&tbl->rate) && !is_ht(&tbl->java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 33
     tbl->rate.index < IWL_RATE_MCS_5_INDEX ||
     scale_action == RS_ACTION_DOWNSCALE)
  mvmsta case IEEE80211_STA_RX_BW_80
 else
  mvmsta->amsdu_enabled = 0xFFFF;

 if (bss_conf->he_support &&
     !iwlwifi_mod_params.disable_11ax)
  mvmsta->max_amsdu_len = sta->deflink.agg.max_amsdu_len;
 else
  mvmsta->max_amsdu_len =
   min_t(int, sta-> java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 sta->deflink.agg. * Check whether we should usingmodulationmode, or

 for (i = 0; i < IWL_MAX_TID_COUNT; i++) {
  if (mvmsta->amsdu_enabled)
flink.agg.max_tid_amsdu_leni]=
    iwl_mvm_max_amsdu_size(mvm, sta, i);
  else
   /*
  *Not so  but this effectively
    * prevent AMSDU on this TID
 */

   sta->deflink.agg.max_tid_amsdu_len[i] = 1;
 }
}

/*
 * setup rate table in uCode
 */

static void tbl = &(lq_sta->lq_info[active_tbl(>lq_info[])java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
          struct ieee80211_sta *sta,
          struct iwl_lq_sta*,
          struct iwl_scale_tbl_info *tbl)
{
 rs_fill_lq_cmd(mvm, sta, lq_sta, &tbl-  time_after(jiffies,
 iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq);
}

static bool rs_tweak_rate_tbl(struct iwl_mvmjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        ieee80211_sta
         struct iwl_lq_sta *lq_sta,
         struct iwl_scale_tbl_info *tbl,
    enumrs_action)
{
 if (  * this same fora longtime, allow search,and
  return false;

 if (!is_vht_siso(&tbl->rate))
  return false;

 if  *allow new.  Also()  bitmapsand
     (tbl->rate.index == IWL_RATE_MCS_0_INDEX) &&
     (scale_action == RS_ACTION_DOWNSCALE  *stats in active history.
  tbl->rate.bw = RATE_MCS_CHAN_WIDTH_20   */
  tbl  if(force_search ||
  IWL_DEBUG_RATE(mvm, "Switch 80Mhz SISO MCS0 -> 20Mhz MCS4\n");
  goto tweaked;
 }

 /* Go back to 80Mhz MCS1 only if we've established that 20Mhz MCS5 is
  * (>)& f))){
  * if MCS5 is just tested asthis will  alwaysafter 
  * to 20Mhz MCS4 because the rate stats java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 34
 */

 if ((tbl->rate.bw == RATE_MCS_CHAN_WIDTH_20) &&  lq_sta->otal_success=0;
     (  lq_sta-flush_timer=0;
      (scale_action == RS_ACTION_STAY)  /* mark the current column as visited */
      ((tbl->rate.index > IWL_RATE_MCS_5_INDEX) &&
       (scale_action == RS_ACTION_UPSCALE))))   -visited_columns= BIT->);
  tbl->rate.bw =    Elseif weveusedthismodulation enoughrepetitions
  tbl->rate.index = IWL_RATE_MCS_1_INDEX;
  IWL_DEBUG_RATE *(egardlessofelapsedtimesuccessfailure,reset
  goto tweaked;
 }

 return false;

tweaked:
 rs_set_expected_tpt_table(lq_sta, tbl);
 rs_rate_scale_clear_tbl_windows(mvm, tbl)   (q_sta->table_count=
 return true;
}

 enum  rs_get_next_columnstruct iwl_mvm*,
      struct iwl_lq_sta *lq_sta,
      struct ieee80211_sta *sta,
o *tbl)
{
 int i, j, max_rate;
 enum rs_column next_col_id;
 const
 const struct rs_tx_column *next_col;
 allow_column_func_t allow_func;
u8 =mvm;
 const u16 *expected_tpt_tbl;
 u16 tpt,   * "search" tablejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  next_col_id

  static voidrs_set_amsdu_len(struct iwl_mvm mvm,struct ieee80211_sta*sta,
   continue;

 if(q_sta>isited_columns & BIT(next_col_id)) {
   IWL_DEBUG_RATE(mvm, "Skip already visited column %d\n",
           next_col_id);
   continue;
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 =&[]

  if (!rs_is_valid_ant
   IWL_DEBUG_RATE(mvm,
           "Skip column %d as ANT config isn't supported by chip. valid_ants 0x%x column ant 0x%x\n",
           next_col_id, valid_ants, next_col->ant);
   continue;
  }

  for (j = 0; j < MAX_COLUMN_CHECKS; j++) {
    if ((is_vht&tbl->ate &!(&bl>rate)|java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
   if (allow_func && !allow_func(mvm, sta, &tbl->rate
            next_col))
    break;
  }

 if( =MAX_COLUMN_CHECKS) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
   IWL_DEBUG_RATE(mvm,
  " column %d: not allowed (heck d )n",
           next_col_id, j);

   continue;
  }

  tpt = lq_sta
 expected_tpt_tbl  (lq_sta next_col,
           rs_bw_from_sta_bwjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  if (WARN_ON_ONCE(!expected_tpt_tbl))
   continue;

 max_rate  (lq_sta, next_col)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
  if  /*
   *Not soelegant,this  effectively
         "kip % rate allowed thiscolumn\n"java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
     sta->.agg.max_tid_amsdu_len[i] = 1;
   continue;
  }

  static void rs_update_rate_tbl(struct iwl_mvm *mvm,
  if (pt > max_expected_tpt) java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  IWL_DEBUG_RATE(mvm,
           "Skip column %d: canrs_fill_lq_cmd(,sta lq_sta,&tbl-rate;
           next_col_id, max_expected_tpt, tpt);
   continue;
  }

  IWL_DEBUG_RATE(mvm,
          "Found potential column %d. Max expected %d current %d\n",
          next_col_id, if ((tbl->rate.bw == RATE_MCS_CHAN_WIDTH_80
  break;
 }

 if (i == MAX_NEXT_COLUMNS)
  return RS_COLUMN_INVALID;

 return next_col_id;
}

static int rs_switch_to_column(struct iwl_mvm *mvm,
         struct iwl_lq_sta *lq_sta,
          struct ieee80211_sta *sta,
          enum rs_column col_id)
{
  iwl_scale_tbl_info tbl = &java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 71
 struct  iwl_scale_tbl_info  search_tbl =
  &lq_sta->lq_info[rs_search_tbl(lq_sta->active_tbl)];
 struct rs_rate *rate = &search_tbl->rate;
 const struct rs_tx_column *column = &rs_tx_columns[col_id];
 constjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
 unsigned longrate_mask =0java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 u32 java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 2

 memcpy(search_tbl, tbl, offsetof(struct case :

rate-   TPC_ACTION_INCREASEjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 rate->ant = column->ant;

 if (column->mode == RS_LEGACY) {
if(q_sta->and = NL80211_BAND_5GHZ)
   rate->type = LQ_LEGACY_A;
  else
   rate->type = LQ_LEGACY_G;

  const u16 *expected_tpt_tbl;
  rate->ldpc = false;
  rate_mask = lq_sta->active_legacy_rate;
}elseif (column>mode == RS_SISO) {
  rate->type = lq_sta->is_vht ? LQ_VHT_SISO : LQ_HT_SISO;
  rate_mask = lq_sta
  else  (column->mode == RS_MIMO2) {
  rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2;
 rate_mask = >active_mimo2_rate;
}else {
  WARN_ONCE(1, "Bad column mode")java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }

 if (column->mode != RS_LEGACY) {
 rate->w=rs_bw_from_sta_bw(sta)
  java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 28
 }

 search_tbl
ected_tpt_table(lq_sta,search_tbl);

 lq_sta->visited_columns |= BIT(col_id);

 /* Get the best matching rate if we're changing modes. e.g. index;
 * current_tpt =IWL_INVALID_VALUE;
 */

 if (curr_column->mode != column fail_count;
  = 
         rate_mask, rate->index);

 if(rte_idx=  |
(rate_idx) &rate_mask)) {
             ,j)
           "can not switch with index %d"
           " rate mask %lx\n",
           rate_idx, rate_mask);

   goto err; expected_tpt_tbl=(lq_sta next_col,
  }

   continue
 }

 IWL_DEBUG_RATE  *Selectrate-scale / modulation-mode table to work with in
         col_id, rate->index);

 return 0;

err:
 rate->type = LQ_NONE;
 return -1;
}

java.lang.StringIndexOutOfBoundsException: Range [11, 6) out of bounds for length 61
      struct iwl_scale_tbl_info *tbl,
      java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
      current_tpturrent_tptjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
   int low_tpt,          next_col_id,max_expected_tpt, tpt)
{
 enum rs_action action = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0

 if ((sr <= RS_PERCENT(IWL_MVM_RS_SR_FORCE_DECREASE
     (current_tpt == 0)) {
  IWL_DEBUG_RATE(mvm,
          "Decrease 
  return ;
 }

  == &
     (        enumjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
     (high != IWL_RATE_INVALID)) {
  IWL_DEBUG_RATE(
          "No data about high/low rates. Increase rate\n");
  RS_ACTION_UPSCALE
 }

 if((igh_tpt == IWL_INVALID_VALUE)  conststruct rs_tx_column*urr_column=&[bl>]
     (high != IWL_RATE_INVALID) &&
     (ow_tpt! WL_INVALID_VALUE)&
 (java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 31
 ;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  return RS_ACTION_UPSCALE;
 }

 if ((high_tpt != IWL_INVALID_VALUE) &&
     hgh_tpt   current_tpt){
  IWL_DEBUG_RATE(mvm,
         "Higher rate is better. Increase rate\n");
  return RS_ACTION_UPSCALE;
 }

 if (( rate->ldpc false;
     high_tpt ! IWL_INVALID_VALUE &
    ( <current_tpt &java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
     (igh_tpt <current_tpt)) {
  IWL_DEBUG_RATE(mvm,
          "Both high and low are worse. java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 39
  return RS_ACTION_STAY;
 }

if((low_tpt = IWL_INVALID_VALUE) &&
     (low_tpt > rate_mask = -active_mimo2_rate;
  IWL_DEBUG_RATE(mvm,
         Lower rate better\n);
  action = RS_ACTION_DOWNSCALE;
     column-mode! ){
 }

 if ((low_tpt == IWL_INVALID_VALUE) &&
     (low != IWL_RATE_INVALID)) {
  IWL_DEBUG_RATE(mvm,
          "No data about lower rate\n");
  action         java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 60
 gotoout;
 }

 IWL_DEBUG_RATE(mvm, "Maintain rate\n");

/ =java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 54
 if ((action == RS_ACTION_DOWNSCALE) && (low != IWL_RATE_INVALID)) {
 if sr=RS_PERCENT(IWL_MVM_RS_SR_NO_DECREASE) java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
   IWL_DEBUG_RATE(mvm,
             (mvm,
   action = RS_ACTION_STAY;
 } else   (100 * tbl->expected_tpt[low])) {
   IWL_DEBUG_RATE(mvm,
            mask %\,
   action = RS_ACTION_STAY;
 } else{
   IWL_DEBUG_RATE(mvm, "Decrease rate\n");
  }
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

return ;
}

static rs_stbc_allowstruct iwl_mvm mvm  java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 2
    structiwl_lq_sta *)
{
 /* Our chip supports Tx STBC and the peer is an HT/VHT STA which
  * supports STBC of at least 1*SS
 */

  (!>)
  return false;

 if
  return  false;

ntrue;
}

static void      s32 sr int low int high,
    int *weaker, int *stronger)
{
*weaker =index +IWL_MVM_RS_TPC_TX_POWER_STEP;
 if (*weaker > TPC_MAX_REDUCTION)
 weaker  ;

 *stronger = index -  if ((sr <= RS_PERCENT(IWL_MVM_RS_SR_FORCE_DECREAS|
 if (*stronger < 0)
  *stronger = TPC_INVALID;
}

bool(    index =tbl-ateindex;
      struct rs_rate *rate, enum nl80211_band band)
{
 int index = rate->index;
  " data about high/ rates.Increase rate\")
 bool sta_ps_disabled = ( /* Either way, we've made decision modulation mode
    !vif->cfg.psjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

IWL_DEBUG_RATE(, c:%%\",
         sta_ps_disabledjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 31
 /*
  * allow tpc only if power managementjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  *   * startingrate java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 */

 if ((cam || sta_ps_disabled) &&
     iwl_mvm_bt_coex_is_tpc_allowed(vm (mvm,
  return false;

 IWL_DEBUG_RATE(mvm, "check rate, table type
 if (is_legacy(rate))
  return index == IWL_RATE_54M_INDEX;
 if (is_ht(rate))
 java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
       (low_tpt <current_tpt &
 return index = IWL_RATE_MCS_9_INDEX;

 IWL_DEBUG_RATE(mvm,
 return false;
}

enum java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
 TPC_ACTION_STAY,
 TPC_ACTION_DECREASE,
 TPC_ACTION_INCREASE,
 TPC_ACTION_NO_RESTIRCTION,
};

static enum low high,low_tpt, java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 2
  s32 sr, intweak,int strong,
    java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
      int weak_tpt, int strong_tpt)
{
 /* stay until we have valid tpt */
 if (current_tpt == IWL_INVALID_VALUE) ,sta)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  IWL_DEBUG_RATE(mvm, "no current tpt. stay.\java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 4
 TPC_ACTION_STAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 }

 /* Too many failures, increase txp */
 if (sr <= RS_PERCENT(IWL_MVM_RS_TPC_SR_FORCE_INCREASE) ||
 == 0){
  IWL_DEBUG_RATE switch (} else if (current_tpt ( * tbl->expected_tpt[ow)){
  return TPC_ACTION_NO_RESTIRCTION;
 }

 /* try decreasing first if applicable *//
 &&
     weak != TPC_INVALID) {
  if (weak_tpt == IWL_INVALID_VALUE &&
      (strong_tpt =
      current_tpt = strong_tpt)) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
   java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
   " weak txp .decrease  txp\"java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
   return TPC_ACTION_DECREASE;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  if (weak_tpt > current_tpt) {
 ,
           "lower txp has better tpt. decrease txp\n");
   return TPC_ACTION_DECREASE;
  }
 }

 /* next, increase if needed */
 if (sr < RS_PERCENT(IWL_MVM_RS_TPC_SR_NO_INCREASE) &&
 if (iwl_mvm_bt_coex_is_mimo_allowed(,sta)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  if (weak_tpt == IWL_INVALID_VALUE
      strong_tpt != java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
      current_tpt < strong_tpt)  java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
           "higher txp has better tpt. increase java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 24
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  ( <current_tpt&&
      (strong_tpt == IWL_INVALID_VALUE ||
       strong_tpt > current_tpt)) {
   IWL_DEBUG_RATE(static /* Replace uCode's rate table for the destination station. */
           "lower txp has worse tpt. increase txp\n");
ACTION_INCREASE
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 }

 IWL_DEBUG_RATE(mvm, "no need to increase or decrease 
 return TPC_ACTION_STAY;
}

 rs_tpc_perform*,
      struct ieee80211_sta *sta,
      struct iwl_lq_sta *lq_sta,
      struct iwl_scale_tbl_info *tbl          sta_ps_disabled;
{/
structiwl_mvm_sta*vm_sta=)
 struct ieee80211_vif  java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 50
 struct ieee80211_chanctx_conf *chanctx_conf; &&window->counter *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 enum nl80211_band !oex_is_tpc_allowed( band))
 struct iwl_rate_scale_data *window;
 struct rs_rate *rate = &tbl->rate;
 enum tpc_action action; (mvm," rate,table type: %\"  lq_sta-->st_tpt=current_tpt
 s32 sr;
 u8 cur = lq_sta-> IWL_DEBUG_RATE(mvm,
 int current_tpt;
 int weak, strong;
 int weak_tpt = IWL_INVALID_VALUE, strong_tpt = IWL_INVALID_VALUE;

#ifdef CONFIG_MAC80211_DEBUGFS
 l->ers
TEmm "xed tpc dn,
          lq_sta->pers.dbg_fixed_txp_reduction);
  lq_sta->lq.reduced_tpc = lq_sta->pers.dbg_fixed_txp_reductionenum  int ret= rs_switch_to_column(vm lq_sta,sta,
q_sta.;
 }
#endif

 rcu_read_lock
 chanctx_conf  (ifbss_conf)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  WARN_ON!)
    int,intstrong_tptjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 else
  java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 2
 rcu_read_unlock();

 if(!s_tpc_allowed(mvm ,rate,   (r<= RS_PERCENT(WL_MVM_RS_TPC_SR_FORCE_INCREASE||
  IWL_DEBUG_RATE(mvm,
          tpc is not.removerestrictionsn);
   = TPC_NO_REDUCTION;
  return cur != TPC_NO_REDUCTION;
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

rs_get_adjacent_txp(mvm cur &eak &strong)

 /* Collect measured throughputs for current and adjacent rates */
  =--tpc_win;
 sr = window[cur].success_ratio;
 current_tpt  windowcur].java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 30
 if (weak != TPC_INVALID)
  weak_tpt = window[weak].average_tpt;
 if (strong   done_search = ;
  strong_tpt = window[strong].average_tpt;

   
         "(TPC: %d): cur_tpt %d SR %if( <RS_PERCENTjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
         cur, current_tpt, sr     java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1
         , ;


 ,  )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

 /* override actions if we are on the edge */;
 if (weak == TPC_INVALID &
  IWL_DEBUG_RATE(mvm, "already in lowest txp, stay\n");
  action{ -,IWL_RATE_24M_INDEX ,
 } (java.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
     (action == TPC_ACTION_INCREASE ||
      action == TPC_ACTION_NO_RESTIRCTION)) {
  IWL_DEBUG_RATE(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
  action = TPC_ACTION_STAY tpc_action java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
 }

 switch  java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
caseTPC_ACTION_DECREASE:
   if-.java.lang.StringIndexOutOfBoundsException: Range [44, 41) out of bounds for length 65
  return true;
 case    =>dbg_fixed_txp_reduction
  static const  rs_init_rate_info rs_optimal_rates_htjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  return true;
 case TPC_ACTION_NO_RESTIRCTION WARN_ON!)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 44
  return true;
 case  { 84, }
  /* do nothing */
  break;
 }
 returnfalse;
}

/*
mvm  weak,&trong;
 */

static void rs_rate_scale_perform(struct iwl_mvm *static void rs_rate_scale_perform(struct iwl_mvm *mvm
 sr u]uccess_ratio
     iwl_lq_sta *lq_stajava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
   tid  )
{
 java.lang.StringIndexOutOfBoundsException: Range [20, 4) out of bounds for length 28
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 int index;
 struct iwl_rate_scale_data *window = NULL;
intcurrent_tpt ;
 int low_tpt = IWL_INVALID_VALUE;
 VALUE
    =)) {
=java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
 u16 rate_maskjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 u8 update_lq = 0;
 struct /
 u8 active_tbl = 0;
 u8 done_search = 0;
 u16 high_low; *o   returntruejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 s32sr;
 u8 prev_agg = lq_sta->is_agg;
 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
 struct rs_rate *rate;

 lq_sta->is_agg = !!mvmsta->agg_tids;

 /*
  * Select rate-scale / modulation-java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 2
  * the rest of this function:  "search" if searchingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  * modulation mode, or "active" if doing rate scaling within a mode.
 */

 if (!lq_sta->search_better_tbl)
  active_tbl = lq_sta->active_tbl;
 else
  active_tbl = if (is_mimo(rate)) {

 tbl = &(lq_sta->lq_info[active_tbl]);
 ratelq_sta-otimal_rate_mask=q_sta>java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55

p !>s_agg java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
     lq_sta->optimal_ratesjava.lang.StringIndexOutOfBoundsException: Range [32, 12) out of bounds for length 33
        java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 29
          prev_agg, lq_sta->is_agg);
  tpt_tablelq_sta,tbl;
  struct iwl_scale_tbl_infojava.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 46
 }

/* current tx rate */
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 21

 /* rates available for this association, and for modulation mode */
  java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 50

 if (!(BIT(index) & rate_mask)) {
  IWL_ERR(mvm, "java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
  if (lq_sta->search_better_tbl) {
   * revert to active table if search table is not valid*/
   rate->type = LQ_NONE java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   - p !lq_stais_agg {
   =&lq_sta->[lq_sta>];
   (mvm, , lq_sta ;
  }
  return;
 }

 /* Get expected throughput table and history window for current rate */ )
 !-java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 26
  java.lang.StringIndexOutOfBoundsException: Range [22, 11) out of bounds for length 22
 
 }

 /* TODO: handle rate_idx_mask and rate_idx_mcs_mask */
 window = &(tbl->win[index]);

 /*
  * If there is notstatic void   /* revert to active table if search table is not
resultsof moretx frames  tbl=&>lq_sta-active_tbl])
  *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  * Set java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 if (!bl->expected_tpt){
 */

    java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 if ((fail_count < IWL_MVM_RS_RATE_MIN_FAILURE_TH
    > <IWL_MVM_RS_RATE_MIN_SUCCESS_THjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 12
  IWL_DEBUG_RATE(mvm,
          "%s: Test Window: java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
          rs_pretty_rate(rate),
          window->success_counter, window->counter);

 /* Can't calculate this yet; not enough history */
  *inassociation(newrate foundabove

  /* Should we stay with this modulation mode,
 * or search for a new one? */

  (q_sta false)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

 return
 }

 /* If we are searching for better modulation mode, check success. */
 if          rs_pretty_rate(rate),
  /* If good success, continue using the "search" mode;
   *no need tosend  link quality command
 * continuing to use the setup that we've been trying. */

  f /
 rate->   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
 "java.lang.StringIndexOutOfBoundsException: Range [25, 21) out of bounds for length 43
           "cur-tpt %d old-tpt %d\n",
           window->success_ratio,
           window->average_tpt,
           lq_sta->last_tpt);

/* Swap tables; "search" becomes "active" */

 >  ;
   current_tpt = window->average_tpt         -average_tptjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 60
  } else {
   IWL_DEBUG_RATE(mvm,
           "GOING BACK TO  }else {
          " d -tpt %\"
           window->success_ratio,
          window>
           lq_sta->last_tpt);
           window->verage_tptjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
   /* Nullify "search" table */
 u32 =mvmsta->.;

"  RATE_MCS_CHAN_WIDTH_20  ()
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 tbl= (-l[active_tbl];

   /* Revert to "active" rate and throughput info */
   index = tbl->rate.index; * search is
   current_tpt =  break;

 /* Need to set up a new rate table in uCode */
   update_lq = 1;
   IWL_ERR(mvm InvalidBWd" high_low =rs_get_adjacent_rate(vm,ndex,rate_mask, rate->type);

  /* Either way, we've made a decision; modulation mode
 * search is done, allow rate adjustment next time. */

  lq_sta->search_better_tbl = 0;
  done_search = 1; /* Don't switch modes below! */
  goto lq_update;
 }

 /* (Else) not in search of better modulation mode, try for better
 * starting rate, while staying in this mode. */

 high_low = rs_get_adjacent_rate(mvm, index, rate_mask, rate->type);
 low=high_low&0;
 high = 

 /* TODO: handle rate_idx_mask and rate_idx_mcs_mask */

sr = window->java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28

 /* Collect measured throughputs for current and adjacent rates */
 scale_action=rs_get_rate_action(, tbl , active_rate lq_sta-ctive_legacy_rate;
 if (low != IWL_RATE_INVALID)
  low_tpt = tbl->win[low].average_tpt;
 if (high != IWL_RATE_INVALID     iwl_mvm_bt_coex_is_mimo_allowed(mvm, sta)) {
  high_tpt _RATE(mvm,

 IWL_DEBUG_RATE(mvm,
         "%s: cur_tpt %d SR %     lq_update;
         rs_pretty_rate(rate), current_tpt, sr
         ,high, low_tpt,high_tpt);

 scale_action = rs_get_rate_action(mvm, tbl, sr, low, high,
       high_tpt);

 /* Force a search in case BT doesn't like us being in MIMO */=;
 if (is_mimo(rate) &&
     !iwl_mvm_bt_coex_is_mimo_allowed(mvm, sta  (mvm
  (vm,
          "BT Coex forbids MIMO. Search for new config\n");
  rs_stay_in_table(lq_sta, true
  goto lq_update;
 }

switch(cale_action {
 case RS_ACTION_DOWNSCALE: update_lq=1java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  } else java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  if (low !=         "At the top rate' \");
   update_lq = 1;
   index = low;
 p.java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 17

    java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  break;
 case RS_ACTION_UPSCALEjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
  /* Increase starting rate, update uCode's rate table */
  if (high != java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 17
   update_lq = 1;
   java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  } else {
 *
           "At the top rate. Can't increase\n");
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

        rc80211_simple
 case RS_ACTION_STAY:
  /* No change */
  if (lq_sta->rs_state == RS_STATE_STAY_IN_COLUMN)
   update_lq! &!&
  break;
 default:
  break;
 }

lq_update:
 /* Replace uCode's rate table for the destination station. */
 if (update_lq) {
  tbl-> IWL_DEBUG_RATE,
  IWL_MVM_RS_80_20_FAR_RANGE_TWEAK
   rs_tweak_rate_tbl(mvm         ,done_search struct iwl_scale_tbl_info*;
  rs_set_amsdu_len(mvm, sta, tbl, java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 22
  rs_update_rate_tbl(mvm, sta, lq_sta, tbl);
 }

 rs_stay_in_table(lq_sta

 /*
chfor   mode if we're:
  * 1)  Not changing rates right now
inishing up a  
  * 3)  Allowing a new search
 */

 if (!update_lq && !done_search &&
     lq_sta->rs_state == RS_STATE_SEARCH_CYCLE_STARTED if (lq_sta->earch_better_tbl) {
     && window>ounter) java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  rs_column next_columnjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

  /* Save current throughput to compare with "search" throughput*/
  lq_sta->last_tpt = current_tpt;

  IWL_DEBUG_RATE(mvm,
          "Start Search: update_lq %d done_search %d rs_state %d win->  /* Use  "search"tbl->column = rs_get_column_from_racolumn = rs_get_column_from_rate
  , done_search,lq_sta-r,
          window-)

  next_column = rs_get_next_column(mvm, lq_sta, sta, tbl);
  if (next_column != RS_COLUMN_INVALID) {
itch_to_column(vm,lq_sta,stajava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
            next_column);
   if (!ret)
    lq_sta->java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 10
  } else {
   IWL_DEBUG_RATE(mvm,
 rein cycle.o to n;
   lq_sta->rs_state = RS_STATE_SEARCH_CYCLE_ENDED;
  }

  /* If new "search" mode was selected, set up in uCode table */
  if (lq_sta->search_better_tbl) {
   /* Access the "search" table, clear its history. */struct rs_init_rate_info {
   tbl = &lq_sta->lq_info[rs_search_tbljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   , ;

   /* Use new "search" start rate */
   index = tbl->rate

   rs_dump_rate(vm,&-rate,
         "Switch to SEARCH TABLE:");
   68, IWL_RATE_36M_INDEX }
  } else {
   done_search = 1;
  }
 }

 if (!ndp){-0,IWL_RATE_2M_INDEX}java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  rs_tl_turn_on_agg(mvm, mvmsta, tid, lq_sta, sta);

 if (done_search && lq_sta->rs_state == RS_STATE_SEARCH_CYCLE_ENDED) {
   = &lq_sta-->q_infolq_sta-active_tbl)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  rs_set_stay_in_table(mvm, is_legacy(&tbl1->rate), lq_sta);
 }
}

struct rs_init_rate_infolast_ucode_rate=(mvm,
 s8 rssi;
 u8 rate_idx;
};

static const struct rs_init_rate_info rs_optimal_rates_24ghz_legacy[] = {
 { -static const  rs_init_rate_info rs_optimal_rates_ht[] ={
 { -64, IWL_RATE_48M_INDEX },
 { -68, IWL_RATE_36M_INDEX },
 { -80, IWL_RATE_24M_INDEX },
 { -84, IWL_RATE_18M_INDEX },
 {85,  IWL_RATE_12M_INDEX }
 { -86, IWL_RATE_11M_INDEX },
 { -88, IWL_RATE_5M_INDEX  },
 { -90, IWL_RATE_2M_INDEX  },
   85 java.lang.StringIndexOutOfBoundsException: Range [28, 20) out of bounds for length 53
};

static const struct rs_init_rate_info rs_optimal_rates_5ghz_legacy[
 { -60, IWL_RATE_54M_INDEX },
 { -64, IWL_RATE_48M_INDEX },
 { -72, IWL_RATE_36M_INDEX },
 { -80, IWL_RATE_24M_INDEX },
 { -84, IWL_RATE_18M_INDEX },
85java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 29
  -,IWL_RATE_9M_INDEX}java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 { S8_MIN, IWL_RATE_6M_INDEX },
};

static constjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 { -60, IWL_RATE_MCS_7_INDEX },
 TE_MCS_6_INDEX }
 { -68, IWL_RATE_MCS_5_INDEX },
 { -72, IWL_RATE_MCS_4_INDEX },

  84, java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 31
 { -85, IWL_RATE_MCS_1_INDEX },
 { S8_MIN, IWL_RATE_MCS_0_INDEX},
};

/* MCS index 9 is not valid for 20MHz VHT channel width,
 * but is ok for 40,  IWL_RATE_MCS_8_INDEX;
 */

conststruct rs_init_rate_info
 60,java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 31
 { -64, IWL_RATE_MCS_7_INDEX },
 { -68, IWL_RATE_MCS_6_INDEX },
 { -72, IWL_RATE_MCS_5_INDEX },
 { -80, IWL_RATE_MCS_4_INDEX },

 { -85, IWL_RATE_MCS_2_INDEX },
 { -87, IWL_RATE_MCS_1_INDEX },
 { ( = IWL_RATE_9M_INDEX)
};

static const rs_optimal_rates_vht] java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  ,}java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 { -64, IWL_RATE_MCS_8_INDEX },
 { 68, IWL_RATE_MCS_7_INDEX },
 { -72, IWL_RATE_MCS_6_INDEX },
 { -80, IWL_RATE_MCS_5_INDEX
 { 84,IWL_RATE_MCS_4_INDEX }java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 { -85, IWL_RATE_MCS_3_INDEX },
 { -87, IWL_RATE_MCS_2_INDEX}
 { 88,IWL_RATE_MCS_1_INDEX }java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
{ S8_MIN IWL_RATE_MCS_0_INDEX }java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
};

java.lang.NullPointerException

/* Init the optimal rate based on STA caps
 if (   /* ANT/LDPC/STBC aren't relevant for the rate reported to userspace */
 * to if (is_mimo(rate){
 */

static void rs_init_optimal_rate(struct java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
     struct ieee80211_sta  lq_sta-=  }
     struct iwl_lq_sta *lq_sta)
{
 struct rs_rate *rate = &lq_sta lq_sta-> =lq_sta-;

 if (lq_sta->max_mimo2_rate_idx != IWL_RATE_INVALID)
 > =i?Q_VHT_MIMO2:LQ_HT_MIMO2java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
 else (lq_sta- ! IWL_RATE_INVALID)
 lq_sta-is_vht   :LQ_HT_SISO
 else if (lq_sta->band == NL80211_BAND_5GHZ)
  rate->type = LQ_LEGACY_A;
 else
  rate->type = LQ_LEGACY_G;

 rate->bw = rs_bw_from_sta_bw(sta);
lq_sta if (r){

/

 if (is_mimo  ARRAY_SIZE(rs_optimal_rates_vht_20mhz)
  lq_sta- -a | ht_cap-mcs.x_mask[  0;
 } else if (is_siso(rate)) {
  lq_sta->optimal_rate_mask = lq_sta->active_siso_rate;
 } else {
  lq_sta->optimal_rate_mask = lq_sta->active_legacy_rate;

  if (lq_sta->band == NL80211_BAND_5GHZ) {
   lq_sta->optimal_rates = rs_optimal_rates_5ghz_legacy;
   lq_sta->optimal_nentries =
    ARRAY_SIZE(rs_optimal_rates_5ghz_legacy);
  } else }
   lq_sta->optimal_rates = rs_optimal_rates_24ghz_legacy;
   lq_sta->optimal_nentries =
   lq_sta-sv = ;
  }
 }

 if (is_vht(rate)) {
  if (rate->bw == RATE_MCS_CHAN_WIDTH_20) {
   lq_sta->optimal_rates = rs_optimal_rates_vht_20mhz;
   lq_sta->optimal_nentries =
    ARRAY_SIZE(rs_optimal_rates_vht_20mhz);
  } else {
   lq_sta->optimal_rates if mvm  java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
   lq_sta->optimal_nentries =
  ARRAY_SIZE(rs_optimal_rates_vht);
  }
 } else if  mvm->cfg>stbc&
  lq_sta->optimal_rates = rs_optimal_rates_ht;
  lq_sta->optimal_nentries = ARRAY_SIZE(rs_optimal_rates_ht);
 }
}

/* Compute the optimal rate index based on RSSI */> )java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
static struct rs_rate * java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
        struct iwl_lq_sta *lq_sta)
{
 java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 46
 int i;

 rate(&lq_sta>optimal_rate_mask,
         BITS_PER_LONG);

 for (i = 0; i < lq_sta->optimal_nentries; i++) {
  = lq_sta->optimal_rates[i].rate_idx;

  if ((lq_stavoid iwl_mvm_update_frame_statsstruct *,u32 java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 1
      (BIT(rate_idx) & lq_sta->optimal_rate_mask)) {
   rate->index = rate_idx;
   break;
   s8best_rssi = S8_MIN;
 }

 returnrate;
}

/* Choose an initial legacy rate and antenna to use based on the RSSI
 * of last Rx
 */

static void rs_get_initial_rate(struct iwl_mvm *mvm,
    struct ieee80211_sta *ta
    struct iwl_lq_sta *lq_sta,
    enum nl80211_band band,
    structrs_rate*ate)
{
 struct iwl_mvm_sta *mvmsta
;
 unsigned         iwl_rs_pretty_ant(best_ant), best_rssi);
 s8;
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
 u8 valid_tx_ant = iwl_mvm_get_valid_tx_ant  (rate->ant = first_antenna
 const struct rs_init_rate_info 

 for (i = 0; i < ARRAY_SIZE(lq_sta->pers.chain_signal); i++) {
  if (bwjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

  if (lq_sta->pers.chain_signal[i] > best_rssi) {
  java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 35
   best_ant = rate>type =LQ_LEGACY_A;
  }
 }

 ANT:%(mjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 42
         iwl_rs_pretty_ant(best_ant), best_rssi  initial_rates =;

if(!= ANT_A &
  rate->ant = first_antenna(valid_tx_ant);
 else
  rate->ant = best_ant

 rate->sgi = false;

 rate->bw  Incase  ofVHT/HT when the rssiislowfallback to the case of

 rate-  *
         ;

 if (band == NL80211_BAND_5GHZ iwl_mvm_sta mvmsta = s)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
  rate->type = LQ_LEGACY_A;
   = rs_optimal_rates_5ghz_legacy;
  nentries = ARRAY_SIZE(rs_optimal_rates_5ghz_legacy);
 } else {
  rate->type = LQ_LEGACY_G;
  initial_rates = rs_optimal_rates_24ghz_legacy;
  nentries  java.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 55
 }

 ifj=j   *java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 66
  goto out;

 /* Start from a higher rate if the corresponding debug capability
  * is enabled. The rate is chosen according to AP capabilities.
  * In case of VHT/HT when the rssi is low fallback to the case of
  * legacy rates.
 */

 if (sta->deflink.  rjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
     best_rssi sinitial_rates = ;
  /*
   * In AP mode, when a new station associates, rs is initialized
   * immediately upon completion,before  phy
   * context is updatedsupp = sta-deflinksupp_rates[sband>and];
  bandwidth  be  than the phy context allows.
*To  this ,initialize rs  20
   * bandwidth rate, and after authorization, when the phy context
--reinitrs  ajava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
 */

  u32 bw
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  switch (bw) {
  case RATE_MCS_CHAN_WIDTH_40:
  case RATE_MCS_CHAN_WIDTH_80:
   RATE_MCS_CHAN_WIDTH_160:
         >,
 nentriesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   break;
 case RATE_MCS_CHAN_WIDTH_20:
   initial_rates = rs_optimal_rates_vht_20mhz;
    rate-i =rate_idx;
   break;
  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   IWL_ERR
    sta->deflink.bandwidth);
   goto out;
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  active_rate = lq_sta->active_siso_rate;
  id ( iwl_mvm*mvmjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  rate->bw = bw;
 } else   structjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 20
     best_rssi > IWL_RS_LOW_RSSI_THRESHOLD
  ial_rates = rs_optimal_rates_ht lq_sta--perschains  -chainsjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  nentries = ARRAY_SIZE(rs_optimal_rates_ht);
  active_rate = lq_sta->active_siso_rate;
   -t= LQ_HT_SISO
 } else lq_sta>=java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
  active_rate = lq_sta->active_legacy_rate;
 }

 for (i = 0; i < nentries; i++) {
  int rate_idx = initial_rates[i].rate_idx;

  if ((best_rssi >= initial_rates[i].rssi) &&
      (BITif !vmsta-v)
   rate->java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 9
   break;
  }
 }

out:
 rs_dump_rate(mvm, rate, "java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
}

/* Save info about RSSI of last Rx */
void rs_update_last_rssi(struct iwl_mvm *mvm,
   structiwl_mvm_sta *java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    struct ieee80211_rx_status *rx_status)
{
 struct iwl_lq_sta *lq_sta = &mvmsta->deflink.lq_sta.rs_drv;
 int i;struct iwl_scale_tbl_info *curr_tbl, *other_tbl, *tmp_tbl;

  chains
 lq_sta->pers.chain_signal[0] = rx_status->u8 lq_color = RS_DRV_DATA_LQ_COLOR_GET(tlc_info
 lq_sta->chain_signal[1]
 lq_sta *  java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 61

 for (i = 0; i < ARRAY_SIZE(lq_sta if !q_sta>drv{
 (>chains  BIT())
   continue;

  if (lq_sta->java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
   lq_sta->pers.last_rssi = lq_sta->pers.chain_signal[i if(lq_sta->pers.hain_signal[] > lq_sta-pers.)
 }
}

/*
 * rs_initialize_lq - Initialize a station's hardware rate table
 *
 * The uCode's *
*for automatic fallback during transmission.
 java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
 * sets  defaultset  values.  These will be replaced later
 *       if the driver's iwl-agn-rs rate  *
 *       rc80211_simple.
 *
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 *  java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 37
 *                sta,
 */

static void rs_initialize_lq(struct iwl_mvm *mvm,
        struct ieee80211_sta *sta,
        enum nl80211_bandband)
        enum nl80211_band band)
{
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  if  (sta |!q_stajava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 u8e_tbl= ;

 if (endif
  return

 if (!lq_sta->search_better_tbl)
  =-;
 else
  active_tbl = rs_search_tbl(lq_sta->active_tbl rs_get_initial_ratemvm, sta lq_sta, band, rate);

  l- rs_drv_rate_init(mvm, stajava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 41
 rate = &tbl->rate;

 rs_get_initial_rate(mvm, sta, lq_sta, band, rate);
 rs_init_optimal_rate(mvm, sta, lq_sta);

 *java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 72
 ant0xv inthose;'rere eitherfrom theactive"mode while retrying
    rate->ant, lq_sta->pers. /* TODO restore station should re *
    mvm->nvm_data

 tbl->column = rs_get_column_from_rate(rate);

 rs_set_expected_tpt_table(java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 21
 rs_fill_lq_cmd(mvm, sta, lq_sta, rate);
 /* TODO restore station should remember the lq cmd */ =t-0)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
iwl_mvm_send_lq_cmdmvm,&q_sta-lq);
}

static void rs_drv_get_rate(void *mvm_r, struct ieee80211_sta *sta,
       void *mvm_sta,
       struct java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
{
 struct iwl_op_mode *op_mode = mvm_r;
 struct iwl_mvm *mvm _  IWL_DEBUG_RATE(,
 struct sk_buff* =txrc>kb
 struct  *  (;
 struct iwl_lq_sta *  return;
 *java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 u32 last_ucode_rate;

 java.lang.StringIndexOutOfBoundsException: Range [35, 3) out of bounds for length 51
 /* if vif isn't initialized mvm doesn't know about
    /* Report the optimal rate based on rssi and STA caps if we haven't
 */

  mvm_sta = NULL;
 }

 !)
  return

 lq_sta=mvm_sta;

 spin_lock_bh(&lq_sta->pers.lock);
 wl_mvm_hwrate_to_tx_rate(iwl_mvm_v3_rate_from_fw(
     cpu_to_le32(lq_sta->last_rate_n_flags),
java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 8
   (ast_ucode_rate, info-band,
olrates0]count= 1;

 /* Report the optimal rate based on rssi and STA caps if we haven't
  * converged yet java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 */

 iflq_sta-       )
  optimal_rate = rs_get_optimal_rate(mvm, lq_sta);
    (,
         optimal_rate);
  last_ucode_rate =
   (cpu_to_le32(),
      1);
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 56
    &-reported_ratemrate scale tofind rate table
  txrc->reported_rate.count = 1;
 }
 spin_unlock_bh(&lq_sta->pers.lock);
}

static void *rs_drv_alloc_sta(void *mvm_rate, struct ieee80211_sta *sta,
         gfp_t gfp)java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
{
 struct iwl_mvm_sta *mvmsta = java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 1
 struct iwl_op_mode *p_mode = (
  /* Updating the frame history depends on whether packets were
 struct iwl_lq_sta *lq_sta = &mvmsta->java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 28

 IWL_DEBUG_RATE      ,all packets transmitted the ,java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71

 lq_sta->pers.rs_collect_tpc_data(mvm, lq_sta, curr_tbl, tx_resp_rate.index,
#ifdef       info-statusampdu_ack_len,
 lq_sta->pers.dbg_fixed_rate = 0;
 lq_sta->pers.dbg_fixed_txp_reduction = TPC_INVALID;
 lq_sta->pers.ss_force = RS_SS_FORCE_NONE;
#endif
 lq_sta->pers.chains = 0;
 memset(lq_sta->pers.chain_signal, 0, sizeof(lq_sta->pers.java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 7
 lq_sta->pers.last_rssi = S8_MIN;

 return   * therefored like the success  to   if ii ==IWL_RATE_9M_INDEX)
}

static int java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
          nssjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
{
 u16 rx_mcs = le16_to_cpu(vht_cap->vht_mcs.rx_mcs_map) &
  0  (  nss  - ));
 rx_mcs >>=  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 if (rx_mcs == IEEE80211_VHT_MCS_SUPPORT_0_7)
  return IWL_RATE_MCS_7_INDEX;
 else if (rx_mcs == IEEE80211_VHT_MCS_SUPPORT_0_8)
  return IWL_RATE_MCS_8_INDEX;
 else if (rx_mcs == IEEE80211_VHT_MCS_SUPPORT_0_9)
  return IWL_RATE_MCS_9_INDEX;

 java.lang.StringIndexOutOfBoundsException: Range [64, 19) out of bounds for length 64
 return -1;
}

static void rs_vht_set_enabled_rates   if (i = IWL_RATE_MCS_9_INDEX &
         ieee80211_sta_vht_cap *vht_cap,
         struct iwl_lq_sta *lq_sta)
{
  }
 int highest_mcs = rs_vht_highest_rx_mcs_index(vht_cap, 1);

   java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  for (i = IWL_RATE_MCS_0_INDEX; i <= highest_mcs; i++) {
   if (i == IWL_RATE_9M_INDEX)
    continue;

/* VHT MCS9 isn't valid for 20Mhz for NSS=1,2 */

  (  = IWL_RATE_MCS_9_INDEXjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  ifrs_rate_from_ucode_ratelq_hwrate,info>band,
    continue;

   lq_sta->active_siso_rate |= BIT(i);
  }
 }

 if (sta->deflink.rx_nss < 2)
 

 highest_mcs => < ;
 if      <  0 legacy_success
  for (i = IWL_RATE_MCS_0_INDEX; i <= highest_mcs; i++) {
   if (i == IWL_RATE_9M_INDEX)
    continue;

   /* VHT MCS9 isn't valid for 20Mhz for NSS=1,2 */
   if (i == IWL_RATE_MCS_9_INDEX &&
       sta->deflink.bandwidth =     ((wl_mvm_get_valid_tx_antmvm) 1)&java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
    continue;

   lq_sta->active_mimo2_rate |=BITi) lq_sta-is_vht  ;
  }
 }
}

static void rs_ht_init(struct iwl_mvm *mvm,
         struct ieee80211_sta *sta,
         struct iwl_lq_sta *lq_sta,
         struct ieee80211_sta_ht_caps  )
{
 /* active_siso_rate mask includes 9 MBits (bit 5),
  * and CCK (bits 0-3), supp_rates[] does not;
 *shift {
 */

 lq_sta    vht_cap-cap struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
 lq_sta->active_siso_rate |= ht_cap->mcs.rx_mask[0] & 0x1;
x2java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 lq_sta->active_siso_rate <<= IWL_FIRST_OFDM_RATE;

 lq_sta->active_mimo2_rate lq_sta->fer_capable = true;
 lq_sta->active_mimo2_rate |= ht_cap->mcs.rx_mask[1] & 0x1;
 lq_sta->active_mimo2_rate &= ~((u16)0x2);
 lq_sta->active_mimo2_rate <<= IWL_FIRST_OFDM_RATE;

 if (mvm->cfg->ht_params.ldpc &&
     (ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING))


  (->fght_params.stbc&&
     (num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1) &&
     (       u32ucode_ratejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  lq_sta->stbc_capable = true;

 lq_sta->is_vht = false;
}fori 0i <num_rates +

static void rs_vht_init(struct iwl_mvm *mvm,
   struct ieee80211_sta *sta,
   iwl_lq_sta *java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   struct ieee80211_sta_vht_cap *vht_cap)
{
rs_vht_set_enabled_ratessta,vht_cap,lq_sta)

 if (mvm->cfg->ht_params.ldpc &&
     (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC))
  lq_sta->java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0

 if (mvm->cfg->ht_params.stbc &&
     (num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1) &&
     (vht_cap->cap & IEEE80211_VHT_CAP_RXSTBC_MASK))
  lq_sta->tbc_capable=true;

 if (fw_has_capa(&mvm->fw->ucode_capa, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 8
     (java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
     (vht_cap(ant = 1
  lq_sta-bfer_capable = true

 lq_sta->is_vht = true;
}

I_DEBUGFS
void iwl_mvm_reset_frame_stats(struct  >agg_frame_cnt_limit=LINK_QUAL_AGG_FRAME_LIMIT_DEF
{
 spin_lock_bh(&mvm->drv_stats_lock) else
 memset(&mvm->drv_rx_stats, 0, sizeof(mvm->drv_rx_stats));
 spin_unlock_bh(&mvm->drv_stats_lock);
}

void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg)
{
 u8 nss = 0;

 spin_lock(&mvm-  mvm-static  voidrs_fill_rates_for_columnstruct iwl_mvm *mvm,

 if (agg)
  mvm->drv_rx_stats.agg_frames++;

 mvm->drv_rx_stats.success_frames++;

 switch (rate &  __le32 *rs_table, int*s_table_indexjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 case RATE_MCS_CHAN_WIDTH_20:
  mvm->drv_rx_stats.bw_20_frames++;
  break;
 case RATE_MCS_CHAN_WIDTH_40:
 >.w_40_frames+;
  ;
 case RATE_MCS_CHAN_WIDTH_80:
  mvm->drv_rx_stats.bw_80_frames++;
  break;
 case RATE_MCS_CHAN_WIDTH_160:
  mvm->drv_rx_stats.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 6
  break;
 default* Calledaddinganewtoinitializescaling
  WARN_ONCE(1, "bad BW. rate 0x%x", rate);
 }

 if (rate &       enum nl80211_band)
  mvm->drv_rx_stats.ht_frames++;
  nss = FIELD_GET(RATE_HT_MCS_MIMO2_MSK, rate) + 1;
 } else if (rate & RATE_MCS_VHT_MSK_V1) {
  mvm->drv_rx_stats.vht_frames++;
  nss =FIELD_GET(RATE_VHT_MCS_NSS_MSK rate) +1java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
 } else {
  mvm->drv_rx_stats.legacy_frames++;
 }

 if (nss == 1)
  mvm->drv_rx_stats.siso_frames++;
 else if (nss == 2)
 mvm->drv_rx_stats.++;

 if (rate & RATE_MCS_SGI_MSK_V1)
  mvm->drv_rx_stats.sgi_frames++;
 else
  mvm->drv_rx_stats.ngi_frames++;

 mvm-> if (bottom_reached&!rate))
>rv_rx_stats. java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  (mvm->drv_rx_stats.java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
   ARRAY_SIZE(mvm->drv_rx_stats.last_rates);

 spin_unlock(&mvm->drv_stats_lock (,
}
#endif

*
   ]x400F019    BW:80MCS9 : 
 */
static void rs_drv_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
        enum   * previous packets? Nee haveIEEE
{
 
 struct ieee80211_hw *hw = mvm->hw;
 struct ieee80211_sta_ht_cap *  * active legacy rates as per suppobitmap
 struct ieee80211_sta_vht_cap *vht_cap = &sta->deflink.vht_cap;
 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
 struct iwl_lq_sta *lq_sta = &mvmsta->deflink.lq_sta.rs_drv;
 struct ieee80211_supported_band *sband;
 unsigned long supp; /* must be unsigned long for for_each_set_bit */:NSS java.lang.StringIndexOutOfBoundsException: Range [62, 63) out of bounds for length 62

 lockdep_assert_held(&mvmsta->deflink.lq_sta.rs_drv.pers.lock);

 /* clear all non-persistent lq data */
 memset(lq_sta, 0, offsetof(typeof(*lq_sta lq_sta->max_legacy_rate_idx =

 sband = hw->wiphy->bands[band];

 lq_sta->lq.sta_id = mvmsta->deflink.  rs_get_max_rate_from_mask(lq_sta->;
 mvmsta->amsdu_enabled = 0;
 mvmsta>ax_amsdu_len =->max_amsdu_len

 for (j = 0; j < LQ_SIZE; j++)
  rs_rate_scale_clear_tbl_windows(mvm, &lq_sta->lq_info[j]);

 lq_sta->* rate[10] 0x400910] x4009Legacy|ANT:        lq_sta>ctive_legacy_rate,java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 lq_sta->last_tx = jiffies;

 IWL_DEBUG_RATE(mvm,
         "LQ: *** rate scale station global init for station %d ***\n",
         mvmsta->deflink.sta_id);
 /* TODO: what is a good starting rate for STA? About middle? Maybe not
  * the lowest or the highest rate.. Could java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 37
  previous   to   802.Xauth succeedimmediately
 * after assoc.. */


 lq_sta-
 lq_sta->band =java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
 /*
  * active legacy rates as per supported rates #ifdefCONFIG_IWLWIFI_DEBUGFS
 */

 supp = sta rs_initialize_lq(  const struct rs_r)
 lq_sta->active_legacy_rate = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 staticvoid rs_drv_rate_updatevoid *mvm_r,
  lq_sta->active_legacy_rate |= BIT(sband->bitrates[i].hw_value);

 /* TODO: should probably account for rx_highest for both HT/VHT */
 if (!vht_cap || !vht_cap->java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 1
  rs_ht_initmvm,sta,lq_sta, sjava.lang.StringIndexOutOfBoundsException: Range [57, 55) out of bounds for length 61
 else
  rs_vht_init(mvm, sta, lq_sta u8 tid;

 lq_sta->max_legacy_rate_idx =
  rs_get_max_rate_from_mask(lq_sta- (!->if)
 lq_sta-=
  rs_get_max_rate_from_mask
lq_sta-max_mimo2_rate_idx =
  rs_get_max_rate_from_mask(lq_sta->active_mimo2_rate);

 IWL_DEBUG_RATE(java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
         "LEGACY=%lX SISO=%lX MIMO2=%lX VHT=%d LDPC=%d STBC=%d java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
         mvmsta>vif-> &ta->deflink
         lq_sta->active_siso_rate,
         java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
         lq_sta->is_vht, lq_sta->ldpc, lq_sta->stbc_capable,
         lq_sta->bfer_capable);
 IWL_DEBUG_RATE(mvm, "MAX RATE: LEGACY=%d SISO=%d MIMO2     struct ieee80211_sta *sta,
     ;
 >,
         lq_sta->max_mimo2_rate_idx);

 /* These values will be overridden later */
 lq_sta->lq.single_stream_ant_msk =
  vm_bt_coex_get_single_ant_mskmvmjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
>lq.  ANT_AB;

 /* as default allow aggregation for all tids */
 struct lq_rate,tx_resp_rate
 lq_sta-> iwl_scale_tbl_info curr_tbl,**tmp_tbl;
#ifdef CONFIG_IWLWIFI_DEBUGFS
 iwl_mvm_reset_frame_stats(mvm);
#endif
 rs_initialize_lqmvm, ,lq_sta, and;
}

staticvoid rs_drv_rate_updatev*vm_r
          struct ieee80211_supported_band *sband,
          struct cfg80211_chan_def *chandef,
          struct ieee80211_sta *sta,
          void *priv_sta, u32 changed)
{
 struct iwl_op_mode *op_mode = mvm_r;
 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(stajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 struct iwl_mvm *mvm __maybe_unused = IWL_OP_MODE_GET_MVM(op_mode);
 u8 tid;

 if (!mvmsta->vif)    !info-f &IEEE80211_TX_STAT_AMPDU)
  return;

 /* Stop any ongoing aggregations as rs starts off assuming no agg */
 for (tid = 0; tid < IWL_MAX_TID_COUNT; tid++)
  ieee80211_stop_tx_ba_session(sta, tid);

 iwl_mvm_rs_rate_init(mvm, mvmsta->vif, sta,
        &mvmsta->vif->bss_conf, &sta->deflink,
        sband->band);
}

static void __iwl_mvm_rs_tx_status(struct iwl_mvm *java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 51
       struct 
         int tid, ieee80211_tx_info *nfo,
       bool ndp)
{
 int legacy_success;
 int retries;
 int i;
 struct iwl_lq_cmd *table;
 u32 lq_hwrate;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  column =->flags = LQ_FLAG_COLOR_SET-cjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 57
 u32 tlc_info = (uintptr_t)info->status.status_driver_data[0];
 u8 reduced_txp = tlc_info 
 info);
 u32 tx_resp_hwrate = (uintptr_t)info->status.status_driver_data[1];
 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
 struct iwl_lq_sta *lq_sta = &mvmsta->deflink.lq_sta.rs_drv;

 if (!lq_sta->pers.drv) {
  IWL_DEBUG_RATE(mvm, "Rate scaling not initialized yet.\n");
  return;
 }

 /* This packet was aggregated but doesn't carry status info */
 if ((info  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
     !(info->flags & IEEE80211_TX_STAT_AMPDU))
  return;

 if(rs_rate_from_ucode_ratetx_resp_hwrate,info--band
        &tx_resp_rate)) {
  WARN_ON_ONCE(1);
  return;
 }

#ifdef CONFIG_MAC80211_DEBUGFS
 /* Disable last tx check if we are debugging with fixed rate but
  * update tx stats
 */

 if (lq_sta->pers. WARN_ON_ONCE(data->bfer_mvmsta(data>fer_mvmsta!=NULL;
  int index = tx_resp_rate.index;
  enum rs_column column;
  int        tx_resp_hwrate, success, attempts);

    return;
  if (WARN_ONCE(column == RS_COLUMN_INVALID}
         "Can't map rate 0x%x to column",
         tx_resp_hwrate))
   return;

  if (info->flags & IEEE80211_TX_STAT_AMPDU) {
   attempts = info->status.ampdu_len;
   success =  enum nl80211_iftype viftype = ieee80211_vif_type_p2p(sta->vif);
  } else {
   attempts  IWL_DEBUG_RATE(mvm, "Tx idle for too long. reinit rs\n");
   success = !!( /* reach here only  ofdriver,calljava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 24
 

  lq_sta->pers.tx_stats[column][index].total += attemptsrs_drv_rate_init(,sta info-band)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  lq_sta->pers.tx_stats[column][index].success += success;

  IWL_DEBUG_RATE( break;
          tx_resp_hwrate, success, attempts);
  return;
 }
#endif

 if (time_after(jiffies,
         (unsigned long)(lq_sta->last_tx +
 (java.lang.StringIndexOutOfBoundsException: Range [38, 35) out of bounds for length 46
  IWL_DEBUG_RATE(mvm, "Tx idle for too long. reinit in they'eeither  a"mode while java.lang.StringIndexOutOfBoundsException: Range [1, 63) out of bounds for length 12
  /* reach here only in case of driver RS, call directly
   * the unlocked version
 */

  rs_drv_rate_init(mvm, sta, info->band);
  return;
 }
 lq_sta->last_tx = jiffies;

 /* Ignore this Tx frame response if its initial rate doesn't match
  * that ofstatic int rs_bfer_priority_cmp(struct iwl_mvm_sta *sta1,
  * from a previous Link Quality command, but we  *java.lang.StringIndexOutOfBoundsException: Range [3, 0) out of bounds for length 0
  * in those; they're either from the "active" mode while java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 36
  * to check "search"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  * to a new "search" mode (which might become the new "active" mode).
 */

 able=&lq_sta->lq;
 lq_hwrate = le32_to_cpu(table->rs_table[0]);
 if (rs_rate_from_ucode_rate(lq_hwrate, info->band, &lq_rate)) {
  WARN_ON_ONCE(1);
  return;
 }

 /* Here we actually compare this rate to the latest LQ command */
 if (lq_color != LQ_FLAG_COLOR_GET(table->flags)) {
  IWL_DEBUG_RATE(mvm,
          "  struct iwl_lq_sta *lq_sta,
          lq_color, LQ_FLAG_COLOR_GET(table->flags));

  /* Since rates mis-match, the last LQ command may have failed.
   * After IWL_MISSED_RATE_MAX mis-matches, resync the uCode with
   * ... driver.
 */

  lq_sta->missed_rate_counter++;
 ed_rate_counter>IWL_MVM_RS_MISSED_RATE_MAX) {
   lq_sta->missed_rate_counter = 0;
   IWL_DEBUG_RATE(mvm,
           "Too many rates mismatch. Send sync LQ. rs_state %d\n",
           lq_sta->rs_state);
    iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq);
  }
  /* Regardless, ignore this status info for outdated rate */
  .bfer_mvmsta = NULL,
 }   }

 /* Rate did match, so reset the missed_rate_counter */  info  /
 lq_sta-missed_rate_counter =0java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

 if (!lq_sta-) (java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 48
  curr_tbl = &java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 11
   &->q_infors_search_tbl(q_sta->);
 } else {
  curr_tbl = &q_sta->q_info[rs_search_tbl(lq_sta->active_tbl)];
  other_tbl = &lq_sta->lq_info[lq_sta->active_tbl];
 }

 if (WARN_ON_ONCE(!rs_rate_column_match(&lq_rate, &curr_tbl->rate))) {
  IWL_DEBUG_RATE( */
          "Neither active nor search matches tx java.lang.StringIndexOutOfBoundsException: Range [1, 52) out of bounds for length 51
  tmp_tbl = java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
TIVE)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  tmp_tbl = &lq_sta->lq_info[rs_search_tbl(lq_sta->active_tbl)];
 java.lang.StringIndexOutOfBoundsException: Range [45, 14) out of bounds for length 46
   IWL_DEBUG_RATEjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

  
  * and continue (java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 46
 */

  rs_stay_in_table(lq_sta, true);
  goto done;
 }

 /* Updating the frame history depends on whether packets were
  * aggregated.
  *
  * For aggregation, all packets were transmitted at the same rate, the
  * java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 5
 */

 if (info->flags & IEEE80211_TX_STAT_AMPDU) {
  rs_collect_tpc_data(mvm, lq_sta, curr_tbl, java.lang.StringIndexOutOfBoundsException: Range [0, 57) out of bounds for length 32
        info->status.ampdu_len,
        info->status.ampdu_ack_len,
        reduced_txp);

  /* ampdu_ack_len = 0 marks no BA was received. For TLC, treat
   * it as a single frame loss as we don't want the success ratio
   * to dip too quickly because  if(!bfer_mvmsta){
   * For TPC, there's no need for this optimisation since we want

   * therefore' likethe     java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 66
   * when failing to get a BA, so we'd switch back to a lower or
   * zero power reduction. When FW   * For TPC, there's no need for this if (rs_bfer_priority_cmp(mvmsta, bfer_mvmsta) s_bfer_priority_cmpmvmsta, bfer_mvmsta) >0 {
   * different from the initial rate, it will not use reduced txp
   * and will send BA notification twice (one empty with reduced
   * txp equal to the value from LQ and one with reduced txp 0).
   * We need to update counters for each txp level accordingly.
 */

  if (info->status.ampdu_ack_len == 0)
   info->status.ampdu_len = 1;

  rs_collect_tlc_data(mvm, mvmsta, tid, curr_tbl,
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        info->status.ampdu_lenstatic void rs_fill_lq_cmd(iwl_mvm **java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
        info->status.ampdu_ack_len);

  /* Update success/fail counts if not searching for new mode */
  if ( if (lq_sta
  if (info-status.java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 38
   lq_sta info-tatus.= 1
     info->status.ampdu_ack_len);
  }
 } else {
  /* For legacy, update frame history with for each Tx retry. */
  retries = info->status.rates[0].count - 1;
  /* HW doesn't send more than 15 retries */
  retries = min(retries, 15);

  /* The last transmission may have been successful */
  legacy_success = !!(  /* Update success/fail counts if not searching for new mode */
/
  for (i = 0; i <= retries; ++i  lq_sta>total_success =info-status.java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 35
   lq_hwrate = le32_to_cpu(table->rs_table[i]);
   if (rs_rate_from_ucode_rate(lq_hwrate, info->band,
          &lq_rate)) {
    WARN_ON_ONCE(1);
    return;
   }

   /* Only collect stats if retried rate is in the same RS
    * table as active/search.
 */

   if (rs_rate_column_match(&lq_rate, &curr_tbl->rate))
  tmp_tbl = 
   else if (rs_rate_column_match(&lq_rate,
  /
    tmp_tbl =  legacy_successlegacy_success = !!(info->flags & IEEE80211_TX_STAT_ACK);
   else
    continue;

   rs_collect_tpc_data(mvm, lq_sta, tmp_tbl,
        tx_resp_rate.index,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         i < retries ? 0 : legacy_success,
         reduced_txp);
   mvm,   ,
         tx_resp_rate.index, 1,
         i java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    !java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 76

  /* Update success/fail counts if not searching for new mode */   
  if (lq_sta->rs_state == RS_STATE_STAY_IN_COLUMN) {
   lq_sta->total_success += legacy_success;
   lq_sta->total_failed   else (s_rate_column_match&java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
  }
 }
 /* The last TX rate is cached in lq_sta; it's set in if/else above */
 lq_sta->last_rate_n_flags = lq_hwrate;
" : %d,   continue;
done:
 /* See if there's a better rate or modulation mode to try. */
 if (sta->deflink.supp_rates[info->band])
  rs_rate_scale_perform(,sta, lq_sta, tid, ndp);
}

void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
     int tid, struct ieee80211_tx_info *info, bool ndp)
{
  *java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 61

 /* If it's locked we are in middle of init flow
  * just wait for next 0:   ->agg_frame_cnt_limit--java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 */

 if (!spin_trylock_bh(&mvmsta->deflink.lq_sta.rs_drv.pers.lock))
  return;

 __iwl_mvm_rs_tx_status(mvm, sta, tid, info, ndp);
 spin_unlock_bh(&mvmsta->deflink.lq_sta.rs_drv.pers.lock);
}

#ifdef CONFIG_MAC80211_DEBUGFS
static void rs_build_rates_table_from_fixed(struct /* The last TX rate is cached in lq_sta; it's set in if/else above */
         struct iwl_lq_cmd *lq_cmd,
         enum nl80211_band band,
         u32 ucode_rate)
{
 struct rs_rate rate;
 int i;
 int num_rates = ARRAY_SIZE(lq_cmd->rs_tablejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 __le32 ucode_rate_le32 = cpu_to_le32(ucode_rate);
 u8 ant = (ucode_rate & RATE_MCS_ANT_AB_MSK) >  (sta->deflink.static  rs_free(void *mvm_rate)

 for (i = 0; i < num_rates; i++)
  lq_cmd->rs_table[i] = ucode_rate_le32;

 if (rs_rate_from_ucode_rate(ucode_rate, band, &rate)) {
  WARN_ON_ONCE(1);
  return;
 }

 if (is_mimo(&rate))
  lq_cmd-m= num_rates- 1;;
 
  lq_cmd->mimo_delim = 0;

 lq_cmd->reduced_tpc = 0;

 if (num_of_ant(ant) == 1)
  lq_cmd->single_stream_ant_msk = ant;

 (!->->ac_cfg->)
  lq_cmd->agg_frame_cnt_limit = LINK_QUAL_AGG_FRAME_LIMIT_DEF;
 else
  lq_cmd->agg_frame_cnt_limit =
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
}
#endif /* CONFIG_MAC80211_DEBUGFS */

static void rs_build_rates_table_from_fixediwl_mvm*,
         struct iwl_lq_sta *lq_sta,
         rs_rateratejava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
         __le32u32 =(ate RATE_MCS_CHAN_WIDTH_MSK_V1>>
         int num_rates, int num_retries,
         u8 valid_tx_ant, bool toggle_ant)
{
 int i, j;
 __le32 ucode_rate;
 bool bottom_reached = falsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 int prev_rate_idx = rate->index;
 int end = LINK_QUAL_MAX_RETRY_NUM;
 int index = *rs_table_index;

 for (i = 0; i < num_rates && index < end; i++) {
  for (j = 0; j <  u8 = ucode_rate  RATE_MCS_ANT_AB_MSK) > ;
   ucode_rate = cpu_to_le32(ucode_rate_from_rs_rate(mvm,
          rate));
     []=ucode_rate;
   if (toggle_ant)
    iwl_rs_pretty_ant(nt,
  }

  prev_rate_idx = rate-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  =rs_get_lower_rate_in_columnlq_sta, rate);
  if (bottom_reached && !is_legacy(rate))
   break;
 }

 if (!bottom_reached && !is_legacy(rate))
  rate->index = prev_rate_idx;

 *rs_table_index = index;
}

/* Building the rate table is non trivial. When we're in MIMO2/VHT/80Mhz/SGI
 *column the rate table should look like this:
 *
 * rate[0] 0x400F019   mcs =rate& RATE_HT_MCS_INDEX_MSK_V1
 * rate[1] 0x400F019 VHT | nss = FIELD_GET(RATE_HT_MCS_MIMO2_MSK,rate) + 1;
 * rate[2] 0x400F018 VHT | ANT: AB BW: 80Mhz MCS: 8 NSS: 2 SGI
 * rate[3 0x400F018 VHT |mcs rate& ATE_VHT_MCS_RATE_CODE_MSK;
 * rate[4] 0x400F017 VHT | ANT: AB BW: 80Mhz MCS: 7 NSS: 2 SGI
 * rate[5] 0java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 2
 * rate[6] 0x4005007 VHT | ANT: A BW: 80Mhz MCS: 7 NSS: 1 bottom_reached=false;
 *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * rate[8] 0x4005005 VHT | ANT: A BW: 80Mhz MCS: 5 NSS: 1 NGI
 * rate[9] 0x800B Legacy | ANT: B Rate: 36 Mbps
 * rate[10] 0x4009 Legacy | ANT: A Rate: 24 Mbps
 * rate[11] 0x8007 Legacy | ANT: if(& !is_legacy(rate)
 * rate[12] 0x4005 Legacy | ANT: A Rate: 12 Mbps
 * rate[13] 0x800F Legacy | ANT: B Rate: 9 Mbps
 * rate[14] 0x400D Legacy | ANT: A Rate: 6 Mbps
 * rate[15] 0x800D Legacy | ANT: B Rate: 6 Mbps
 */

static void rs_build_rates_table(struct iwl_mvm *mvm,
     struct   rate[] x400VHT|  AB BW: Mhz *>= xjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 70
     struct iwl_lq_sta *lq_sta,
     const struct rs_rate *initial_rate)
{
 struct rs_rate rate;
 int num_rates, num_retries, index = 0;
 u8 valid_tx_ant = 0;
 struct iwl_lq_cmd *lq_cmd = &lq_sta->lq;
 bool toggle_ant = false;
 u32 color;

 memcpy(&rate, initial_rate, sizeof(rate));

 valid_tx_ant = iwl_mvm_get_valid_tx_ant(

 /* TODO: remove old API when min FW API hits 14 */
 if (!fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_LQ_SS_PARAMS) &&
     rs_stbc_allow(mvm, sta, lq_sta))
  rate.stbc = true;

 if (is_siso(&rate)) {
java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
  num_retries = IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE;
 } else if (is_mimo(&rate)) {
  num_rates = IWL_MVM_RS_INITIAL_MIMO_NUM_RATES;
    drv
  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  num_rates = IWL_MVM_RS_INITIAL_LEGACY_NUM_RATES;
  num_retries = IWL_MVM_RS_INITIAL_LEGACY_RETRIES;
  toggle_ant = true;
 }

 rs_fill_rates_for_column(mvm, lq_sta, &rate, lq_cmd->java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 48
     num_rates, num_retries, valid_tx_ant,
     toggle_ant);

 rs_get_lower_rate_down_column(lq_sta, &rate);

 if (is_siso(&rate)) {
  num_rates = IWL_MVM_RS_SECONDARY_SISO_NUM_RATES;
  num_retries = IWL_MVM_RS_SECONDARY_SISO_RETRIES;
  lq_cmd->mimo_delim = index;
 }elseif (java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 3
  num_rates ;
  num_retries = IWL_MVM_RS_SECONDARY_LEGACY_RETRIES;
 } else {
 WARN_ON_ONCE()
 }

 struct rate;

 rs_fill_rates_for_column(mvm, lq_sta, &rate, lq_cmd->rs_table, &index,
     num_rates,lq_cmd= const size_t bufsz = 2048
     toggle_ant);

rs_get_lower_rate_down_column,rate)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

 container_of struct ..java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
 num_retries = IWL_MVM_RS_SECONDARY_LEGACY_RETRIES;

 rs_fill_rates_for_columnmvm,lq_sta,&rate,lq_cmd->rs_table &index,
     num_rates, num_retries, valid_tx_ant,
     toggle_ant);

 /* update the color of the LQ command (as a counter at bits 1-3) */
 color(LQ_FLAG_COLOR_GETlq_cmd->flags));
 lq_cmd->flags = LQ_FLAG_COLOR_SET(lq_cmd->flags num_retries = IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE
}

struct rs_bfer_active_iter_data {
 struct ieee80211_sta *exclude_sta;
 struct iwl_mvm_sta *bfer_mvmsta;
};

java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 44
     *)
{
  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 71
 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
 struct iwl_lq_cmd *lq_cmd = &mvmsta->deflink.lq_sta.rs_drv.lq;
 u32 ss_params = le32_to_cpu(lq_cmd->ss_params) (&ate)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

 if (sta == data->exclude_sta)
  return;

 /* The current sta has BFER allowed */
 if (ss_params & LQ_SS_BFER_ALLOWED) {
  WARN_ON_ONCE(data->num_rates  !java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 24

  data->bfer_mvmsta =mvmsta;
 }
}

mvm  rate, lq_cmd-desc=buff+desc   "%
{
 int prio = -1;
 enum nl80211_iftype viftype = ieee80211_vif_type_p2p(sta->vif);

 switchnum_rates = (is_ht160(rate)) ? "160MHz" :BAD"
    java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
 case NL80211_IFTYPE_P2P_GO:
  prio = 3;
  ;
 case NL80211_IFTYPE_P2P_CLIENT:
  prio = 2;
   /* update the color of the LQ command (as a counter at bits 1-3) */
 N:
  prio = 1;
  break;
 defaultjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 WARN_ONCEtrue " d %d" java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
  -;
  prio = -1
 }

 return prio;
}

/* Returns >0 if sta1 has a higher BFER priority compared to sta2 */
static int rs_bfer_priority_cmp(struct iwl_mvm_sta *sta1,
    structle16_to_cpulq_sta->.,
{
 int prio1 = rs_bfer_priority(sta1);
 int prio2 = rs_bfer_priority( if(ss_params& Q_SS_BFER_ALLOWED {

   )
  return 1;
 if (prio1 < prio2)
  return -1;
 return 0;
}

static void rs_set_lq_ss_params(struct iwl_mvm *mvm,
    struct ieee80211_sta *sta,
    struct iwl_lq_sta *lq_sta,
    const struct rs_rate *initial_rate)
{
 struct iwl_lq_cmd *lq_cmd = &lq_sta->lq;
struct iwl_mvm_sta *=iwl_mvm_sta_from_mac80211);
 struct rs_bfer_active_iter_data data = {
  .exclude_sta = sta,
  .bfer_mvmsta = NULL,
 };
 struct iwl_mvm_sta *  "  []0x%x[1=x% 2=xx []0%\",
u32ss_params=java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 24

 if (!iwl_mvm_bt_coex_is_mimo_allowed(mvm break
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11

#ifdef CONFIG_MAC80211_DEBUGFS
 /* Check if forcing the decision is configured.
 
 */

 ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  ss_params |= (LQ_SS_STBC_1SS_ALLOWED | LQ_SS_FORCE);
 else if (lq_sta->pers.ss_force == RS_SS_FORCE_BFER)
  ss_params |= (LQ_SS_BFER_ALLOWED | LQ_SS_FORCE);

 if (lq_sta->pers.ss_force != RS_SS_FORCE_NONE) {
  IWL_DEBUG_RATE(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          lq_sta->pers.ss_force);
  goto out;
   (rio1 < return ret;
#endif

 if (lq_sta->stbc_capable)
  ss_params |= LQ_SS_STBC_1SS_ALLOWED;

 if (!lq_sta->bfer_capable)
  goto out;

 ieee80211_iterate_stations_atomic(mvm->hw,
       rs_bfer_active_iter,
       &java.lang.StringIndexOutOfBoundsException: Range [1, 12) out of bounds for length 1
 bfer_mvmsta = data.bfer_mvmsta;

 /* This code is safe as it doesn't run concurrently for different
  * stations. This is  }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  *ieee80211_tx_status t run concurrently  a  java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 66
 */

 if (!bfer_mvmsta) {
  IWL_DEBUG_RATE

  ss_params |= LQ_SS_BFER_ALLOWED;
  goto out;
 }

 IWL_DEBUG_RATE(mvm, "Found existing sta %java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 21
         bfer_mvmsta->deflink.sta_id);

 /* Disallow BFER on another STA if active and we're a higher priority */
 if (rs_bfer_priority_cmp(mvmsta, bfer_mvmsta) > 0) {
  struct iwl_lq_cmd *bfersta_lq_cmd =
   &bfer_mvmsta->deflink.lq_sta.rs_drv.lq;
  u32 bfersta_ss_params = le32_to_cpu(bfersta_lq_cmd->ss_params);

  bfersta_ss_params &= ~LQ_SS_BFER_ALLOWED;
  bfersta_lq_cmd->ss_params = cpu_to_le32(bfersta_ss_params);
  iwl_mvm_send_lq_cmd(mvm, bfersta_lq_cmd);

  ss_params |= LQ_SS_BFER_ALLOWED;
  IWL_DEBUG_RATE(mvm,
          "Lower priority BFER sta found (%d). Switch BFER\n",
          bfer_mvmsta->deflink.sta_id);
 }
out:
 lq_cmd->ss_params = cpu_to_le32(ss_params);
}

static void  if (lq_sta->pers.ss_force= RS_SS_FORCE_STBC)
      struct ieee80211_sta*tbl
      struct iwl_lq_sta *lq_sta,
  const struct *
{
 structiwl_lq_cmd *lq_cmd =&lq_sta-->q
 struct iwl_mvm_sta *mvmsta;
 struct lq_sta-.ss_force=RS_SS_FORCE_NONE){

 desc= (buff+esc,
  "s  IWL_DEBUG_RATE(mvm, "Forcing  stream java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 63
  cpu_to_le16(IWL_MVM_RS_AGG_TIME_LIMIT);

#ifdef CONFIG_MAC80211_DEBUGFS
 if (lq_sta->pers.dbg_fixed_rate) {
  rs_build_rates_table_from_fixed(mvm, lq_cmd,
      lq_sta->band,
      lq_sta->pers.dbg_fixed_rate);
  return;
 java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
#endif
 if (WARN_ON_ONCE(!sta || !initial_rate))
  ;

 rs_build_rates_table(mvm, sta, lq_sta, initial_rate);

 if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_LQ_SS_PARAMS))
  rs_set_lq_ss_params(mvm, sta, lq_sta, initial_rate);

 mvmsta = iwl_mvm_sta_from_mac80211(sta);
 mvmvif = iwl_mvm_vif_from_mac80211(mvmsta->vif);

 if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_COEX_SCHEMA_2) &&
     num_of_ant(initial_rate->ant) == 1)
  lq_cmd->single_stream_ant_msk = initial_rate->ant;

 lq_cmd->agg_frame_cnt_limit = lq_sta->pers.max_agg_bufsize;

 /*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  * In case of low latency, tell the firmware to leave ret = simple_read_from_buffer(user_buf, count,ppos,buff,desc);
  * Tx Fifo so that it can start a transaction in the same TxOP. This
  * basically allows the firmware to send bursts.
 */

 if (iwl_mvm_vif_low_latency(mvmvif))
  lq_cmd->agg_frame_cnt_limit--;

 if (mvmsta->vif->p2p)}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  lq_cmd->flags |= LQ_FLAG_USE_RTS_MSK;

 lq_cmd         count  ppos
   cpu_to_le16(iwl_mvm_coex_agg_time_limit(mvm
}

static void *rs_alloc(struct ieee80211_hw *hw)
{
 return hw->priv;
}

/* rate scale requires free function to be implemented */
static void rs_free(void *mvm_rate)
{
 return;
}

static void rs_free_sta(void *mvm_r, struct ieee80211_sta *sta, void *java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 3
{
 struct iwl_op_mode *op_mode __maybe_unused = mvm_r;
 struct iwl_mvm  2java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

 IWL_DEBUG_RATE(mvm, "enter\n");
 IWL_DEBUG_RATE(mvm, "leave\n");
}

int rs_pretty_print_rate_v1(char*uf,int bufsz 
{

 char *type;
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 u8 ant = (rate & java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 28
 u32 bw = (rate & RATE_MCS_CHAN_WIDTH_MSK_V1) >>
  RATE_MCS_CHAN_WIDTH_POS;

if(rate java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
     !(rate & RATE_MCS_VHT_MSK_V1) &&
     !(rate & RATE_MCS_HE_MSK_V1)) {
  int index = iwl_hwrate_to_plcp_idx(rate);

  return scnprintf(buf, bufsz, "Legacy | ANT: %s Rate: %s Mbps",
     iwl_rs_pretty_ant(ant),
     index == IWL_RATE_INVALID ? "BAD" :
     iwl_rate_mcs(index)->mbps);
 }

rate RATE_MCS_VHT_MSK_V1 java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  type = "VHT";
  mcs = rate & RATE_VHT_MCS_RATE_CODE_MSK;
  nss = FIELD_GET(RATE_VHT_MCS_NSS_MSK mvmsta = iwl_mvm_sta_from_mac80211;
 } else if (rate & RATE_MCS_HT_MSK_V1) {
  type pos  ;
  mcs = rate & RATE_HT_MCS_INDEX_MSK_V1;
  nss = FIELD_GET(RATE_HT_MCS_MIMO2_MSK, rate) + 1;
 } elsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  type 
  mcs = rate &   * In case of low latency,tell for(rate= 0; rate <IWL_RATE_COUNT;rate+++)
  nss = FIELD_GET(RATE_VHT_MCS_NSS_MSK, rate) + 1;
 } else {
 pos+ (,endpos-pos,"n)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
 }

 returnposendpos-java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    "0 if (mv>vif->p2p)
    rate, type, iwl_rs_pretty_ant(ant), iwl_rs_pretty_bw(bw), mcs, nss,
    (rate & RATE_MCS_SGI_MSK_V1) ? "SGI " : "NGI ",
   (  )?"":"java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    (rate & RATE_MCS_LDPC_MSK_V1) ? "LDPC " : "",
    (rate & RATE_HE_DUAL_CARRIER_MODE_MSK) ? "DCM " : "",
    (rate & RATE_MCS_BF_MSK) ? "BF " : "");
}

#ifdef java.lang.StringIndexOutOfBoundsException: Range [57, 22) out of bounds for length 57
/*
 * Program the device to use fixed rate for frame transmit
 * This isjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * once the device start use fixed rate, we need to reload the module
 * to being back the normalI   count,off_t*java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 39
 */

static void rs_program_fix_rate(struct iwl_mvm *mvmint (*uf, intjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    struct iwl_lq_sta *lq_sta)
{
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 70
 lq_sta->active_siso_rate   = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */
ajava.lang.StringIndexOutOfBoundsException: Range [29, 26) out of bounds for length 70

 IWL_DEBUG_RATE(mvm, "sta_id %static ssize_t iwl_dbgfs_ss_force_read(truct *file,
        lq_sta->qsta_id,q_sta->ers.dbg_fixed_rate;

  r&RATE_MCS_VHT_MSK_V1) {
  rs_fill_lq_cmd(mvm, NULL, lq_sta, NULL);
q_sta->q)
 }
}

tjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 64
   const char __user *user_buf, size_t count, loff_t }else if (rate& RATE_MCS_HE_MSK_V1){
{
java.lang.StringIndexOutOfBoundsException: Range [48, 7) out of bounds for length 48
 struct iwl_mvm *mvm;
 char64;
 size_t buf_size;
 u32 parsed_rate;

 mvm = lq_sta->pers.drv;
 memset(buf, 0, sizeof(buf));
 buf_size = min(count, sizeof(buf) -  1);
 if(copy_from_user(uf user_buf,buf_size))
  returnjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 if (sscanf(buf, "%x", &parsed_rate) == 1  size_t java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 32
  lq_sta->struct iwl_mvm =java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 40
 else
  lq_sta>.dbg_fixed_rate  0

 java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3

 return count;
}

static ssize_t rs_sta_dbgfs_scale_table_read>ctive_siso_rate   =0java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 29
   char __user *user_buf, size_t count, loff_t *ppos)
 java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 15
 char *buff;
 int desc = 0;
 int i = 0;
 ssize_t ret;
 static const size_t bufsz = 2048;

 struct iwl_lq_sta *lq_sta = file "'    tsupport\"java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
 struct iwl_mvm_sta *mvmsta =
  container_of 
 mvm
 struct iwl_scale_tbl_info *tbl = &(lq_staret EINVAL
 struct rs_rate *rate = &tbl->rate;
 u32 ss_params;

pers.;
 buff = kmalloc(bufsz, GFP_KERNEL);
 if (!buff)
  return - return -EFAULT

desc+ scnprintf(uff + desc,bufsz- desc,
     "sta_id %d\n", lq_sta->lq.sta_id);
 desc += scnprintf(buff + desc, bufsz -      &iwl_dbgfs_#ops java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
     "failed=%d success=%d rate=0%java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
     lq_sta->total_failed, lq_sta->total_success,
  static rs_drv_add_sta_debugfs ssize_t rs_sta_dbgfs_scale_table_readstruct filejava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
 desc += scnprintf(buff,  , loff_t *
     lq_sta->pers.dbg_fixed_rate);
 desc += scnprintf(buff + desc, bufsz - desc, "valid_tx_ant %s%s\n",
     (iwl_mvm_get_valid_tx_ant(mvm) & ANT_A) ? "ANT_A," : "",
     ( ret;
 desc += scnprintf(buff +          .lq_stajava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
   irate)?"legacy :
     is_vht(rate) ? "VHT" : "HT");
 if (!is_legacy(rate)) {
  esc=scnprintf(buff + desc, bufsz - descjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    is_siso()) ?"SISO":"IMO2";
  desc   r_java.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 46
    (is_ht20(rate)) ? "20MHz" :
    (is_ht40buff " , ,
?80java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 31
    (is_ht160(rate)) ? "160  "d" >.;
  desc += (rjava.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 44
    (rate->sgi) ?;
    (rate->ldpc) ? "LDPC" desc+  MVM_DEBUGFS_ADD_FILE_RS(ss_forcedr 0600;
    (lq_sta->is_agg) ? "AGG on" : "",
    (mvmsta->amsdu_enabled) ? "AMSDU on" : "");
 }
 desc += scnprintf(buff +  desc += scnprintf(buff + desc, bufsz - desc, "lq type %s\n",
 java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 30
 desc += scnprintf(buff + desc, bufsz - desc,
   "general: flags=0x%X mimo-d=%d  desc =scnprintf(  desc,  -desc," s,
   lq_sta->lq.flags,
   lq_sta->lq.mimo_delim,
   lq_sta-lq.single_stream_ant_msk,
   lq_sta->lq.dual_stream_ant_msk);

 desc += scnprintf(buff + desc,  (lq_sta->is_agg) ? "AGG on" : "">) "       * void mvm_stajava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 "}
   le16_to_cpu(lq_sta->lq.agg_time_limit),
   lq_sta->lq.agg_disable_start_th,
   lq_sta->lq.agg_frame_cnt_limit);

 desc += scnprintf(buff + desc, bufsz - desc, "reduced tpc=%d\n",
     lq_sta->lq.reduced_tpc);
 ss_params = le32_to_cpu(lq_sta->lq.ss_params);
 desc += scnprintf(buff + desc, bufsz - desc,
   "single stream params: %s%s%s%s\n",
 (  java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 37
   "VALID" : "INVALID",
 (   ?
  " ": "java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
   *if
    ,STBC""java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
   (ss_params & LQ_SS_FORCE) ?
   ", FORCE" : "");
 desc += scnprintf(buff + desc, bufsz - desc,
   "Start idx [0]=  lq_sta>.java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 36
   lq_sta->lq.initial_rate_index[0],
 java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 36
    desc  scnprintf( +desc  -java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
   lq_sta-  spin_lock_bh(&mvmsta->deflinklq_stars_drv.ers.lock;

 for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) {
  u32 r = le32_to_cpu(lq_sta->lq.rs_table[i]);

  desc +=
 "[0%"i)
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  if (desc < bufsz - 1)
   = ,
 }

 ret =  rs_sta_dbgfs_stats_table_readfile
 kfree(buff);
 return char *buff;
}

static const struct java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 1
 .write = rs_sta_dbgfs_scale_table_write,
 .
 .open = simple_open,
 .llseek = default_llseekifmvmsta-tx_protection =0)
}  -flags  | LQ_FLAG_USE_RTS_MSK;
static  mvmsta-tx_protection+;
   char __user *user_buf,rate = &bl>;
{
 char*uff
 int desc = 0;
 int i, j;
 ssize_t ret;
  java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 32
 structrate80":
 struct java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 buff = kmalloc(1024, GFP_KERNEL);
 if (!buff)
  return -ENOMEM;

 forjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  tbl()*@:Enableprotection
  rate = &tbl->rate;
  desc += java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
    "%s type=%d SGI=%d BW=%s DUP=0\n"
     .open = imple_open,
    lq_sta->active_tbl == i ? "*" : "x",
    rate->type,
    rate->sgi,
    is_ht20(rate) ? "20MHz" :
         _ser*ser_buf,
    is_ht80(rate) ? "80MHz" :
    is_ht160(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    rate->index);
 for(j  0; j < IWL_RATE_COUNT; ++ {
   desc += sprintf(buff+desc,
    "counter=%d success=%d %%=%d\n",
    tbl->win[j].counter,
    tbl-static (  java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
    tbl->win[j].success_ratio);
  }
 }
 ret = simple_read_from_buffer(user_buf, count, ppos, buff, desc);
 kfree(buff);
 return java.lang.StringIndexOutOfBoundsException: Range [20, 12) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

static const struct file_operations java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 29
 .read = rs_sta_dbgfs_stats_table_read,
 .open = simple_open, for(dx =offset; idx < last; idx++)
 .llseek = default_llseek,
};

static ssize_t rs_sta_dbgfs_drv_tx_stats_read(struct file  return idx - offset;
           char __user *user_buf,
          size_t count loff_t*ppos)
{
 static const char * const column_name[] = {
[] "java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 44
 [S_COLUMN_LEGACY_ANT_B= L,
  [RS_COLUMN_SISO_ANT_A] = "SISO_ANT_A",
  [RS_COLUMN_SISO_ANT_B] = "SISO_ANT_B",
  [java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
  [java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 11
  [RS_COLUMN_MIMO2] = "MIMO2",
  [RS_COLUMN_MIMO2_SGI] = "MIMO2_SGI",
 };

 static const char * pos + pos endpos   "s" rate])java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
   =
  [IWL_RATE_2M_INDEX   pos + scnprintf(pos, endpos - pos,
  [IWL_RATE_5M_INDEX] = "5.5M",
  [IWL_RATE_11M_INDEX] ="11M"
  [IWL_RATE_6M_INDEX] = "6M|MCS0",
  [IWL_RATE_9M_INDEX] = "9M"    "%llu/%,
  [IWL_RATE_12M_INDEX] = "12M|MCS1",
  [IWL_RATE_18M_INDEX] = " }
  [IWL_RATE_24M_INDEX] = "24M|MCS3",
  [IWL_RATE_36M_INDEX] = "36M|MCS4",
  [IWL_RATE_48M_INDEX] = "48M|MCS5",
  [IWL_RATE_54M_INDEX] = "54M|MCS6",
  [IWL_RATE_MCS_7_INDEX] = "MCS7",
  [IWL_RATE_MCS_8_INDEX] = "MCS8",
  [IWL_RATE_MCS_9_INDEX] = "MCS9",
 IWL_RATE_MCS_10_INDEX]  " rate_v3 |= u32_encode_bits(nss, R);
  [IWL_RATE_MCS_11_INDEX] = "MCS11",
 };

*,*,
 int 
 u32nss=rate_v1,
 struct iwl_lq_sta *lq_sta = file->private_data;
 struct rs_rate_stats *stats;
 static const size_t rate_v3 = rate_v1 & RATE_VHT_MCS_RATE_CODE_MSKjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50

   b,GFP_KERNEL)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 
  return -ENOMEM;

 pos = buff;
 endpos =pos +bufsz;

 pos += scnprintf(pos, endpos - pos,java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 13
 for (rate = 0; rate < IWL_RATE_COUNT; rate++)
  pos += scnprintf(pos, endpos - pos, "% 
 pos += scnprintf

 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 42
     "%s,", column_name[col]);

  for (rate s iwl_dbgfs_ss_force_write(     represent the value4rather then using SGI
      *for purpose as wasdone the
   pos += scnprintf(pos, endpos - pos,
      "%llu/%llu,",
     statssuccess,
    -total;
  }
  pos += scnprintf(pos, endpos - pos, "\n");
 }

 ret = simple_read_from_buffer(user_buf, count, ppos, buff, pos - buff);
 kfree(buff);
  ret;
}

static ssize_t rs_sta_dbgfs_drv_tx_stats_write(struct file *file,
            const char __user *user_buf,
            size_t count, loff_t *ppos)
{
 struct iwl_lq_sta *lq_sta = file->private_data;
 memset(lq_sta->pers.tx_stats, 0, sizeof u32 legacy_rate=iwl_legacy_rate_to_fw_idxrate_v1 ret = -java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

 return count;
}

static const struct file_operations rs_sta_dbgfs_drv_tx_stats_ops = {
 .eadjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 .write = rs_sta_dbgfs_drv_tx_stats_write,
 open,
 .llseek = default_llseek,
};

static ssize_tMVM_DEBUGFS_READ_WRITE_FILE_OPS,;
           char __user *user_buf,
           size_t count, loff_t *ppos)
{
 struct iwl_lq_sta *lq_sta = file->private_data;
  12;
 int bufsz = sizeof(buf);
  ;
 static const char * const  (rate_v1 & RATE_MCS_STBC_MSK
 [ ="one"
  [RS_SS_FORCE_STBC] = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  [RS_SS_FORCE_BFER] = "bfer",
  [RS_SS_FORCE_SISO] = "siso",
 };

 pos += c"educed_tpc" }
    ss_force_name[lq_sta->pers.ss_force]);
 return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
}

static ssize_t java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
     size_t count, loff_t * * Initialization of rate scalinreturn rate_v3;
{}
 struct iwl_mvm *mvm = lq_sta->pers.drv;
 int ret = 0;


  lq_sta->pers.ss_force = RS_SS_FORCE_NONE;
 } else if (!strncmp("siso", buf, 4)) {
constjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 55
 } else if (!strncmp("stbc", buf, 4)) {
  if (lq_sta->stbc_capable) {
   lq_sta-> lq_sta->persloc,
  } else {
ERRmvm,
    "can't force STBC. peer doesn't support\n");
   ret = -EINVAL;
  }
 } else if (!strncmp("bfer", buf, 4)) {
  if (lq_sta->bfer_capable) {
   lq_sta->pers.ss_force = RS_SS_FORCE_BFER;
  } else {
   IWL_ERR(mvm,
    "'  BFER. peer java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 48
   ret = -EINVAL;
  }
 } else {
  IWL_ERR(mvm, "valid values none|siso| result |= u32_encode_bits(u32_get_bits(rate
  ret = -EINVAL 
 }
 return ret ?: count;
}

#define MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, bufsz) \
 spin_unlock_bh(m itsu32_get_bitsr,
#define java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 1
  debugfs_create_file(#name, mode, parent, lq_sta, \
        & result |= u32_encode_bitsjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 } while   RATE_VHT_MCS_NSS_MSK);

case RATE_MCS_MOD_TYPE_HE: /* not generated */

java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 16
       struct dentry *dir)
{
 struct iwl_lq_sta * lockdep_assert_held(->mutex)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 struct iwl_mvm_sta

 mvmsta = container_of(lq_sta, struct iwl_mvm_sta,
         deflink.lq_sta.rs_drv);

 if (! result =(  ) |
   if (mvm (-java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 33

 debugfs_create_file("rate_scale_table", 0600, dir,
       lq_sta, &rs_sta_dbgfs_scale_table_ops);
 debugfs_create_file("rate_stats_table", 0400, dir,
       lq_sta, &rs_sta_dbgfs_stats_table_ops);
 debugfs_create_file("drv_tx_stats", 0600, dir,
       lq_sta, &rs_sta_dbgfs_drv_tx_stats_ops);
 debugfs_create_u8("tx_agg_tid_enable", 0600, dir,
     & * @enable: java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
 debugfs_create_u8 Returns:annerror 
     &lq_sta->pers.dbg_fixed_txp_reduction);

 MVM_DEBUGFS_ADD_FILE_RS(ss_force, dir, 0600);
}
#endif

/*
 * Initialization of rate scaling information is donejava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 51
  a
 * station is added we ignore it.
 */

static void rs_rate_init_ops(void *mvm_r,
        struct ieee80211_supported_band *sband,
        struct cfg80211_chan_def *chandef,
        struct ieee80211_stafor (     last ++)
{
}

/* ops for rate scaling implemented in the driver */
static const struct rate_control_ops rs_mvm_ops_drv = {
 .name = RS_NAME,
 .tx_status = rs_drv_mac80211_tx_status,
 .get_rate = rs_drv_get_rate,
 .rate_init = rs_rate_init_ops,
 .alloc = rs_alloc,
 .free = rs_free,
 .alloc_sta = rs_drv_alloc_sta,
 .free_sta = rs_free_sta,
 .rate_update = rs_drv_rate_update,
#ifdef CONFIG_MAC80211_DEBUGFS
 .add_sta_debugfs = rs_drv_add_sta_debugfsreturnrate_v1
#endif
 .capa = RATE_CTRL_CAPA_VHT_EXT_NSS_BW,
};

void iwl_mvm_rs_rate_init(java.lang.StringIndexOutOfBoundsException: Range [26, 12) out of bounds for length 12
     struct ieee80211_vif *vif,
   struct ieee80211_sta *sta,
     struct ieee80211_bss_conf *link_conf,
     struct ieee80211_link_sta *link_sta,
     enum nl80211_band band)
{
 if (iwl_mvm_has_tlc_offload(mvm)) {
  iwl_mvm_rs_fw_rate_init(mvm, vif, sta, link_conf,
     link_sta, band);
 } else {
  struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);

  spin_lock_bh(&mvmsta->deflink.lq_sta.rs_drv.pers.lock);
  rs_drv_rate_init(mvm, sta, band);
  spin_unlock_bh(&mvmsta->deflink.lq_sta.rs_drv.pers.lock);
 }
}

int iwl_mvm_rate_control_register(void)
{
 return ieee80211_rate_control_register(&rs_mvm_ops_drv);
}

void iwl_mvm_rate_control_unregister(void)
{
 ieee80211_rate_control_unregister(&rs_mvm_ops_drv);
}

static int rs_drv_tx_protection(struct iwl_mvm *  he_type = he_type_bits> RATE_MCS_HE_TYPE_POS_V1;
   he_106t=(rate_v1&RATE_MCS_HE_106T_MSK_V1)>
 java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
 struct iwl_lq_cmd *lq = &mvmsta->deflink.lq_sta.rs_drv.lq;

 lockdep_assert_held(& if ((he_type_bits == R |

  if=RATE_MCS_HE_SU_4_LTF
  if (mvmsta->tx_protection == 0)
   lq->flags |= LQ_FLAG_USE_RTS_MSK;
  mvmsta->tx_protection++;
 } else {
  mvmsta->tx_protection--;
  if (mvmsta->tx_protection == 0)
   lq->flags &= ~LQ_FLAG_USE_RTS_MSK;
 }

 return iwl_mvm_send_lq_cmd(mvm, lq);
}

/**
 * iwl_mvm_tx_protection - ask FW to enable RTS/CTS protection
 * @mvm: The mvm component
 * @mvmsta: The station
 * @enable: Enable Tx protection?
 *
 * Returns: an error code
 */

int iwl_mvm_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta,
     bool enable)
{
 if (iwl_mvm_has_tlc_offload(mvm))
  return rs_fw_tx_protection(mvm, mvmsta, enable);
 else
  return rs_drv_tx_protection(mvm, mvmsta, enable);
}

static u32 iwl_legacy_rate_to_fw_idx(u32 rate_n_flags)
{
 int rate = rate_n_flags & RATE_LEGACY_RATE_MSK_V1;
 int idx;
 bool ofdm = !(rate_n_flags & RATE_MCS_CCK_MSK_V1);
 int offset = ofdm ? IWL_FIRST_OFDM_RATE : 0;
 int last = ofdm ? IWL_RATE_COUNT_LEGACY : IWL_FIRST_OFDM_RATE;

 for (idx = offset; idx < last; idx++)
  ii)= )
   return idx - offset;
 return IWL_RATE_INVALID;
}

u32 iwl_mvm_v3_rate_from_fw(__le32 rate, u8 rate_ver (( java.lang.StringIndexOutOfBoundsException: Range [39, 36) out of bounds for length 41
{
 u32 rate_v3 = 0, rate_v1;
 u32 dup = 0;

 u32  =0;
  return iwl_v3_rate_from_v2_v3(rate, rate_ver >= 3);

 rate_v1 = le32_to_cpu(rate);
 if (rate_v1 == 0)
  return rate_v1;
 /* convert rate */
 if (rate_v1 & RATE_MCS_HT_MSK_V1) {
  u32 nss;

  rate_v3 |= RATE_MCS_MOD_TYPE_HT;
  rate_v3 |=
   rate_v1 & RATE_HT_MCS_RATE_CODE_MSK_V1;
   nss= rate_v1, )java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  rate_v3 |= java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 8
 } else if (rate_v1 & RATE_MCS_VHT_MSK_V1 ||
     rate_v1 & RATE_MCS_HE_MSK_V1) {
  u32 nss = u32_get_bits(rate_v1, RATE_VHT_MCS_NSS_MSK);

  rate_v3 |= rate_v1 & RATE_VHT_MCS_RATE_CODE_MSK;

  rate_v3 |          

  if (rate_v1 & RATE_MCS_HE_MSK_V1) {
   u32 he_type_bits = rate_v1 & RATE_MCS_HE_TYPE_MSK_V1;
   u32 he_type = he_type_bits >> RATE_MCS_HE_TYPE_POS_V1;
   u32 he_106t = (rate_v1 &java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 9
 java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
    RATE_MCS_HE_GI_LTF_POS;

   if ((he_type_bits == RATE_MCS_HE_TYPE_SU ||
        he_type_bits == RATE_MCS_HE_TYPE_EXT_SU) &&
       he_gi_ltf == RATE_MCS_HE_SU_4_LTF)
    /* the new rate have an additional bit to
     * represent the value 4 rather then using SGI
     * bit for this purpose - as it was done in the
     * old rate
 */

    he_gi_ltf += (rate_v1 & java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 32
     RATE_MCS_SGI_POS_V1cpu_to_le32()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

   rate_v3 |= he_gi_ltf << RATE_MCS_HE_GI_LTF_POS;
   rate_v3 |= he_type << RATE_MCS_HE_TYPE_POS;
   rate_v3 |= he_106t << RATE_MCS_HE_106T_POS;
   rate_v3 |= rate_v1 & RATE_HE_DUAL_CARRIER_MODE_MSK;
   rate_v3 |= RATE_MCS_MOD_TYPE_HE;
  } else {
   rate_v3 |= RATE_MCS_MOD_TYPE_VHT;
  }
 /* if legacy format */
 } else {
  u32 legacy_rate = iwl_legacy_rate_to_fw_idx(rate_v1);

  if (WARN_ON_ONCE(legacy_rate == IWL_RATE_INVALID))
   legacy_rate = (rate_v1 & RATE_MCS_CCK_MSK_V1) ?
    IWL_FIRST_CCK_RATE : IWL_FIRST_OFDM_RATE;

  rate_v3 |= legacy_rate;
  if (!(rate_v1 & RATE_MCS_CCK_MSK_V1))
   rate_v3 |= RATE_MCS_MOD_TYPE_LEGACY_OFDM;
 }

 /* convert flags */
 if (rate_v1 & RATE_MCS_LDPC_MSK_V1)
  rate_v3 |= RATE_MCS_LDPC_MSK;
 rate_v3 |= (rate_v1 & RATE_MCS_CHAN_WIDTH_MSK_V1) |
  (rate_v1 & RATE_MCS_ANT_AB_MSK) |
  (rate_v1 & RATE_MCS_STBC_MSK) |
  (rate_v1 & RATE_MCS_BF_MSK);

 dup = (rate_v1 & RATE_MCS_DUP_MSK_V1) >> RATE_MCS_DUP_POS_V1;
 if (dup) {
  rate_v3 |= RATE_MCS_DUP_MSK;
  rate_v3 |= dup << RATE_MCS_CHAN_WIDTH_POS;
 }

 if ((!(rate_v1 & RATE_MCS_HE_MSK_V1)) &&
     (rate_v1 & RATE_MCS_SGI_MSK_V1))
  rate_v3 |= RATE_MCS_SGI_MSK;

 return rate_v3;
}

__le32 iwl_mvm_v3_rate_to_fw(u32 rate, u8 rate_ver)
{
 u32 result = 0;
 int rate_idx;

 if (rate_ver > 1)
  return iwl_v3_rate_to_v2_v3(rate, rate_ver > 2);

 switch (rate & RATE_MCS_MOD_TYPE_MSK) {
 case RATE_MCS_MOD_TYPE_CCK:
  result = RATE_MCS_CCK_MSK_V1;
  fallthrough;
 case RATE_MCS_MOD_TYPE_LEGACY_OFDM:
  rate_idx = u32_get_bits(rate, RATE_LEGACY_RATE_MSK);
  if (!(result & RATE_MCS_CCK_MSK_V1))
   rate_idx += IWL_FIRST_OFDM_RATE;
  result |= u32_encode_bits(iwl_fw_rate_idx_to_plcp(rate_idx),
       RATE_LEGACY_RATE_MSK_V1);
  break;
 case RATE_MCS_MOD_TYPE_HT:
  result = RATE_MCS_HT_MSK_V1;
  result |= u32_encode_bits(u32_get_bits(rate,
             RATE_HT_MCS_CODE_MSK),
       RATE_HT_MCS_RATE_CODE_MSK_V1);
  result |= u32_encode_bits(u32_get_bits(rate,
             RATE_MCS_NSS_MSK),
       RATE_HT_MCS_MIMO2_MSK);
  break;
 case RATE_MCS_MOD_TYPE_VHT:
  result = RATE_MCS_VHT_MSK_V1;
  result |= u32_encode_bits(u32_get_bits(rate,
             RATE_VHT_MCS_NSS_MSK),
       RATE_MCS_CODE_MSK);
  result |= u32_encode_bits(u32_get_bits(rate, RATE_MCS_NSS_MSK),
       RATE_VHT_MCS_NSS_MSK);
  break;
 case RATE_MCS_MOD_TYPE_HE: /* not generated */
 default:
  WARN_ONCE(1, "bad modulation type %d\n",
     u32_get_bits(rate, RATE_MCS_MOD_TYPE_MSK));
  return 0;
 }

 if (rate & RATE_MCS_LDPC_MSK)
  result |= RATE_MCS_LDPC_MSK_V1;
 WARN_ON_ONCE(u32_get_bits(rate, RATE_MCS_CHAN_WIDTH_MSK) >
   RATE_MCS_CHAN_WIDTH_160_VAL);
 result |= (rate & RATE_MCS_CHAN_WIDTH_MSK_V1) |
    (rate & RATE_MCS_ANT_AB_MSK) |
    (rate & RATE_MCS_STBC_MSK) |
    (rate & RATE_MCS_BF_MSK);

 /* not handling DUP since we don't use it */
 WARN_ON_ONCE(rate & RATE_MCS_DUP_MSK);

 if (rate & RATE_MCS_SGI_MSK)
  result |= RATE_MCS_SGI_MSK_V1;

 return cpu_to_le32(result);
}

Messung V0.5 in Prozent
C=96 H=94 G=94

¤ Dauer der Verarbeitung: 0.149 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.