staging: rtl8723au: multiple condition with no effect - if identical to else

A number if/else if/else branches are identical - so the condition has no
effect on the effective code and can be significantly simplified - this
patch removes the condition and the duplicated code.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nicholas Mc Guire 2015-02-03 08:08:16 -05:00 committed by Greg Kroah-Hartman
parent 11862b36ce
commit ceb2f735e8

View File

@ -7255,63 +7255,19 @@ btdm_2AntTdmaDurationAdjust(struct rtw_adapter *padapter, u8 bScoHid,
RTPRINT(FBT, BT_TRACE, ("[BTCoex], first run TdmaDurationAdjust()!!\n"));
if (bScoHid) {
if (bTxPause) {
if (maxInterval == 1) {
btdm_2AntPsTdma(padapter, true, 15);
pBtdm8723->psTdmaDuAdjType = 15;
} else if (maxInterval == 2) {
btdm_2AntPsTdma(padapter, true, 15);
pBtdm8723->psTdmaDuAdjType = 15;
} else if (maxInterval == 3) {
btdm_2AntPsTdma(padapter, true, 15);
pBtdm8723->psTdmaDuAdjType = 15;
} else {
btdm_2AntPsTdma(padapter, true, 15);
pBtdm8723->psTdmaDuAdjType = 15;
}
btdm_2AntPsTdma(padapter, true, 15);
pBtdm8723->psTdmaDuAdjType = 15;
} else {
if (maxInterval == 1) {
btdm_2AntPsTdma(padapter, true, 11);
pBtdm8723->psTdmaDuAdjType = 11;
} else if (maxInterval == 2) {
btdm_2AntPsTdma(padapter, true, 11);
pBtdm8723->psTdmaDuAdjType = 11;
} else if (maxInterval == 3) {
btdm_2AntPsTdma(padapter, true, 11);
pBtdm8723->psTdmaDuAdjType = 11;
} else {
btdm_2AntPsTdma(padapter, true, 11);
pBtdm8723->psTdmaDuAdjType = 11;
}
btdm_2AntPsTdma(padapter, true, 11);
pBtdm8723->psTdmaDuAdjType = 11;
}
} else {
if (bTxPause) {
if (maxInterval == 1) {
btdm_2AntPsTdma(padapter, true, 7);
pBtdm8723->psTdmaDuAdjType = 7;
} else if (maxInterval == 2) {
btdm_2AntPsTdma(padapter, true, 7);
pBtdm8723->psTdmaDuAdjType = 7;
} else if (maxInterval == 3) {
btdm_2AntPsTdma(padapter, true, 7);
pBtdm8723->psTdmaDuAdjType = 7;
} else {
btdm_2AntPsTdma(padapter, true, 7);
pBtdm8723->psTdmaDuAdjType = 7;
}
btdm_2AntPsTdma(padapter, true, 7);
pBtdm8723->psTdmaDuAdjType = 7;
} else {
if (maxInterval == 1) {
btdm_2AntPsTdma(padapter, true, 3);
pBtdm8723->psTdmaDuAdjType = 3;
} else if (maxInterval == 2) {
btdm_2AntPsTdma(padapter, true, 3);
pBtdm8723->psTdmaDuAdjType = 3;
} else if (maxInterval == 3) {
btdm_2AntPsTdma(padapter, true, 3);
pBtdm8723->psTdmaDuAdjType = 3;
} else {
btdm_2AntPsTdma(padapter, true, 3);
pBtdm8723->psTdmaDuAdjType = 3;
}
btdm_2AntPsTdma(padapter, true, 3);
pBtdm8723->psTdmaDuAdjType = 3;
}
}
up = 0;