From 70e7bc3c1bf082a740bb2b137f8a0a833959e079 Mon Sep 17 00:00:00 2001 From: Markus Linnala Date: Mon, 21 Sep 2015 16:11:16 +0300 Subject: [PATCH] silence warnings --- chips/mt76x0.c | 18 +++++++++++------- chips/rt65xx.c | 6 ++++-- common/cmm_asic.c | 8 +++++--- common/cmm_cfg.c | 3 ++- common/cmm_data.c | 6 ++++++ common/cmm_data_usb.c | 3 ++- common/cmm_info.c | 4 ++-- common/cmm_mac_usb.c | 1 - common/cmm_wpa.c | 6 +++++- common/crypt_aes.c | 4 ++-- common/mlme.c | 4 ++-- common/rtmp_init.c | 4 ++++ common/rtusb_bulk.c | 1 - common/rtusb_io.c | 7 +++++-- common/spectrum.c | 2 +- common/txpower.c | 4 ++-- common/vht.c | 4 ++++ include/os/rt_linux.h | 2 +- include/rt_os_util.h | 2 +- include/rtmp.h | 6 +++--- include/rtmp_chip.h | 2 +- mcu/mcu.c | 4 ++-- mcu/mcu_and.c | 8 +++++--- mgmt/mgmt_vht.c | 2 ++ os/linux/rt_linux.c | 7 ++----- os/linux/rt_profile.c | 3 +-- os/linux/sta_ioctl.c | 1 + os/linux/usb_main_dev.c | 4 ++-- phy/rlt_phy.c | 6 ++++-- rate_ctrl/ra_ctrl.c | 5 ++++- sta/sta_cfg.c | 3 --- sta/sync.c | 2 ++ 32 files changed, 88 insertions(+), 54 deletions(-) diff --git a/chips/mt76x0.c b/chips/mt76x0.c index 937a4e6..fbcbe74 100644 --- a/chips/mt76x0.c +++ b/chips/mt76x0.c @@ -1195,7 +1195,7 @@ VOID SetRfChFreqParametersMT76x0( UINT32 i = 0, RfBand = 0, MacReg = 0; UCHAR RFValue = 0; BOOLEAN bSDM = FALSE; - MT76x0_FREQ_ITEM *pMT76x0_freq_item = NULL; + const MT76x0_FREQ_ITEM *pMT76x0_freq_item = NULL; if (!IS_MT76x0(pAd)) { @@ -1573,7 +1573,7 @@ static VOID NICInitMT76x0RFRegisters(RTMP_ADAPTER *pAd) E2: B0.R21<0>: xo_cxo<0>, B0.R22<7:0>: xo_cxo<8:1> */ RFValue = (UCHAR)(pAd->RfFreqOffset & 0xFF); - RFValue = min(RFValue, 0xBF); /* Max of 9-bit built-in crystal oscillator C1 code */ + RFValue = min(RFValue, (UCHAR)0xBF); /* Max of 9-bit built-in crystal oscillator C1 code */ rlt_rf_write(pAd, RF_BANK0, RF_R22, RFValue); rlt_rf_read(pAd, RF_BANK0, RF_R22, &RFValue); @@ -1733,7 +1733,9 @@ static VOID MT76x0_AsicAntennaDefaultReset( static VOID MT76x0_ChipBBPAdjust(RTMP_ADAPTER *pAd) { +#ifdef DBG static char *ext_str[]={"extNone", "extAbove", "", "extBelow"}; +#endif UCHAR rf_bw, ext_ch; @@ -1784,14 +1786,15 @@ static VOID MT76x0_ChipSwitchChannel( enum SWITCH_CHANNEL_STAGE bScan) { CHAR TxPwer = 0; /* Bbp94 = BBPR94_DEFAULT, TxPwer2 = DEFAULT_RF_TX_POWER; */ - UCHAR RFValue = 0; UINT32 RegValue = 0; UINT32 Index; UINT32 rf_phy_mode, rf_bw = RF_BW_20; - UCHAR bbp_ch_idx, delta_pwr; + UCHAR bbp_ch_idx; UINT32 ret; ULONG Old, New, Diff; -#ifndef MT76x0_TSSI_CAL_COMPENSATION +#ifdef MT76x0_TSSI_CAL_COMPENSATION + UCHAR delta_pwr; +#else UINT32 Value; #endif /* !MT76x0_TSSI_CAL_COMPENSATION */ #ifdef SINGLE_SKU_V2 @@ -2358,9 +2361,9 @@ VOID mt76x0_read_per_rate_tx_pwr( */ // TODO: check if any document to describe this ? RT28xx_EEPROM_READ16(pAd, EEPROM_VHT_BW80_TX_POWER_DELTA - 1, e2p_val); - pAd->chipCap.delta_tw_pwr_bw80 = (e2p_val & 0xFF00) == 0xFF00 ? 0 : (e2p_val & 0xFF00); if ((e2p_val & 0xFF00) != 0xFF00) { + pAd->chipCap.delta_tw_pwr_bw80 = (USHORT)(e2p_val & 0xFF00); if (e2p_val & 0x8000) bw80_aband_delta = ((e2p_val & 0x1F00) >> 8); @@ -2368,6 +2371,8 @@ VOID mt76x0_read_per_rate_tx_pwr( dec_aband_bw80_delta = FALSE; else dec_aband_bw80_delta = TRUE; + } else { + pAd->chipCap.delta_tw_pwr_bw80 = 0; } #ifdef SINGLE_SKU_V2 @@ -5495,7 +5500,6 @@ void mt76x0_temp_tx_alc_init(PRTMP_ADAPTER pAd) void mt76x0_read_tx_alc_info_from_eeprom(PRTMP_ADAPTER pAd) { - BOOLEAN status = TRUE; USHORT e2p_value = 0; if (IS_MT76x0(pAd)) { diff --git a/chips/rt65xx.c b/chips/rt65xx.c index f20acb0..58736b9 100644 --- a/chips/rt65xx.c +++ b/chips/rt65xx.c @@ -113,12 +113,14 @@ VOID ral_wlan_chip_onoff( VOID dump_bw_info(RTMP_ADAPTER *pAd) { UINT32 core_r1, agc_r0, be_r0, band_cfg; - static UCHAR *bw_str[]={"20", "10", "40", "80"}; UCHAR bw, prim_ch_idx, decode_cap; + UCHAR tx_prim; +#ifdef DBG + static UCHAR *bw_str[]={"20", "10", "40", "80"}; static UCHAR *decode_str[] = {"0", "20", "40", "20/40", "80", "20/80", "40/80", "20/40/80"}; - UCHAR tx_prim; RTMP_CHIP_CAP *pChipCap = &pAd->chipCap; +#endif RTMP_BBP_IO_READ32(pAd, CORE_R1, &core_r1); diff --git a/common/cmm_asic.c b/common/cmm_asic.c index bfa66bf..50c6bf3 100644 --- a/common/cmm_asic.c +++ b/common/cmm_asic.c @@ -325,9 +325,9 @@ VOID AsicUpdateProtect( IN BOOLEAN bNonGFExist) { PROT_CFG_STRUC ProtCfg, ProtCfg4; - UINT32 Protect[6]; + UINT32 Protect[6], PhyMode = 0x4000; USHORT offset; - UCHAR i, PhyMode = 0x4000; + UCHAR i; UINT32 MacReg = 0; #ifdef RALINK_ATE @@ -2271,10 +2271,12 @@ VOID AsicAddPairwiseKeyEntry( { INT i; ULONG offset; +#ifdef DBG PUCHAR pKey = pCipherKey->Key; + UCHAR CipherAlg = pCipherKey->CipherAlg; +#endif PUCHAR pTxMic = pCipherKey->TxMic; PUCHAR pRxMic = pCipherKey->RxMic; - UCHAR CipherAlg = pCipherKey->CipherAlg; /* EKEY*/ offset = PAIRWISE_KEY_TABLE_BASE + (WCID * HW_KEY_ENTRY_SIZE); diff --git a/common/cmm_cfg.c b/common/cmm_cfg.c index 0eee4be..cf8748c 100644 --- a/common/cmm_cfg.c +++ b/common/cmm_cfg.c @@ -200,7 +200,9 @@ static UCHAR CFG_WMODE_MAP[]={ }; +#ifdef DBG static PSTRING BAND_STR[] = {"Invalid", "2.4G", "5G", "2.4G/5G"}; +#endif static PSTRING WMODE_STR[]= {"", "A", "B", "G", "gN", "aN", "AC"}; UCHAR *wmode_2_str(UCHAR wmode) @@ -702,7 +704,6 @@ INT RTMP_COM_IoctlHandle( case CMD_RTPRIV_IOCTL_USB_INTF_GET: /* get USB INTF */ { - VOID **ppINTF = (VOID **)pData; //*ppINTF = (VOID *)(pObj->intf); } break; diff --git a/common/cmm_data.c b/common/cmm_data.c index cf9dd73..4a9424a 100644 --- a/common/cmm_data.c +++ b/common/cmm_data.c @@ -105,7 +105,9 @@ VOID dumpRxFCEInfo(RTMP_ADAPTER *pAd, RXFCE_INFO *pRxFceInfo) #endif /* RLT_MAC */ +#ifdef DBG static UCHAR *txwi_txop_str[]={"HT_TXOP", "PIFS", "SIFS", "BACKOFF", "Invalid"}; +#endif #define TXWI_TXOP_STR(_x) ((_x) <= 3 ? txwi_txop_str[(_x)]: txwi_txop_str[4]) VOID dumpTxWI(RTMP_ADAPTER *pAd, TXWI_STRUC *pTxWI) @@ -161,9 +163,11 @@ VOID dump_rxwi(RTMP_ADAPTER *pAd, RXWI_STRUC *pRxWI) } +#ifdef DBG static UCHAR *txinfo_type_str[]={"PKT", "", "CMD", "RSV", "Invalid"}; static UCHAR *txinfo_d_port_str[]={"WLAN", "CPU_RX", "CPU_TX", "HOST", "VIRT_RX", "VIRT_TX", "DROP", "Invalid"}; static UCHAR *txinfo_que_str[]={"MGMT", "HCCA", "EDCA_1", "EDCA_2", "Invalid"}; +#endif #define TXINFO_TYPE_STR(_x) ((_x)<=3 ? txinfo_type_str[_x] : txinfo_type_str[4]) #define TXINFO_DPORT_STR(_x) ((_x) <= 6 ? txinfo_d_port_str[_x]: txinfo_d_port_str[7]) @@ -177,7 +181,9 @@ VOID dump_txinfo(RTMP_ADAPTER *pAd, TXINFO_STRUC *pTxInfo) #ifdef RLT_MAC { +#ifdef DBG struct _TXINFO_NMAC_PKT *pkt_txinfo = (struct _TXINFO_NMAC_PKT *)pTxInfo; +#endif DBGPRINT(RT_DEBUG_OFF, ("\tInfo_Type=%d(%s)\n", pkt_txinfo->info_type, TXINFO_TYPE_STR(pkt_txinfo->info_type))); DBGPRINT(RT_DEBUG_OFF, ("\td_port=%d(%s)\n", pkt_txinfo->d_port, TXINFO_DPORT_STR(pkt_txinfo->d_port))); diff --git a/common/cmm_data_usb.c b/common/cmm_data_usb.c index a77b8bd..d0c925c 100644 --- a/common/cmm_data_usb.c +++ b/common/cmm_data_usb.c @@ -211,6 +211,7 @@ VOID rlt_usb_write_txinfo( } +#if 0 static VOID rlt_usb_update_txinfo( IN RTMP_ADAPTER *pAd, IN TXINFO_STRUC *pTxInfo, @@ -219,6 +220,7 @@ static VOID rlt_usb_update_txinfo( #ifdef RLT_MAC #endif /* RLT_MAC */ } +#endif #ifdef CONFIG_STA_SUPPORT @@ -1158,7 +1160,6 @@ PNDIS_PACKET GetPacketFromRxRing( UCHAR *pData, *RXDMA; ULONG ThisFrameLen, RxBufferLength, valid_len; RXWI_STRUC *pRxWI; - UINT8 RXWISize = pAd->chipCap.RXWISize; RXINFO_STRUC *pRxInfo; #ifdef RLT_MAC RXFCE_INFO *pRxFceInfo; diff --git a/common/cmm_info.c b/common/cmm_info.c index 5daf15f..05e33e3 100644 --- a/common/cmm_info.c +++ b/common/cmm_info.c @@ -1081,7 +1081,7 @@ INT Set_DebugFunc_Proc( { DBGPRINT_S(RT_DEBUG_TRACE, ("==>%s()\n", __FUNCTION__)); RTDebugFunc = simple_strtol(arg, 0, 10); - DBGPRINT_S(RT_DEBUG_TRACE, ("Set RTDebugFunc = 0x%x\n", RTDebugFunc)); + DBGPRINT_S(RT_DEBUG_TRACE, ("Set RTDebugFunc = 0x%lx\n", RTDebugFunc)); return TRUE; } @@ -5957,7 +5957,7 @@ INT set_rf(RTMP_ADAPTER *pAd, PSTRING arg) if (arg) { - rv = sscanf(arg, "%d-%d-%x", &(bank_id), &(rf_id), &(rf_val)); + rv = sscanf(arg, "%d-%d-%hhx", &(bank_id), &(rf_id), &(rf_val)); DBGPRINT(RT_DEBUG_TRACE, ("%s():rv = %d, bank_id = %d, rf_id = %d, rf_val = 0x%02x\n", __FUNCTION__, rv, bank_id, rf_id, rf_val)); if (rv == 3) { diff --git a/common/cmm_mac_usb.c b/common/cmm_mac_usb.c index c4e6da9..0114071 100644 --- a/common/cmm_mac_usb.c +++ b/common/cmm_mac_usb.c @@ -1344,7 +1344,6 @@ Return Value: VOID RT28XXDMAEnable( IN RTMP_ADAPTER *pAd) { - WPDMA_GLO_CFG_STRUC GloCfg; USB_DMA_CFG_STRUC UsbCfg; diff --git a/common/cmm_wpa.c b/common/cmm_wpa.c index 1d95e73..a88da57 100644 --- a/common/cmm_wpa.c +++ b/common/cmm_wpa.c @@ -1158,7 +1158,9 @@ VOID PeerPairMsg4Action( PHEADER_802_11 pHeader; UINT MsgLen; BOOLEAN Cancelled; - UCHAR group_cipher = Ndis802_11WEPDisabled; +#ifdef DBG + UCHAR group_cipher = Ndis802_11WEPDisabled; +#endif DBGPRINT(RT_DEBUG_TRACE, ("===> PeerPairMsg4Action\n")); @@ -1518,7 +1520,9 @@ VOID PeerGroupMsg2Action( PUCHAR pData; BOOLEAN Cancelled; PEAPOL_PACKET pMsg2; +#ifdef DBG UCHAR group_cipher = Ndis802_11WEPDisabled; +#endif DBGPRINT(RT_DEBUG_TRACE, ("===> PeerGroupMsg2Action \n")); diff --git a/common/crypt_aes.c b/common/crypt_aes.c index dee22f6..b7c5e5e 100644 --- a/common/crypt_aes.c +++ b/common/crypt_aes.c @@ -1456,7 +1456,7 @@ INT AES_Key_Wrap ( /* if ((pResult = (UINT8 *) kmalloc(sizeof(UINT8)*PlainTextLength, GFP_ATOMIC)) == NULL) { */ if (pResult == NULL) { - DBGPRINT(RT_DEBUG_ERROR, ("AES_Key_Wrap: allocate %d bytes memory failure.\n", sizeof(UINT8)*PlainTextLength)); + DBGPRINT(RT_DEBUG_ERROR, ("AES_Key_Wrap: allocate %lu bytes memory failure.\n", sizeof(UINT8)*PlainTextLength)); return -2; } /* End of if */ @@ -1551,7 +1551,7 @@ INT AES_Key_Unwrap ( /* if ((pResult = (UINT8 *) kmalloc(sizeof(UINT8)*PlainLength, GFP_ATOMIC)) == NULL) { */ if (pResult == NULL) { - DBGPRINT(RT_DEBUG_ERROR, ("AES_Key_Unwrap: allocate %d bytes memory failure.\n", sizeof(UINT8)*PlainLength)); + DBGPRINT(RT_DEBUG_ERROR, ("AES_Key_Unwrap: allocate %lu bytes memory failure.\n", sizeof(UINT8)*PlainLength)); return -2; } /* End of if */ diff --git a/common/mlme.c b/common/mlme.c index 5fe9724..f111bbd 100644 --- a/common/mlme.c +++ b/common/mlme.c @@ -535,8 +535,8 @@ VOID MlmeResetRalinkCounters( #endif /* RALINK_ATE */ /* for performace enchanement */ NdisZeroMemory(&pAd->RalinkCounters, - (UINT32)&pAd->RalinkCounters.OneSecEnd - - (UINT32)&pAd->RalinkCounters.OneSecStart); + (UINT32)(&pAd->RalinkCounters.OneSecEnd - + &pAd->RalinkCounters.OneSecStart)); return; } diff --git a/common/rtmp_init.c b/common/rtmp_init.c index 413b249..bff6556 100644 --- a/common/rtmp_init.c +++ b/common/rtmp_init.c @@ -709,6 +709,7 @@ VOID NICReadEEPROMParameters(RTMP_ADAPTER *pAd, PSTRING mac_addr) else #endif /* RT65xx */ /* 1. 11a*/ +#if 0 { { } @@ -719,6 +720,7 @@ VOID NICReadEEPROMParameters(RTMP_ADAPTER *pAd, PSTRING mac_addr) pAd->TssiPlusBoundaryA[1], pAd->TssiPlusBoundaryA[2], pAd->TssiPlusBoundaryA[3], pAd->TssiPlusBoundaryA[4], pAd->TxAgcStepA, pAd->bAutoTxAgcA)); } +#endif pAd->BbpRssiToDbmDelta = 0x0; /* Read frequency offset setting for RF*/ @@ -1058,7 +1060,9 @@ VOID NICInitAsicFromEEPROM( #ifdef CONFIG_STA_SUPPORT UINT32 data = 0; #endif /* CONFIG_STA_SUPPORT */ +#ifndef RT65xx USHORT i; +#endif #ifdef RALINK_ATE USHORT value; #endif /* RALINK_ATE */ diff --git a/common/rtusb_bulk.c b/common/rtusb_bulk.c index d7acd46..30e3851 100644 --- a/common/rtusb_bulk.c +++ b/common/rtusb_bulk.c @@ -1368,7 +1368,6 @@ VOID RTUSBCancelPendingBulkInIRP( PRX_CONTEXT pRxContext; PCMD_RSP_CONTEXT pCmdRspEventContext = &pAd->CmdRspEventContext; UINT i; - ULONG IrqFlags; DBGPRINT_RAW(RT_DEBUG_TRACE, ("--->RTUSBCancelPendingBulkInIRP\n")); for ( i = 0; i < (RX_RING_SIZE); i++) diff --git a/common/rtusb_io.c b/common/rtusb_io.c index 71ccb85..7491a0c 100644 --- a/common/rtusb_io.c +++ b/common/rtusb_io.c @@ -519,8 +519,9 @@ int write_reg( if (ret) { DBGPRINT(RT_DEBUG_ERROR, ("write reg fail\n")); - return; } + + return ret; } int read_reg( @@ -537,6 +538,7 @@ int read_reg( req = 0x47; else if (base == 0x41) req = 0x7; + else return -1; ret = RTUSB_VendorRequest(ad, (USBD_TRANSFER_DIRECTION_IN | USBD_SHORT_TRANSFER_OK), @@ -551,6 +553,8 @@ int read_reg( if (ret) *value = 0xffffffff; + + return ret; } /* @@ -801,7 +805,6 @@ NTSTATUS RTUSBWriteEEPROM( IN USHORT length) { NTSTATUS Status = STATUS_SUCCESS; - USHORT Value; Status = RTUSB_VendorRequest( pAd, diff --git a/common/spectrum.c b/common/spectrum.c index 7983003..2c0597b 100644 --- a/common/spectrum.c +++ b/common/spectrum.c @@ -1969,7 +1969,7 @@ static VOID PeerMeasureReportAction( /* if ((pMeasureReportInfo = kmalloc(sizeof(MEASURE_RPI_REPORT), GFP_ATOMIC)) == NULL)*/ if (pMeasureReportInfo == NULL) { - DBGPRINT(RT_DEBUG_ERROR, ("%s unable to alloc memory for measure report buffer (size=%d).\n", __FUNCTION__, sizeof(MEASURE_RPI_REPORT))); + DBGPRINT(RT_DEBUG_ERROR, ("%s unable to alloc memory for measure report buffer (size=%lu).\n", __FUNCTION__, sizeof(MEASURE_RPI_REPORT))); return; } diff --git a/common/txpower.c b/common/txpower.c index 8e741ac..1599cdb 100644 --- a/common/txpower.c +++ b/common/txpower.c @@ -161,8 +161,8 @@ VOID AsicGetAutoAgcOffsetForExternalTxAlc( /* a channel */ bAutoTxAgc = pAd->bAutoTxAgcA; TssiRef = pAd->TssiRefA; - pTssiMinusBoundary = &pAd->TssiMinusBoundaryA[0]; - pTssiPlusBoundary = &pAd->TssiPlusBoundaryA[0]; + pTssiMinusBoundary = &pAd->TssiMinusBoundaryA[0][0]; + pTssiPlusBoundary = &pAd->TssiPlusBoundaryA[0][0]; TxAgcStep = pAd->TxAgcStepA; pTxAgcCompensate = &pAd->TxAgcCompensateA; } diff --git a/common/vht.c b/common/vht.c index 842b074..a45928e 100644 --- a/common/vht.c +++ b/common/vht.c @@ -100,8 +100,10 @@ static struct vht_ch_layout vht_ch_80M[]={ VOID dump_vht_cap(RTMP_ADAPTER *pAd, VHT_CAP_IE *vht_ie) { +#ifdef DBG VHT_CAP_INFO *vht_cap = &vht_ie->vht_cap; VHT_MCS_SET *vht_mcs = &vht_ie->mcs_set; +#endif DBGPRINT(RT_DEBUG_OFF, ("Dump VHT_CAP IE\n")); hex_dump("VHT CAP IE Raw Data", (UCHAR *)vht_ie, sizeof(VHT_CAP_IE)); @@ -137,8 +139,10 @@ VOID dump_vht_cap(RTMP_ADAPTER *pAd, VHT_CAP_IE *vht_ie) VOID dump_vht_op(RTMP_ADAPTER *pAd, VHT_OP_IE *vht_ie) { +#ifdef DBG VHT_OP_INFO *vht_op = &vht_ie->vht_op_info; VHT_MCS_MAP *vht_mcs = &vht_ie->basic_mcs_set; +#endif DBGPRINT(RT_DEBUG_OFF, ("Dump VHT_OP IE\n")); hex_dump("VHT OP IE Raw Data", (UCHAR *)vht_ie, sizeof(VHT_OP_IE)); diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h index 9eb655d..c4ef072 100644 --- a/include/os/rt_linux.h +++ b/include/os/rt_linux.h @@ -792,7 +792,7 @@ void linux_pci_unmap_single(void *handle, ra_dma_addr_t dma_addr, size_t size, i RTUSBReadMACRegister((_A), (_R), (PUINT32) (_pV)) #define RTMP_IO_WRITE32(_A, _R, _V) \ - RTUSBWriteMACRegister((_A), (_R), (UINT32) (_V), FALSE) + RTUSBWriteMACRegister((_A), (_R), (_V), FALSE) #define RTMP_IO_WRITE8(_A, _R, _V) \ { \ diff --git a/include/rt_os_util.h b/include/rt_os_util.h index 6ec6117..b5c929e 100644 --- a/include/rt_os_util.h +++ b/include/rt_os_util.h @@ -663,7 +663,7 @@ VOID RtmpDrvAllE2PPrint( VOID RtmpDrvAllRFPrint( IN VOID *pReserved, - IN UINT32 *pBuf, + IN CHAR *pBuf, IN UINT32 BufLen); int RtmpOSIRQRelease( diff --git a/include/rtmp.h b/include/rtmp.h index 8cbacc8..6d3fd2a 100644 --- a/include/rtmp.h +++ b/include/rtmp.h @@ -7239,7 +7239,7 @@ NTSTATUS RTUSBMultiWrite( NTSTATUS RTUSBMultiWrite_nBytes( IN PRTMP_ADAPTER pAd, IN USHORT Offset, - IN PUCHAR pData, + IN PUCHAR pData, IN USHORT length, IN USHORT batchLen); @@ -7840,8 +7840,6 @@ INT Set_Wpa_Support( IN PSTRING arg); #endif /* WPA_SUPPLICANT_SUPPORT */ -#ifdef DBG - VOID RTMPIoctlMAC( IN PRTMP_ADAPTER pAdapter, IN RTMP_IOCTL_INPUT_STRUCT *wrq); @@ -7849,6 +7847,8 @@ VOID RTMPIoctlMAC( VOID RTMPIoctlE2PROM( IN PRTMP_ADAPTER pAdapter, IN RTMP_IOCTL_INPUT_STRUCT *wrq); +#ifdef DBG + #endif /* DBG */ diff --git a/include/rtmp_chip.h b/include/rtmp_chip.h index f910aed..c26d16e 100644 --- a/include/rtmp_chip.h +++ b/include/rtmp_chip.h @@ -869,7 +869,7 @@ struct _RTMP_CHIP_OP_ { VOID (*CckMrcStatusCtrl)(struct _RTMP_ADAPTER *pAd); VOID (*RadarGLRTCompensate)(struct _RTMP_ADAPTER *pAd); - VOID (*Calibration)(struct _RTMP_ADAPTER *pAd, UINT32 CalibrationID, UINT32 Parameter); + int (*Calibration)(struct _RTMP_ADAPTER *pAd, UINT32 CalibrationID, UINT32 Parameter); VOID (*SecondCCADetection)(struct _RTMP_ADAPTER *pAd); int (*BurstWrite)(struct _RTMP_ADAPTER *ad, UINT32 Offset, UINT32 *Data, UINT32 Cnt); diff --git a/mcu/mcu.c b/mcu/mcu.c index 3289c20..0a94743 100644 --- a/mcu/mcu.c +++ b/mcu/mcu.c @@ -27,14 +27,14 @@ #include "rt_config.h" -INT MCUBurstWrite(PRTMP_ADAPTER pAd, UINT32 Offset, UINT32 *Data, UINT32 Cnt) +VOID MCUBurstWrite(PRTMP_ADAPTER pAd, UINT32 Offset, PUCHAR Data, UINT32 Cnt) { #ifdef RTMP_USB_SUPPORT RTUSBMultiWrite_nBytes(pAd, Offset, Data, Cnt * 4, 64); #endif /* RTMP_USB_SUPPORT */ } -INT MCURandomWrite(PRTMP_ADAPTER pAd, RTMP_REG_PAIR *RegPair, UINT32 Num) +VOID MCURandomWrite(PRTMP_ADAPTER pAd, RTMP_REG_PAIR *RegPair, UINT32 Num) { UINT32 Index; diff --git a/mcu/mcu_and.c b/mcu/mcu_and.c index fa4286a..f18f07f 100644 --- a/mcu/mcu_and.c +++ b/mcu/mcu_and.c @@ -29,7 +29,7 @@ #ifdef RTMP_MAC_USB -VOID usb_uploadfw_complete(purbb_t urb, pregs *pt_regs) +VOID usb_uploadfw_complete(purbb_t urb) { RTMP_OS_COMPLETION *load_fw_done = (RTMP_OS_COMPLETION *)RTMP_OS_USB_CONTEXT_GET(urb); @@ -111,7 +111,7 @@ NDIS_STATUS andes_usb_loadfw(RTMP_ADAPTER *ad) } if (loop >= GET_SEMAPHORE_RETRY_MAX) { - DBGPRINT(RT_DEBUG_ERROR, ("%s: can not get the hw semaphore\n")); + DBGPRINT(RT_DEBUG_ERROR, ("%s: can not get the hw semaphore\n", __FUNCTION__)); return NDIS_STATUS_FAILURE; } } @@ -784,6 +784,7 @@ static u32 andes_queue_len(struct MCU_CTRL *ctl, DL_LIST *list) return qlen; } +#if 0 static int andes_queue_empty(struct MCU_CTRL *ctl, DL_LIST *list) { unsigned long flags; @@ -798,6 +799,7 @@ static int andes_queue_empty(struct MCU_CTRL *ctl, DL_LIST *list) return is_empty; } +#endif static void andes_queue_init(struct MCU_CTRL *ctl, DL_LIST *list) { @@ -1272,7 +1274,7 @@ static int andes_dequeue_and_kick_out_cmd_msgs(RTMP_ADAPTER *ad) int ret = NDIS_STATUS_SUCCESS; TXINFO_NMAC_CMD *tx_info; - while (msg = andes_dequeue_cmd_msg(ctl, &ctl->txq)) { + while ((msg = andes_dequeue_cmd_msg(ctl, &ctl->txq))) { if (!RTMP_TEST_FLAG(ad, fRTMP_ADAPTER_MCU_SEND_IN_BAND_CMD) || RTMP_TEST_FLAG(ad, fRTMP_ADAPTER_NIC_NOT_EXIST) || RTMP_TEST_FLAG(ad, fRTMP_ADAPTER_SUSPEND)) { diff --git a/mgmt/mgmt_vht.c b/mgmt/mgmt_vht.c index a027fd4..5f026d2 100644 --- a/mgmt/mgmt_vht.c +++ b/mgmt/mgmt_vht.c @@ -43,7 +43,9 @@ VOID rtmp_set_vht(RTMP_ADAPTER *pAd, RT_PHY_INFO *phy_info) INT SetCommonVHT(RTMP_ADAPTER *pAd) { +#ifdef DBG UCHAR cent_ch = 0; +#endif if (!WMODE_CAP_AC(pAd->CommonCfg.PhyMode)) { diff --git a/os/linux/rt_linux.c b/os/linux/rt_linux.c index 6f405eb..26ce931 100644 --- a/os/linux/rt_linux.c +++ b/os/linux/rt_linux.c @@ -173,8 +173,6 @@ VOID RTMPusecDelay(ULONG usec) /* Unify all delay routine by using udelay */ VOID RtmpOsUsDelay(ULONG value) { - ULONG i; - udelay(value); } @@ -2008,13 +2006,12 @@ VOID RtmpDrvAllE2PPrint( VOID RtmpDrvAllRFPrint( IN VOID *pReserved, - IN UINT32 *pBuf, + IN CHAR *pBuf, IN UINT32 BufLen) { struct file *file_w; PSTRING fileName = "RFDump.txt"; mm_segment_t orig_fs; - UINT32 macAddr = 0, macValue = 0; orig_fs = get_fs(); set_fs(KERNEL_DS); @@ -2150,7 +2147,7 @@ int RtmpOSIRQRelease( IN PPCI_DEV pci_dev, IN BOOLEAN *pHaveMsi) { - struct net_device *net_dev = (struct net_device *)pNetDev; +/* struct net_device *net_dev = (struct net_device *)pNetDev; */ diff --git a/os/linux/rt_profile.c b/os/linux/rt_profile.c index ccc3af7..459400e 100644 --- a/os/linux/rt_profile.c +++ b/os/linux/rt_profile.c @@ -331,7 +331,6 @@ void announce_802_3_packet( IN PNDIS_PACKET pPacket, IN UCHAR OpMode) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pAdSrc; PNDIS_PACKET pRxPkt = pPacket; ASSERT(pPacket); @@ -440,7 +439,7 @@ void STA_MonPktSend( if (pRxBlk->DataSize + sizeof(wlan_ng_prism2_header) > RX_BUFFER_AGGRESIZE) { - DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header))); + DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%lu)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header))); goto err_free_sk_buff; } diff --git a/os/linux/sta_ioctl.c b/os/linux/sta_ioctl.c index 50afb88..4d42d73 100644 --- a/os/linux/sta_ioctl.c +++ b/os/linux/sta_ioctl.c @@ -27,6 +27,7 @@ #define RTMP_MODULE_OS +#include "rt_config.h" #include "rtmp_comm.h" #include "rt_os_util.h" #include "rt_os_net.h" diff --git a/os/linux/usb_main_dev.c b/os/linux/usb_main_dev.c index 877213f..2300722 100644 --- a/os/linux/usb_main_dev.c +++ b/os/linux/usb_main_dev.c @@ -390,7 +390,7 @@ static int rt2870_suspend( struct usb_interface *intf, pm_message_t state) { - struct net_device *net_dev; +/* struct net_device *net_dev; */ VOID *pAd = usb_get_intfdata(intf); DBGPRINT(RT_DEBUG_TRACE, ("===> rt2870_suspend()\n")); @@ -438,7 +438,7 @@ static int rt2870_suspend( static int rt2870_resume( struct usb_interface *intf) { - struct net_device *net_dev; +/* struct net_device *net_dev; */ VOID *pAd = usb_get_intfdata(intf); #ifdef USB_SUPPORT_SELECTIVE_SUSPEND diff --git a/phy/rlt_phy.c b/phy/rlt_phy.c index 7a9efe4..cd6630a 100644 --- a/phy/rlt_phy.c +++ b/phy/rlt_phy.c @@ -65,9 +65,9 @@ NDIS_STATUS NICInitBBP(RTMP_ADAPTER *pAd) INT rtmp_bbp_get_temp(struct _RTMP_ADAPTER *pAd, CHAR *temp_val) { +#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION) UINT32 bbp_val; -#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION) RTMP_BBP_IO_READ32(pAd, CORE_R35, &bbp_val); *temp_val = (CHAR)(bbp_val & 0xff); @@ -79,10 +79,10 @@ INT rtmp_bbp_get_temp(struct _RTMP_ADAPTER *pAd, CHAR *temp_val) INT rtmp_bbp_tx_comp_init(RTMP_ADAPTER *pAd, INT adc_insel, INT tssi_mode) { +#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION) UINT32 bbp_val; UCHAR rf_val; -#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION) RTMP_BBP_IO_READ32(pAd, CORE_R34, &bbp_val); bbp_val = (bbp_val & 0xe7); bbp_val = (bbp_val | 0x80); @@ -150,6 +150,7 @@ INT rtmp_bbp_set_rxpath(struct _RTMP_ADAPTER *pAd, INT rxpath) } +#if 0 static UCHAR vht_prim_ch_val[] = { 42, 36, 0, 42, 40, 1, @@ -176,6 +177,7 @@ static UCHAR vht_prim_ch_val[] = { 155, 157, 2, 155, 161, 3 }; +#endif INT rtmp_bbp_set_ctrlch(struct _RTMP_ADAPTER *pAd, INT ext_ch) diff --git a/rate_ctrl/ra_ctrl.c b/rate_ctrl/ra_ctrl.c index 3e79c59..94f3b4d 100644 --- a/rate_ctrl/ra_ctrl.c +++ b/rate_ctrl/ra_ctrl.c @@ -1669,7 +1669,10 @@ VOID MlmeRALog( #endif /* DBG_CTRL_SUPPORT */ ) { - BOOLEAN stbc, csd=FALSE; + BOOLEAN stbc; +#ifdef DBG + BOOLEAN csd=FALSE; +#endif ULONG tp; /* Get STBC and StreamMode state */ diff --git a/sta/sta_cfg.c b/sta/sta_cfg.c index d2a68d2..833b4cf 100644 --- a/sta/sta_cfg.c +++ b/sta/sta_cfg.c @@ -4574,7 +4574,6 @@ INT RTMPQueryInformation( } -#ifdef DBG /* ========================================================================== Description: @@ -5020,8 +5019,6 @@ VOID RTMPIoctlE2PROM( } -#endif /* DBG */ - #ifdef RT65xx VOID RTMPIoctlBbp32( diff --git a/sta/sync.c b/sta/sync.c index 862b87b..e35d341 100644 --- a/sta/sync.c +++ b/sta/sync.c @@ -178,7 +178,9 @@ VOID MlmeForceJoinReqAction( UCHAR ExtRateLen; UCHAR ASupRate[] = {0x8C, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6C}; UCHAR ASupRateLen = sizeof(ASupRate)/sizeof(UCHAR); +#ifdef DBG MLME_JOIN_REQ_STRUCT *pInfo = (MLME_JOIN_REQ_STRUCT *)(Elem->Msg); +#endif #ifdef CONFIG_PM #ifdef USB_SUPPORT_SELECTIVE_SUSPEND