staging: rtl8723au: pxmitframe->frame_tag is never set to a value > 8
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 10 Nov 2014 23:11:43 +0000 (18:11 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 20:41:48 +0000 (12:41 -0800)
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>
drivers/staging/rtl8723au/core/rtw_xmit.c
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c

index 5cbfab4..1f4ebb3 100644 (file)
@@ -1291,7 +1291,7 @@ void rtw_count_tx_stats23a(struct rtw_adapter *padapter, struct xmit_frame *pxmi
        struct xmit_priv        *pxmitpriv = &padapter->xmitpriv;
        struct mlme_priv        *pmlmepriv = &padapter->mlmepriv;
 
-       if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG) {
+       if (pxmitframe->frame_tag == DATA_FRAMETAG) {
                pxmitpriv->tx_bytes += sz;
                pmlmepriv->LinkDetectInfo.NumTxOkInPeriod++;
 
index cf31d29..9cdd9e5 100644 (file)
@@ -163,7 +163,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
 
        memset(ptxdesc, 0, sizeof(struct tx_desc));
 
-       if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG) {
+       if (pxmitframe->frame_tag == DATA_FRAMETAG) {
                /* offset 4 */
                ptxdesc->txdw1 |= cpu_to_le32(pattrib->mac_id&0x1f);
 
@@ -215,7 +215,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
 
                        ptxdesc->txdw5 |= cpu_to_le32(MRateToHwRate23a(pmlmeext->tx_rate));
                }
-       } else if ((pxmitframe->frame_tag&0x0f) == MGNT_FRAMETAG) {
+       } else if (pxmitframe->frame_tag == MGNT_FRAMETAG) {
                /* offset 4 */
                ptxdesc->txdw1 |= cpu_to_le32(pattrib->mac_id&0x1f);
 
@@ -240,10 +240,11 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
                ptxdesc->txdw5 |= cpu_to_le32(0x00180000);/* retry limit = 6 */
 
                ptxdesc->txdw5 |= cpu_to_le32(MRateToHwRate23a(pmlmeext->tx_rate));
-       } else if ((pxmitframe->frame_tag&0x0f) == TXAGG_FRAMETAG) {
+       } else if (pxmitframe->frame_tag == TXAGG_FRAMETAG) {
                DBG_8723A("pxmitframe->frame_tag == TXAGG_FRAMETAG\n");
        } else {
-               DBG_8723A("pxmitframe->frame_tag = %d\n", pxmitframe->frame_tag);
+               DBG_8723A("pxmitframe->frame_tag = %d\n",
+                         pxmitframe->frame_tag);
 
                /* offset 4 */
                ptxdesc->txdw1 |= cpu_to_le32((4)&0x1f);/* CAM_ID(MAC_ID) */
@@ -392,7 +393,7 @@ bool rtl8723au_xmitframe_complete(struct rtw_adapter *padapter,
 
                pxmitbuf->priv_data = pxmitframe;
 
-               if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG) {
+               if (pxmitframe->frame_tag == DATA_FRAMETAG) {
                        if (pxmitframe->attrib.priority <= 15)/* TID0~15 */
                                res = rtw_xmitframe_coalesce23a(padapter, pxmitframe->pkt, pxmitframe);