Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354335
b: refs/heads/master
c: 84cf5fc
h: refs/heads/master
i:
  354333: 6f95f69
  354331: 6d98033
  354327: ed44bfa
  354319: 85f9810
  354303: b1d2044
v: v3
  • Loading branch information
Andres More authored and Greg Kroah-Hartman committed Feb 4, 2013
1 parent ef5a3f5 commit 102c541
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c16fdffc2d83d4be2925e05ce1a2fb27f2f2962f
refs/heads/master: 84cf5fcbb581fc8d8f5a0469511c53bd765029d8
33 changes: 21 additions & 12 deletions trunk/drivers/staging/vt6656/datarate.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@


/*--------------------- Static Variables --------------------------*/
//static int msglevel =MSG_LEVEL_DEBUG;

/* static int msglevel = MSG_LEVEL_DEBUG; */
static int msglevel =MSG_LEVEL_INFO;
const BYTE acbyIERate[MAX_RATE] =
{0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
Expand All @@ -71,7 +72,7 @@ void s_vResetCounter(PKnownNodeDB psNodeDBTable)
{
BYTE ii;

// clear statistic counter for auto_rate
/* clear statistics counter for auto_rate */
for (ii = 0; ii <= MAX_RATE; ii++) {
psNodeDBTable->uTxOk[ii] = 0;
psNodeDBTable->uTxFail[ii] = 0;
Expand Down Expand Up @@ -105,8 +106,8 @@ DATARATEbyGetRateIdx (
{
BYTE ii;

//Erase basicRate flag.
byRate = byRate & 0x7F;//0111 1111
/* erase BasicRate flag */
byRate = byRate & 0x7F;

for (ii = 0; ii < MAX_RATE; ii ++) {
if (acbyIERate[ii] == byRate)
Expand Down Expand Up @@ -159,8 +160,8 @@ RATEwGetRateIdx(
{
WORD ii;

//Erase basicRate flag.
byRate = byRate & 0x7F;//0111 1111
/* erase BasicRate flag */
byRate = byRate & 0x7F;

for (ii = 0; ii < MAX_RATE; ii ++) {
if (acbyIERate[ii] == byRate)
Expand Down Expand Up @@ -218,7 +219,10 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
byRate = (BYTE)(pItemRates->abyRates[ii]);
if (WLAN_MGMT_IS_BASICRATE(byRate) &&
(bUpdateBasicRate == TRUE)) {
// Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate
/*
* add to basic rate set, update pDevice->byTopCCKBasicRate and
* pDevice->byTopOFDMBasicRate
*/
CARDbAddBasicRate((void *)pDevice, RATEwGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", RATEwGetRateIdx(byRate));
}
Expand All @@ -239,9 +243,12 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,

for (ii = 0; ii < uExtRateLen ; ii++) {
byRate = (BYTE)(pItemExtRates->abyRates[ii]);
// select highest basic rate
/* select highest basic rate */
if (WLAN_MGMT_IS_BASICRATE(pItemExtRates->abyRates[ii])) {
// Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate
/*
* add to basic rate set, update pDevice->byTopCCKBasicRate and
* pDevice->byTopOFDMBasicRate
*/
CARDbAddBasicRate((void *)pDevice, RATEwGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", RATEwGetRateIdx(byRate));
}
Expand All @@ -251,9 +258,11 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
if (byRate > byHighSuppRate)
byHighSuppRate = byRate;
*pwSuppRate |= (1<<RATEwGetRateIdx(byRate));
//DBG_PRN_GRP09(("ParseMaxRate : HighSuppRate: %d, %X\n", RATEwGetRateIdx(byRate), byRate));

/* DBG_PRN_GRP09(("ParseMaxRate : HighSuppRate: %d, %X\n",
RATEwGetRateIdx(byRate), byRate)); */
}
} //if(pItemExtRates != NULL)
}

if ((pDevice->byPacketType == PK_TYPE_11GB)
&& CARDbIsOFDMinBasicRate((void *)pDevice)) {
Expand Down Expand Up @@ -363,7 +372,7 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice,
(psNodeDBTable->uTxFail[MAX_RATE] * 4) ) {
psNodeDBTable->wTxDataRate = wIdxUpRate;
}
}else { // adhoc, if uTxOk(total) =0 & uTxFail(total) = 0
} else { /* adhoc, if uTxOk(total) == 0 & uTxFail(total) == 0 */
if (psNodeDBTable->uTxFail[MAX_RATE] == 0)
psNodeDBTable->wTxDataRate = wIdxUpRate;
}
Expand Down

0 comments on commit 102c541

Please sign in to comment.