diff options
| -rw-r--r-- | network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.c | 30 | ||||
| -rw-r--r-- | network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.c | 7 |
2 files changed, 15 insertions, 22 deletions
diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.c b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.c index d48ee104..86a16e03 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.c @@ -1006,17 +1006,15 @@ PlatformSdioGetProperty( PSDBUS_REQUEST_PACKET psdrp = NULL; NTSTATUS status; - psdrp = (PSDBUS_REQUEST_PACKET)ExAllocatePoolWithTag(NonPagedPool, sizeof(SDBUS_REQUEST_PACKET), '3278'); + psdrp = (PSDBUS_REQUEST_PACKET)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(SDBUS_REQUEST_PACKET), '3278'); if(!psdrp) return STATUS_INSUFFICIENT_RESOURCES; - RtlZeroMemory(psdrp, sizeof(SDBUS_REQUEST_PACKET)); - - psdrp->RequestFunction = SDRF_GET_PROPERTY; - psdrp->Parameters.GetSetProperty.Property = Property; - psdrp->Parameters.GetSetProperty.Buffer = Buffer; - psdrp->Parameters.GetSetProperty.Length = Length; + psdrp->RequestFunction = SDRF_GET_PROPERTY; + psdrp->Parameters.GetSetProperty.Property = Property; + psdrp->Parameters.GetSetProperty.Buffer = Buffer; + psdrp->Parameters.GetSetProperty.Length = Length; NdisAcquireSpinLock( &(pDevice->IrpSpinLock) ); RT_SDIO_INC_CMD_REF(pDevice); @@ -1062,17 +1060,15 @@ PlatformSdioSetProperty( PSDBUS_REQUEST_PACKET psdrp = NULL; NTSTATUS status; - psdrp = (PSDBUS_REQUEST_PACKET)ExAllocatePoolWithTag(NonPagedPool, sizeof(SDBUS_REQUEST_PACKET), '3278'); + psdrp = (PSDBUS_REQUEST_PACKET)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(SDBUS_REQUEST_PACKET), '3278'); if(!psdrp) return STATUS_INSUFFICIENT_RESOURCES; - RtlZeroMemory(psdrp, sizeof(SDBUS_REQUEST_PACKET)); - - psdrp->RequestFunction = SDRF_SET_PROPERTY; - psdrp->Parameters.GetSetProperty.Property = Property; - psdrp->Parameters.GetSetProperty.Buffer = Buffer; - psdrp->Parameters.GetSetProperty.Length = Length; + psdrp->RequestFunction = SDRF_SET_PROPERTY; + psdrp->Parameters.GetSetProperty.Property = Property; + psdrp->Parameters.GetSetProperty.Buffer = Buffer; + psdrp->Parameters.GetSetProperty.Length = Length; NdisAcquireSpinLock( &(pDevice->IrpSpinLock) ); RT_SDIO_INC_CMD_REF(pDevice); @@ -1409,14 +1405,12 @@ PlatformSdioCmd53ReadWriteMDL( // // Now allocate a request packet for the arguments of the command. // - psdrp = ExAllocatePoolWithTag(NonPagedPool, sizeof(SDBUS_REQUEST_PACKET), '3278'); + psdrp = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(SDBUS_REQUEST_PACKET), '3278'); if(!psdrp) { RT_TRACE(COMP_IO, DBG_SERIOUS, ("PlatformSdioCmd53ReadWriteMDL(): Allocate sdrp fail!!\n")); return rtstatus; } - - RtlZeroMemory(psdrp, sizeof(SDBUS_REQUEST_PACKET)); psdrp->RequestFunction = SDRF_DEVICE_COMMAND; psdrp->Parameters.DeviceCommand.Mdl = pmdl; @@ -2985,7 +2979,7 @@ PrepareSdioAWBs( // // Allocate SD Request Packet // - device->pAsynIoWriteSdrp = (PSDBUS_REQUEST_PACKET)ExAllocatePoolWithTag(NonPagedPool, sizeof(SDBUS_REQUEST_PACKET), '3278'); + device->pAsynIoWriteSdrp = (PSDBUS_REQUEST_PACKET)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(SDBUS_REQUEST_PACKET), '3278'); if(device->pAsynIoWriteSdrp == NULL) goto Error; diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.c b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.c index fb9160a4..1165eed1 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.c @@ -1489,10 +1489,9 @@ N6SdioInitTxQueue( pDevice->RtNumTxQueue = SDIO_MAX_TX_QUEUE; // TX_HIQ, TX_MIQ and TX_LOQ // Initialize the contexts in Tx Queue. - pDevice->RtTxQueue = - (PRT_SDIO_TX_QUEUE)ExAllocatePoolWithTag(NonPagedPool, SDIO_MAX_TX_QUEUE*sizeof(RT_SDIO_TX_QUEUE), '3278' ); - PlatformZeroMemory(pDevice->RtTxQueue, SDIO_MAX_TX_QUEUE*sizeof(RT_SDIO_TX_QUEUE)); - + pDevice->RtTxQueue = + (PRT_SDIO_TX_QUEUE)ExAllocatePool2(POOL_FLAG_NON_PAGED, SDIO_MAX_TX_QUEUE*sizeof(RT_SDIO_TX_QUEUE), '3278' ); + if (pDevice->RtTxQueue != NULL) { |
