|
@@ -116,11 +116,11 @@ extern "C" {
|
|
|
} while (0)
|
|
|
|
|
|
#define WMI_GET_BITS(_val,_index,_num_bits) \
|
|
|
- (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
|
|
|
+ (((_val) >> (_index)) & (((A_UINT32) 1 << (_num_bits)) - 1))
|
|
|
|
|
|
-#define WMI_SET_BITS(_var,_index,_num_bits,_val) do { \
|
|
|
- (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
|
|
|
- (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
|
|
|
+#define WMI_SET_BITS(_var,_index,_num_bits,_val) do { \
|
|
|
+ (_var) &= ~((((A_UINT32) 1 << (_num_bits)) - 1) << (_index)); \
|
|
|
+ (_var) |= (((_val) & (((A_UINT32) 1 << (_num_bits)) - 1)) << (_index)); \
|
|
|
} while (0)
|
|
|
|
|
|
#define WMI_APPEND_TWO_SET_BITS(var, lsb_index, lsb_num_bits, msb_index, msb_num_bits, val) \
|
|
@@ -180,7 +180,7 @@ static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
|
|
|
A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
|
|
|
A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
|
|
|
return (arr[uint_index] >> start_bit_in_uint) &
|
|
|
- ((1 << bits_per_entry) - 1);
|
|
|
+ (((A_UINT32) 1 << bits_per_entry) - 1);
|
|
|
}
|
|
|
|
|
|
static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
|
|
@@ -192,9 +192,10 @@ static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
|
|
|
A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
|
|
|
A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
|
|
|
|
|
|
- arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
|
|
|
+ arr[uint_index] &=
|
|
|
+ ~((((A_UINT32) 1 << bits_per_entry) - 1) << start_bit_in_uint);
|
|
|
arr[uint_index] |=
|
|
|
- ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
|
|
|
+ ((val & (((A_UINT32) 1 << bits_per_entry) - 1)) << start_bit_in_uint);
|
|
|
}
|
|
|
|
|
|
/** 2 word representation of MAC addr */
|
|
@@ -218,10 +219,10 @@ typedef struct _wmi_mac_addr {
|
|
|
/** macro to convert MAC address from char array to WMI word format */
|
|
|
#define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr) do { \
|
|
|
(pwmi_mac_addr)->mac_addr31to0 = \
|
|
|
- (((c_macaddr)[0] << 0) | \
|
|
|
- ((c_macaddr)[1] << 8) | \
|
|
|
- ((c_macaddr)[2] << 16) | \
|
|
|
- ((c_macaddr)[3] << 24)); \
|
|
|
+ (((A_UINT32)(c_macaddr)[0] << 0) | \
|
|
|
+ ((A_UINT32)(c_macaddr)[1] << 8) | \
|
|
|
+ ((A_UINT32)(c_macaddr)[2] << 16) | \
|
|
|
+ ((A_UINT32)(c_macaddr)[3] << 24)); \
|
|
|
(pwmi_mac_addr)->mac_addr47to32 = ((c_macaddr)[4] | ((c_macaddr)[5] << 8));\
|
|
|
} while (0)
|
|
|
|
|
@@ -2396,11 +2397,11 @@ typedef enum {
|
|
|
#define WMI_CHAN_FLAG_ALLOW_EHT 21 /* EHT (11be) is allowed on this channel */
|
|
|
|
|
|
#define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
|
|
|
- (pwmi_channel)->info |= (1 << flag); \
|
|
|
+ (pwmi_channel)->info |= ((A_UINT32) 1 << flag); \
|
|
|
} while (0)
|
|
|
|
|
|
#define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
|
|
|
- (((pwmi_channel)->info & (1 << flag)) >> flag)
|
|
|
+ (((pwmi_channel)->info & ((A_UINT32) 1 << flag)) >> flag)
|
|
|
|
|
|
#define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
|
|
|
(pwmi_channel)->reg_info_1 &= 0xffffff00; \
|
|
@@ -2785,11 +2786,11 @@ enum {
|
|
|
#define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
|
|
|
#define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
|
|
|
|
|
|
-#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
|
|
|
-#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
|
|
|
-#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
|
|
|
-#define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
|
|
|
-#define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
|
|
|
+#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
|
|
|
+#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
|
|
|
+#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
|
|
|
+#define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
|
|
|
+#define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
|
|
|
|
|
|
#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
|
|
|
WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
|
|
@@ -2820,12 +2821,12 @@ enum {
|
|
|
#define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
|
|
|
#define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS (26)
|
|
|
|
|
|
-#define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
|
|
|
-#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
|
|
|
-#define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
|
|
|
-#define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
|
|
|
-#define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
|
|
|
-#define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
|
|
|
+#define WMI_DBS_FW_MODE_CFG_DBS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
|
|
|
+#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
|
|
|
+#define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
|
|
|
+#define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
|
|
|
+#define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
|
|
|
+#define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
|
|
|
|
|
|
#define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
|
|
|
WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
|