wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl
branchRCL_3
changeset 42 a828660c511c
parent 0 c40eb8fe8501
child 43 d3d7683d16f5
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl	Thu Aug 19 11:40:48 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl	Tue Aug 31 17:02:06 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: 10 %
 */
 
 // ---------------------------------------------------------------------------
@@ -78,11 +78,9 @@
 // 
 // ---------------------------------------------------------------------------
 //
-inline TInt RPcmNetCardIf::InitialiseBuffers( 
-    RFrameXferBlockProtocolStack*& aFrameXferBlock )
+inline TInt RPcmNetCardIf::InitialiseBuffers()
     {
     TInt status ( KErrNone );
-    
     TSharedChunkInfo info;
     
     status = DoSvControl( 
@@ -109,25 +107,17 @@
                 + sizeof( RFrameXferBlock ) 
                 + sizeof( RFrameXferBlockProtocolStack ) ) );
 
-        aFrameXferBlock = reinterpret_cast<RFrameXferBlockProtocolStack*>(
-            baseAddress
-            + KRxDataChunkSize
-            + sizeof( TDataBuffer )
-            + KMgmtSideTxBufferLength
-            + KProtocolStackSideTxDataChunkSize
-            + sizeof( RFrameXferBlock ) );
+        RFrameXferBlockProtocolStack* frameXferBlock = 
+            reinterpret_cast<RFrameXferBlockProtocolStack*>(
+                baseAddress
+                + KRxDataChunkSize
+                + sizeof( TDataBuffer )
+                + KMgmtSideTxBufferLength
+                + KProtocolStackSideTxDataChunkSize
+                + sizeof( RFrameXferBlock ) );
 
-        aFrameXferBlock->SetRxDataChunkField( reinterpret_cast<TLinAddr>(
-            baseAddress) );
-
-        aFrameXferBlock->SetTxDataBufferField( reinterpret_cast<TLinAddr>(
-            baseAddress
-            + KRxDataChunkSize
-            + sizeof( TDataBuffer )
-            + KMgmtSideTxBufferLength) );
-        
-        aFrameXferBlock->UserInitialize( 
-            reinterpret_cast<TUint32>(aFrameXferBlock) );
+        frameXferBlock->UserInitialize( 
+            reinterpret_cast<TUint32>(frameXferBlock) );
         }
     
     return status;
@@ -184,3 +174,14 @@
         EControlFastAddTxFrame, 
         reinterpret_cast<TAny*>(aPacket) ));
     }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+inline TDataBuffer* RPcmNetCardIf::GetRxFrame( TDataBuffer* aFrameToFree )
+    {
+    return reinterpret_cast<TDataBuffer*>(DoControl( 
+        EControlFastGetRxFrame,
+        reinterpret_cast<TAny*>(aFrameToFree) ));
+    }