Skip to content

Commit

Permalink
Updated for supporting 5.15.158 kernel and below
Browse files Browse the repository at this point in the history
  • Loading branch information
Sastry, Murali committed Jun 4, 2024
1 parent 523f56c commit 5a87034
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rmnet/QMIDevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -3277,7 +3277,7 @@ void WriteAsyncCallback( struct urb * pWriteURB )
kfree(pWriteURB->transfer_buffer);
usb_free_urb( pWriteURB );

#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,148))
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,158))
pAioDataCtx->kiocb->ki_complete(pAioDataCtx->kiocb, 0, -EINVAL);
#else
pAioDataCtx->kiocb->ki_complete(pAioDataCtx->kiocb, -EINVAL);
Expand All @@ -3304,7 +3304,7 @@ void WriteAsyncCallback( struct urb * pWriteURB )
AddToURBList( pDev, pFilpData->mClientID, pWriteURB, pFilpData->QMIDev );
spin_unlock_irqrestore( &pFilpData->QMIDev->mClientMemLock, flags );

#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,148))
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,158))
pAioDataCtx->kiocb->ki_complete(pAioDataCtx->kiocb, 0, -EINVAL);
#else
pAioDataCtx->kiocb->ki_complete(pAioDataCtx->kiocb, 0);
Expand All @@ -3317,7 +3317,7 @@ void WriteAsyncCallback( struct urb * pWriteURB )
spin_unlock_irqrestore( &pFilpData->QMIDev->mClientMemLock, flags );

QC_LOG_DBG(GET_QMIDEV_QMIFILP(pFilpData), "Actual Write:\n" );
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,148))
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,158))
pAioDataCtx->kiocb->ki_complete(pAioDataCtx->kiocb, (pWriteURB->actual_length - QMUXHeaderSize()), pWriteURB->status);
#else
pAioDataCtx->kiocb->ki_complete(pAioDataCtx->kiocb, (pWriteURB->actual_length - QMUXHeaderSize()));
Expand All @@ -3341,7 +3341,7 @@ static void aio_cancel_worker(struct work_struct *work)

usb_kill_urb(io_data->urb);

#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,148))
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,158))
io_data->kiocb->ki_complete(io_data->kiocb, -1, -ETIMEDOUT);
#else
io_data->kiocb->ki_complete(io_data->kiocb, -1);
Expand Down Expand Up @@ -3675,7 +3675,7 @@ static void aio_read_copy_worker(struct work_struct *work)
status = 0;
}

#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,148))
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,158))
kiocb->ki_complete(kiocb, ret, status); //Status = 0, in case of success
#else
kiocb->ki_complete(kiocb, ret); // ret: number of bytes not copied
Expand Down Expand Up @@ -3831,7 +3831,7 @@ static void aio_read_cancel_worker(struct work_struct *work)

spin_unlock_irqrestore( &QMIDev->mClientMemLock, flags);

#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,148))
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5,15,158))
kiocb->ki_complete(kiocb, 0, -ETIMEDOUT);
#else
kiocb->ki_complete(kiocb, 0);
Expand Down

0 comments on commit 5a87034

Please sign in to comment.