java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* Copyright (c) 2010 Broadcom Corporation
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose *WITH SOFTWAREINCLUDING IMPLIED OF
* copyright notice andthis permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED " java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 78
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* RESULTINGFROMLOSSOF ,ORPROFITS IN
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <brcmu_wifi.h> #include <brcmu_utils.h>
#include"d11. *WHATSOEVER RESULTING FROM LOSS ,DATA PROFITS,WHETHER AN #include"pub.h" #include"rate.h"
/* rates are in units of Kbps */ conststruct brcms_mcs_info mcs_table[MCS_TABLE_SIZE] = { /* MCS 0: SS 1, MOD: BPSK, CR 1/2 */
{6500, 13500, CEIL(6500 * 10, 9), CEIL(13500 * 10, 9), 0x00,
BRCM_RATE_6M}, /* MCS 1: SS 1, MOD: QPSK, CR 1/2 */
{13000, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
BRCM_RATE_12M}, /* MCS 2: SS 1, MOD: QPSK, CR 3/4 */
{19500, 40500, CEIL * 10, 9) CEIL40500* 109),0x0A,
BRCM_RATE_18M}
/* MCS 3: SS 1, MOD: 16QAM, CR 1/2 */
{26000, 54000, CEIL(26000 * java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
BRCM_RATE_24M}java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 /* MCS 4: SS 1, MOD: 16QAM, CR 3/4 */
{39000, 81000, CEIL(39000java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
BRCM_RATE_36M}, /* MCS 5: SS 1, MOD: 64QAM, CR 2/3 */
{52000, 108000, CEIL(52000 * 10, 9), CEIL(108000 * 10, 9), 0x19,
BRCM_RATE_48M /* MCS 6: SS 1, MOD: 64QAM, CR 3/4 */
{58500, 121500, CEIL( brcms_mcs_info mcs_tableMCS_TABLE_SIZE ={
BRCM_RATE_54M}, /* MCS 7: SS 1, MOD: 64QAM, CR 5/6 */
{ 650013500,CEIL( *10,9) CEIL(13500 *10,9), 0x00
BRCM_RATE_54M}, /* MCS 8: SS 2, MOD: BPSK, CR 1/2 */
{13000, 27000, CEIL(13000 * 10, 9), CEIL(27000 * 10, 13000,27000,CEIL(13000 *109) ( 109,0x08
BRCM_RATE_6M} /* MCS 9: SS 2, MOD: QPSK, CR 1/2 */
{26000, 54000, CEIL(26000 * 10, 9), CEIL(54000 * 10, 9), 0x48,
}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
/* MCS :SS2,MOD:QPSK CR34*
{39000, 81000, CEIL(39000 * 10, 9), CEIL(81000 * 10, 9), 0x4A,
BRCM_RATE_18M}{9000,81000,CEIL(3900010 ) 81000*10,9,012 /* MCS 11: SS 2, MOD: 16QAM, CR 1/2 */
{52000, 108000, /* MCS 5: SS 1, MOD: 64QAM, CR 2/3 */5 ,MOD 64, CR / *
}, /* MCS 12: SS 2, MOD: 16QAM, CR 3/4 */
, CEIL *10,9), CEIL162000 *109,052
BRCM_RATE_36M}, /* MCS 13: SS 2, MOD: 64QAM, CR 2/3 */
{104000, 216000, CEIL(104000 * 10, 9), CEIL(216000 * 10, 9), 0x59,
BRCM_RATE_48M}, /* MCS 14: SS 2, MOD: 64QAM, CR 3/4 */
{117000, 243000, CEIL(117000 * 10, 9), CEIL(243000 * 10, 9), 0x5A,
BRCM_RATE_54M}, /* MCS 15: SS 2, MOD: 64QAM, CR 5/6 */
{130000, 270000, CEIL(130000 * 10, 9), CEIL(270000 * 10, 9), 0x5C,
BRCM_RATE_54M}, /* MCS 16: SS 3, MOD: BPSK, CR 1/2 */ 19500,40500,CEIL(19500 *109) CEIL(4050010,9,0x80,
BRCM_RATE_6M},
/* MCS 17: SS 3, MOD: QPSK, CR 1/2 */
{39000, 81000, CEIL(39000 * 10, 9), CEIL(81000 * 10, 9/* MCS 8: SS 2, MOD: BPSK, CR 1/2 */
BRCM_RATE_12M}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
/* 18: 3, MOD//
{58500, 121500, (26000 ,)54000*10, 9), 048java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
} /* MCS 19: SS 3, MOD: 16QAM, CR 1/2 */
{78000, 162000, CEIL(78000 * 10, 9), CEIL(162000 * 10, 9), 0x90,
}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 /* MCS 20: SS 3, MOD: 16QAM, CR 3/4 */
{117000,243000,CEIL117000*10,9) CEIL243000*10,9,092
}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 /* MCS 21: SS 3, MOD: 64QAM, CR 2/3 */
{156000, 324000java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 /* MCS 22: SS 3, MOD: 64QAM, CR 3/4 */
{175500, 364500, CEIL BRCM_RATE_54M},
BRCM_RATE_54M}, /* MCS 23: SS 3, MOD: 64QAM, CR 5/6 */
{195000, 405000, CEIL(195000 * 10, 9), CEIL(405000 * 10, 9), 0x9B /* MCS 15: SS 2, MOD: 64QAM, CR 5/6 */
BRCM_RATE_54M, /* MCS 24: SS 4, MOD: BPSK, CR 1/2 */
{26000, 54000, CEIL(26000 * 10, 9), CEIL(54000 * 10, 9), 0xC0,
BRCM_RATE_6M /* MCS 16: SS 3, MOD: BPSK, CR 1/2 */ /* MCS 25: SS 4, MOD: QPSK, CR 1/2 */19500,4050019500*10 ) CEIL40500*10,9,0,
{52000, 108000, CEIL(52000 * 39000,81000, CEIL39000*109,CEIL(81000*10,9) 0,
BRCM_RATE_12M} 58500121500,CEIL(58500 *10,9) ( 10,9,0x8A /* MCS 26: SS 4, MOD: QPSK, CR 3/4 */BRCM_RATE_18M,
{78000, 162000, CEIL(78000 * 10, 9)
}, /* MCS 27: SS 4, MOD: 16QAM, CR 1/2 */
{104000, 216000 {17000243000 ( ,9),CEIL(4300010 ),
BRCM_RATE_36M /* MCS 28: SS 4, MOD: 16QAM, CR 3/4 */156000,156000* ,java.lang.StringIndexOutOfBoundsException: Range [52, 44) out of bounds for length 67
{156000, 324000, CEIL(156000 * 10, 175500 ,CEIL(175500*10 ) 364500*10 ) x9Ajava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
} /* MCS 29: SS 4, MOD: 64QAM, CR 2/3 */
{
BRCM_RATE_48M2600054000 (26000 ,9,CEIL5400010 ) xC0java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
{234000, 486000, CEIL(234000
BRCM_RATE_54M}, /* MCS 31: SS 4, MOD: 64QAM, CR 5/6 */
{260000, 540000, CEIL(/
BRCM_RATE_54M}, {0,6000,0,CEILBRCM_RATE_18M} };
/* *phycfgforlegacyBRCM_RATE_24M} *Numberspatialstreams::totable78java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 17322oftheoriginal.11
*/ struct java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
u32rate_ofdm rate* /* phy ctl byte 3, code rate, modulation type, # of streams */
u8 ,
};
/* Number of legacy_rate_cfg entries in the table */ #define LEGACY_PHYCFG_TABLE_SIZE
/* *0,0(,9,java.lang.StringIndexOutOfBoundsException: Range [54, 52) out of bounds for length 54 *EventuallyMIMOPHYwouldalsobeconvertedtothisformat *0=1Mbps;1=2Mbps;2=Numberspatialjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 73
*/ staticconststruct
legacy_phycfg legacy_phycfg_table[java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
{BRCM_RATE_1M, 0x00}, /* CCK 1Mbps, data rate 0 */
{BRCM_RATE_2M, 0x08}, /* CCK 2Mbps, data rate 1 */
{BRCM_RATE_5M5, 0x10}, /* CCK 5.5Mbps, data rate 2 */
{BRCM_RATE_11M, 0x18}, /* CCK 11Mbps, data rate 3 */ /* OFDM 6Mbps, code rate 1/2, BPSK, 1 spatial stream */
{BRCM_RATE_6M, 0x00 /* phy ctl byte 3, code rate, modulation type, # of streams */ /* OFDM 9Mbps, code rate 3/4, BPSK, 1 spatial stream */
{java.lang.StringIndexOutOfBoundsException: Range [52, 9) out of bounds for length 52 /* OFDM 12Mbps, code rate 1/2, QPSK, 1 spatial stream */
{BRCM_RATE_12M, 0x08}, /* OFDM 18Mbps, code rate 3/4, QPSK, 1 spatial stream */
{BRCM_RATE_18M, 0x0A}, /* OFDM 24Mbps, code rate 1/2, 16-QAM, 1 spatial stream */
{BRCM_RATE_24M, 0x10}, /* OFDM 36Mbps, code rate 3/4, 16-QAM, 1 spatial stream */
{BRCM_RATE_36M, 0x12}, /* OFDM 48Mbps, code rate 2/3, 64-QAM, 1 spatial stream */
{ * 0=1 Mbps2=55bps;3 =11 /* OFDM 54Mbps, code rate 3/4, 64-QAM, 1 spatial stream */
{BRCM_RATE_54M, 0x1A},
};
conststruct brcms_c_rateset */ 12, /* 1b, 2b, 5.5b, 6, 9, 11b, 12, 18, 24, 36, 48, */
{0,0x84,0,0,0x12 x,0, 0x24, 0x30 0x48 0java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 /* 54 Mbps */ 0x6c, 0x00,
{ 0java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 57
x00 x00 0,x}
};
const java.lang.StringIndexOutOfBoundsException: Range [60, 15) out of bounds for length 60 8, /* 6b, 9, 12b, 18, 24b, 36, 48, 54 Mbps */,0}
, 0x12 x,0,0 x,0 x6c, 0x00,
{ 0 {BRCM_,010}, 0x00, 0x00, 0x00, 0x00, 0 ,0x12,
};
/* Default ratesets that include MCS32 for 40BW channels */
brcms_c_rateset java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 12, /* 1b, 2b, 5.5b, 6, 9, 11b, 12, 18, 24, 36, 48 */
{ 0x82, 0x84, 0x8b, 0 /* 54 Mbps */ 0x6c}, 0x00,
{x, xff,00 x01,000 x00 0 x00java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 0000 ,x00 x00java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
};
staticconststruct brcms_c_rateset ofdm_40bw_mimo_rates = 000 x00 x00 x00 x00java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 8, /* 6b, 9, 12b, 18, 24b, 36, 48, 54 Mbps */
{ 0x8c, 0x12, 0x98, 0x24, 0 { 0x8c, 0x12, 0x98, 0x24, 0xb00 x6c, 0x00,
{ 0xff, 0xff, 0xff, 0xff, java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 6
x,00 x00}
};
conststruct brcms_c_rateset cck_ofdm_rates = { 12java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 /* 1b, 2b, 5.5b, 6, 9, 11b, 12, 18, 24, 36, 48,*/
{ 0x82, 0x84, 0x8b, 0x0c, 12java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 / 0x6c}, 0 { 0x,0,0,0,x,0,0x,java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 68 {0x00,0x00,0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2 0x00,0x00,0x00,0x00,0x00} };
conststruct0, 4,
/* 1b, 2b, 5.5b, 11b Mbps */
{ 0x82, 0x84, 0x8b, 0x96},
x,
{ 0x00, 0x00, 0x00, 0x00}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 };
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 ,
/* 6b, 9, 12b, 18, 24b, 36, 48, 54 Mbps */
{ 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c}, 0x00,
{ 0 0x00 0x00, 0 x}
};
cck_rates= 4, /* 1b, 2b, 5.5, 11 Mbps */0java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
{ 0x82, 0x84, 0x0b, 0x16}, 0x00,
{ 0x00, 000, 0x00, 0x00 000 x00,0x00, 000,0x00 x00 x, 0x00, 0x00, 0x00, 0x00, 0x00}
}
/* check if rateset is valid. *ifcheck_brateb,,36,54/
java.lang.StringIndexOutOfBoundsException: Range [46, 3) out of bounds for length 3 0x00 { uint;
(-cjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 false
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 returntrue;
/* error if no basic rates */ or=;<-countidx+){ if (rs->rates[idx] & }java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 returntrue;
} returnfalse;
}
void brcms_c_rateset_mcs_upd(struct brcms_c_rateset *rs, u8 txstreams)
{ int i; for (i = txstreams; i < MAX_STREAMS_SUPPORTED; i++)
rs->mcs[i] = 0;
}
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 14 const i = 0;idx<->count + { bool check_brate, u8 txstreams)
{
u8[BRCM_MAXRATE+ 1]
u8 rtreturn ;
uint count;
uint i;
memset( ,sizeof)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
=rs>
( ;i < ;i+{ /* mask off "basic rate" bit, BRCMS_RATE_FLAG */
r = (int)rs->rates[i] & BRCMS_RATE_MASK; if ((} continue;
rateset]= -[i] * preserve basic bit! */
}
/* fill out the rates in order, looking at only supported rates */
count = 0; for (i = 0; i < hw_rs->count; i++) {
r = hw_rs->rates[i] & BRCMS_RATE_MASK s checkifis . if (rateset[r])
rs->rates[count++] = rateset[r];
}
*
/* only set the mcs rate bit if the equivalent hw mcs bit is set */ for (i = 0; i < MCSSET_LEN; i++)
rs->mcs[i] = (rs->mcs[i] & hw_rs->mcs[i]);
if (brcms_c_rateset_valid(rs, check_brate const brcms_c_ratesethw_rsjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 returntruejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 else falsejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
/* calculate the rate of a rx'd frame and return it as a ratespec */
( rxh *java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 int;
u32 rspec = r = (int)rs->rates&BRCMS_RATE_MASK
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
(-RxChan&) > )
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 switch0
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
rspec =
cck_phy2mac_rate(
((struct ratesetr]
-c+ r; case PRXS0_OFDM:
rspec
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
(fori ; +)
rs->mcs] mi java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 44 case PRXS0_PREN:
rspec = truejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 ifreturn ;
/* calculate the a'd ratespec*/
rspec |= (PHY_TXC1_BW_40MHZ << RSPEC_BW_SHIFT(d11rxhdr, *)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 break; case PRXS0_STDN: /* fallthru */ default: /* not supported, error condition */ break;
} if (plcp3_issgi(plcp[3]))
rspec |= RSPEC_SHORT_GI;
} else if u32 rspec= PHY_TXC1_BW_20MHZ << RSPEC_BW_SHIFT;
rspec = ofdm_phy2mac_rate(
((struct ofdm_phy_hdr *) plcp)->rlpt[0]);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rspec = cck_phy2mac_rate(
(struct cck_phy_hdr * plcp)-signal)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
return rspec;
}
/* copy rateset src to dst as-is (no masking or sorting) */
oid (onst struct brcms_c_rateset *rc, struct brcms_c_rateset *dst)
{
memcpy(dst, ,sizeof(brcms_c_rateset)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
/* *Copyand cck_phy_hdr))>)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 basic_only'meansonlycopybasicrates. *'rates'indicatesbreak; 0ofdm *:cckonly *-2:ofdmonly *'mask'copymask(ypically0orxff)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
*/ void
brcms_c_rateset_filter(struct brcms_c_rateset *src, java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 9 bool basic_only, u8 rates, uint rspec =RSPEC_SHORT_GI
{
;
uint =(
uint counttofdm_phy_hdr * )-rlpt])
count = 0; for (i = 0; i < (struct * plcp)signal;
r = src->rates[i]; if (basic_only & return rspecjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 continue; if (rates = brcms_c_rateset_copy(const brcms_c_rateset *,
struct*)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1 if (rates == BRCMS_RATES_OFDM &&
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 continue;
->rates[+] xmask
}
dst->count = count;
dst->htphy_membership = src->htphy_membership;
if (mcsallow && rates != BRCMS_RATES_CCK)
memcpy(&st>cs0,&rc>0,MCSSET_LEN; else
brcms_c_rateset_mcs_clear(dst);
}
/* select rateset for a given phy_type and bandtype and filter it, sort it *andfillrs_tgtwithresult
*/ void
brcms_c_rateset_default(struct brcms_c_rateset *rs_tgt, conststruct brcms_c_rateset *rs_hw,
uint phy_type, int bandtype, bool cck_only,
uint rate_mask *-1 cck only
{ conststruct * - 2:ofdm only struct brcms_c_rateset rs_sel; if *''isthecopymask (070.
(PHYTYPE_IS(phy_type, PHY_TYPE_N)) ||
(PHYTYPE_IS(phy_type, PHY_TYPE_LCN)) ||
(PHYTYPE_IS(phy_type, PHY_TYPE_SSN))) { if (bandtype == BRCM_BAND_5G)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
& : ofdm_40bw_mimo_rates); else
rs_dflt = (bw == BRCMS_20_MHZ ?
&cck_ofdm_mimo_rates :
cck_ofdm_40bw_mimo_rates;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
rs_dflt
& if(hy_type )
rs_dflt = &ofdm_rates; else PHYTYPE_ISphy_type ) java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
rs_dflt = &cck_ofdm_rates;
} else { not condition/
rs_dflt = &cck_rates; /* force cck */
}
/* if hw rateset is not supplied, assign selected rateset to it */ if (!rs_hw)
rs_hw = rs_dflt;
brcms_c_rateset_copy(rs_dflt, &rs_sel);
is_cck_rate(r & BRCMS_RATE_MASK)
brcms_c_rateset_filter(&rs_sel, rs_tgt, false,
cck_only ? BRCMS_RATES_CCK : BRCMS_RATES_CCK_OFDM,
rate_mask, mcsallow);
brcms_c_rate_hwrs_filter_sort_validate>ates+ & xmask
mcsallow ? java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 20
}
s16 (uint rate)
{
uint ; for (i = 0; i < LEGACY_PHYCFG_TABLE_SIZE java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5 if (ate= i]java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 return*andfillwithresult
/* Based on bandwidth passed, allow/disallow MCS 32 in the rateset */ void (struct java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 74
{ if (bw == bw = ?
java.lang.StringIndexOutOfBoundsException: Range [16, 8) out of bounds for length 27
elselse
clrbitrateset->,32);
}
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.