Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Malcolm Priestley and committed by
Greg Kroah-Hartman
95d93e27 90be652c

+4 -11
+4 -11
drivers/staging/rtl8192e/rtl819x_TSProc.c
··· 306 306 pTsCommonInfo->TClasNum = TCLAS_Num; 307 307 } 308 308 309 - static bool IsACValid(unsigned int tid) 310 - { 311 - return tid < 7; 312 - } 313 - 314 309 bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS, 315 310 u8 *Addr, u8 TID, enum tr_select TxRxSelect, bool bAddNewTs) 316 311 { ··· 323 328 if (ieee->current_network.qos_data.supported == 0) { 324 329 UP = 0; 325 330 } else { 326 - if (!IsACValid(TID)) { 327 - netdev_warn(ieee->dev, "%s(): TID(%d) is not valid\n", 328 - __func__, TID); 329 - return false; 330 - } 331 - 332 331 switch (TID) { 333 332 case 0: 334 333 case 3: ··· 340 351 case 7: 341 352 UP = 7; 342 353 break; 354 + default: 355 + netdev_warn(ieee->dev, "%s(): TID(%d) is not valid\n", 356 + __func__, TID); 357 + return false; 343 358 } 344 359 } 345 360