staging: rtl8723au: rtl8723a_add_rateatid() simplyfy code
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 9 Feb 2015 22:52:18 +0000 (17:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 17:54:23 +0000 (09:54 -0800)
No point shifting raid right, just to shift it left again before
re-adding it.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c

index 0b77ee1eaddf48b4b96e181a01adcb60a041ec53..3304e55108ee7ed8e86cfbb362da9d6afea94823 100644 (file)
@@ -142,16 +142,16 @@ int rtl8723a_set_raid_cmd(struct rtw_adapter *padapter, u32 mask, u8 arg)
 /* arg[5] = Short GI */
 void rtl8723a_add_rateatid(struct rtw_adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_level)
 {
-       struct hal_data_8723a   *pHalData = GET_HAL_DATA(pAdapter);
-       u8 macid = arg&0x1f;
-       u8 raid = (bitmap>>28) & 0x0f;
+       struct hal_data_8723a *pHalData = GET_HAL_DATA(pAdapter);
+       u8 macid = arg & 0x1f;
+       u32 raid = bitmap & 0xf0000000;
 
        bitmap &= 0x0fffffff;
        if (rssi_level != DM_RATR_STA_INIT)
                bitmap = ODM_Get_Rate_Bitmap23a(pHalData, macid, bitmap,
                                                rssi_level);
 
-       bitmap |= ((raid<<28)&0xf0000000);
+       bitmap |= raid;
 
        rtl8723a_set_raid_cmd(pAdapter, bitmap, arg);
 }