summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2017-05-11 18:57:46 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-15 11:48:45 +0200
commit95d93e271d920dfda369d4740b1cc1061d41fe7f (patch)
tree8ded24ca02b9636b9e48ba3a048c9a9367386192
parent90be652c9f157d44b9c2803f902a8839796c090d (diff)
downloadlinux-95d93e271d920dfda369d4740b1cc1061d41fe7f.tar.gz
linux-95d93e271d920dfda369d4740b1cc1061d41fe7f.tar.bz2
linux-95d93e271d920dfda369d4740b1cc1061d41fe7f.zip
staging: rtl8192e: GetTs Fix invalid TID 7 warning.
TID 7 is a valid value for QoS IEEE 802.11e. The switch statement that follows states 7 is valid. Remove function IsACValid and use the default case to filter invalid TIDs. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8192e/rtl819x_TSProc.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 48bbd9e8a52f..dcc4eb691889 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -306,11 +306,6 @@ static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,
pTsCommonInfo->TClasNum = TCLAS_Num;
}
-static bool IsACValid(unsigned int tid)
-{
- return tid < 7;
-}
-
bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
u8 *Addr, u8 TID, enum tr_select TxRxSelect, bool bAddNewTs)
{
@@ -328,12 +323,6 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
if (ieee->current_network.qos_data.supported == 0) {
UP = 0;
} else {
- if (!IsACValid(TID)) {
- netdev_warn(ieee->dev, "%s(): TID(%d) is not valid\n",
- __func__, TID);
- return false;
- }
-
switch (TID) {
case 0:
case 3:
@@ -351,6 +340,10 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
case 7:
UP = 7;
break;
+ default:
+ netdev_warn(ieee->dev, "%s(): TID(%d) is not valid\n",
+ __func__, TID);
+ return false;
}
}