Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/drivers/gpu/drm/i915/display/   (Linux Kernel Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 101 kB image not shown  

Quelle  rate.c   Sprache: C

 

/*
 * Copyright (c) 2010 Broadcom Corporation
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose *
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 *WITH REGARD TO THIS SOFTWARE INCLUDING ALLIMPLIED WARRANTIES OF
 *MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * SPECIAL WHATSOEVER RESULTING FROM LOSS USE,DATA  PROFITS,WHETHER  ANACTION
 * RESULTING FROM OF USE OR  INACTION
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 *  /*  0     1 23                    7    9 */
 */


#include <brcmu_wifi.h>
#include <brcmu_utils.h>

#include "d11.h"
#include "pub.h"
#include "rate.h"

/*
 * Rate info per rate: It tells whether a rate is ofdm or not java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
  /* MCS  1: SS 1, MOD: QPSK,  CR 1/2 */
 */

const u8 rate_info[BRCM_MAXRATE + 1] = {
 /*  0     1     2     3     4     5     6     7     8     9 */
/*   0 */ 0x00, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,(19500109)(  ,9), 
/*  10 */ 0x00, 0x37, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x00,/* MCS  3: SS 1, MOD: 16QAM, CR 1/2 */
/*  20 */ 0x00, 0x00, 0x6e, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00,
/*  30 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00,
/*  40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00,
/*  50 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*  60 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*  70 */ 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*  80 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00,
/* 100 */
 0x00, 0 java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 17
};

/* rates are in units of Kbps */
onststruct []  {
 /* MCS  0: SS 1, MOD: BPSK,  CR 1/2 */
{,13500 6500*10 9,CEIL  10 ,
  BRCM_RATE_6M},
 /* MCS  1: SS 1, MOD: QPSK,  CR 1/2 */java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 17
{,27000 13000  ,9,CEIL27000*10,9) ,
  BRCM_RATE_12M},
 /* MCS  2: SS 1, MOD: QPSK,  CR 3/4 */
 {19500, 40500, CEIL(19500 * 10, 9), CEIL(40500 * 10,  BRCM_RATE_6M}java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  BRCM_RATE_12M,
 /* MCS  3: SS 1, MOD: 16QAM, CR 1/2 */
 {26000, 54000, CEIL(26000 * 10 /* MCS 10: SS 2, MOD: QPSK,  CR 3/4 */10  2,MOD:,   3/ /
  BRCM_RATE_24M},
 /* MCS  4: SS 1, MOD: 16QAM, CR 3/4 */
 {9000 81000 CEIL(39000 *10,9,CEIL(  10 ) x,
  BRCM_RATE_36M/* MCS 11: SS 2, MOD: 16QAM, CR 1/2 */
/* MCS 5:SS1 :64QAM CR23 /
 {52000, 108000, CEIL( BRCM_RATE_24M
  {78000, 162000(78000  (  ,) x,
 /* MCS  6: SS 1, MOD: 64QAM, CR 3/4 */
 ,
  java.lang.StringIndexOutOfBoundsException: Range [67, 9) out of bounds for length 67
 /* MCS  7: SS 1, MOD: 64QAM, CR 5/6 */
 {{ ,19500 ,9,CEIL*10 ) x80
 java.lang.StringIndexOutOfBoundsException: Range [10, 7) out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 {13000, 27000, CEIL(,
  BRCM_RATE_6M},
 /* MCS  9: SS 2, MOD: QPSK,  CR 1/2 */ *MCS 18:SS 3,: QPSK,  CR 3/4 */
EIL26000 *10,9) CEIL(54000 *x48,
  BRCM_RATE_12M},
 /* MCS 10: SS 2, MOD: QPSK,  CR 3/4 */
 {39000, 81000, CEIL(39000 * 10, 9), CEIL(81000 * 10BRCM_RATE_18M}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  BRCM_RATE_18M},
 /* MCS 11: SS 2, MOD: 16QAM, CR 1/2 */
 {52000, 108000,  BRCM_RATE_24M,
  BRCM_RATE_24M},
 /* MCS 12: SS 2, MOD: 16QAM, CR 3/4 */
 { {117000 243000,( *10 ,CEIL(  10 ) x92,
  BRCM_RATE_36M}  BRCM_RATE_36M},
 /* MCS 13: SS 2, MOD: 64QAM, CR 2/3 */
 {104000, 216000, CEIL(104000 * 10, 9), CEIL(216000 * 10, 9), 0x59,
,
 /* MCS 14: SS 2, MOD: 64QAM, CR 3/4 */
 {117000, 243000, CEIL(117000 * 10, 9), CEIL( BRCM_RATE_48M,
 java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 {130000, 270000, CEIL(130000 * 10, 9), CEIL(270000 * 10, 9), BRCM_RATE_54M}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  BRCM_RATE_54M},
 /* MCS 16: SS 3, MOD: BPSK,  CR 1/2 */
 {19500 ,CEIL(  ,9,CEIL(  10,),x80
  BRCM_RATE_6M},
 /* MCS 17: SS 3, MOD: QPSK,  CR 1/2 */
{,81000, CEIL(  ,9) 81000   9,0x88
  BRCM_RATE_12M},
 /* MCS 18: SS 3, MOD: QPSK,  CR 3/4 */
{, 121500 (58500 *10,9,CEIL121500*10, ) 0,
  BRCM_RATE_18M}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 /* MCS 19: SS 3, MOD: 16QAM, CR 1/2 */
 BRCM_RATE_18M,
  
 /* MCS 20: SS 3, MOD: 16QAM, CR 3/4 */
{17000,,CEIL(17000*10 9) ( * 10,9),0x92java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  },
 /* MCS 21: SS 3, MOD: 64QAM, CR 2/3 */
 {156000, 324000,CEIL(156000 *10, 9) CEIL(324000 * 10, 9), 0x99,
  BRCM_RATE_48M},
 /* MCS 22: SS 3, MOD: 64QAM, CR 3/4 */
 {,364500 (175500  10,9,CEIL(364500 *10,9,0x9A,
  BRCM_RATE_54M},
 /* MCS 23: SS 3, MOD: 64QAM, CR 5/6 */
 {195000, 405000, CEIL(195000 * 10, 9), CEIL(405000 *   BRCM_RATE_36M,
  BRCM_RATE_54M},
 /* MCS 24: SS 4, MOD: BPSK,  CR 1/2 */
 {, 54000,CEIL( *10 9), (54000 *10,9,0xC0,
  BRCM_RATE_6M},
 /* MCS 25: SS 4, MOD: QPSK,  CR 1/2 */
 {52000, 108000, CEIL /* MCS 30: SS 4, MOD: 64QAM, CR 3/4 */
java.lang.StringIndexOutOfBoundsException: Range [30, 17) out of bounds for length 17
 /* MCS 26: SS 4, MOD: QPSK,  CR 3/4 */
 {78000 /* MCS 32: SS 1, MOD: BPSK,  CR 1/2 */
  }
 /* MCS 27: SS 4, MOD: 16QAM, CR 1/2 */
 {104000, 216000, CEIL(104000 * 10, 9), CEIL(216000 * 10, 9), 0xD0,
 }
 /* MCS 28: SS 4, MOD: 16QAM, CR 3/4 */
 {156000, 324000, CEIL(156000 * 10, 9), CEIL(324000 *   of streamsalways1otherfieldsrefertotable78of
  BRCM_RATE_36M},
 /* MCS 29: SS 4, MOD: 64QAM, CR 2/3 */
 {208000, 432000, CEIL(208000 * 10, 9), CEIL(432000 * 10, 9), 0xD9,
  BRCM_RATE_48M},
 /* MCS 30: SS 4, MOD: 64QAM, CR 3/4 */
 {234000, 486000, CEIL(234000 * 10, 9), CEIL( *section.3.2. of original11astandard
  BRCM_RATE_54Mstruct legacy_phycfg{
 /* MCS 31: SS 4, MOD: 64QAM, CR 5/6 */
 {260000, 540000, CEIL(260000 * 10, 9), CEIL(540000 *  rate_ofdm;/* ofdmmacrate /
 BRCM_RATE_54M}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 /* MCS 32: SS 1, MOD: BPSK,  CR 1/2 */
 {,6000 0,CEIL6000*10, ),0x00,BRCM_RATE_6M},
};

/*
 * phycfg for legacy OFDM frames: code rate, modulation scheme, spatial streams
*  of  streams: always 1 other fields: refer to table 78 of
 * section 17.3.2.2 of the original .11a standard
 */

struct
 u32 rate_ofdm; /* ofdm mac rate */
 /* phy ctl byte 3, code rate, modulation type, # of streams */
 u8 tx_phy_ctl3
};

/* Number of legacy_rate_cfg entries in the table */
#define LEGACY_PHYCFG_TABLE_SIZE 12

/*
 * In java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Range [18, 15) out of bounds for length 23
  Mbps;1=2Mbps;  = .Mbps; Mbps
 */

static  12java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
legacy_phycfg  0x82, 0x8b x0c 0,096 0x180 0,,0x60,
 {BRCM_RATE_1M, 0x00}, /* CCK  1Mbps,  data rate  0 */
  0}java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 {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 */
    0,0x00,0x00, 0x00 000}
 /* OFDM  9Mbps,  code rate 3/4, BPSK,   1 spatial stream */
 {BRCM_RATE_9M, 0x02},
 /* OFDM  12Mbps, code rate 1/2, QPSK,   1 spatial stream */
 {BRCM_RATE_12M 0x08},
 /* OFDM  18Mbps, code rate 3/4, QPSK,   1 spatial stream */
 {{ 0x8c0x12,098 0x24, xb0,048,0x60,0}java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
 /* OFDM  24Mbps, code rate 1/2, 16-QAM, 1 spatial stream */
RATE_24M x10},
 /* 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 */
 {java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 2
 /* OFDM  54Mbps, code rate 3/4, 64-QAM, 1 spatial stream */
 {BRCM_RATE_54Mstatic conststructbrcms_c_rateset cck_ofdm_40bw_mimo_rates={
};

/* Hardware rates (also encodes default basic rates) */

const struct brcms_c_rateset cck_ofdm_mimo_rates = {

 /*  1b,   2b,   5.5b, 6,    9,    11b,  12,   18,   24,   36,   48, */
  {0ff0xff 0xff, 0xff,0x01, x00,0x00,0x00, 0x00,0x00,0x00,
 /* 54 Mbps */0x00,x00,0x00,0,0x00}
   0x6c},
 0x00,
 { java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   x,0x00,0x00,0x00,0}
};

const struct brcms_c_rateset ofdm_mimo_rates = {
 8,
 /*  6b,   9,    12b,  18,   24b,  36,   48,   54 Mbps */
, 0x48, x60,0x6c},
 0x00,
 { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 0x00,000 x00, 0x00,0x00}
 12,
};

/* Default ratesets that include MCS32 for 40BW channels */
static const struct brcms_c_rateset cck_ofdm_40bw_mimo_rates = {
12,
 /*  1b,   2b,   5.5b, 6,    9,    11b,  12,   18,   24,   36,   48 */
 { 0x82, 0x84, /*54 Mbps */
 /* 54 Mbps */
   0x6c},
 0x00,
 {f 0xff 0xff, xff 001 0x00 0x00, 000, x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00}
};

static const struct brcms_c_rateset ofdm_40bw_mimo_rates = {
 8,
 /*  6b,   9,    12b,  18,   24b,  36,   48,   54 Mbps */
 { 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c},
 0x00
 { 0xff, 0xff, 0xff, 0xff, 0java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 3
   0x00, 0x00, 0000
;

const struct brcms_c_rateset cck_ofdm_rates = {
 12,
 /*  1b,   2b, 5.5b, 6,    9,    11b,  12,   18,   24,   36,   48,*/
 const struct brcms_c_rateset ofdm_rates={
 /*54 Mbps */
   0x6c},
 0x00,
 { 0x00, 0x00, 0x00, 0x00 8,
   0x00, 0x00, 0x00, 0x00, 0x00}
};

const struct brcms_c_rateset gphy_legacy_rates = {

 /*  1b,   2b,   5.5b, 11b Mbps */,0x00,0x00, x00,000}
 { 0x82, 0x84, 0x8bconst structbrcms_c_rateset cck_rates ={
 0x00,
 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  xx00,x,0,0x00, x00 0x00,0, 000java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
}

const;
 8,
12,18 24b,  ,   48    Mbps*
 { 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0
 ,
{
   0x00 idx
};

constif (rs>ount)
 4,
 /*  1b,   2b,   5.5,  11 Mbps */
 { 0x82, 0x84, 0x0b  return;
0x00,
 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00 or (idx  0;idx <rs>; idx++){
};

/* check if rateset is valid.
 * if check_brate is true, rateset without a basic rate is considered NOT java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 15
 */

static bool brcms_c_rateset_valid(struct brcms_c_rateset *rs, bool check_brate)
{
 uint idx;

 if(rsc
  return false;

 if (!bool
  return true;

 /* error if no basic rates */
for(dx 0 idx <rs;idx++ java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  if (rs-  rateset  1]
  returntruejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 }
 return false memsetrateset,0 sizeof(rateset);
}

 count=rs-count;

 int fori=0 i count;++ {
 for (i = txstreams; i < java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 42
  rs->mcs[i] = 0;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

/*[r  rs-rates]/java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
 * filter based on hardware java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 11
 *bit()preserved,and check if resulting rateset  valid
*/

bool
java.lang.StringIndexOutOfBoundsException: Range [68, 20) out of bounds for length 68
     struct *,
       bool check_brate, u8 txstreams)
{
  return true;
 u8 r;
 uint count;
   return false;

 memset(rateset, 0, sizeof(java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 1
 count = rs-u32 brcms_c_compute_rspecstruct d11rxhdr *,u8 *lcp)

 for (i = 0{
  /* mask off "basic rate" bit, BRCMS_RATE_FLAG */ phy_type;
  [i]  ;
  if ((r >  phy_type =
   continue;
  rateset (rxh>  RXS_CHAN_PHYTYPE_MASK>RXS_CHAN_PHYTYPE_SHIFT;
 }

 /* fill out the rates in order, looking at only supported rates */
 count= 0;
 for (i casePRXS0_CCK:
  r = hw_rs->rates[i] & java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 10
  if(rateset[]
  rs-rates[ount+]=rateset[]java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 }

 rs-  ofdm_phy2mac_rate(

 /* only set the mcs rate bit if the equivalent hw mcs bit is set */
 for ( = 0;i<MCSSET_LEN;i+)
 [i = (rs->cs[] &hw_rs->mcs[i]);

 if (brcms_c_rateset_valid :
return;
 else
  false
}

/* calculate the rate of a rx'd frame and return it as a ratespec */ rateof rx frame andreturn it asa  */
u32 brcms_c_compute_rspecstruct  *rxh, u8 *lcp
{
 int phy_type
  java.lang.StringIndexOutOfBoundsException: Range [34, 30) out of bounds for length 49

 phy_type =
      ()plcp-;

 if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     (phy_type == PHY_TYPE_LCN) || vbrcms_c_rateset_copyc  brcms_c_rateset*rcjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  switch (dstsrc sizeofstruct );
  case PRXS0_CCK:
   java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    cck_phy2mac_rate(
    ((struct *)plcp-signal);
   break;
  case PRXS0_OFDM:
   rspec =
       *'java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 44
    ((struct ofdm_phy_hdr *) plcp)->rlpt[0]);
   break;
  case PRXS0_PREN:
   rspec = (plcp*-0:cck andjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
   if ( *-1 cckonly
    /* indicate rspec is for 40 MHz mode */only
    rspec &= ~RSPEC_BW_MASK; 'isthe copy  typically 0x7f or0ff.
    rspec |= (PHY_TXC1_BW_40MHZ << RSPEC_BW_SHIFT);
   }
   break;
  case PRXS0_STDN:
   /* fallthru */
  default:
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   break;
  }
  if (plcp3_issgi(plcp[3]))
   | ;
 } else
      uint i
 rspec =ofdm_phy2mac_rate
 ofdm_phy_hdr * plcp->[0)
 else
  rspec = cck_phy2mac_rate(
  (structcck_phy_hdr* plcp)>)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43

return;
}

/* copy rateset src to dst as-is (no masking or sorting) */
voidbrcms_c_rateset_copy(conststruct brcms_c_rateset*rc
   brcms_c_rateset dst
{
 memcpy(dst, src, sizeof(struct java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 34
}

/*
 *  dstcount+]=r& xmask;
 * 'java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
 (&-m[] s-mcs[] )java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 *    - 0: cck and ofdm
      :only
 *    - 2 only
 *xmask is the copy  (ypically xfor xff)
 */

void
brcms_c_rateset_filter(     ofdm_mimo_rates:&
         bool  &cck_ofdm_40bw_mimo_rates);
{
 uint i;
 uint r;
 uint count;

 count =    &fdm_rates:&cck_ofdm_rates;
 for}else  (PHYTYPE_ISphy_type,PHY_TYPE_A){
  r = src->rates[} else if((phy_type,PHY_TYPE_G){
  if (basic_only && !(r & BRCMS_RATE_FLAG))
   continue;
  if ( /* should happen,error *java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
      is_ofdm_rate((r & BRCMS_RATE_MASK
   continue;
  java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 18
 (( & ))java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
   continue;
  dst-r[count+] =r;
 }
 dst->count = count;
 dst->htphy_membership = src->htphy_membership;

 if (brcms_c_rate_legacy_phyctl
  memcpy(&dst ijava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
 else
  brcms_c_rateset_mcs_clear(dst);
}

/* select rateset for a given phy_type and bandtype and filter it, sort it( =legacy_phycfg_table[i]rate_ofdm)
   fill rs_tgt with result
 */

void
brcms_c_rateset_default( brcms_c_rateset *s_tgt,
   const struct brcms_c_rateset;
  phy_type,intbandtype,boolcck_only,
      java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
{
 const struct brcms_c_rateset *rs_dflt;
 struct brcms_c_rateset rs_sel;
 if ((PHYTYPE_IS(phy_type, PHY_TYPE_HT)) ||
      memcpy&>[,&cck_ofdm_mimo_ratesmcs[] );
     PHYTYPE_ISphy_type,PHY_TYPE_LCN) |java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
     (PHYTYPE_IS(phy_type,voidbrcms_c_rateset_bw_mcs_filter brcms_c_rateset*rateset, u8 bw)
  if (bandtype == BRCM_BAND_5G)
  rs_dflt=( = BRCMS_20_MHZ?
       &setbit(rateset->mcs, 32);
  else
   rs_dflt t(rateset>cs 32);
       &cck_ofdm_mimo_rates :
       &cck_ofdm_40bw_mimo_rates);
 } else if (PHYTYPE_IS(phy_type, PHY_TYPE_LP)) {
  rs_dflt = (bandtype == BRCM_BAND_5G) ?
     &ofdm_rates : &cck_ofdm_rates;
 } else if (PHYTYPE_IS(phy_type, PHY_TYPE_A)) {
  rs_dflt = &ofdm_rates;
 } else if (PHYTYPE_IS(phy_type, PHY_TYPE_G)) {
  rs_dflt = &cck_ofdm_rates;
 } else {
  /* should not happen, error 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);
 brcms_c_rateset_mcs_upd(&rs_sel, txstreams);
 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(rs_tgt, rs_hw, false,
        mcsallow ? txstreams : 1);
}

s16 brcms_c_rate_legacy_phyctl(uint rate)
{
 uint i;
 for (i = 0; i < LEGACY_PHYCFG_TABLE_SIZE; i++)
  if (rate == legacy_phycfg_table[i].rate_ofdm)
   return legacy_phycfg_table[i].tx_phy_ctl3;

 return -1;
}

void brcms_c_rateset_mcs_clear(struct brcms_c_rateset *rateset)
{
 uint i;
 for (i = 0; i < MCSSET_LEN; i++)
  rateset->mcs[i] = 0;
}

void brcms_c_rateset_mcs_build(struct brcms_c_rateset *rateset, u8 txstreams)
{
 memcpy(&rateset->mcs[0], &cck_ofdm_mimo_rates.mcs[0], MCSSET_LEN);
 brcms_c_rateset_mcs_upd(rateset, txstreams);
}

/* Based on bandwidth passed, allow/disallow MCS 32 in the rateset */
void brcms_c_rateset_bw_mcs_filter(struct brcms_c_rateset *rateset, u8 bw)
{
 if (bw == BRCMS_40_MHZ)
  setbit(rateset->mcs, 32);
 else
  clrbit(rateset->mcs, 32);
}

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

¤ Dauer der Verarbeitung: 0.8 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.