Commit ca58fb30 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rt28x0: fix some build warnings

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 44c68c23
......@@ -552,8 +552,8 @@
#ifdef RT30xx
#define RTMP_ASIC_MMPS_DISABLE(_pAd) \
do{ \
UCHAR _bbpData; \
UINT32 _macData; \
UINT32 _macData; \
UCHAR _bbpData = 0; \
/* disable MMPS BBP control register */ \
RTMP_BBP_IO_READ8_BY_REG_ID(_pAd, BBP_R3, &_bbpData); \
_bbpData &= ~(0x04); /*bit 2*/ \
......@@ -568,8 +568,8 @@
#define RTMP_ASIC_MMPS_ENABLE(_pAd) \
do{ \
UCHAR _bbpData; \
UINT32 _macData; \
UINT32 _macData; \
UCHAR _bbpData = 0; \
/* enable MMPS BBP control register */ \
RTMP_BBP_IO_READ8_BY_REG_ID(_pAd, BBP_R3, &_bbpData); \
_bbpData |= (0x04); /*bit 2*/ \
......
......@@ -86,7 +86,9 @@ VOID RT30xxSetRxAnt(
IN UCHAR Ant)
{
UINT32 Value;
#ifdef RTMP_MAC_PCI
UINT32 x;
#endif
if ((pAd->EepromAccess) ||
(RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS)) ||
......
......@@ -810,9 +810,9 @@ VOID AsicSwitchChannel(
#if defined(RT3090) || defined(RT3390)
// PCIe PHY Transmit attenuation adjustment
if (IS_RT3090A(pAd) || IS_RT3390(pAd))
{
TX_ATTENUATION_CTRL_STRUC TxAttenuationCtrl = {0};
if (IS_RT3090A(pAd) || IS_RT3390(pAd)) {
TX_ATTENUATION_CTRL_STRUC
TxAttenuationCtrl = { .word = 0 };
RTMP_IO_READ32(pAd, PCIE_PHY_TX_ATTENUATION_CTRL, &TxAttenuationCtrl.word);
......
......@@ -1173,10 +1173,9 @@ BOOLEAN RT28xxPciAsicRadioOn(
pAd->Mlme.bPsPollTimerRunning = FALSE;
RTMPCancelTimer(&pAd->Mlme.PsPollTimer, &Cancelled);
}
if ((pAd->StaCfg.PSControl.field.EnableNewPS == TRUE)&&
((Level == GUIRADIO_OFF) || (Level == GUI_IDLE_POWER_SAVE))
||(RTMP_TEST_PSFLAG(pAd, fRTMP_PS_SET_PCI_CLK_OFF_COMMAND)))
{
if ((pAd->StaCfg.PSControl.field.EnableNewPS == TRUE &&
(Level == GUIRADIO_OFF || Level == GUI_IDLE_POWER_SAVE)) ||
RTMP_TEST_PSFLAG(pAd, fRTMP_PS_SET_PCI_CLK_OFF_COMMAND)) {
// Some chips don't need to delay 6ms, so copy RTMPPCIePowerLinkCtrlRestore
// return condition here.
/*
......
......@@ -679,7 +679,6 @@ VOID MlmePeriodicExec(
{
ULONG TxTotalCnt;
PRTMP_ADAPTER pAd = (RTMP_ADAPTER *)FunctionContext;
SHORT realavgrssi;
#ifdef RTMP_MAC_PCI
{
......
......@@ -3621,7 +3621,8 @@ INT RtmpRaDevCtrlInit(
#ifdef RTMP_MAC_USB
init_MUTEX(&(pAd->UsbVendorReq_semaphore));
os_alloc_mem(pAd, (PUCHAR)&pAd->UsbVendorReqBuf, MAX_PARAM_BUFFER_SIZE - 1);
os_alloc_mem(pAd, (PUCHAR *)&pAd->UsbVendorReqBuf,
MAX_PARAM_BUFFER_SIZE - 1);
if (pAd->UsbVendorReqBuf == NULL)
{
DBGPRINT(RT_DEBUG_ERROR, ("Allocate vendor request temp buffer failed!\n"));
......
......@@ -119,7 +119,9 @@ NDIS_STATUS RtmpAsicLoadFirmware(
PUCHAR pFirmwareImage = NULL;
ULONG FileLength, Index;
UINT32 MacReg = 0;
#ifdef RTMP_MAC_USB
UINT32 Version = (pAd->MACVersion >> 16);
#endif
// New 8k byte firmware size for RT3071/RT3072
{
......
......@@ -310,7 +310,7 @@ static INT __devinit rt2860_probe(
return rv;
}
print_name = pci_name(pci_dev);
print_name = (PSTRING)pci_name(pci_dev);
if ((rv = pci_request_regions(pci_dev, print_name)) != 0)
{
......@@ -883,7 +883,7 @@ VOID RTMPPCIeLinkCtrlValueRestore(
#endif // RT2860 //
// Check PSControl Configuration
if (pAd->StaCfg.PSControl.field.EnableNewPS == FALSE)
return TRUE;
return;
//3090 will not execute the following codes.
// Check interface : If not PCIe interface, return.
......@@ -977,7 +977,7 @@ VOID RTMPPCIeLinkCtrlSetting(
#endif // RT2860 //
// Check PSControl Configuration
if (pAd->StaCfg.PSControl.field.EnableNewPS == FALSE)
return TRUE;
return;
// Check interface : If not PCIe interface, return.
//Block 3090 to enter the following function
......@@ -1086,17 +1086,17 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
IN PRTMP_ADAPTER pAd)
{
ULONG HostConfiguration;
ULONG HostConfiguration = 0;
ULONG Configuration;
ULONG Vendor;
ULONG offset;
POS_COOKIE pObj;
INT pos;
USHORT reg16;
pObj = (POS_COOKIE) pAd->OS_Cookie;
DBGPRINT(RT_DEBUG_INFO, ("RTMPrt3xSetPCIePowerLinkCtrl.===> %x\n", pAd->StaCfg.PSControl.word));
DBGPRINT(RT_DEBUG_INFO,
("RTMPrt3xSetPCIePowerLinkCtrl.===> %lx\n",
pAd->StaCfg.PSControl.word));
// Check PSControl Configuration
if (pAd->StaCfg.PSControl.field.EnableNewPS == FALSE)
......@@ -1104,7 +1104,6 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
RTMPFindHostPCIDev(pAd);
if (pObj->parent_pci_dev)
{
USHORT vendor_id;
// Find PCI-to-PCI Bridge Express Capability Offset
pos = pci_find_capability(pObj->parent_pci_dev, PCI_CAP_ID_EXP);
......@@ -1129,7 +1128,10 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
// Because in rt30xxForceASPMTest Mode, Force turn on L0s, L1.
// Fix HostConfiguration bit0:1 = 0x3 for later use.
HostConfiguration = 0x3;
DBGPRINT(RT_DEBUG_TRACE, ("PSM : Force ASPM : Host device L1/L0s Value = 0x%x\n", HostConfiguration));
DBGPRINT(RT_DEBUG_TRACE,
("PSM : Force ASPM : "
"Host device L1/L0s Value = 0x%lx\n",
HostConfiguration));
}
}
else if (pAd->StaCfg.PSControl.field.rt30xxFollowHostASPM == 1)
......@@ -1141,7 +1143,10 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
PCI_REG_READ_WORD(pObj->parent_pci_dev, pAd->HostLnkCtrlOffset, HostConfiguration);
pAd->Rt3xxHostLinkCtrl = HostConfiguration;
HostConfiguration &= 0x3;
DBGPRINT(RT_DEBUG_TRACE, ("PSM : Follow Host ASPM : Host device L1/L0s Value = 0x%x\n", HostConfiguration));
DBGPRINT(RT_DEBUG_TRACE,
("PSM : Follow Host ASPM : "
"Host device L1/L0s Value = 0x%lx\n",
HostConfiguration));
}
}
}
......@@ -1155,8 +1160,10 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
pAd->RLnkCtrlOffset = pos + PCI_EXP_LNKCTL;
pci_read_config_word(pObj->pci_dev, pAd->RLnkCtrlOffset, &reg16);
Configuration = le2cpu16(reg16);
DBGPRINT(RT_DEBUG_TRACE, ("Read (Ralink PCIe Link Control Register) offset 0x%x = 0x%x\n",
pAd->RLnkCtrlOffset, Configuration));
DBGPRINT(RT_DEBUG_TRACE,
("Read (Ralink PCIe Link Control Register) "
"offset 0x%x = 0x%lx\n",
pAd->RLnkCtrlOffset, Configuration));
Configuration |= 0x100;
if ((pAd->StaCfg.PSControl.field.rt30xxFollowHostASPM == 1)
|| (pAd->StaCfg.PSControl.field.rt30xxForceASPMTest == 1))
......@@ -1182,7 +1189,9 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
reg16 = cpu2le16(Configuration);
pci_write_config_word(pObj->pci_dev, pAd->RLnkCtrlOffset, reg16);
pAd->Rt3xxRalinkLinkCtrl = Configuration;
DBGPRINT(RT_DEBUG_TRACE, ("PSM :Write Ralink device L1/L0s Value = 0x%x\n", Configuration));
DBGPRINT(RT_DEBUG_TRACE,
("PSM :Write Ralink device L1/L0s Value = 0x%lx\n",
Configuration));
}
DBGPRINT(RT_DEBUG_INFO,("PSM :RTMPrt3xSetPCIePowerLinkCtrl <==============\n"));
}
......@@ -965,6 +965,7 @@ void send_monitor_packets(
*******************************************************************************/
int RtmpOSIRQRequest(IN PNET_DEV pNetDev)
{
#ifdef RTMP_PCI_SUPPORT
struct net_device *net_dev = pNetDev;
PRTMP_ADAPTER pAd = NULL;
int retval = 0;
......@@ -973,7 +974,6 @@ int RtmpOSIRQRequest(IN PNET_DEV pNetDev)
ASSERT(pAd);
#ifdef RTMP_PCI_SUPPORT
if (pAd->infType == RTMP_DEV_INF_PCI)
{
POS_COOKIE _pObj = (POS_COOKIE)(pAd->OS_Cookie);
......@@ -982,14 +982,13 @@ int RtmpOSIRQRequest(IN PNET_DEV pNetDev)
if (retval != 0)
printk("RT2860: request_irq ERROR(%d)\n", retval);
}
#endif // RTMP_PCI_SUPPORT //
return retval;
#else
return 0;
#endif
}
int RtmpOSIRQRelease(IN PNET_DEV pNetDev)
{
struct net_device *net_dev = pNetDev;
......@@ -1149,7 +1148,6 @@ NDIS_STATUS RtmpOSTaskAttach(
IN void *arg)
{
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
pid_t pid_number = -1;
#ifdef KTHREAD_SUPPORT
pTask->task_killed = 0;
......
......@@ -209,15 +209,13 @@ int rt28xx_close(IN PNET_DEV dev)
BOOLEAN Cancelled;
UINT32 i = 0;
GET_PAD_FROM_NET_DEV(pAd, net_dev);
#ifdef RTMP_MAC_USB
DECLARE_WAIT_QUEUE_HEAD(unlink_wakeup);
DECLARE_WAITQUEUE(wait, current);
//RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_REMOVE_IN_PROGRESS);
#endif // RTMP_MAC_USB //
GET_PAD_FROM_NET_DEV(pAd, net_dev);
DBGPRINT(RT_DEBUG_TRACE, ("===> rt28xx_close\n"));
Cancelled = FALSE;
......
......@@ -1809,7 +1809,6 @@ VOID LinkDown(
IN BOOLEAN IsReqFromAP)
{
UCHAR i, ByteValue = 0;
BOOLEAN Cancelled;
// Do nothing if monitor mode is on
if (MONITOR_ON(pAd))
......
......@@ -686,9 +686,10 @@ VOID RTUSBWatchDog(IN RTMP_ADAPTER *pAd)
RTMP_IRQ_UNLOCK(&pAd->BulkOutLock[idx], irqFlags);
printk("%d:%d LTL=%d , TL=%d L:%d\n",idx,pAd->watchDogTxPendingCnt[idx],pAd->TransferedLength[idx]
,actual_length,transfer_buffer_length);
printk(KERN_INFO "%d:%lu LTL=%d , TL=%d L:%d\n",
idx, pAd->watchDogTxPendingCnt[idx],
pAd->TransferedLength[idx],
actual_length, transfer_buffer_length);
if (pUrb)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment