wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl
branchRCL_3
changeset 42 a828660c511c
parent 0 c40eb8fe8501
child 43 d3d7683d16f5
equal deleted inserted replaced
40:5fb7af913dfd 42:a828660c511c
     1 /*
     1 /*
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    14 * Description:   Implementation of RPcmNetCardIf inline methods.
    14 * Description:   Implementation of RPcmNetCardIf inline methods.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 9 %
    19 * %version: 10 %
    20 */
    20 */
    21 
    21 
    22 // ---------------------------------------------------------------------------
    22 // ---------------------------------------------------------------------------
    23 // 
    23 // 
    24 // ---------------------------------------------------------------------------
    24 // ---------------------------------------------------------------------------
    76 
    76 
    77 // ---------------------------------------------------------------------------
    77 // ---------------------------------------------------------------------------
    78 // 
    78 // 
    79 // ---------------------------------------------------------------------------
    79 // ---------------------------------------------------------------------------
    80 //
    80 //
    81 inline TInt RPcmNetCardIf::InitialiseBuffers( 
    81 inline TInt RPcmNetCardIf::InitialiseBuffers()
    82     RFrameXferBlockProtocolStack*& aFrameXferBlock )
       
    83     {
    82     {
    84     TInt status ( KErrNone );
    83     TInt status ( KErrNone );
    85     
       
    86     TSharedChunkInfo info;
    84     TSharedChunkInfo info;
    87     
    85     
    88     status = DoSvControl( 
    86     status = DoSvControl( 
    89         ESvControlInitBuffers, 
    87         ESvControlInitBuffers, 
    90         static_cast<TAny*>(&info) );
    88         static_cast<TAny*>(&info) );
   107                 + KMgmtSideTxBufferLength
   105                 + KMgmtSideTxBufferLength
   108                 + KProtocolStackSideTxDataChunkSize
   106                 + KProtocolStackSideTxDataChunkSize
   109                 + sizeof( RFrameXferBlock ) 
   107                 + sizeof( RFrameXferBlock ) 
   110                 + sizeof( RFrameXferBlockProtocolStack ) ) );
   108                 + sizeof( RFrameXferBlockProtocolStack ) ) );
   111 
   109 
   112         aFrameXferBlock = reinterpret_cast<RFrameXferBlockProtocolStack*>(
   110         RFrameXferBlockProtocolStack* frameXferBlock = 
   113             baseAddress
   111             reinterpret_cast<RFrameXferBlockProtocolStack*>(
   114             + KRxDataChunkSize
   112                 baseAddress
   115             + sizeof( TDataBuffer )
   113                 + KRxDataChunkSize
   116             + KMgmtSideTxBufferLength
   114                 + sizeof( TDataBuffer )
   117             + KProtocolStackSideTxDataChunkSize
   115                 + KMgmtSideTxBufferLength
   118             + sizeof( RFrameXferBlock ) );
   116                 + KProtocolStackSideTxDataChunkSize
       
   117                 + sizeof( RFrameXferBlock ) );
   119 
   118 
   120         aFrameXferBlock->SetRxDataChunkField( reinterpret_cast<TLinAddr>(
   119         frameXferBlock->UserInitialize( 
   121             baseAddress) );
   120             reinterpret_cast<TUint32>(frameXferBlock) );
   122 
       
   123         aFrameXferBlock->SetTxDataBufferField( reinterpret_cast<TLinAddr>(
       
   124             baseAddress
       
   125             + KRxDataChunkSize
       
   126             + sizeof( TDataBuffer )
       
   127             + KMgmtSideTxBufferLength) );
       
   128         
       
   129         aFrameXferBlock->UserInitialize( 
       
   130             reinterpret_cast<TUint32>(aFrameXferBlock) );
       
   131         }
   121         }
   132     
   122     
   133     return status;
   123     return status;
   134     }
   124     }
   135 
   125 
   182     {
   172     {
   183     return static_cast<TBool>(DoControl( 
   173     return static_cast<TBool>(DoControl( 
   184         EControlFastAddTxFrame, 
   174         EControlFastAddTxFrame, 
   185         reinterpret_cast<TAny*>(aPacket) ));
   175         reinterpret_cast<TAny*>(aPacket) ));
   186     }
   176     }
       
   177 
       
   178 // ---------------------------------------------------------------------------
       
   179 // 
       
   180 // ---------------------------------------------------------------------------
       
   181 //
       
   182 inline TDataBuffer* RPcmNetCardIf::GetRxFrame( TDataBuffer* aFrameToFree )
       
   183     {
       
   184     return reinterpret_cast<TDataBuffer*>(DoControl( 
       
   185         EControlFastGetRxFrame,
       
   186         reinterpret_cast<TAny*>(aFrameToFree) ));
       
   187     }