wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp
changeset 0 c40eb8fe8501
child 17 a828660c511c
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   Implementation of the DWlanLogicalChannelBase class.
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 2 %
       
    20 */
       
    21 
       
    22 #include "WlLddWlanLddConfig.h"
       
    23 #include "wllddlogicalchannelbase.h"
       
    24 #include <kern_priv.h>
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // 
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 DWlanLogicalChannelBase::DWlanLogicalChannelBase()
       
    31     {
       
    32     }
       
    33 
       
    34 
       
    35 // ---------------------------------------------------------------------------
       
    36 // 
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 DWlanLogicalChannelBase::~DWlanLogicalChannelBase()
       
    40     {
       
    41     }
       
    42 
       
    43 // ---------------------------------------------------------------------------
       
    44 // 
       
    45 // ---------------------------------------------------------------------------
       
    46 //
       
    47 TInt DWlanLogicalChannelBase::Request( TInt aReqNo, TAny* a1, TAny* a2 )
       
    48     {
       
    49     if ( aReqNo < static_cast<TInt>(EMinRequestId) )
       
    50         {
       
    51         Kern::PanicCurrentThread( 
       
    52             _L("DWlanLogicalChannelBase::Request"), 
       
    53             ERequestNoInvalid );
       
    54         
       
    55         return KErrGeneral;
       
    56         }
       
    57     else if ( aReqNo >= EMinControlFast && aReqNo < EMaxControlFast)
       
    58         {
       
    59         // Execute fast control commands in the context of the client's 
       
    60         // thread in supervisor mode.
       
    61         return reinterpret_cast<TInt>(DoControlFast( aReqNo , a1 ));
       
    62         }
       
    63     else
       
    64         {
       
    65         TThreadMessage& m = Kern::Message();
       
    66         m.iValue = aReqNo;
       
    67         m.iArg[0] = a1;
       
    68         if ( aReqNo < 0 )
       
    69             {
       
    70             kumemget32( &m.iArg[1], a2, 2 * sizeof( TAny* ) );
       
    71             }
       
    72         else
       
    73             {
       
    74             m.iArg[1] = a2;
       
    75             }
       
    76         return m.SendReceive( &iMsgQ );
       
    77         }
       
    78     }