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

staging: rtl8723au: pxmitframe->frame_tag is never set to a value > 8

No point of masking out high bits since we never set the value to
anything exceeding bits 0-3.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jes Sorensen and committed by
Greg Kroah-Hartman
b81f3f26 22f42e2a

+7 -6
+1 -1
drivers/staging/rtl8723au/core/rtw_xmit.c
··· 1291 1291 struct xmit_priv *pxmitpriv = &padapter->xmitpriv; 1292 1292 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; 1293 1293 1294 - if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG) { 1294 + if (pxmitframe->frame_tag == DATA_FRAMETAG) { 1295 1295 pxmitpriv->tx_bytes += sz; 1296 1296 pmlmepriv->LinkDetectInfo.NumTxOkInPeriod++; 1297 1297
+6 -5
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c
··· 163 163 164 164 memset(ptxdesc, 0, sizeof(struct tx_desc)); 165 165 166 - if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG) { 166 + if (pxmitframe->frame_tag == DATA_FRAMETAG) { 167 167 /* offset 4 */ 168 168 ptxdesc->txdw1 |= cpu_to_le32(pattrib->mac_id&0x1f); 169 169 ··· 215 215 216 216 ptxdesc->txdw5 |= cpu_to_le32(MRateToHwRate23a(pmlmeext->tx_rate)); 217 217 } 218 - } else if ((pxmitframe->frame_tag&0x0f) == MGNT_FRAMETAG) { 218 + } else if (pxmitframe->frame_tag == MGNT_FRAMETAG) { 219 219 /* offset 4 */ 220 220 ptxdesc->txdw1 |= cpu_to_le32(pattrib->mac_id&0x1f); 221 221 ··· 240 240 ptxdesc->txdw5 |= cpu_to_le32(0x00180000);/* retry limit = 6 */ 241 241 242 242 ptxdesc->txdw5 |= cpu_to_le32(MRateToHwRate23a(pmlmeext->tx_rate)); 243 - } else if ((pxmitframe->frame_tag&0x0f) == TXAGG_FRAMETAG) { 243 + } else if (pxmitframe->frame_tag == TXAGG_FRAMETAG) { 244 244 DBG_8723A("pxmitframe->frame_tag == TXAGG_FRAMETAG\n"); 245 245 } else { 246 - DBG_8723A("pxmitframe->frame_tag = %d\n", pxmitframe->frame_tag); 246 + DBG_8723A("pxmitframe->frame_tag = %d\n", 247 + pxmitframe->frame_tag); 247 248 248 249 /* offset 4 */ 249 250 ptxdesc->txdw1 |= cpu_to_le32((4)&0x1f);/* CAM_ID(MAC_ID) */ ··· 393 392 394 393 pxmitbuf->priv_data = pxmitframe; 395 394 396 - if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG) { 395 + if (pxmitframe->frame_tag == DATA_FRAMETAG) { 397 396 if (pxmitframe->attrib.priority <= 15)/* TID0~15 */ 398 397 res = rtw_xmitframe_coalesce23a(padapter, pxmitframe->pkt, pxmitframe); 399 398