diff --git a/core/rtw_recv.c b/core/rtw_recv.c index fda0043..55efb19 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -793,9 +793,9 @@ union recv_frame *portctrl(_adapter *adapter, union recv_frame *precv_frame) * 1. If old PN is 0, any PN is legal * 2. PN > old PN */ -#define PN_LESS_CHK(a, b) (((a-b) & 0x800000000000) != 0) +#define PN_LESS_CHK(a, b) (((a-b) & 0x800000000000ull) != 0) #define VALID_PN_CHK(new, old) (((old) == 0) || PN_LESS_CHK(old, new)) -#define CCMPH_2_KEYID(ch) (((ch) & 0x00000000c0000000) >> 30) +#define CCMPH_2_KEYID(ch) (((ch) & 0x00000000c0000000ull) >> 30) sint recv_ucast_pn_decache(union recv_frame *precv_frame); sint recv_ucast_pn_decache(union recv_frame *precv_frame) { @@ -849,7 +849,7 @@ sint recv_bcast_pn_decache(union recv_frame *precv_frame) pkt_pn = CCMPH_2_PN(tmp_iv_hdr); curr_pn = le64_to_cpu(*(u64*)psecuritypriv->iv_seq[key_id]); - curr_pn &= 0x0000ffffffffffff; + curr_pn &= 0x0000ffffffffffffull; if (!VALID_PN_CHK(pkt_pn, curr_pn)) return _FAIL; diff --git a/hal/phydm/phydm_phystatus.h b/hal/phydm/phydm_phystatus.h index c65b624..6510f05 100644 --- a/hal/phydm/phydm_phystatus.h +++ b/hal/phydm/phydm_phystatus.h @@ -197,7 +197,7 @@ struct phy_status_rpt_8812 { __PACK struct phy_sts_rpt_jgr2_type0 { /* @DW0 */ u8 page_num; - u8 pwdb; + s8 pwdb; #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) u8 gain : 6; u8 rsvd_0 : 1; diff --git a/hal/phydm/phydm_rainfo.c b/hal/phydm/phydm_rainfo.c index 69738c9..82229e9 100644 --- a/hal/phydm/phydm_rainfo.c +++ b/hal/phydm/phydm_rainfo.c @@ -981,73 +981,73 @@ u64 phydm_get_bb_mod_ra_mask(void *dm_void, u8 sta_idx) /*N_2G*/ if (tx_stream_num == 1) { if (bw == CHANNEL_WIDTH_40) - ra_mask_bitmap &= 0x000ff015; + ra_mask_bitmap &= 0x000ff015ull; else - ra_mask_bitmap &= 0x000ff005; + ra_mask_bitmap &= 0x000ff005ull; } else if (tx_stream_num == 2) { if (bw == CHANNEL_WIDTH_40) - ra_mask_bitmap &= 0x0ffff015; + ra_mask_bitmap &= 0x0ffff015ull; else - ra_mask_bitmap &= 0x0ffff005; + ra_mask_bitmap &= 0x0ffff005ull; } else if (tx_stream_num == 3) { - ra_mask_bitmap &= 0xffffff015; + ra_mask_bitmap &= 0xffffff015ull; } else { - ra_mask_bitmap &= 0xffffffff015; + ra_mask_bitmap &= 0xffffffff015ull; } } else if (wrls_mode == (WIRELESS_OFDM | WIRELESS_HT)) { /*N_5G*/ if (tx_stream_num == 1) { if (bw == CHANNEL_WIDTH_40) - ra_mask_bitmap &= 0x000ff030; + ra_mask_bitmap &= 0x000ff030ull; else - ra_mask_bitmap &= 0x000ff010; + ra_mask_bitmap &= 0x000ff010ull; } else if (tx_stream_num == 2) { if (bw == CHANNEL_WIDTH_40) - ra_mask_bitmap &= 0x0ffff030; + ra_mask_bitmap &= 0x0ffff030ull; else - ra_mask_bitmap &= 0x0ffff010; + ra_mask_bitmap &= 0x0ffff010ull; } else if (tx_stream_num == 3) { - ra_mask_bitmap &= 0xffffff010; + ra_mask_bitmap &= 0xffffff010ull; } else { - ra_mask_bitmap &= 0xffffffff010; + ra_mask_bitmap &= 0xffffffff010ull; } } else if (wrls_mode == (WIRELESS_CCK | WIRELESS_OFDM | WIRELESS_VHT)) { /*@AC_2G*/ if (tx_stream_num == 1) - ra_mask_bitmap &= 0x003ff015; + ra_mask_bitmap &= 0x003ff015ull; else if (tx_stream_num == 2) - ra_mask_bitmap &= 0xfffff015; + ra_mask_bitmap &= 0xfffff015ull; else if (tx_stream_num == 3) - ra_mask_bitmap &= 0x3fffffff015; + ra_mask_bitmap &= 0x3fffffff015ull; else /*@AC_4SS 2G*/ - ra_mask_bitmap &= 0x000ffffffffff015; + ra_mask_bitmap &= 0x000ffffffffff015ull; if (bw == CHANNEL_WIDTH_20) { /* @AC 20MHz doesn't support MCS9 except 3SS & 6SS*/ - ra_mask_bitmap &= 0x0007ffff7fdff015; + ra_mask_bitmap &= 0x0007ffff7fdff015ull; } else if (bw == CHANNEL_WIDTH_80) { /* @AC 80MHz doesn't support 3SS MCS6*/ - ra_mask_bitmap &= 0x000fffbffffff015; + ra_mask_bitmap &= 0x000fffbffffff015ull; } } else if (wrls_mode == (WIRELESS_OFDM | WIRELESS_VHT)) { /*@AC_5G*/ if (tx_stream_num == 1) - ra_mask_bitmap &= 0x003ff010; + ra_mask_bitmap &= 0x003ff010ull; else if (tx_stream_num == 2) - ra_mask_bitmap &= 0xfffff010; + ra_mask_bitmap &= 0xfffff010ull; else if (tx_stream_num == 3) - ra_mask_bitmap &= 0x3fffffff010; + ra_mask_bitmap &= 0x3fffffff010ull; else /*@AC_4SS 5G*/ - ra_mask_bitmap &= 0x000ffffffffff010; + ra_mask_bitmap &= 0x000ffffffffff010ull; if (bw == CHANNEL_WIDTH_20) { /* @AC 20MHz doesn't support MCS9 except 3SS & 6SS*/ - ra_mask_bitmap &= 0x0007ffff7fdff010; + ra_mask_bitmap &= 0x0007ffff7fdff010ull; } else if (bw == CHANNEL_WIDTH_80) { /* @AC 80MHz doesn't support 3SS MCS6*/ - ra_mask_bitmap &= 0x000fffbffffff010; + ra_mask_bitmap &= 0x000fffbffffff010ull; } else if (bw == CHANNEL_WIDTH_160) { /* @AC 80M+80M doesn't support 3SS & 4SS*/ - ra_mask_bitmap &= 0xfffff010; + ra_mask_bitmap &= 0xfffff010ull; } } else { PHYDM_DBG(dm, DBG_RA, "[Warrning] RA mask is Not found\n"); @@ -1065,23 +1065,23 @@ u64 phydm_get_bb_mod_ra_mask(void *dm_void, u8 sta_idx) if (wrls_mode != WIRELESS_CCK) { if (iot_table->patch_id_40010700) { ra_mask_bitmap &= (rssi_lv == 0 ? - 0xffffffffffffffff : - 0xfffffffffffffff0); + 0xffffffffffffffffull : + 0xfffffffffffffff0ull); return ra_mask_bitmap; } if (rssi_lv == 0) - ra_mask_bitmap &= 0xffffffffffffffff; + ra_mask_bitmap &= 0xffffffffffffffffull; else if (rssi_lv == 1) - ra_mask_bitmap &= 0xfffffffffffffff0; + ra_mask_bitmap &= 0xfffffffffffffff0ull; else if (rssi_lv == 2) - ra_mask_bitmap &= 0xffffffffffffefe0; + ra_mask_bitmap &= 0xffffffffffffefe0ull; else if (rssi_lv == 3) - ra_mask_bitmap &= 0xffffffffffffcfc0; + ra_mask_bitmap &= 0xffffffffffffcfc0ull; else if (rssi_lv == 4) - ra_mask_bitmap &= 0xffffffffffff8f80; + ra_mask_bitmap &= 0xffffffffffff8f80ull; else if (rssi_lv >= 5) - ra_mask_bitmap &= 0xffffffffffff0f00; + ra_mask_bitmap &= 0xffffffffffff0f00ull; } PHYDM_DBG(dm, DBG_RA, "Mod by RSSI=0x%llx\n", ra_mask_bitmap); diff --git a/include/drv_types.h b/include/drv_types.h index 9a8e3e4..8469c58 100644 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -975,10 +975,10 @@ struct macid_ctl_t { #define RATE_BMP_GET_HT_4SS(_bmp_ht) ((_bmp_ht & RATE_BMP_HT_4SS) >> 24) /* used for rf_ctl_t.rate_bmp_vht_by_bw */ -#define RATE_BMP_VHT_1SS 0x00000003FF -#define RATE_BMP_VHT_2SS 0x00000FFC00 -#define RATE_BMP_VHT_3SS 0x003FF00000 -#define RATE_BMP_VHT_4SS 0xFFC0000000 +#define RATE_BMP_VHT_1SS 0x00000003FFull +#define RATE_BMP_VHT_2SS 0x00000FFC00ull +#define RATE_BMP_VHT_3SS 0x003FF00000ull +#define RATE_BMP_VHT_4SS 0xFFC0000000ull #define RATE_BMP_HAS_VHT_1SS(_bmp_vht) (_bmp_vht & RATE_BMP_VHT_1SS) #define RATE_BMP_HAS_VHT_2SS(_bmp_vht) (_bmp_vht & RATE_BMP_VHT_2SS) #define RATE_BMP_HAS_VHT_3SS(_bmp_vht) (_bmp_vht & RATE_BMP_VHT_3SS) diff --git a/include/rtw_security.h b/include/rtw_security.h index 9cceed6..816379e 100644 --- a/include/rtw_security.h +++ b/include/rtw_security.h @@ -49,8 +49,8 @@ enum security_type { #define IEEE80211W_WRONG_KEY 0x1 #define IEEE80211W_NO_KEY 0x2 -#define CCMPH_2_PN(ch) ((ch) & 0x000000000000ffff) \ - | (((ch) & 0xffffffff00000000) >> 16) +#define CCMPH_2_PN(ch) ((ch) & 0x000000000000ffffull) \ + | (((ch) & 0xffffffff00000000ull) >> 16) #define is_wep_enc(alg) (((alg) == _WEP40_) || ((alg) == _WEP104_))