[PATCH 12/13] staging: r8188eu: we always use HQ and NQ for two endpoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When _InitNormalChipTwoOutEpPriority is called, pdvobjpriv->RtNumOutPipes
and haldata->OutEpQueueSel have already been initialized.

_InitNormalChipTwoOutEpPriority is called only if
pdvobjpriv->RtNumOutPipes == 2. In this case, haldata->OutEpQueueSel is
always TX_SELE_HQ | TX_SELE_NQ.

Remove the switch-case statement and set valueHi and valueLow directly.

Signed-off-by: Martin Kaiser <martin@xxxxxxxxx>
---
 drivers/staging/r8188eu/hal/usb_halinit.c | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index a89db93840f3..fc4d25b835d3 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -227,28 +227,10 @@ static void _InitNormalChipRegPriority(struct adapter *Adapter, u16 beQ,
 
 static void _InitNormalChipTwoOutEpPriority(struct adapter *Adapter)
 {
-	struct hal_data_8188e *haldata = &Adapter->haldata;
 	struct registry_priv *pregistrypriv = &Adapter->registrypriv;
 	u16 beQ, bkQ, viQ, voQ, mgtQ, hiQ;
-	u16 valueHi = 0;
-	u16 valueLow = 0;
-
-	switch (haldata->OutEpQueueSel) {
-	case (TX_SELE_HQ | TX_SELE_LQ):
-		valueHi = QUEUE_HIGH;
-		valueLow = QUEUE_LOW;
-		break;
-	case (TX_SELE_NQ | TX_SELE_LQ):
-		valueHi = QUEUE_NORMAL;
-		valueLow = QUEUE_LOW;
-		break;
-	case (TX_SELE_HQ | TX_SELE_NQ):
-		valueHi = QUEUE_HIGH;
-		valueLow = QUEUE_NORMAL;
-		break;
-	default:
-		break;
-	}
+	u16 valueHi = QUEUE_HIGH;
+	u16 valueLow = QUEUE_NORMAL;
 
 	if (!pregistrypriv->wifi_spec) {
 		beQ	= valueLow;
-- 
2.30.2





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux