소스 검색

qcacld-3.0: Use correct BIT operation for staflags

While filling station info rx_mpdus and fcs_error count
are getting filled and corresponding flags are getting
set. These flags are set using BIT macro which operates
only on integers and will cause overflow on 32 bit
machine if the bit operation is of more than 32 bit.

To resolve above issue use BIT_ULL for bit operations
on station flags.

Change-ID: Ia7263f0e86a1fbdf477491b84bf94d5609781b00
CRs-Fixed: 2484159
Ashish Kumar Dhanotiya 5 년 전
부모
커밋
b6f487bf7c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      core/hdd/src/wlan_hdd_stats.c

+ 2 - 2
core/hdd/src/wlan_hdd_stats.c

@@ -74,8 +74,8 @@
 #define HDD_INFO_RX_BYTES64             BIT(NL80211_STA_INFO_RX_BYTES64)
 #define HDD_INFO_INACTIVE_TIME          BIT(NL80211_STA_INFO_INACTIVE_TIME)
 #define HDD_INFO_CONNECTED_TIME         BIT(NL80211_STA_INFO_CONNECTED_TIME)
-#define HDD_INFO_RX_MPDUS               BIT(NL80211_STA_INFO_RX_MPDUS)
-#define HDD_INFO_FCS_ERROR_COUNT        BIT(NL80211_STA_INFO_FCS_ERROR_COUNT)
+#define HDD_INFO_RX_MPDUS             BIT_ULL(NL80211_STA_INFO_RX_MPDUS)
+#define HDD_INFO_FCS_ERROR_COUNT      BIT_ULL(NL80211_STA_INFO_FCS_ERROR_COUNT)
 #endif /* kernel version less than 4.0.0 && no_backport */
 
 /* 11B, 11G Rate table include Basic rate and Extended rate