wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl
changeset 22 c6a1762761b8
parent 17 41a8eba36f74
child 45 e038696bbbe5
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17 %
+* %version: 18 %
 */
 
 // -----------------------------------------------------------------------------
@@ -39,9 +39,7 @@
     TWlanUnit aUnit, 
     TOpenParam& aOpenParam )
     {
-    iWlanSystemInitialized = EFalse;
-    
-	TInt err = DoCreate(
+    TInt err = DoCreate(
         LDD_NAME, 
         VersionRequired(), 
         aUnit, 
@@ -54,12 +52,6 @@
         // driver load sequence success
         // do system init
         err = InitWlanSystem( aOpenParam  );
-        
-        if ( err == KErrNone )
-            {
-            // WLAN system successfully initialized
-            iWlanSystemInitialized = ETrue;
-            }
         }
 
     return err;
@@ -71,21 +63,12 @@
 //
 inline void RWlanLogicalChannel::CloseChannel()
     {
-    // release WLAN system resources only if we have been able to do the 
-    // initialization successfully.
-    // This check is done to prevent a release attempt in a case where the 
-    // device driver framework has not been properly initialized to be able to 
-    // handle requests
-    if ( iWlanSystemInitialized )
-        {
-        TRequestStatus status;
-        DoRequest( EWlanFinitSystem, status );
-        User::WaitForRequest(status);
-
-        // not initialized any more. This is needed to handle the case
-        // that this method is called multiple times
-        iWlanSystemInitialized = EFalse;
-        }
+    // request WLAN system resources to be released
+    //
+    TRequestStatus status;
+    DoRequest( EWlanFinitSystem, status );
+    User::WaitForRequest(status);
+    
     // internally call close
     Close();
     }
@@ -237,12 +220,12 @@
             + KMgmtSideTxBufferLength
             + KProtocolStackSideTxDataChunkSize );
 
-        aFrameXferBlock->SetRxDataChunkField( reinterpret_cast<TLinAddr>(
-            baseAddress) );
-
         aFrameXferBlock->SetTxDataBufferField( reinterpret_cast<TLinAddr>(
             baseAddress
             + KRxDataChunkSize ) );
+        
+        aFrameXferBlock->UserInitialize( 
+            reinterpret_cast<TUint32>(aFrameXferBlock) );
         }
     
     return status;
@@ -279,3 +262,15 @@
     {
     DoRequest( EWlanRequestFrame, aStatus );
     }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+inline TDataBuffer* RWlanLogicalChannel::GetRxFrame(
+    TDataBuffer* aFrameToFree )
+    {
+    return reinterpret_cast<TDataBuffer*>(DoControl( 
+        EWlanControlFastGetRxFrame,
+        reinterpret_cast<TAny*>(aFrameToFree) ));
+    }