Commit 6d5485af authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: BBvUpdatePreEDThreshold change byBBPreEDIndex

assign pDevice->byBBPreEDIndex to ed_idx and change ed_inx
value in switch.

If ed_inx == byBBPreEDIndex and not bScanning return out.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7794dad6
...@@ -1411,6 +1411,7 @@ void TimerSQ3Tmax3CallBack(struct vnt_private *pDevice) ...@@ -1411,6 +1411,7 @@ void TimerSQ3Tmax3CallBack(struct vnt_private *pDevice)
void BBvUpdatePreEDThreshold(struct vnt_private *pDevice, int bScanning) void BBvUpdatePreEDThreshold(struct vnt_private *pDevice, int bScanning)
{ {
u8 cr_201 = 0x0, cr_206 = 0x0; u8 cr_201 = 0x0, cr_206 = 0x0;
u8 ed_inx = pDevice->byBBPreEDIndex;
switch(pDevice->byRFType) switch(pDevice->byRFType)
{ {
...@@ -1421,99 +1422,78 @@ void BBvUpdatePreEDThreshold(struct vnt_private *pDevice, int bScanning) ...@@ -1421,99 +1422,78 @@ void BBvUpdatePreEDThreshold(struct vnt_private *pDevice, int bScanning)
if( bScanning ) if( bScanning )
{ // need Max sensitivity //RSSI -69, -70,.... { // need Max sensitivity //RSSI -69, -70,....
pDevice->byBBPreEDIndex = 0; ed_inx = 0;
cr_206 = 0x30; cr_206 = 0x30;
break; break;
} }
if(pDevice->byBBPreEDRSSI <= 45) { // RSSI 0, -1,-2,....-45 if(pDevice->byBBPreEDRSSI <= 45) { // RSSI 0, -1,-2,....-45
if(pDevice->byBBPreEDIndex == 20) break; ed_inx = 20;
pDevice->byBBPreEDIndex = 20;
cr_201 = 0xff; cr_201 = 0xff;
} else if(pDevice->byBBPreEDRSSI <= 46) { //RSSI -46 } else if(pDevice->byBBPreEDRSSI <= 46) { //RSSI -46
if(pDevice->byBBPreEDIndex == 19) break; ed_inx = 19;
pDevice->byBBPreEDIndex = 19;
cr_201 = 0x1a; cr_201 = 0x1a;
} else if(pDevice->byBBPreEDRSSI <= 47) { //RSSI -47 } else if(pDevice->byBBPreEDRSSI <= 47) { //RSSI -47
if(pDevice->byBBPreEDIndex == 18) break; ed_inx = 18;
pDevice->byBBPreEDIndex = 18;
cr_201 = 0x15; cr_201 = 0x15;
} else if(pDevice->byBBPreEDRSSI <= 49) { //RSSI -48, -49 } else if(pDevice->byBBPreEDRSSI <= 49) { //RSSI -48, -49
if(pDevice->byBBPreEDIndex == 17) break; ed_inx = 17;
pDevice->byBBPreEDIndex = 17;
cr_201 = 0xe; cr_201 = 0xe;
} else if(pDevice->byBBPreEDRSSI <= 51) { //RSSI -50, -51 } else if(pDevice->byBBPreEDRSSI <= 51) { //RSSI -50, -51
if(pDevice->byBBPreEDIndex == 16) break; ed_inx = 16;
pDevice->byBBPreEDIndex = 16;
cr_201 = 0x9; cr_201 = 0x9;
} else if(pDevice->byBBPreEDRSSI <= 53) { //RSSI -52, -53 } else if(pDevice->byBBPreEDRSSI <= 53) { //RSSI -52, -53
if(pDevice->byBBPreEDIndex == 15) break; ed_inx = 15;
pDevice->byBBPreEDIndex = 15;
cr_201 = 0x6; cr_201 = 0x6;
} else if(pDevice->byBBPreEDRSSI <= 55) { //RSSI -54, -55 } else if(pDevice->byBBPreEDRSSI <= 55) { //RSSI -54, -55
if(pDevice->byBBPreEDIndex == 14) break; ed_inx = 14;
pDevice->byBBPreEDIndex = 14;
cr_201 = 0x3; cr_201 = 0x3;
} else if(pDevice->byBBPreEDRSSI <= 56) { //RSSI -56 } else if(pDevice->byBBPreEDRSSI <= 56) { //RSSI -56
if(pDevice->byBBPreEDIndex == 13) break; ed_inx = 13;
pDevice->byBBPreEDIndex = 13;
cr_201 = 0x2; cr_201 = 0x2;
cr_206 = 0xa0; cr_206 = 0xa0;
} else if(pDevice->byBBPreEDRSSI <= 57) { //RSSI -57 } else if(pDevice->byBBPreEDRSSI <= 57) { //RSSI -57
if(pDevice->byBBPreEDIndex == 12) break; ed_inx = 12;
pDevice->byBBPreEDIndex = 12;
cr_201 = 0x2; cr_201 = 0x2;
cr_206 = 0x20; cr_206 = 0x20;
} else if(pDevice->byBBPreEDRSSI <= 58) { //RSSI -58 } else if(pDevice->byBBPreEDRSSI <= 58) { //RSSI -58
if(pDevice->byBBPreEDIndex == 11) break; ed_inx = 11;
pDevice->byBBPreEDIndex = 11;
cr_201 = 0x1; cr_201 = 0x1;
cr_206 = 0xa0; cr_206 = 0xa0;
} else if(pDevice->byBBPreEDRSSI <= 59) { //RSSI -59 } else if(pDevice->byBBPreEDRSSI <= 59) { //RSSI -59
if(pDevice->byBBPreEDIndex == 10) break; ed_inx = 10;
pDevice->byBBPreEDIndex = 10;
cr_201 = 0x1; cr_201 = 0x1;
cr_206 = 0x54; cr_206 = 0x54;
} else if(pDevice->byBBPreEDRSSI <= 60) { //RSSI -60 } else if(pDevice->byBBPreEDRSSI <= 60) { //RSSI -60
if(pDevice->byBBPreEDIndex == 9) break; ed_inx = 9;
pDevice->byBBPreEDIndex = 9;
cr_201 = 0x1; cr_201 = 0x1;
cr_206 = 0x18; cr_206 = 0x18;
} else if(pDevice->byBBPreEDRSSI <= 61) { //RSSI -61 } else if(pDevice->byBBPreEDRSSI <= 61) { //RSSI -61
if(pDevice->byBBPreEDIndex == 8) break; ed_inx = 8;
pDevice->byBBPreEDIndex = 8;
cr_206 = 0xe3; cr_206 = 0xe3;
} else if(pDevice->byBBPreEDRSSI <= 62) { //RSSI -62 } else if(pDevice->byBBPreEDRSSI <= 62) { //RSSI -62
if(pDevice->byBBPreEDIndex == 7) break; ed_inx = 7;
pDevice->byBBPreEDIndex = 7;
cr_206 = 0xb9; cr_206 = 0xb9;
} else if(pDevice->byBBPreEDRSSI <= 63) { //RSSI -63 } else if(pDevice->byBBPreEDRSSI <= 63) { //RSSI -63
if(pDevice->byBBPreEDIndex == 6) break; ed_inx = 6;
pDevice->byBBPreEDIndex = 6;
cr_206 = 0x93; cr_206 = 0x93;
} else if(pDevice->byBBPreEDRSSI <= 64) { //RSSI -64 } else if(pDevice->byBBPreEDRSSI <= 64) { //RSSI -64
if(pDevice->byBBPreEDIndex == 5) break; ed_inx = 5;
pDevice->byBBPreEDIndex = 5;
cr_206 = 0x79; cr_206 = 0x79;
} else if(pDevice->byBBPreEDRSSI <= 65) { //RSSI -65 } else if(pDevice->byBBPreEDRSSI <= 65) { //RSSI -65
if(pDevice->byBBPreEDIndex == 4) break; ed_inx = 4;
pDevice->byBBPreEDIndex = 4;
cr_206 = 0x62; cr_206 = 0x62;
} else if(pDevice->byBBPreEDRSSI <= 66) { //RSSI -66 } else if(pDevice->byBBPreEDRSSI <= 66) { //RSSI -66
if(pDevice->byBBPreEDIndex == 3) break; ed_inx = 3;
pDevice->byBBPreEDIndex = 3;
cr_206 = 0x51; cr_206 = 0x51;
} else if(pDevice->byBBPreEDRSSI <= 67) { //RSSI -67 } else if(pDevice->byBBPreEDRSSI <= 67) { //RSSI -67
if(pDevice->byBBPreEDIndex == 2) break; ed_inx = 2;
pDevice->byBBPreEDIndex = 2;
cr_206 = 0x43; cr_206 = 0x43;
} else if(pDevice->byBBPreEDRSSI <= 68) { //RSSI -68 } else if(pDevice->byBBPreEDRSSI <= 68) { //RSSI -68
if(pDevice->byBBPreEDIndex == 1) break; ed_inx = 1;
pDevice->byBBPreEDIndex = 1;
cr_206 = 0x36; cr_206 = 0x36;
} else { //RSSI -69, -70,.... } else { //RSSI -69, -70,....
if(pDevice->byBBPreEDIndex == 0) break; ed_inx = 0;
pDevice->byBBPreEDIndex = 0;
cr_206 = 0x30; cr_206 = 0x30;
} }
break; break;
...@@ -1524,107 +1504,84 @@ void BBvUpdatePreEDThreshold(struct vnt_private *pDevice, int bScanning) ...@@ -1524,107 +1504,84 @@ void BBvUpdatePreEDThreshold(struct vnt_private *pDevice, int bScanning)
if( bScanning ) if( bScanning )
{ // need Max sensitivity //RSSI -69, -70, ... { // need Max sensitivity //RSSI -69, -70, ...
pDevice->byBBPreEDIndex = 0; ed_inx = 0;
cr_206 = 0x24; cr_206 = 0x24;
break; break;
} }
if(pDevice->byBBPreEDRSSI <= 41) { // RSSI 0, -1,-2,....-41 if(pDevice->byBBPreEDRSSI <= 41) { // RSSI 0, -1,-2,....-41
if(pDevice->byBBPreEDIndex == 22) break; ed_inx = 22;
pDevice->byBBPreEDIndex = 22;
cr_201 = 0xff; cr_201 = 0xff;
} else if(pDevice->byBBPreEDRSSI <= 42) { //RSSI -42 } else if(pDevice->byBBPreEDRSSI <= 42) { //RSSI -42
if(pDevice->byBBPreEDIndex == 21) break; ed_inx = 21;
pDevice->byBBPreEDIndex = 21;
cr_201 = 0x36; cr_201 = 0x36;
} else if(pDevice->byBBPreEDRSSI <= 43) { //RSSI -43 } else if(pDevice->byBBPreEDRSSI <= 43) { //RSSI -43
if(pDevice->byBBPreEDIndex == 20) break; ed_inx = 20;
pDevice->byBBPreEDIndex = 20;
cr_201 = 0x26; cr_201 = 0x26;
} else if(pDevice->byBBPreEDRSSI <= 45) { //RSSI -44, -45 } else if(pDevice->byBBPreEDRSSI <= 45) { //RSSI -44, -45
if(pDevice->byBBPreEDIndex == 19) break; ed_inx = 19;
pDevice->byBBPreEDIndex = 19;
cr_201 = 0x18; cr_201 = 0x18;
} else if(pDevice->byBBPreEDRSSI <= 47) { //RSSI -46, -47 } else if(pDevice->byBBPreEDRSSI <= 47) { //RSSI -46, -47
if(pDevice->byBBPreEDIndex == 18) break; ed_inx = 18;
pDevice->byBBPreEDIndex = 18;
cr_201 = 0x11; cr_201 = 0x11;
} else if(pDevice->byBBPreEDRSSI <= 49) { //RSSI -48, -49 } else if(pDevice->byBBPreEDRSSI <= 49) { //RSSI -48, -49
if(pDevice->byBBPreEDIndex == 17) break; ed_inx = 17;
pDevice->byBBPreEDIndex = 17;
cr_201 = 0xa; cr_201 = 0xa;
} else if(pDevice->byBBPreEDRSSI <= 51) { //RSSI -50, -51 } else if(pDevice->byBBPreEDRSSI <= 51) { //RSSI -50, -51
if(pDevice->byBBPreEDIndex == 16) break; ed_inx = 16;
pDevice->byBBPreEDIndex = 16;
cr_201 = 0x7; cr_201 = 0x7;
} else if(pDevice->byBBPreEDRSSI <= 53) { //RSSI -52, -53 } else if(pDevice->byBBPreEDRSSI <= 53) { //RSSI -52, -53
if(pDevice->byBBPreEDIndex == 15) break; ed_inx = 15;
pDevice->byBBPreEDIndex = 15;
cr_201 = 0x4; cr_201 = 0x4;
} else if(pDevice->byBBPreEDRSSI <= 55) { //RSSI -54, -55 } else if(pDevice->byBBPreEDRSSI <= 55) { //RSSI -54, -55
if(pDevice->byBBPreEDIndex == 14) break; ed_inx = 14;
pDevice->byBBPreEDIndex = 14;
cr_201 = 0x2; cr_201 = 0x2;
cr_206 = 0xc0; cr_206 = 0xc0;
} else if(pDevice->byBBPreEDRSSI <= 56) { //RSSI -56 } else if(pDevice->byBBPreEDRSSI <= 56) { //RSSI -56
if(pDevice->byBBPreEDIndex == 13) break; ed_inx = 13;
pDevice->byBBPreEDIndex = 13;
cr_201 = 0x2; cr_201 = 0x2;
cr_206 = 0x30; cr_206 = 0x30;
} else if(pDevice->byBBPreEDRSSI <= 57) { //RSSI -57 } else if(pDevice->byBBPreEDRSSI <= 57) { //RSSI -57
if(pDevice->byBBPreEDIndex == 12) break; ed_inx = 12;
pDevice->byBBPreEDIndex = 12;
cr_201 = 0x1; cr_201 = 0x1;
cr_206 = 0xb0; cr_206 = 0xb0;
} else if(pDevice->byBBPreEDRSSI <= 58) { //RSSI -58 } else if(pDevice->byBBPreEDRSSI <= 58) { //RSSI -58
if(pDevice->byBBPreEDIndex == 11) break; ed_inx = 11;
pDevice->byBBPreEDIndex = 11;
cr_201 = 0x1; cr_201 = 0x1;
cr_206 = 0x70; cr_206 = 0x70;
} else if(pDevice->byBBPreEDRSSI <= 59) { //RSSI -59 } else if(pDevice->byBBPreEDRSSI <= 59) { //RSSI -59
if(pDevice->byBBPreEDIndex == 10) break; ed_inx = 10;
pDevice->byBBPreEDIndex = 10;
cr_201 = 0x1; cr_201 = 0x1;
cr_206 = 0x30; cr_206 = 0x30;
} else if(pDevice->byBBPreEDRSSI <= 60) { //RSSI -60 } else if(pDevice->byBBPreEDRSSI <= 60) { //RSSI -60
if(pDevice->byBBPreEDIndex == 9) break; ed_inx = 9;
pDevice->byBBPreEDIndex = 9;
cr_206 = 0xea; cr_206 = 0xea;
} else if(pDevice->byBBPreEDRSSI <= 61) { //RSSI -61 } else if(pDevice->byBBPreEDRSSI <= 61) { //RSSI -61
if(pDevice->byBBPreEDIndex == 8) break; ed_inx = 8;
pDevice->byBBPreEDIndex = 8;
cr_206 = 0xc0; cr_206 = 0xc0;
} else if(pDevice->byBBPreEDRSSI <= 62) { //RSSI -62 } else if(pDevice->byBBPreEDRSSI <= 62) { //RSSI -62
if(pDevice->byBBPreEDIndex == 7) break; ed_inx = 7;
pDevice->byBBPreEDIndex = 7;
cr_206 = 0x9c; cr_206 = 0x9c;
} else if(pDevice->byBBPreEDRSSI <= 63) { //RSSI -63 } else if(pDevice->byBBPreEDRSSI <= 63) { //RSSI -63
if(pDevice->byBBPreEDIndex == 6) break; ed_inx = 6;
pDevice->byBBPreEDIndex = 6;
cr_206 = 0x80; cr_206 = 0x80;
} else if(pDevice->byBBPreEDRSSI <= 64) { //RSSI -64 } else if(pDevice->byBBPreEDRSSI <= 64) { //RSSI -64
if(pDevice->byBBPreEDIndex == 5) break; ed_inx = 5;
pDevice->byBBPreEDIndex = 5;
cr_206 = 0x68; cr_206 = 0x68;
} else if(pDevice->byBBPreEDRSSI <= 65) { //RSSI -65 } else if(pDevice->byBBPreEDRSSI <= 65) { //RSSI -65
if(pDevice->byBBPreEDIndex == 4) break; ed_inx = 4;
pDevice->byBBPreEDIndex = 4;
cr_206 = 0x52; cr_206 = 0x52;
} else if(pDevice->byBBPreEDRSSI <= 66) { //RSSI -66 } else if(pDevice->byBBPreEDRSSI <= 66) { //RSSI -66
if(pDevice->byBBPreEDIndex == 3) break; ed_inx = 3;
pDevice->byBBPreEDIndex = 3;
cr_206 = 0x43; cr_206 = 0x43;
} else if(pDevice->byBBPreEDRSSI <= 67) { //RSSI -67 } else if(pDevice->byBBPreEDRSSI <= 67) { //RSSI -67
if(pDevice->byBBPreEDIndex == 2) break; ed_inx = 2;
pDevice->byBBPreEDIndex = 2;
cr_206 = 0x36; cr_206 = 0x36;
} else if(pDevice->byBBPreEDRSSI <= 68) { //RSSI -68 } else if(pDevice->byBBPreEDRSSI <= 68) { //RSSI -68
if(pDevice->byBBPreEDIndex == 1) break; ed_inx = 1;
pDevice->byBBPreEDIndex = 1;
cr_206 = 0x2d; cr_206 = 0x2d;
} else { //RSSI -69, -70, ... } else { //RSSI -69, -70, ...
if(pDevice->byBBPreEDIndex == 0) break; ed_inx = 0;
pDevice->byBBPreEDIndex = 0;
cr_206 = 0x24; cr_206 = 0x24;
} }
break; break;
...@@ -1632,105 +1589,89 @@ void BBvUpdatePreEDThreshold(struct vnt_private *pDevice, int bScanning) ...@@ -1632,105 +1589,89 @@ void BBvUpdatePreEDThreshold(struct vnt_private *pDevice, int bScanning)
case RF_VT3342A0: //RobertYu:20060627, testing table case RF_VT3342A0: //RobertYu:20060627, testing table
if( bScanning ) if( bScanning )
{ // need Max sensitivity //RSSI -67, -68, ... { // need Max sensitivity //RSSI -67, -68, ...
pDevice->byBBPreEDIndex = 0; ed_inx = 0;
cr_206 = 0x38; cr_206 = 0x38;
break; break;
} }
if(pDevice->byBBPreEDRSSI <= 41) { // RSSI 0, -1,-2,....-41 if(pDevice->byBBPreEDRSSI <= 41) { // RSSI 0, -1,-2,....-41
if(pDevice->byBBPreEDIndex == 20) break; ed_inx = 20;
pDevice->byBBPreEDIndex = 20;
cr_201 = 0xff; cr_201 = 0xff;
} else if(pDevice->byBBPreEDRSSI <= 42) { //RSSI -42 } else if(pDevice->byBBPreEDRSSI <= 42) { //RSSI -42
if(pDevice->byBBPreEDIndex == 19) break; ed_inx = 19;
pDevice->byBBPreEDIndex = 19;
cr_201 = 0x36; cr_201 = 0x36;
} else if(pDevice->byBBPreEDRSSI <= 43) { //RSSI -43 } else if(pDevice->byBBPreEDRSSI <= 43) { //RSSI -43
if(pDevice->byBBPreEDIndex == 18) break; ed_inx = 18;
pDevice->byBBPreEDIndex = 18;
cr_201 = 0x26; cr_201 = 0x26;
} else if(pDevice->byBBPreEDRSSI <= 45) { //RSSI -44, -45 } else if(pDevice->byBBPreEDRSSI <= 45) { //RSSI -44, -45
if(pDevice->byBBPreEDIndex == 17) break; ed_inx = 17;
pDevice->byBBPreEDIndex = 17;
cr_201 = 0x18; cr_201 = 0x18;
} else if(pDevice->byBBPreEDRSSI <= 47) { //RSSI -46, -47 } else if(pDevice->byBBPreEDRSSI <= 47) { //RSSI -46, -47
if(pDevice->byBBPreEDIndex == 16) break; ed_inx = 16;
pDevice->byBBPreEDIndex = 16;
cr_201 = 0x11; cr_201 = 0x11;
} else if(pDevice->byBBPreEDRSSI <= 49) { //RSSI -48, -49 } else if(pDevice->byBBPreEDRSSI <= 49) { //RSSI -48, -49
if(pDevice->byBBPreEDIndex == 15) break; ed_inx = 15;
pDevice->byBBPreEDIndex = 15;
cr_201 = 0xa; cr_201 = 0xa;
} else if(pDevice->byBBPreEDRSSI <= 51) { //RSSI -50, -51 } else if(pDevice->byBBPreEDRSSI <= 51) { //RSSI -50, -51
if(pDevice->byBBPreEDIndex == 14) break; ed_inx = 14;
pDevice->byBBPreEDIndex = 14;
cr_201 = 0x7; cr_201 = 0x7;
} else if(pDevice->byBBPreEDRSSI <= 53) { //RSSI -52, -53 } else if(pDevice->byBBPreEDRSSI <= 53) { //RSSI -52, -53
if(pDevice->byBBPreEDIndex == 13) break; ed_inx = 13;
pDevice->byBBPreEDIndex = 13;
cr_201 = 0x4; cr_201 = 0x4;
} else if(pDevice->byBBPreEDRSSI <= 55) { //RSSI -54, -55 } else if(pDevice->byBBPreEDRSSI <= 55) { //RSSI -54, -55
if(pDevice->byBBPreEDIndex == 12) break; ed_inx = 12;
pDevice->byBBPreEDIndex = 12;
cr_201 = 0x2; cr_201 = 0x2;
cr_206 = 0xc0; cr_206 = 0xc0;
} else if(pDevice->byBBPreEDRSSI <= 56) { //RSSI -56 } else if(pDevice->byBBPreEDRSSI <= 56) { //RSSI -56
if(pDevice->byBBPreEDIndex == 11) break; ed_inx = 11;
pDevice->byBBPreEDIndex = 11;
cr_201 = 0x2; cr_201 = 0x2;
cr_206 = 0x30; cr_206 = 0x30;
} else if(pDevice->byBBPreEDRSSI <= 57) { //RSSI -57 } else if(pDevice->byBBPreEDRSSI <= 57) { //RSSI -57
if(pDevice->byBBPreEDIndex == 10) break; ed_inx = 10;
pDevice->byBBPreEDIndex = 10;
cr_201 = 0x1; cr_201 = 0x1;
cr_206 = 0xb0; cr_206 = 0xb0;
} else if(pDevice->byBBPreEDRSSI <= 58) { //RSSI -58 } else if(pDevice->byBBPreEDRSSI <= 58) { //RSSI -58
if(pDevice->byBBPreEDIndex == 9) break; ed_inx = 9;
pDevice->byBBPreEDIndex = 9;
cr_201 = 0x1; cr_201 = 0x1;
cr_206 = 0x70; cr_206 = 0x70;
} else if(pDevice->byBBPreEDRSSI <= 59) { //RSSI -59 } else if(pDevice->byBBPreEDRSSI <= 59) { //RSSI -59
if(pDevice->byBBPreEDIndex == 8) break; ed_inx = 8;
pDevice->byBBPreEDIndex = 8;
cr_201 = 0x1; cr_201 = 0x1;
cr_206 = 0x30; cr_206 = 0x30;
} else if(pDevice->byBBPreEDRSSI <= 60) { //RSSI -60 } else if(pDevice->byBBPreEDRSSI <= 60) { //RSSI -60
if(pDevice->byBBPreEDIndex == 7) break; ed_inx = 7;
pDevice->byBBPreEDIndex = 7;
cr_206 = 0xea; cr_206 = 0xea;
} else if(pDevice->byBBPreEDRSSI <= 61) { //RSSI -61 } else if(pDevice->byBBPreEDRSSI <= 61) { //RSSI -61
if(pDevice->byBBPreEDIndex == 6) break; ed_inx = 6;
pDevice->byBBPreEDIndex = 6;
cr_206 = 0xc0; cr_206 = 0xc0;
} else if(pDevice->byBBPreEDRSSI <= 62) { //RSSI -62 } else if(pDevice->byBBPreEDRSSI <= 62) { //RSSI -62
if(pDevice->byBBPreEDIndex == 5) break; ed_inx = 5;
pDevice->byBBPreEDIndex = 5;
cr_206 = 0x9c; cr_206 = 0x9c;
} else if(pDevice->byBBPreEDRSSI <= 63) { //RSSI -63 } else if(pDevice->byBBPreEDRSSI <= 63) { //RSSI -63
if(pDevice->byBBPreEDIndex == 4) break; ed_inx = 4;
pDevice->byBBPreEDIndex = 4;
cr_206 = 0x80; cr_206 = 0x80;
} else if(pDevice->byBBPreEDRSSI <= 64) { //RSSI -64 } else if(pDevice->byBBPreEDRSSI <= 64) { //RSSI -64
if(pDevice->byBBPreEDIndex == 3) break; ed_inx = 3;
pDevice->byBBPreEDIndex = 3;
cr_206 = 0x68; cr_206 = 0x68;
} else if(pDevice->byBBPreEDRSSI <= 65) { //RSSI -65 } else if(pDevice->byBBPreEDRSSI <= 65) { //RSSI -65
if(pDevice->byBBPreEDIndex == 2) break; ed_inx = 2;
pDevice->byBBPreEDIndex = 2;
cr_206 = 0x52; cr_206 = 0x52;
} else if(pDevice->byBBPreEDRSSI <= 66) { //RSSI -66 } else if(pDevice->byBBPreEDRSSI <= 66) { //RSSI -66
if(pDevice->byBBPreEDIndex == 1) break; ed_inx = 1;
pDevice->byBBPreEDIndex = 1;
cr_206 = 0x43; cr_206 = 0x43;
} else { //RSSI -67, -68, ... } else { //RSSI -67, -68, ...
if(pDevice->byBBPreEDIndex == 0) break; ed_inx = 0;
pDevice->byBBPreEDIndex = 0;
cr_206 = 0x38; cr_206 = 0x38;
} }
break; break;
} }
if (ed_inx == pDevice->byBBPreEDIndex && !bScanning)
return;
pDevice->byBBPreEDIndex = ed_inx;
dev_dbg(&pDevice->usb->dev, "%s byBBPreEDRSSI %d\n", dev_dbg(&pDevice->usb->dev, "%s byBBPreEDRSSI %d\n",
__func__, pDevice->byBBPreEDRSSI); __func__, pDevice->byBBPreEDRSSI);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment