From 1621248cc155fd5c83d8ed156c42eb0f2edd9202 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 25 Oct 2017 11:34:05 -0500 Subject: [PATCH] rtl8723ds: Make fixes for more Sparse errors Signed-off-by: Larry Finger --- core/efuse/rtw_efuse.c | 6 ++--- core/rtw_cmd.c | 4 ++-- core/rtw_debug.c | 4 ++-- core/rtw_ieee80211.c | 12 +++++----- core/rtw_mlme_ext.c | 36 +++++++++++++++--------------- core/rtw_security.c | 22 +++++++++--------- hal/phydm/phydm_debug.c | 24 ++++++++++---------- hal/phydm/phydm_powertracking_ce.c | 2 +- hal/phydm/phydm_rainfo.c | 24 ++++++++++---------- include/HalVerDef.h | 20 +---------------- include/rtw_debug.h | 4 +++- include/sta_info.h | 4 ++-- 12 files changed, 73 insertions(+), 89 deletions(-) diff --git a/core/efuse/rtw_efuse.c b/core/efuse/rtw_efuse.c index 4084377..b64bd5c 100644 --- a/core/efuse/rtw_efuse.c +++ b/core/efuse/rtw_efuse.c @@ -43,7 +43,7 @@ u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0}; u8 maskfileBuffer[64]; /*------------------------Define local variable------------------------------*/ -BOOLEAN rtw_file_efuse_IsMasked(PADAPTER pAdapter, u16 Offset) +static BOOLEAN rtw_file_efuse_IsMasked(PADAPTER pAdapter, u16 Offset) { int r = Offset / 16; int c = (Offset % 16) / 2; @@ -60,7 +60,7 @@ BOOLEAN rtw_file_efuse_IsMasked(PADAPTER pAdapter, u16 Offset) return (result > 0) ? 0 : 1; } -BOOLEAN efuse_IsMasked(PADAPTER pAdapter, u16 Offset) +static BOOLEAN efuse_IsMasked(PADAPTER pAdapter, u16 Offset) { PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter); @@ -1506,7 +1506,7 @@ Efuse_PgPacketWrite(IN PADAPTER pAdapter, } -int +static int Efuse_PgPacketWrite_BT(IN PADAPTER pAdapter, IN u8 offset, IN u8 word_en, diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 8f382a0..04b44d4 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -4233,9 +4233,9 @@ static void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm) } else if (cmd == ST_CMD_ADD || cmd == ST_CMD_DEL) { struct st_ctl_t *st_ctl; u32 local_naddr = parm->local_naddr; - u16 local_port = parm->local_port; + __be16 local_port = parm->local_port; u32 remote_naddr = parm->remote_naddr; - u16 remote_port = parm->remote_port; + __be16 remote_port = parm->remote_port; struct session_tracker *st = NULL; _irqL irqL; _list *plist, *phead; diff --git a/core/rtw_debug.c b/core/rtw_debug.c index 9709575..a28bb1b 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -23,7 +23,7 @@ #include #ifdef CONFIG_RTW_DEBUG -const char *rtw_log_level_str[] = { +static const char *rtw_log_level_str[] = { "_DRV_NONE_ = 0", "_DRV_ALWAYS_ = 1", "_DRV_ERR_ = 2", @@ -358,7 +358,7 @@ void rtw_sink_rtp_seq_dbg(_adapter *adapter, _pkt *pkt) { struct recv_priv *precvpriv = &(adapter->recvpriv); if (precvpriv->sink_udpport > 0) { - if (*((u16 *)((pkt->data) + 0x24)) == cpu_to_be16(precvpriv->sink_udpport)) { + if (*((__be16 *)((pkt->data) + 0x24)) == cpu_to_be16(precvpriv->sink_udpport)) { precvpriv->pre_rtp_rxseq = precvpriv->cur_rtp_rxseq; precvpriv->cur_rtp_rxseq = be16_to_cpu(*((u16 *)((pkt->data) + 0x2C))); if (precvpriv->pre_rtp_rxseq + 1 != precvpriv->cur_rtp_rxseq) diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index 8a76427..bcbb8b8 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -442,20 +442,20 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) ie += sz; /* beacon interval : 2bytes */ - *(u16 *)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod); /* BCN_INTERVAL; */ + *(__le16 *)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod); /* BCN_INTERVAL; */ sz += 2; ie += 2; /* capability info */ *(u16 *)ie = 0; - *(u16 *)ie |= cpu_to_le16(cap_IBSS); + *(__le16 *)ie |= cpu_to_le16(cap_IBSS); if (pregistrypriv->preamble == PREAMBLE_SHORT) - *(u16 *)ie |= cpu_to_le16(cap_ShortPremble); + *(__le16 *)ie |= cpu_to_le16(cap_ShortPremble); if (pdev_network->Privacy) - *(u16 *)ie |= cpu_to_le16(cap_Privacy); + *(__le16 *)ie |= cpu_to_le16(cap_Privacy); sz += 2; ie += 2; @@ -1447,7 +1447,7 @@ void dump_ht_cap_ie_content(void *sel, u8 *buf, u32 buf_len) , HT_SUP_MCS_SET_ARG(HT_CAP_ELE_SUP_MCS_SET(buf))); } -void dump_ht_cap_ie(void *sel, u8 *ie, u32 ie_len) +static void dump_ht_cap_ie(void *sel, u8 *ie, u32 ie_len) { u8 *pos = (u8 *)ie; u16 id; @@ -2487,7 +2487,7 @@ int ieee80211_get_hdrlen(u16 fc) return hdrlen; } -int rtw_get_cipher_info(struct wlan_network *pnetwork) +static int rtw_get_cipher_info(struct wlan_network *pnetwork) { u32 wpa_ielen; unsigned char *pbuf; diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 99e028a..bd7a8db 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -4521,7 +4521,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l p2pie[p2pielen++] = P2P_ATTR_STATUS; /* Length: */ - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001); + *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001); p2pielen += 2; /* Value: */ @@ -4532,7 +4532,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l p2pie[p2pielen++] = P2P_ATTR_CAPABILITY; /* Length: */ - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002); + *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002); p2pielen += 2; /* Value: */ @@ -4559,7 +4559,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l p2pie[p2pielen++] = P2P_ATTR_GO_INTENT; /* Length: */ - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001); + *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001); p2pielen += 2; /* Value: */ @@ -4577,7 +4577,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l p2pie[p2pielen++] = P2P_ATTR_CONF_TIMEOUT; /* Length: */ - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002); + *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002); p2pielen += 2; /* Value: */ @@ -4589,7 +4589,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l p2pie[p2pielen++] = P2P_ATTR_OPERATING_CH; /* Length: */ - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005); + *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005); p2pielen += 2; /* Value: */ @@ -4621,7 +4621,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l p2pie[p2pielen++] = P2P_ATTR_INTENDED_IF_ADDR; /* Length: */ - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN); + *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN); p2pielen += 2; /* Value: */ @@ -4641,11 +4641,11 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l #ifdef CONFIG_CONCURRENT_MODE if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0) - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(5 + 1); + *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(5 + 1); else - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); + *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); #else - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); + *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); #endif p2pielen += 2; @@ -4721,7 +4721,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l /* Length: */ /* 21->P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */ /* + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes) */ - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len); + *(__be16 *)(p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len); p2pielen += 2; /* Value: */ @@ -4732,21 +4732,21 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l /* Config Method */ /* This field should be big endian. Noted by P2P specification. */ - *(u16 *)(p2pie + p2pielen) = cpu_to_be16(pwdinfo->supported_wps_cm); + *(__be16 *)(p2pie + p2pielen) = cpu_to_be16(pwdinfo->supported_wps_cm); p2pielen += 2; /* Primary Device Type */ /* Category ID */ - *(u16 *)(p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA); + *(__be16 *)(p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA); p2pielen += 2; /* OUI */ - *(u32 *)(p2pie + p2pielen) = cpu_to_be32(WPSOUI); + *(__be32 *)(p2pie + p2pielen) = cpu_to_be32(WPSOUI); p2pielen += 4; /* Sub Category ID */ - *(u16 *)(p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER); + *(__be16 *)(p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER); p2pielen += 2; /* Number of Secondary Device Types */ @@ -4754,11 +4754,11 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l /* Device Name */ /* Type: */ - *(u16 *)(p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); + *(__be16 *)(p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); p2pielen += 2; /* Length: */ - *(u16 *)(p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len); + *(__be16 *)(p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len); p2pielen += 2; /* Value: */ @@ -4771,7 +4771,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l p2pie[p2pielen++] = P2P_ATTR_GROUP_ID; /* Length: */ - *(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + pwdinfo->nego_ssidlen); + *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + pwdinfo->nego_ssidlen); p2pielen += 2; /* Value: */ @@ -5056,7 +5056,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr) struct pkt_attrib *pattrib; unsigned char *pframe; struct rtw_ieee80211_hdr *pwlanhdr; - unsigned short *fctrl; + __le16 *fctrl; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); diff --git a/core/rtw_security.c b/core/rtw_security.c index 0d80e65..5ef0d8f 100644 --- a/core/rtw_security.c +++ b/core/rtw_security.c @@ -278,7 +278,7 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe) length = pattrib->last_txcmdsz - pattrib->hdrlen - pattrib->iv_len - pattrib->icv_len; - *((u32 *)crc) = cpu_to_le32(getcrc32(payload, length)); + *((__le32 *)crc) = cpu_to_le32(getcrc32(payload, length)); arcfour_init(&mycontext, wepkey, 3 + keylength); arcfour_encrypt(&mycontext, payload, payload, length); @@ -286,7 +286,7 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe) } else { length = pxmitpriv->frag_len - pattrib->hdrlen - pattrib->iv_len - pattrib->icv_len ; - *((u32 *)crc) = cpu_to_le32(getcrc32(payload, length)); + *((__le32 *)crc) = cpu_to_le32(getcrc32(payload, length)); arcfour_init(&mycontext, wepkey, 3 + keylength); arcfour_encrypt(&mycontext, payload, payload, length); arcfour_encrypt(&mycontext, payload + length, crc, 4); @@ -337,7 +337,7 @@ void rtw_wep_decrypt(_adapter *padapter, u8 *precvframe) arcfour_encrypt(&mycontext, payload, payload, length); /* calculate icv and compare the icv */ - *((u32 *)crc) = le32_to_cpu(getcrc32(payload, length - 4)); + *((__le32 *)crc) = le32_to_cpu(getcrc32(payload, length - 4)); WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra); @@ -761,7 +761,7 @@ u32 rtw_tkip_encrypt(_adapter *padapter, u8 *pxmitframe) if ((curfragnum + 1) == pattrib->nr_frags) { /* 4 the last fragment */ length = pattrib->last_txcmdsz - pattrib->hdrlen - pattrib->iv_len - pattrib->icv_len; - *((u32 *)crc) = cpu_to_le32(getcrc32(payload, length)); /* modified by Amy*/ + *((__le32 *)crc) = cpu_to_le32(getcrc32(payload, length)); /* modified by Amy*/ arcfour_init(&mycontext, rc4key, 16); arcfour_encrypt(&mycontext, payload, payload, length); @@ -769,7 +769,7 @@ u32 rtw_tkip_encrypt(_adapter *padapter, u8 *pxmitframe) } else { length = pxmitpriv->frag_len - pattrib->hdrlen - pattrib->iv_len - pattrib->icv_len ; - *((u32 *)crc) = cpu_to_le32(getcrc32(payload, length)); /* modified by Amy*/ + *((__le32 *)crc) = cpu_to_le32(getcrc32(payload, length)); /* modified by Amy*/ arcfour_init(&mycontext, rc4key, 16); arcfour_encrypt(&mycontext, payload, payload, length); arcfour_encrypt(&mycontext, payload + length, crc, 4); @@ -887,7 +887,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe) arcfour_init(&mycontext, rc4key, 16); arcfour_encrypt(&mycontext, payload, payload, length); - *((u32 *)crc) = le32_to_cpu(getcrc32(payload, length - 4)); + *((__le32 *)crc) = le32_to_cpu(getcrc32(payload, length - 4)); if (crc[3] != payload[length - 1] || crc[2] != payload[length - 2] || crc[1] != payload[length - 3] || crc[0] != payload[length - 4]) { res = _FAIL; @@ -1373,8 +1373,8 @@ static sint aes_cipher(u8 *key, uint hdrlen, u8 padded_buffer[16]; u8 mic[8]; /* uint offset = 0; */ - uint frtype = GetFrameType(pframe); - uint frsubtype = GetFrameSubType(pframe); + __le16 frtype = GetFrameType(pframe); + __le16 frsubtype = GetFrameSubType(pframe); frsubtype = frsubtype >> 4; @@ -1682,8 +1682,8 @@ static sint aes_decipher(u8 *key, uint hdrlen, /* uint offset = 0; */ - uint frtype = GetFrameType(pframe); - uint frsubtype = GetFrameSubType(pframe); + __le16 frtype = GetFrameType(pframe); + __le16 frsubtype = GetFrameSubType(pframe); frsubtype = frsubtype >> 4; @@ -2840,7 +2840,7 @@ static int omac1_aes_128_vector(u8 *key, size_t num_elem, * OMAC1 was standardized with the name CMAC by NIST in a Special Publication * (SP) 800-38B. */ /* modify for CONFIG_IEEE80211W */ -int omac1_aes_128(u8 *key, u8 *data, size_t data_len, u8 *mac) +static int omac1_aes_128(u8 *key, u8 *data, size_t data_len, u8 *mac) { return omac1_aes_128_vector(key, 1, &data, &data_len, mac); } diff --git a/hal/phydm/phydm_debug.c b/hal/phydm/phydm_debug.c index 5c265f2..50434e3 100644 --- a/hal/phydm/phydm_debug.c +++ b/hal/phydm/phydm_debug.c @@ -77,7 +77,7 @@ PHYDM_InitDebugSetting( pDM_Odm->pre_c2h_seq = 0; } -VOID +static VOID phydm_BB_RxHang_Info( IN PVOID pDM_VOID, IN u4Byte *_used, @@ -254,7 +254,7 @@ phydm_BB_RxHang_Info( } -VOID +static VOID phydm_BB_Debug_Info( IN PVOID pDM_VOID, IN u4Byte *_used, @@ -1245,7 +1245,7 @@ phydm_api_trx_mode( } #endif -VOID +static VOID phydm_get_per_path_txagc( IN PVOID pDM_VOID, IN u1Byte path, @@ -1296,7 +1296,7 @@ phydm_get_per_path_txagc( } -VOID +static VOID phydm_get_txagc( IN PVOID pDM_VOID, IN u4Byte *_used, @@ -1326,7 +1326,7 @@ phydm_get_txagc( } -VOID +static VOID phydm_set_txagc( IN PVOID pDM_VOID, IN u4Byte *const dm_value, @@ -1380,7 +1380,7 @@ phydm_set_txagc( #endif } -VOID +static VOID phydm_debug_trace( IN PVOID pDM_VOID, IN u4Byte *const dm_value, @@ -1445,7 +1445,7 @@ phydm_debug_trace( PHYDM_SNPRINTF((output + used, out_len - used, "%s\n", "================================")); } -VOID +static VOID phydm_fw_debug_trace( IN PVOID pDM_VOID, IN u4Byte *const dm_value, @@ -1497,7 +1497,7 @@ phydm_fw_debug_trace( } } -VOID +static VOID phydm_DumpBbReg( IN PVOID pDM_VOID, IN u4Byte *_used, @@ -1542,7 +1542,7 @@ phydm_DumpBbReg( } } -VOID +static VOID phydm_DumpAllReg( IN PVOID pDM_VOID, IN u4Byte *_used, @@ -1591,7 +1591,7 @@ phydm_DumpAllReg( } } -VOID +static VOID phydm_EnableBigJump( IN PDM_ODM_T pDM_Odm, IN BOOLEAN state @@ -1693,7 +1693,7 @@ enum PHYDM_CMD_ID { PHYDM_ANT_SWITCH }; -struct _PHYDM_COMMAND phy_dm_ary[] = { +static struct _PHYDM_COMMAND phy_dm_ary[] = { {"-h", PHYDM_HELP}, /*do not move this element to other position*/ {"demo", PHYDM_DEMO}, /*do not move this element to other position*/ {"ra", PHYDM_RA}, @@ -2969,7 +2969,7 @@ phydm_fw_trace_handler_8051( int i = 0; u1Byte Extend_c2hSubID = 0, Extend_c2hDbgLen = 0, Extend_c2hDbgSeq = 0; u1Byte fw_debug_trace[128]; - pu1Byte Extend_c2hDbgContent = 0; + pu1Byte Extend_c2hDbgContent = NULL; if (CmdLen > 127) return; diff --git a/hal/phydm/phydm_powertracking_ce.c b/hal/phydm/phydm_powertracking_ce.c index 0c5c247..d1c78fb 100644 --- a/hal/phydm/phydm_powertracking_ce.c +++ b/hal/phydm/phydm_powertracking_ce.c @@ -481,7 +481,7 @@ odm_TXPowerTrackingInit( odm_TXPowerTrackingThermalMeterInit(pDM_Odm); } -u1Byte +static u1Byte getSwingIndex( IN PVOID pDM_VOID ) diff --git a/hal/phydm/phydm_rainfo.c b/hal/phydm/phydm_rainfo.c index 51a2220..6b7241e 100644 --- a/hal/phydm/phydm_rainfo.c +++ b/hal/phydm/phydm_rainfo.c @@ -848,7 +848,7 @@ phydm_modify_RA_PCR_threshold( ODM_RT_TRACE(pDM_Odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("Set RA_threshold_offset = (( %s%d ))\n", ((RA_threshold_offset == 0) ? " " : ((RA_offset_direction) ? "+" : "-")), RA_threshold_offset)); } -VOID +static VOID odm_RSSIMonitorCheckMP( IN PVOID pDM_VOID ) @@ -1120,7 +1120,7 @@ odm_RSSIMonitorCheckMP( #if (DM_ODM_SUPPORT_TYPE == ODM_CE) /*H2C_RSSI_REPORT*/ -s8 phydm_rssi_report(PDM_ODM_T pDM_Odm, u8 mac_id) +static s8 phydm_rssi_report(PDM_ODM_T pDM_Odm, u8 mac_id) { PADAPTER Adapter = pDM_Odm->Adapter; pRA_T pRA_Table = &pDM_Odm->DM_RA_Table; @@ -1233,7 +1233,7 @@ s8 phydm_rssi_report(PDM_ODM_T pDM_Odm, u8 mac_id) return _SUCCESS; } -void phydm_ra_rssi_rpt_wk_hdl(PVOID pContext) +static void phydm_ra_rssi_rpt_wk_hdl(PVOID pContext) { PDM_ODM_T pDM_Odm = (PDM_ODM_T)pContext; int i; @@ -1262,7 +1262,7 @@ void phydm_ra_rssi_rpt_wk(PVOID pContext) } #endif -VOID +static VOID odm_RSSIMonitorCheckCE( IN PVOID pDM_VOID ) @@ -1317,7 +1317,7 @@ odm_RSSIMonitorCheckCE( } -VOID +static VOID odm_RSSIMonitorCheckAP( IN PVOID pDM_VOID ) @@ -1582,7 +1582,7 @@ odm_RefreshRateAdaptiveMask( } -u1Byte +static u1Byte phydm_trans_platform_bw( IN PVOID pDM_VOID, IN u1Byte BW @@ -1646,7 +1646,7 @@ phydm_trans_platform_bw( } -u1Byte +static u1Byte phydm_trans_platform_rf_type( IN PVOID pDM_VOID, IN u1Byte RfType @@ -1741,7 +1741,7 @@ phydm_trans_platform_rf_type( } -u4Byte +static u4Byte phydm_trans_platform_wireless_mode( IN PVOID pDM_VOID, IN u4Byte wireless_mode @@ -2486,7 +2486,7 @@ phydm_rate_order_compute( } -VOID +static VOID phydm_ra_common_info_update( IN PVOID pDM_VOID ) @@ -2655,7 +2655,7 @@ odm_Find_RTS_Rate( } -VOID +static VOID odm_Set_RA_DM_ARFB_by_Noisy( IN PDM_ODM_T pDM_Odm ) @@ -3045,7 +3045,7 @@ PhyDM_Get_Rate_Bitmap_Ex( { PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID; PSTA_INFO_T pEntry; - u8Byte rate_bitmap = 0; + u64 rate_bitmap = 0; u1Byte WirelessMode; pEntry = pDM_Odm->pODM_StaInfo[macid]; @@ -3112,7 +3112,7 @@ PhyDM_Get_Rate_Bitmap_Ex( if (*(pDM_Odm->pBandWidth) == ODM_BW40M) rate_bitmap = 0x0000000ffffff015; else - rate_bitmap = 0x0000000ffffff005; + rate_bitmap = 0x000000ffffff005; } } } diff --git a/include/HalVerDef.h b/include/HalVerDef.h index 3d81880..ce9f810 100644 --- a/include/HalVerDef.h +++ b/include/HalVerDef.h @@ -160,26 +160,8 @@ typedef struct tag_HAL_VERSION { /* ---------------------------------------------------------------------------- * Chip version Macro. -- * ---------------------------------------------------------------------------- */ -#if 0 - #define IS_81XXC_TEST_CHIP(version) ((IS_81XXC(version) && (!IS_NORMAL_CHIP(version))) ? TRUE : FALSE) - #define IS_92C_SERIAL(version) ((IS_81XXC(version) && IS_2T2R(version)) ? TRUE : FALSE) - #define IS_81xxC_VENDOR_UMC_A_CUT(version) (IS_81XXC(version) ? (IS_CHIP_VENDOR_UMC(version) ? (IS_A_CUT(version) ? TRUE : FALSE) : FALSE) : FALSE) - #define IS_81xxC_VENDOR_UMC_B_CUT(version) (IS_81XXC(version) ? (IS_CHIP_VENDOR_UMC(version) ? (IS_B_CUT(version) ? TRUE : FALSE) : FALSE) : FALSE) - #define IS_81xxC_VENDOR_UMC_C_CUT(version) (IS_81XXC(version) ? (IS_CHIP_VENDOR_UMC(version) ? (IS_C_CUT(version) ? TRUE : FALSE) : FALSE) : FALSE) - - #define IS_NORMAL_CHIP92D(version) ((IS_92D(version)) ? ((GET_CVID_CHIP_TYPE(version) == NORMAL_CHIP) ? TRUE : FALSE) : FALSE) - - #define IS_92D_SINGLEPHY(version) ((IS_92D(version)) ? (IS_2T2R(version) ? TRUE : FALSE) : FALSE) - #define IS_92D_C_CUT(version) ((IS_92D(version)) ? (IS_C_CUT(version) ? TRUE : FALSE) : FALSE) - #define IS_92D_D_CUT(version) ((IS_92D(version)) ? (IS_D_CUT(version) ? TRUE : FALSE) : FALSE) - #define IS_92D_E_CUT(version) ((IS_92D(version)) ? (IS_E_CUT(version) ? TRUE : FALSE) : FALSE) - - #define IS_8723A_A_CUT(version) ((IS_8723_SERIES(version)) ? (IS_A_CUT(version) ? TRUE : FALSE) : FALSE) - #define IS_8723A_B_CUT(version) ((IS_8723_SERIES(version)) ? (IS_B_CUT(version) ? TRUE : FALSE) : FALSE) -#endif - -#define IS_VENDOR_8188E_I_CUT_SERIES(_Adapter) ((IS_8188E(GET_HAL_DATA(_Adapter)->VersionID)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->VersionID) >= I_CUT_VERSION) ? TRUE : FALSE) : FALSE) +#define IS_VENDOR_8188E_I_CUT_SERIES(_Adapter) ((IS_8188E(GET_HAL_DATA((PADAPTER)_Adapter)->VersionID)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA((PADAPTER)_Adapter)->VersionID) >= I_CUT_VERSION) ? TRUE : FALSE) : FALSE) #define IS_VENDOR_8812A_TEST_CHIP(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->VersionID)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->VersionID)) ? FALSE : TRUE) : FALSE) #define IS_VENDOR_8812A_MP_CHIP(_Adapter) ((IS_8812_SERIES(GET_HAL_DATA(_Adapter)->VersionID)) ? ((IS_NORMAL_CHIP(GET_HAL_DATA(_Adapter)->VersionID)) ? TRUE : FALSE) : FALSE) diff --git a/include/rtw_debug.h b/include/rtw_debug.h index 52eed62..351ef98 100644 --- a/include/rtw_debug.h +++ b/include/rtw_debug.h @@ -20,6 +20,8 @@ #ifndef __RTW_DEBUG_H__ #define __RTW_DEBUG_H__ +#include + /* driver log level*/ enum { _DRV_NONE_ = 0, @@ -257,7 +259,7 @@ extern uint rtw_drv_log_level; if (sel == RTW_DBGDUMP)\ RTW_PRINT(fmt, ##arg); \ else {\ - _seqdump(sel, fmt, ##arg) /*rtw_warn_on(1)*/; \ + _seqdump((struct seq_file *)sel, fmt, ##arg) /*rtw_warn_on(1)*/; \ } \ } while (0) diff --git a/include/sta_info.h b/include/sta_info.h index 51e1fad..c9c088c 100644 --- a/include/sta_info.h +++ b/include/sta_info.h @@ -147,9 +147,9 @@ struct st_cmd_parm { u8 cmd; struct sta_info *sta; u32 local_naddr; /* TODO: IPV6 */ - u16 local_port; + __be16 local_port; u32 remote_naddr; /* TODO: IPV6 */ - u16 remote_port; + __be16 remote_port; }; typedef bool (*st_match_rule)(_adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port);