Revision: 201021
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 27 May 2010 14:33:33 +0300
changeset 22 c6a1762761b8
parent 19 629e60dfa279
child 27 debc621e0d58
Revision: 201021 Kit: 2010121
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_unload_drivers.h
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_delete_ts.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_delete_ts.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_roam_update_ts.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_traffic_stream_list_iter.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_virtual_traffic_stream_list_iter.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/group/wlmserversrv.mmh
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlandevicesettings.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanticktimer.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatformdata.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.inl
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmsystemnotify.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtframehandler.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanticktimer.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatformdata.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp
wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.h
wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.inl
wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h
wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacProtocolStackSideUmacCb.h
wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp
wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp
wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp
wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacProtocolStackSideUmacCb.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EthernetFrameMemMngr.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/FrameXferBlock.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/MgmtFrameMemMngr.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/WlanLogicalChannel.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddlogicalchannelbase.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/DataFrameMemMngr.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/FrameXferBlock.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/MgmtFrameMemMngr.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WLanLogicalDevice.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WlanLogicalChannel.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp
wlan_bearer/wlannwif/etherpkt/CardDll.cpp
wlan_bearer/wlannwif/etherpkt/receiver_hw.cpp
wlan_bearer/wlannwif/inc/carddrv.h
wlan_bearer/wlannwif/inc/receiver_hw.h
wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h
wlan_plat/wlan_management_api/inc/wlanerrorcodes.h
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_unload_drivers.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_unload_drivers.h	Thu May 27 14:33:33 2010 +0300
@@ -21,7 +21,7 @@
 
 #include "core_operation_base.h"
 
-const u32_t DELAY_FOR_AGENT = 100000; // 0,1 seconds
+const u32_t DELAY_FOR_AGENT = 500000; // 0,5 seconds
 
 class core_server_c;
 
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_delete_ts.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_delete_ts.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: 9 %
 */
 
 #include "core_operation_delete_ts.h"
@@ -121,6 +121,7 @@
              * Delete the virtual traffic stream.
              */
             virtual_ts_iter.remove();
+            virtual_stream = NULL;
             
             /**
              * Locate the actual traffic stream based on the TID.
@@ -279,6 +280,7 @@
              * Delete the actual traffic stream.
              */
             ts_iter.remove();
+            stream = NULL;
 
             if( direction == core_traffic_stream_direction_uplink ||
                 direction == core_traffic_stream_direction_bidirectional )
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_delete_ts.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_delete_ts.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: 10 %
 */
 
 #include "core_operation_handle_delete_ts.h"
@@ -125,6 +125,7 @@
             server_m->get_wpx_adaptation_instance().handle_ts_delete(
                 tid_m, user_priority );           
             ts_iter.remove();
+            stream = NULL;
 
             if( direction == core_traffic_stream_direction_uplink ||
                 direction == core_traffic_stream_direction_bidirectional )
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_roam_update_ts.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_roam_update_ts.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 13 %
 */
 
 #include "core_sub_operation_roam_update_ts.h"
@@ -154,14 +154,25 @@
             core_virtual_traffic_stream_c* virtual_iter = virtual_ts_iter.first();
             while( virtual_iter )
                 {
-                if( is_ac_required[virtual_iter->access_class()] &&
-                    virtual_iter->status() != core_traffic_stream_status_active )
+                if( virtual_iter->status() != core_traffic_stream_status_active )
                     {
-                    DEBUG1( "core_sub_operation_roam_update_ts_c::next_state() - virtual traffic stream with ID %u needs to created",
-                        virtual_iter->id() );
+                    if( is_ac_required[virtual_iter->access_class()] )
+                        {
+                        DEBUG1( "core_sub_operation_roam_update_ts_c::next_state() - virtual traffic stream with ID %u needs to created",
+                            virtual_iter->id() );
 
-                    virtual_stream_list_m.add_traffic_stream(
-                        *virtual_iter );
+                        virtual_stream_list_m.add_traffic_stream(
+                            *virtual_iter );
+                        }
+                    else
+                        {
+                        /**
+                         * Send a status update to all affected virtual traffic streams. 
+                         */
+                        set_virtual_traffic_stream_inactive_by_id(
+                            virtual_iter->id(),
+                            core_traffic_stream_status_inactive_not_required );
+                        }
                     }
 
                 virtual_iter = virtual_ts_iter.next();
@@ -188,7 +199,7 @@
                      */
                     set_virtual_traffic_stream_inactive_by_tid(
                         iter->tid(),
-                        core_traffic_stream_status_inactive_not_required );                    
+                        core_traffic_stream_status_inactive_not_required );
                     
                     /**
                      * Delete the actual traffic stream.
@@ -196,6 +207,7 @@
                     server_m->get_wpx_adaptation_instance().handle_ts_delete(
                         iter->tid(), iter->user_priority() );                   
                     ts_iter.remove();
+                    iter = NULL;
                     }
                 else if( iter->status() == core_traffic_stream_status_undefined )
                     {
@@ -222,6 +234,7 @@
                     server_m->get_wpx_adaptation_instance().handle_ts_delete(
                         iter->tid(), iter->user_priority() );                   
                     ts_iter.remove();
+                    iter = NULL;
                     }
 
                 iter = ts_iter.next();
@@ -301,6 +314,7 @@
              * Move to the next entry.
              */
             stream_iter_m.remove();
+            iter = NULL;
             (void)stream_iter_m.first();
 
             return goto_state( core_state_recreate_next );
@@ -439,7 +453,9 @@
              * Move to the next entry.
              */
             stream_iter_m.remove();
+            iter = NULL;
             virtual_stream_iter_m.remove();
+            virtual_iter = NULL;
             (void)virtual_stream_iter_m.first();
 
             return goto_state( core_state_recreate_virtual_next );
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_traffic_stream_list_iter.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_traffic_stream_list_iter.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: %
+* %version: 4 %
 */
 
 #include "core_traffic_stream_list_iter.h"
@@ -85,5 +85,15 @@
 //
 core_error_e core_traffic_stream_list_iter_c::remove()
     {
-    return iter_m.remove();
+    core_traffic_stream_list_c::entry_s* entry = iter_m.current();
+    core_error_e ret = iter_m.remove();
+    if( ret == core_error_ok &&
+        entry )
+        {
+        delete entry->traffic_stream;        
+        delete entry;
+        entry = NULL;
+        }
+
+    return ret;
     }
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_virtual_traffic_stream_list_iter.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_virtual_traffic_stream_list_iter.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 1 %
+* %version: 2 %
 */
 
 #include "core_virtual_traffic_stream_list_iter.h"
@@ -84,5 +84,15 @@
 //
 core_error_e core_virtual_traffic_stream_list_iter_c::remove()
     {
-    return iter_m.remove();
+    core_virtual_traffic_stream_list_c::entry_s* entry = iter_m.current();
+    core_error_e ret = iter_m.remove();
+    if( ret == core_error_ok &&
+        entry )
+        {
+        delete entry->traffic_stream;
+        delete entry;
+        entry = NULL;
+        }
+
+    return ret;
     }
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/group/wlmserversrv.mmh	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/group/wlmserversrv.mmh	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 11 %
 */
 
 TARGETTYPE      dll
@@ -144,6 +144,7 @@
 SOURCE          wlanbgscanstates.cpp
 SOURCE          wlantimerservices.cpp
 SOURCE          wlantimer.cpp
+SOURCE          wlanticktimer.cpp
 
 USERINCLUDE     ../inc
 USERINCLUDE     ../../../../inc
@@ -163,5 +164,6 @@
 LIBRARY         wlandbif.lib
 LIBRARY         featmgr.lib
 LIBRARY         commsdat.lib
+LIBRARY         hal.lib
 
 STATICLIBRARY   wlanscanlist.lib
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: 12 %
 */
 
 #ifndef WLANBGSCAN_H
@@ -93,7 +93,7 @@
      * 
      * @param aState New WLAN state
      */
-    void WlanSetBgScanState( const MWlanBgScanProvider::TWlanBgScanState &aState );
+    void SetBgScanState( const MWlanBgScanProvider::TWlanBgScanState &aState );
     
     /**
      * From MWlanBgScanProvider.
@@ -114,20 +114,6 @@
     void NotifyChangedSettings( MWlanBgScanProvider::TWlanBgScanSettings& aSettings );
     
     /**
-     * From MAwsBgScanProvider.
-     * Set new background scan interval.
-     * Asynchronous method to set new background scan interval, executed in
-     * AWS thread context.
-     *
-     * @since S60 v5.2
-     * @param aNewInterval new interval to be taken into use
-     * @param aStatus Status of the calling active object. On successful
-     *                completion contains KErrNone, otherwise one of the
-     *                system-wide error codes.
-     */
-    void SetInterval( TUint32 aNewInterval, TRequestStatus& aReportStatus );
-    
-    /**
      * From MWlanTimerServiceCallback.
      * OnTimeout.
      * Requested time has elapsed.
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlandevicesettings.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlandevicesettings.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 23 %
+* %version: 24 %
 */
 
 #ifndef WLANDEVICESETTINGS_H
@@ -88,7 +88,7 @@
 const TUint32 KWlanDefaultBssLostRoamNextIntervalFactor = 1;
 const TUint32 KWlanDefaultBssLostRoamNextIntervalAddition = 500000; // 500 ms
 const TUint32 KWlanDefaultBssLostRoamMaxTriesToFindNw = 5;
-const TUint32 KWlanDefaultTrafficStreamCreationTimeout = 1000000;   // 1 minute
+const TUint32 KWlanDefaultTrafficStreamCreationTimeout = 1000000;   // 1 second
 const TUint32 KWlanDefaultBeaconLostThreshold = 15;
 const TUint32 KWlanDefaultBtBeaconLostThreshold = 20;
 const TUint32 KWlanDefaultTxFailThreshold = 4;
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: 10 %
 */
 
 
@@ -137,7 +137,7 @@
      * 
      * @param aState New WLAN state
      */
-    virtual void WlanSetBgScanState( const TWlanBgScanState &aState ) = 0;
+    virtual void SetBgScanState( const TWlanBgScanState &aState ) = 0;
     
     /**
      * Whether background scan is enabled.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanticktimer.h	Thu May 27 14:33:33 2010 +0300
@@ -0,0 +1,139 @@
+/*
+* Copyright (c) 2009-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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* This class implements a system tick based timer service.
+*
+*/
+
+/*
+* %version: 1 %
+*/
+
+#ifndef WLANTICKTIMER_H
+#define WLANTICKTIMER_H
+
+#include <e32base.h>
+
+/**
+ *  CWlanTickTimer class.
+ *
+ *  Class providing timer services. The underlaying implementation relies
+ *  on RTimer. Therefore this module has the same limitations as RTimer.
+ * 
+ *  @lib wlmserversrv.dll
+ *  @since S60 v5.2
+ */
+ 
+NONSHARABLE_CLASS( CWlanTickTimer ) : public CActive
+    {
+    
+public: // CWlanTickTimer public methods
+
+    /**
+     * Static constructor.
+     * @param aTimerExpiredCB   Callback for indicating timer expiry.
+     * @param aTimerCancelledCB Callback for indicating timer cancellation.
+     * @param aTimerErrorCB     Callback for indicating timer error.
+     */
+    static CWlanTickTimer* NewL(
+        const TCallBack& aTimerExpiredCB,
+        const TCallBack& aTimerCancelledCB,
+        const TCallBack& aTimerErrorCB );
+
+    /**
+     * Destructor.
+     */
+    ~CWlanTickTimer();
+
+    /**
+     * Requests an event after the specified interval.
+     * @param The time interval in system ticks.
+     */
+    void After(
+        TUint aTicks );
+    
+private: // CWlanTickTimer private methods
+
+    /**
+     * C++ constructor.
+     * @param aTimerExpiredCB   Callback for indicating timer expiry.
+     * @param aTimerCancelledCB Callback for indicating timer cancellation.
+     * @param aTimerErrorCB     Callback for indicating timer error.
+     */
+    CWlanTickTimer(
+        const TCallBack& aTimerExpiredCB,
+        const TCallBack& aTimerCancelledCB,
+        const TCallBack& aTimerErrorCB );
+    
+    /**
+     * Symbian 2nd phase constructor.
+     */
+    void ConstructL();
+
+private: // From CActive
+
+    /**
+     * From CActive.
+     * Called by the active object framework when the request has been completed.
+     */
+    void RunL();
+
+    /**
+     * From CActive.
+     * Called by the framework if RunL leaves.
+     *
+     * @param aError The error code RunL leaved with.
+     * @return KErrNone if leave was handled, one of the system-wide error codes otherwise.
+     */
+    TInt RunError(
+        TInt aError );
+
+    /**
+     * From CActive.
+     * Called by the framework when Cancel() has been called.
+     */
+    void DoCancel();
+
+private: // CWlanTickTimer private data
+
+    /**
+     * Handle to RTimer.
+     */
+    RTimer iTimer;
+
+    /**
+     * TimerExpiredCB.
+     * Registered callback method that is called, when the timer
+     * expires. This is set when CWlanTickTimer instance is created.
+     */   
+    TCallBack iTimerExpiredCB;
+    
+    /**
+     * TimerCancelledCB.
+     * Registered callback method that is called, when the timer
+     * is cancelled by an external event (i.e. cancellation is
+     * not requested by the client). This is set when CWlanTickTimer
+     * instance is created.
+     */
+    TCallBack iTimerCancelledCB;
+    
+    /**
+     * TimerErrorCB.
+     * Registered callback method that is called, when there is
+     * a timer error. This is set when CWlanTickTimer instance is created.
+     */
+    TCallBack iTimerErrorCB;
+    };
+
+#endif // WLANTICKTIMER_H
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatformdata.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatformdata.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: 14 %
 */
 
 #ifndef WLMPLATFORMDATA_H
@@ -127,11 +127,9 @@
         
         /**
          * Method for publishing WLAN on/off state.
-         * @since S60^4
          * @param aWlanState WLAN state to be published.
-         * @return Symbian error code.
          */
-        TInt PublishWlanOnOff( TPSWlanOnOff aWlanState );
+        void PublishWlanOnOff( TPSWlanOnOff aWlanState );
 
     private:  // Definitions
         
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 56 %
+* %version: 57 %
 */
 
 #ifndef WLMSERVER_H
@@ -43,6 +43,7 @@
 class CWlmDriverIf;
 class CWlanSsidListDb;
 class CWlanTimerServices;
+class CWlanTickTimer;
 
 /**
  * Command Ids to be used un the asynchronous core service requests
@@ -62,6 +63,9 @@
 /** UID for WLAN Power Save Test Notifier */
 const TUid KUidWlanPowerSaveTestNote = { 0x101F6D4F };
 
+/** Multiplier for converting seconds into microseconds */
+const TUint KWlanSecsToMicrosecsMultiplier( 1000000 );
+
 /**
 * The server for WLAN services. Counterpart of RWLMServer.
 *
@@ -90,7 +94,7 @@
             TAny* iParam1;
             TAny* iParam2;
             TAny* iParam3;
-            TTime* iTime;
+            TUint* iTime;
 
             SRequestMapEntry() :
                 iRequestId( 0 ),
@@ -907,7 +911,21 @@
          * @return error code
          */       
         static TInt ScanSchedulingTimerExpired( TAny* aThisPtr );
-        
+
+        /**
+         * Method called by the scan scheduling timer when it expires.
+         * @param aThisPtr Pointer to the server instance.
+         * @return error code
+         */
+        static TInt ScanSchedulingTimerCanceled( TAny* aThisPtr );
+
+        /**
+         * A callback method that does absolutely nothing.
+         * @param aThisPtr Pointer to the server instance.
+         * @return error code
+         */
+        static TInt EmptyCb( TAny* aThisPtr );
+
         /**
          * Handles the conversion of IAP data list.
          * @param aCoreIapDataList Converted IAP data list.
@@ -949,11 +967,11 @@
 
         /**
          * Updates the scan scheduling timer.
-         * @param aScanTime specifies when the scan should be started.
+         * @param aScanTime specifies when the scan should be started in system ticks.
          * @param aTriggeringRequestId the id of that request which updates the timer.
          */        
         void UpdateScanSchedulingTimer( 
-        	TTime aScantime,
+        	TUint aScantime,
         	TUint aTriggeringRequestId );
 
         /**
@@ -1091,7 +1109,7 @@
          * @param aDelay Number of seconds to add to current moment in time.
          * @return Calculated time.
          */
-        inline TTime CalculateScanStartTime(
+        inline TUint CalculateScanStartTime(
             const TInt aDelay ) const;
 
         /**
@@ -1229,7 +1247,7 @@
          * Timer creating periodic expirations.
          * Used for starting scheduled scans
          */
-        CPeriodic* iScanSchedulingTimer;
+        CWlanTickTimer* iScanSchedulingTimer;
 
         /**
          * Cache for scanresults etc.
@@ -1332,12 +1350,17 @@
          * EAPOL callback handler in core. Not owned by this pointer.
          */        
         abs_wlan_eapol_callback_c* iEapolHandler;
-       
+
+        /** 
+         * The amount of microseconds per a system tick.
+         */
+        TInt iSystemTickPeriod;
+
         /**
-         * Time when the scan scheduling timer is set to expire.
+         * Time in system ticks when the scan scheduling timer is set to expire.
          */
-        TTime iScanSchedulingTimerExpiration;
-        
+        TUint iScanSchedulingTimerExpiration;
+
         /**
          * Request id to that request in the iRequestMap which has set the scan scheduling timer.
          */
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.inl	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.inl	Thu May 27 14:33:33 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"
@@ -15,6 +15,9 @@
 *
 */
 
+/*
+* %version: 18 %
+*/
 
 #include "am_debug.h"
 
@@ -129,15 +132,13 @@
 // CWlmServer::CalculateScanStartTime
 // ---------------------------------------------------------
 //
-inline TTime CWlmServer::CalculateScanStartTime(
+inline TUint CWlmServer::CalculateScanStartTime(
     const TInt aDelay ) const
     {
-    TTime scanTime;
-    scanTime.UniversalTime();
-    TTimeIntervalSeconds delay( aDelay );
-    scanTime += delay;
+    TUint ticks(
+        aDelay * KWlanSecsToMicrosecsMultiplier / iSystemTickPeriod );
 
-    return scanTime;
+    return User::TickCount() + ticks; 
     }
 
 // ---------------------------------------------------------
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmsystemnotify.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmsystemnotify.h	Thu May 27 14:33:33 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2006 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"
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17 %
+* %version: 18 %
 */
 
 #include <e32base.h>
@@ -159,9 +159,9 @@
 // CWlanBgScan::WlanSetBgScanState
 // ---------------------------------------------------------------------------
 //
-void CWlanBgScan::WlanSetBgScanState( const MWlanBgScanProvider::TWlanBgScanState &aState )
+void CWlanBgScan::SetBgScanState( const MWlanBgScanProvider::TWlanBgScanState &aState )
     {
-    DEBUG2( "CWlanBgScan::WlanSetBgScanState() - old state: %u, new state: %u", iWlanBgScanState, aState );
+    DEBUG2( "CWlanBgScan::SetBgScanState() - old state: %u, new state: %u", iWlanBgScanState, aState );
     
     // store state
     iWlanBgScanState = aState;
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtframehandler.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtframehandler.cpp	Thu May 27 14:33:33 2010 +0300
@@ -15,6 +15,9 @@
 *
 */
 
+/*
+* %version: 11 %
+*/
 
 // INCLUDE FILES
 #include <e32std.h>
@@ -149,7 +152,8 @@
         {
         DEBUG( "CWlanMgmtFrameHandler::RunL() iDataBlock is not NULL" );
         TDataBuffer* buffer = NULL;
-        while( iDataBlock->GetNextRxDataBuffer( buffer ) )
+        TDataBuffer* frameToFree = NULL;
+        while( ( buffer = iServiceProvider.GetRxFrame( frameToFree ) ) != NULL )
             {
             DEBUG1( "EAPOL packet received, length=%d", 
                     buffer->GetLength() );
@@ -159,6 +163,8 @@
                 buffer->GetLength(),
                 buffer->GetBuffer(),
                 buffer->Rcpi() );
+            
+            frameToFree = buffer;
             }
         }
     // Wait for next packets.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanticktimer.cpp	Thu May 27 14:33:33 2010 +0300
@@ -0,0 +1,133 @@
+/*
+* Copyright (c) 2009-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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* This class implements a system tick based timer service.
+*
+*/
+
+/*
+* %version: 1 %
+*/
+
+#include "wlanticktimer.h"
+#include "am_debug.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CWlanTickTimer::CWlanTickTimer( 
+    const TCallBack& aTimerExpiredCB,
+    const TCallBack& aTimerCancelledCB,
+    const TCallBack& aTimerErrorCB ) :
+    CActive( CActive::EPriorityStandard ), 
+    iTimerExpiredCB( aTimerExpiredCB ),
+    iTimerCancelledCB( aTimerCancelledCB ),
+    iTimerErrorCB( aTimerErrorCB )
+    {
+    // No implementation required
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CWlanTickTimer::ConstructL()
+    {
+    User::LeaveIfError( iTimer.CreateLocal() );
+    CActiveScheduler::Add( this );
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CWlanTickTimer* CWlanTickTimer::NewL(  
+    const TCallBack& aTimerExpiredCB,
+    const TCallBack& aTimerCancelledCB,
+    const TCallBack& aTimerErrorCB )
+    {
+    CWlanTickTimer* self = new (ELeave) CWlanTickTimer(
+        aTimerExpiredCB,
+        aTimerCancelledCB,
+        aTimerErrorCB );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CWlanTickTimer::~CWlanTickTimer()
+    {
+    iTimer.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CWlanTickTimer::After(
+    TUint aTicks )
+    {
+    DEBUG1( "CWlanTickTimer::After() - aTicks: %u",
+        aTicks );
+    
+    iTimer.AfterTicks(
+        iStatus,
+        aTicks );
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CWlanTickTimer::RunL()
+    {
+    DEBUG1( "CWlanTickTimer::RunL() - iStatus: %d",
+        iStatus.Int() );
+
+    switch( iStatus.Int() )
+        {
+        case KErrNone: // Timer expired
+            iTimerExpiredCB.CallBack();
+            break;
+        case KErrCancel: // Timer cancelled
+            iTimerCancelledCB.CallBack();
+            break;
+        default: // Timer error code
+            iTimerErrorCB.CallBack();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+TInt CWlanTickTimer::RunError(
+    TInt /* aError */ )
+    {
+    DEBUG( "CWlanTickTimer::RunError()" );
+
+    return 0;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CWlanTickTimer::DoCancel()
+    {
+    DEBUG( "CWlanTickTimer::DoCancel()" );
+
+    iTimer.Cancel();
+    }
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatformdata.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatformdata.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: 14 %
 */
 
 // INCLUDE FILES
@@ -131,6 +131,8 @@
     User::LeaveIfError( iPsOnOffState.Attach( KPSUidWlan,
         KPSWlanOnOffState, EOwnerThread ) );
     
+    // Publish initial value for WLAN on/off as WLAN OFF
+    PublishWlanOnOff( EPSWlanOff );
     }
 
 // ---------------------------------------------------------
@@ -160,6 +162,8 @@
     RProperty::Delete( KPSUidWlan, KPSWlanMacAddress );
     iPsBgScanInterval.Close();
     RProperty::Delete( KPSUidWlan, KPSWlanBgScanInterval );
+    iPsOnOffState.Close();
+    RProperty::Delete( KPSUidWlan, KPSWlanOnOffState );
     delete iPropertySystemState;
     delete iBtConnections;
     delete iEmergencyCall;
@@ -491,31 +495,20 @@
 //
 void CWlmPlatformData::NotifyWlanOnOffObserver()
     {
-	DEBUG( "CWlmPlatformData::NotifyWlanOnOffObserver()" );
-	
-	// Read WLAN master switch
-	TInt wlanOn( EFalse );
-	iWlanOnOff->Get( wlanOn );
-	
-	// Read WLAN force disable switch
-	TInt wlanForceDisable( EFalse );
-	iWlanForceDisable->Get( wlanForceDisable );
-	
-	DEBUG3( "    WlanOnOff: %d, WlanForceDisable: %d, NotifiedToObserver: %d",
-	    wlanOn, wlanForceDisable, iNotifiedWlanState );
+	DEBUG1( "CWlmPlatformData::NotifyWlanOnOffObserver() - last notified state=%d",
+	    iNotifiedWlanState );
 	
 	// Note that the observer is only notified if the
 	// state really changes 
 	
-	// If WLAN is set ON and it is not forcibly disabled
-	if( wlanOn &&                        // WLAN set ON
-	    wlanForceDisable == EFalse &&    // WLAN force disable not set
+	// If WLAN is set ON
+	if( GetWlanOnOffState() == EWlanOn &&    // WLAN set ON
 	    iNotifiedWlanState != CWlmPlatformData::EWlanNotifiedOn ) // WLAN ON not notified yet
 	    {
 		// Notify observer that WLAN is set ON
 		iCallback.WlanOn();
 		iNotifiedWlanState = CWlmPlatformData::EWlanNotifiedOn;
-		(void)PublishWlanOnOff( EPSWlanOn );
+		PublishWlanOnOff( EPSWlanOn );
 		// Note! P&S write operation return value is not checked
 		DEBUG( "CWlmPlatformData::NotifyWlanOnOffObserver() - WLAN ON notified, P&S updated" );
 		}
@@ -525,7 +518,7 @@
 		// Notify observer that WLAN is set OFF
 	    iCallback.WlanOff();
 	    iNotifiedWlanState = CWlmPlatformData::EWlanNotifiedOff;
-	    (void)PublishWlanOnOff( EPSWlanOff );
+	    PublishWlanOnOff( EPSWlanOff );
 	    // Note! P&S write operation return value is not checked
 	    DEBUG( "CWlmPlatformData::NotifyWlanOnOffObserver() - WLAN OFF notified, P&S updated" );
 		}
@@ -536,10 +529,17 @@
 // Status : Draft
 // ---------------------------------------------------------
 //
-TInt CWlmPlatformData::PublishWlanOnOff( TPSWlanOnOff aWlanState )
+void CWlmPlatformData::PublishWlanOnOff( TPSWlanOnOff aWlanState )
     {
     DEBUG1( "CWlmPlatformData::PublishWlanOnOff( wlanState = %d )",
         aWlanState );
 
-    return iPsOnOffState.Set( aWlanState );
+    TInt err( KErrNone );
+    err = iPsOnOffState.Set( aWlanState );
+    
+    if( err != KErrNone )
+        {
+        DEBUG1( "CWlmPlatformData::PublishWlanOnOff() - ERROR: update failed, err=%d",
+            err );
+        }
     }
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 106 %
+* %version: 108 %
 */
 
 #include <e32def.h>
@@ -24,6 +24,7 @@
 #include <featmgr.h>
 #include <in_sock.h>
 #include <bldvariant.hrh> // for feature definitions
+#include <hal.h>
 
 #include "wlmserver.h"
 #include "wlmdriverif.h"
@@ -38,6 +39,7 @@
 #include "wlandevicesettingsinternalcrkeys.h"
 #include "wlanbgscan.h"
 #include "wlantimerservices.h"
+#include "wlanticktimer.h"
 #include "am_debug.h"
 
 /** Panic codes for WlanEngine */
@@ -89,9 +91,6 @@
     CWlmServer::EWlanStaticFeature802dot11k |
     CWlmServer::EWlanStaticFeature802dot11n;
 
-/** Multiplier for converting seconds into microseconds */
-const TUint KWlanSecsToMicrosecsMultiplier( 1000000 );
-
 /** Minimum value for aggressive background scan interval, in seconds */
 const TUint KWlanAggressiveBgScanMinInterval( 1 );
 
@@ -141,6 +140,7 @@
     iIsStartupComplete( EFalse ),
     iEapolClient( NULL ),
     iEapolHandler( NULL ),
+    iSystemTickPeriod( 0 ),
     iScanSchedulingTimerExpiration( 0 ),
     iRequestTriggeringScanning( 0 ),
     iCoreHandlingScanRequest( EFalse ),
@@ -164,6 +164,12 @@
     User::LeaveIfError( User::RenameThread( KWLMDataServerName ) );
     StartL( KWLMDataServerName );    
 
+    HAL::Get( HAL::ESystemTickPeriod, iSystemTickPeriod );
+    DEBUG1( "CWlmServer::ConstructL() - system tick period is %d",
+        iSystemTickPeriod );
+    DEBUG1( "CWlmServer::ConstructL() - current system tick count is %u",
+        User::TickCount( ) );
+
     // Consult FeatureManager whether startup is allowed
     FeatureManager::InitializeLibL();
     if( !FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ) )
@@ -220,7 +226,13 @@
 
     // Create scan timer
     DEBUG( "CWlmServer::ConstructL() - create backgroundscan timer" );
-    iScanSchedulingTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+    TCallBack expiredCb( ScanSchedulingTimerExpired, this );
+    TCallBack canceledCb( ScanSchedulingTimerCanceled, this );
+    TCallBack emptyCb( EmptyCb, NULL );
+    iScanSchedulingTimer = CWlanTickTimer::NewL(
+        expiredCb,
+        canceledCb,
+        emptyCb );
 
     // Create scan cache
     iCache = CWlanScanResultCache::NewL();
@@ -469,7 +481,7 @@
 	if( wlanState != EWlanOn )
 	    {
 		// WLAN is OFF
-		DEBUG1( "CWlmServer::Connect() refused due to WLAN is OFF (%d)",
+		DEBUG1( "CWlmServer::Connect() - refused due to WLAN is OFF (%d)",
 		    wlanState );
 		// WLAN state enumerations map one to one to WLAN error code
 		aMessage.Complete( wlanState );
@@ -1100,15 +1112,15 @@
         return;
         }    
 
-    TTime* scanTime( NULL );
+    TUint* scanTime( NULL );
     if( scanScheduling.maxDelay != KWlmInfiniteScanDelay )
         {
-        scanTime = new TTime(
-            CalculateScanStartTime( scanScheduling.maxDelay ).Int64() );
+        scanTime = new TUint(
+            CalculateScanStartTime( scanScheduling.maxDelay ) );
         if( !scanTime )
             {
-            DEBUG( "CWlmServer::GetScanResult() - unable to instantiate TTime" );
-    
+            DEBUG( "CWlmServer::GetScanResult() - unable to instantiate TUint" );
+
             delete coreSsid;
             delete scanList;
             aMessage.Complete( KErrNoMemory );
@@ -1338,14 +1350,14 @@
         return;
         }
 
-    TTime* scanTime( NULL );
+    TUint* scanTime( NULL );
     if( maxDelayPckg() != KWlmInfiniteScanDelay )
         {
-        scanTime = new TTime(
-            CalculateScanStartTime( maxDelayPckg() ).Int64() );
+        scanTime = new TUint(
+            CalculateScanStartTime( maxDelayPckg() ) );
         if( !scanTime )
             {
-            DEBUG( "CWlmServer::GetAvailableIaps() - unable to instantiate TTime" );
+            DEBUG( "CWlmServer::GetAvailableIaps() - unable to instantiate TUint" );
     
             aMessage.Complete( KErrNoMemory );
             delete iapDataList;
@@ -1555,7 +1567,7 @@
 // ---------------------------------------------------------
 //
 void CWlmServer::UpdateScanSchedulingTimer( 
-	TTime aScanTime, 
+    TUint aScanTime, 
 	TUint aTriggeringRequestId )
     {
     DEBUG1( "CWlmServer::UpdateScanSchedulingTimer() - aTriggeringRequestId = %u ", aTriggeringRequestId );
@@ -1568,32 +1580,22 @@
         return;
         }
 
-    TTime timeNow;
-    timeNow.UniversalTime();
-
-    TTimeIntervalMicroSeconds difference( aScanTime.MicroSecondsFrom( timeNow ) );
-    if( difference.Int64() < 0 )
+    TUint currentTickCount(
+        User::TickCount() );
+    TUint difference( 0 );
+    if( aScanTime > currentTickCount )
         {
-        difference = TTimeIntervalMicroSeconds( 0 );
+        difference = aScanTime - currentTickCount;  
         }
-    TTimeIntervalMicroSeconds32 differenceMicroseconds(
-        difference.Int64() );
 
     iScanSchedulingTimer->Cancel();
     iScanSchedulingTimerExpiration = aScanTime;
     iRequestTriggeringScanning = aTriggeringRequestId;
-    TCallBack callback( ScanSchedulingTimerExpired, this );
-
-	DEBUG1( "CWlmServer::UpdateScanSchedulingTimer() - scheduling the timer to %u second(s)",
-	    differenceMicroseconds.Int() / SECONDS_FROM_MICROSECONDS );
-	
-	TTimeIntervalMicroSeconds32 intervalMicroseconds( KWlmMaxScanDelay * SECONDS_FROM_MICROSECONDS );
-
-    iScanSchedulingTimer->Start(
-            differenceMicroseconds,
-            intervalMicroseconds,
-            callback );
     
+    DEBUG2( "CWlmServer::UpdateScanSchedulingTimer() - scheduling the timer to %u system ticks(s) [%u s]",
+        difference, difference * iSystemTickPeriod / KWlanSecsToMicrosecsMultiplier );
+
+    iScanSchedulingTimer->After( difference );
     }
 
 // ---------------------------------------------------------
@@ -1606,14 +1608,14 @@
     DEBUG( "CWlmServer::FindNextTimedScanSchedulingRequest()" );
     
     TBool pendingScanRequestsFound( EFalse );
-    TTime closestTime = TTime( 0 );
+    TUint closestTime( 0 );
     aTriggeringRequestIndex = 0;
     
     for(TInt i=0; i < iRequestMap.Count(); i++)
         {
         if( IsPendingTimedScanRequest( i ) )
             {
-            TTime* checkedTime = reinterpret_cast<TTime*>( iRequestMap[i].iTime );
+            TUint* checkedTime = reinterpret_cast<TUint*>( iRequestMap[i].iTime );
             if( pendingScanRequestsFound == EFalse || closestTime > *checkedTime )
                 {
                 closestTime = *checkedTime;
@@ -1627,7 +1629,7 @@
         {
         // clear the scan scheduling related variables
         iRequestTriggeringScanning = KWlanIntCmdNull;
-        iScanSchedulingTimerExpiration = TTime( 0 );
+        iScanSchedulingTimerExpiration = 0;
         }
     else
         {
@@ -1830,7 +1832,7 @@
 					// If WLAN is ON, enable background scanning
 					if( iPlatform->GetWlanOnOffState() == EWlanOn )
 					    {
-                        iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
+                        iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
                         }
                     
                     break;
@@ -2340,7 +2342,7 @@
                 // If background scan is currently on, background scan
                 // will be disabled and it's request will be removed
                 // from the request map.
-                iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOff );
+                iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOff );
                 
                 }
             }
@@ -2458,7 +2460,7 @@
 
     	if( FindNextTimedScanSchedulingRequest( indexNextScan ) )
             {
-            TTime* nextScanTime = reinterpret_cast<TTime*>( iRequestMap[indexNextScan].iTime );
+            TUint* nextScanTime = reinterpret_cast<TUint*>( iRequestMap[indexNextScan].iTime );
             UpdateScanSchedulingTimer( *nextScanTime, iRequestMap[indexNextScan].iRequestId );
             }
         }
@@ -2628,7 +2630,7 @@
             delete iapDataList;
             iapDataList = NULL;
             
-            TTime* completedScanTime = reinterpret_cast<TTime*>( aRequest.iTime );
+            TUint* completedScanTime = reinterpret_cast<TUint*>( aRequest.iTime );
             delete completedScanTime;
             completedScanTime = NULL;
 
@@ -2693,7 +2695,7 @@
             {
             ScanList* tmp( NULL );
             core_ssid_s* ssid = reinterpret_cast<core_ssid_s*>( aRequest.iParam1 );
-            TTime* completedScanTime = reinterpret_cast<TTime*>( aRequest.iTime );
+            TUint* completedScanTime = reinterpret_cast<TUint*>( aRequest.iTime );
             ScanList* completedScanList = reinterpret_cast<ScanList*>( aRequest.iParam0 );
 
             if( aTriggerRequest == NULL )
@@ -2793,7 +2795,7 @@
             iapSsidList = reinterpret_cast<core_type_list_c<core_ssid_entry_s>*>( aRequest.iParam3 );
             iapDataList = reinterpret_cast<core_type_list_c<core_iap_data_s>*>( aRequest.iParam0 );
             
-            TTime* completedScanTime = reinterpret_cast<TTime*>( aRequest.iTime );
+            TUint* completedScanTime = reinterpret_cast<TUint*>( aRequest.iTime );
             ScanList* completedScanList = reinterpret_cast<ScanList*>( aRequest.iParam2);
             core_type_list_c<u32_t>* completedIdList = reinterpret_cast<core_type_list_c<u32_t>*>( aRequest.iParam1 );
             
@@ -3451,11 +3453,11 @@
         return KErrNoMemory;
         }
 
-    TTime* scanTime = new TTime(
-        CalculateScanStartTime( aScanStartInterval ).Int64() );
+    TUint* scanTime = new TUint(
+        CalculateScanStartTime( aScanStartInterval ) );
     if( !scanTime )
         {
-        DEBUG( "CWlmServer::BackgroundScanRequest() - unable to instantiate TTime" );
+        DEBUG( "CWlmServer::BackgroundScanRequest() - unable to instantiate TUint" );
 
         delete iapDataList;
         delete iapSsidList;
@@ -3532,7 +3534,7 @@
 
         ScanList* completedScanList = reinterpret_cast<ScanList*>( self->iRequestMap[index].iParam0 );
         core_ssid_s* completedSsid =  reinterpret_cast<core_ssid_s*>( self->iRequestMap[index].iParam1 );
-        TTime* completedScanTime = reinterpret_cast<TTime*>( self->iRequestMap[index].iTime );
+        TUint* completedScanTime = reinterpret_cast<TUint*>( self->iRequestMap[index].iTime );
         
         // Only the triggering request is completed and then scan scheduling timer is set again 
         TPckgBuf<TUint32> pckgCount( 0 );
@@ -3559,7 +3561,7 @@
 
         if( self->FindNextTimedScanSchedulingRequest( indexNextScan ) )
             {
-            TTime* nextScanTime = reinterpret_cast<TTime*>( self->iRequestMap[indexNextScan].iTime );
+            TUint* nextScanTime = reinterpret_cast<TUint*>( self->iRequestMap[indexNextScan].iTime );
         	self->UpdateScanSchedulingTimer( *nextScanTime, self->iRequestMap[indexNextScan].iRequestId );
             }
         
@@ -3577,7 +3579,7 @@
         core_type_list_c<u32_t>* iapIdList =  reinterpret_cast<core_type_list_c<u32_t>*>( self->iRequestMap[index].iParam1 );
         ScanList* scanList =  reinterpret_cast<ScanList*>( self->iRequestMap[index].iParam2 );
         core_type_list_c<core_ssid_entry_s>* iapSsidList =  reinterpret_cast<core_type_list_c<core_ssid_entry_s>*>( self->iRequestMap[index].iParam3 );
-        TTime* scanTime =  reinterpret_cast<TTime*>( self->iRequestMap[index].iTime );        
+        TUint* scanTime =  reinterpret_cast<TUint*>( self->iRequestMap[index].iTime );        
 
         // If the device is roaming OR
         // there are not WLAN IAPs defined in the device OR
@@ -3616,7 +3618,7 @@
 
             if( self->FindNextTimedScanSchedulingRequest( indexNextScan ) )
                 {
-                TTime* nextScanTime = reinterpret_cast<TTime*>( self->iRequestMap[indexNextScan].iTime );
+                TUint* nextScanTime = reinterpret_cast<TUint*>( self->iRequestMap[indexNextScan].iTime );
                 self->UpdateScanSchedulingTimer( *nextScanTime, self->iRequestMap[indexNextScan].iRequestId );
                 }
         
@@ -3707,7 +3709,43 @@
         }
     self->iCoreHandlingScanRequest = ETrue;
     return KErrNone;
+   }
+
+// ---------------------------------------------------------
+// CWlmServer::ScanSchedulingTimerCanceled()
+// ---------------------------------------------------------
+//
+TInt CWlmServer::ScanSchedulingTimerCanceled(
+    TAny* aThisPtr )
+    {
+    DEBUG( "CWlmServer::ScanSchedulingTimerCanceled()" );
+
+    CWlmServer* self = reinterpret_cast<CWlmServer*>( aThisPtr );
+
+    /**
+     * Scan scheduling timer was canceled, re-arm the timer. 
+     */
+    TUint indexNextScan( 0 );
+    if( self->FindNextTimedScanSchedulingRequest( indexNextScan ) )
+        {
+        self->UpdateScanSchedulingTimer(
+            *(self->iRequestMap[indexNextScan].iTime),
+            self->iRequestMap[indexNextScan].iRequestId );
+        }
+
+    return 0;
     }
+
+// ---------------------------------------------------------
+// CWlmServer::EmptyCb()
+// ---------------------------------------------------------
+//
+TInt CWlmServer::EmptyCb(
+    TAny* /* aThisPtr */ )
+    {
+    return 0;
+    }
+
     
 // ---------------------------------------------------------
 // CWlmServer::GetIapDataList()
@@ -3923,38 +3961,6 @@
     	iTimerServices->HandleTimeout();
         DEBUG("CWlmServer::SystemTimeChanged() - refreshing settings to BgScan provider");
         iBgScanProvider->NotifyChangedSettings( iBgScanProviderSettings );
-    	
-    	// Pending scan requests should be handled because after the system time change all the
-    	// timestamps are invalid. Change the scan start times to start immediately
-
-        DEBUG("CWlmServer::SystemTimeChanged() - set all pending requests to expire immediately");
-        
-    	TInt i( 0 );
-    	for( i = 0; i < iRequestMap.Count(); i++ )
-    	    {
-    	    if( IsPendingTimedScanRequest(i) )
-    	        {
-                DEBUG1( "CWlmServer::SystemTimeChanged() - setting iTime to current time for request %i",
-                        iRequestMap[i].iRequestId );
-                
-    	        TTime* requestedScanTime = reinterpret_cast<TTime*>( iRequestMap[i].iTime );
-                requestedScanTime->UniversalTime();              
-    	        }
-    	    }
-        if( !iCoreHandlingScanRequest )
-            {
-            // Core is not handling any scan request so update the timer
-            DEBUG("CWlmServer::SystemTimeChanged() - Core is not currently handling any scan requests");
-            DEBUG("CWlmServer::SystemTimeChanged() - Cancel timer and set it again to new value");
-
-            iScanSchedulingTimer->Cancel();
-            TUint indexNextScan;
-            if( FindNextTimedScanSchedulingRequest( indexNextScan ) )
-                {
-                TTime* nextScanTime = reinterpret_cast<TTime*>( iRequestMap[indexNextScan].iTime );
-                UpdateScanSchedulingTimer( *nextScanTime, iRequestMap[indexNextScan].iRequestId );
-                }
-            }
     	}
     }
 
@@ -4100,7 +4106,7 @@
             delete reinterpret_cast<core_type_list_c<u32_t>*>( entry.iParam1 );
             delete reinterpret_cast<ScanList*>( entry.iParam2);
             delete reinterpret_cast<core_type_list_c<core_ssid_entry_s>*>( entry.iParam3 );
-            delete reinterpret_cast<TTime*>( entry.iTime );
+            delete reinterpret_cast<TUint*>( entry.iTime );
             iRequestMap.Remove( index );
 
             DEBUG( "CWlmServer::CancelScan() - find next possible timed scan scheduling request" );
@@ -4137,7 +4143,7 @@
                 delete reinterpret_cast<core_type_list_c<u32_t>*>( entry.iParam1 );
                 delete reinterpret_cast<ScanList*>( entry.iParam2);
                 delete reinterpret_cast<core_type_list_c<core_ssid_entry_s>*>( entry.iParam3 );
-                delete reinterpret_cast<TTime*>( entry.iTime );                
+                delete reinterpret_cast<TUint*>( entry.iTime );                
                 iRequestMap.Remove( index );
                 }
             }
@@ -4382,7 +4388,7 @@
 	if( wlanState != EWlanOn )
 	    {
 		// WLAN is OFF and therefore request is not served.
-		DEBUG1( "CWlmServer::RunProtectedSetup() rejected due to WLAN is OFF (%d)",
+		DEBUG1( "CWlmServer::RunProtectedSetup() - rejected due to WLAN is OFF (%d)",
 		    wlanState );
 		// WLAN states map one to one to WLAN error codes.
 		aMessage.Complete( wlanState );
@@ -5013,7 +5019,7 @@
     // If WLAN is set ON, enable background scanning
     if( iPlatform->GetWlanOnOffState() == EWlanOn )
         {
-        iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
+        iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
         }
 
     iPlatform->InitializeSystemTimeHandler();
@@ -5232,7 +5238,7 @@
 	if( iIsStartupComplete )
 	    {
 	    // Enable background scanning
-	    iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
+	    iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
 	    }
 	}
 
@@ -5242,10 +5248,11 @@
 //
 void CWlmServer::WlanOff()
     {
-	DEBUG( "CWlmServer::WlanOff()" );
+	DEBUG1( "CWlmServer::WlanOff() - ConnectionState=%d",
+	    iConnectionState );
 	
 	// Disable background scanning
-	iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOff );
+	iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOff );
 	
 	// Cancel all running operations that are forbidden in WLAN OFF
     CancelExternalRequestsByType( ERunProtectedSetup );
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 105 %
+* %version: 106 %
 */
 
 #ifndef WLANCONTEXTIMPL_H
@@ -945,7 +945,7 @@
     * @since S60 3.2
     * @return length of the frame body
     */
-    inline const TUint16 ScanResponseFrameBodyLength() const;
+    inline TUint16 ScanResponseFrameBodyLength() const;
 
     /**
     * Stores the IE(s) to be included into the (re-)association request.
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.inl	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.inl	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 77 %
+* %version: 78 %
 */
 
 #include "umacconnectcontext.h"
@@ -420,7 +420,7 @@
 // 
 // ---------------------------------------------------------------------------
 //
-inline const TUint16 WlanContextImpl::ScanResponseFrameBodyLength() const
+inline TUint16 WlanContextImpl::ScanResponseFrameBodyLength() const
     {
     return iConnectContext.iScanResponseFrameBodyLength;
     }
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h	Thu May 27 14:33:33 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: 17 %
+* %version: 18 %
 */
 
 #ifndef WLANMANAGEMENTSIDEUMACB_H
@@ -112,7 +112,7 @@
     * @param aNumOfBuffers number of meta header pointers in the array
     */
     virtual void MgmtDataReceiveComplete( 
-        const TDataBuffer*& aBufferStart, 
+        TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacProtocolStackSideUmacCb.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacProtocolStackSideUmacCb.h	Thu May 27 14:33:33 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: 14 %
+* %version: 15 %
 */
 
 #ifndef WLANPROTOCOLSTACKSIDEUMACCB_H
@@ -101,7 +101,7 @@
     *         EFalse otherwise
     */
     virtual TBool ProtocolStackDataReceiveComplete( 
-        const TDataBuffer*& aBufferStart, 
+        TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 96 %
+* %version: 97 %
 */
 
 #include "config.h"
@@ -658,8 +658,8 @@
     TUint nbrOfpacketsForMgmtClient ( 0 );
     const TUint KMaxNbrOfPacketsForUsr ( 30 );
     const TUint KMaxNbrOfPacketsForMgmtClient ( 10 );
-    const TDataBuffer* packetsForUsr[KMaxNbrOfPacketsForUsr];
-    const TDataBuffer* packetsForMgmtClient[KMaxNbrOfPacketsForMgmtClient];
+    TDataBuffer* packetsForUsr[KMaxNbrOfPacketsForUsr];
+    TDataBuffer* packetsForMgmtClient[KMaxNbrOfPacketsForMgmtClient];
     // one byte past the last actual payload byte (so excluding the potentially
     // present security trailer) of the MPDU
     const TUint8* const KMpduPayloadEnd ( 
@@ -1006,8 +1006,7 @@
             - aBuffer );                              // buffer beginning
         
         // complete
-        const TDataBuffer* KMetaHdr ( metaHdr );
-        aCtxImpl.iUmac.MgmtDataReceiveComplete( KMetaHdr, 1 );
+        aCtxImpl.iUmac.MgmtDataReceiveComplete( metaHdr, 1 );
         }
     else
         {
@@ -1369,7 +1368,7 @@
     if ( // our client has instructed us not the encrypt this frame under
          // any circumstances OR
          ( aDataBuffer.KeFlags() & TDataBuffer::KTxFrameMustNotBeEncrypted ) ||
-         // no space is reserved for security header on this sw layer. It is
+         // no space is reserved for security trailer on this sw layer. It is
          // done on lower layers; when necessary.
          ( aCtxImpl.WHASettings().iCapability & 
            WHA::SSettings::KNoSecHdrAndTrailer ) )
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 86 %
+* %version: 87 %
 */
 
 #include "config.h"
@@ -2684,8 +2684,7 @@
             - aBuffer );                              // buffer beginning
                     
         // complete
-        const TDataBuffer* KMetaHdr ( metaHdr );
-        aCtxImpl.iUmac.MgmtDataReceiveComplete( KMetaHdr, 1 );
+        aCtxImpl.iUmac.MgmtDataReceiveComplete( metaHdr, 1 );
         }
     else
         {
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp	Thu May 27 14:33:33 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-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: 19 %
+* %version: 20 %
 */
 
 #include "config.h"
@@ -121,7 +121,7 @@
 // ---------------------------------------------------------------------------
 //
 void WlanManagementSideUmacCb::MgmtDataReceiveComplete( 
-    const TDataBuffer*& aBufferStart, 
+    TDataBuffer*& aBufferStart, 
     TUint32 aNumOfBuffers )
     {
     if ( iSelf )
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacProtocolStackSideUmacCb.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacProtocolStackSideUmacCb.cpp	Thu May 27 14:33:33 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: 12 %
+* %version: 13 %
 */
 
 #include "config.h"
@@ -87,7 +87,7 @@
 // -----------------------------------------------------------------------------
 //
 TBool WlanProtocolStackSideUmacCb::ProtocolStackDataReceiveComplete( 
-    const TDataBuffer*& aBufferStart, 
+    TDataBuffer*& aBufferStart, 
     TUint32 aNumOfBuffers )
     {
     TBool status ( EFalse );
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 13 %
 */
 
 #ifndef DATAFRAMEMMNGR_H
@@ -42,6 +42,7 @@
         TInt aTxFrameBufAllocationUnit ) : 
         DEthernetFrameMemMngr( aParent, aRxFrameMemoryPool ),
         iFrameXferBlockProtoStack( NULL ),
+        iUserToKernAddrOffset( 0 ),
         iTxDataChunk( NULL ),
         iTxFrameMemoryPool( NULL ),
         iTxFrameBufAllocationUnit ( aTxFrameBufAllocationUnit )
@@ -85,52 +86,87 @@
     *         EFalse otherwise
     */
     virtual TBool DoEthernetFrameRxComplete( 
-        const TDataBuffer*& aBufferStart, 
+        TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
     * From DEthernetFrameMemMngr
-    * Gets start address of Rx buffers (their offset addresses)
-    * that are waiting for completion to user mode
-    *
-    * @since S60 3.1
-    * @return see above
-    */
-    virtual TUint32* DoGetTobeCompletedBuffersStart();
-
-    /**
-    * From DEthernetFrameMemMngr
-    * Gets start address of Rx buffers (their offset addresses)
-    * that have been completed to user mode
+    * To be called when user mode client issues a frame Rx request
     *
-    * @since S60 3.1
-    * @return see above
+    * @return ETrue if callee should complete the request immediately 
+    *         as there exists Rx frame(s) which can be retrieved by the user
+    *         mode client.
+    *         EFalse otherwise
     */
-    virtual TUint32* DoGetCompletedBuffersStart();
-
+    virtual TBool OnReadRequest();
+    
     /**
-    * From DEthernetFrameMemMngr
-    * Gets called when user mode client issues a frame receive request 
-    * and Rx buffers have been completed to it. The completed Rx frame 
-    * buffers are freed.
-    *
-    * @since S60 3.1
-    */
-    virtual void DoFreeRxBuffers();
-
+     * From DEthernetFrameMemMngr
+     * Gets the highest priority frame (contained in a buffer allocated from
+     * the shared memory) from the Rx queues.
+     * Optionally frees the memory associated to a previously received frame. 
+     * 
+     * @param aFrameToFreeInUserSpace User space pointer to previously 
+     *        received frame which can now be freed.
+     *        NULL if nothing to free.
+     * @return User space pointer to the Rx frame to be handled next.
+     *         NULL, if there are no frames available.
+     */ 
+    virtual TDataBuffer* GetRxFrame( TDataBuffer* aFrameToFreeInUserSpace );
+    
     /**
      * From DEthernetFrameMemMngr
      * Allocates a Tx packet from the shared memory.
      * 
      * @param aLength Length of the requested Tx buffer in bytes
-     * @return Pointer to the meta header attached to the allocated packet, on
-     *         success.
+     * @return User space pointer to the meta header attached to the 
+     *         allocated packet, on success.
      *         NULL, in case of failure.
      */
     virtual TDataBuffer* AllocTxBuffer( TUint aLength );
 
     /**
      * From DEthernetFrameMemMngr
+     * Adds the specified Tx frame (contained in the buffer allocated from the 
+     * shared memory) to the relevant Tx queue according to its AC (i.e.
+     * priority).
+     *  
+     * @param aPacketInUserSpace Meta header attached to the frame; as a user
+     *        space pointer.
+     * @param aPacketInKernSpace If not NULL on return, the frame needs to be 
+     *        discarded and this is the kernel space pointer to its meta header.
+     *        If NULL on return, the frame must not be discarded. 
+     * @param aUserDataTxEnabled ETrue if user data Tx is enabled
+     *        EFalse otherwise
+     * @return ETrue if the client is allowed to continue calling this method
+     *         (i.e. Tx flow is not stopped).
+     *         EFalse if the client is not allowed to call this method again
+     *         (i.e. Tx flow is stopped) until it is re-allowed.
+     */
+    virtual TBool AddTxFrame( 
+        TDataBuffer* aPacketInUserSpace, 
+        TDataBuffer*& aPacketInKernSpace,
+        TBool aUserDataTxEnabled );
+    
+    /**
+     * From DEthernetFrameMemMngr
+     * Gets the frame to be transmitted next from the Tx queues.
+     * 
+     * @param aWhaTxQueueState State (full / not full) of every WHA transmit 
+     *        queue
+     * @param aMore On return is ETrue if another frame is also ready to be 
+     *        transmitted, EFalse otherwise
+     * @return Pointer to the meta header of the frame to be transmitted, on
+     *         success
+     *         NULL, if there's no frame that could be transmitted, given the
+     *         current status of the WHA Tx queues
+     */ 
+    virtual TDataBuffer* GetTxFrame( 
+        const TWhaTxQueueState& aTxQueueState,
+        TBool& aMore );
+    
+    /**
+     * From DEthernetFrameMemMngr
      * Deallocates a Tx packet.
      * 
      * All Tx packets allocated with AllocTxBuffer() must be deallocated using
@@ -138,7 +174,27 @@
      * 
      * @param aPacket Meta header of the packet to the deallocated
      */ 
-    virtual void FreeTxPacket( TDataBuffer*& aPacket );    
+    virtual void FreeTxPacket( TDataBuffer*& aPacket );
+
+    /** 
+     * From DEthernetFrameMemMngr
+     * Determines if Tx from protocol stack side client should be resumed
+     *  
+     * @param aUserDataTxEnabled ETrue if user data Tx is enabled
+     *        EFalse otherwise
+     * @return ETrue if Tx should be resumed
+     *         EFalse otherwise
+     */
+    virtual TBool ResumeClientTx( TBool aUserDataTxEnabled ) const;
+    
+    /** 
+     * From DEthernetFrameMemMngr
+     * Determines if all protocol stack side client's Tx queues are empty
+     * 
+     * @return ETrue if all Tx queues are empty
+     *         EFalse otherwise
+     */
+    virtual TBool AllTxQueuesEmpty() const;
     
 private:
 
@@ -157,20 +213,14 @@
     
 private:    // Data
 
+    /** kernel address of frame xfer block */
+    RFrameXferBlockProtocolStack* iFrameXferBlockProtoStack;
+    
     /** 
-    * array of TDataBuffer offset addresses, denoting Rx buffers,
-    * which are waiting here in kernel mode to be completed 
-    * to user mode, when the next frame receive request arrives
+    * the offset from a User space address to the corresponding address
+    * in the Kernel space in the shared memory chunk. May also be negative 
     */
-    TUint32 iTobeCompletedBuffers[KMaxToBeCompletedRxBufs];
-
-    /** 
-    * array of TDataBuffer offset addresses, denoting Rx buffers, that are
-    * currently under processing in user mode
-    */
-    TUint32 iCompletedBuffers[KMaxCompletedRxBufs];
-    
-    RFrameXferBlockProtocolStack* iFrameXferBlockProtoStack;
+    TInt32 iUserToKernAddrOffset;
     
     /** 
     * pointer to protocol stack side Tx area start in the kernel address 
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.h	Thu May 27 14:33:33 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: 12 %
+* %version: 13 %
 */
 
 #if !defined(__ETHERAPI_H__)
@@ -69,6 +69,7 @@
 	    {
 	    EControlFastAllocTxBuffer = 0x0F000000,
 	    EControlFastAddTxFrame,
+	    EControlFastGetRxFrame
 	    };
 	
 public:
@@ -119,12 +120,9 @@
     * is able to access the memory.
     *
     * @since S60 3.1
-    * @param aFrameXferBlock FrameXferBlock to be initialized by 
-    *        the device driver
     * @return KErrNone on success, any other on failure
     */
-    inline TInt InitialiseBuffers( 
-        RFrameXferBlockProtocolStack*& aFrameXferBlock );
+    inline TInt InitialiseBuffers();
 
     /**
     * Unmap memory mapped by InitiliazeBuffers method from the client 
@@ -183,6 +181,21 @@
 	 */
 	inline TBool AddTxFrame( TDataBuffer* aPacket );
 	
+    /**
+     * Gets the highest priority frame (contained in a buffer allocated from
+     * the shared memory) from the Rx queues.
+     * Optionally frees the memory associated to a previously received frame. 
+     * 
+     * @param aFrameToFree Previously received frame which can now be freed.
+     *        NULL if nothing to free.
+     * @return Pointer to the Rx frame to be handled next.
+     *         NULL, if there are no frames available. If NULL is returned
+     *         the client should re-issue the asynchronous frame Rx request
+     *         (i.e. RequestFrame())
+     */ 
+	inline TDataBuffer* GetRxFrame( TDataBuffer* aFrameToFree );
+	
+	
 #ifndef __KERNEL_MODE__
 private:
     /** handle to kernel side shared memory chunk */
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl	Thu May 27 14:33:33 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) ));
+    }
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EthernetFrameMemMngr.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EthernetFrameMemMngr.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 19 %
 */
 
 #ifndef DETHERNETFRAMEMEMMNGR_H
@@ -35,11 +35,6 @@
 /**
 * Manager object for frame Tx and Rx memory
 *
-* Consumed count of Rx-buffers = 
-* nbr of Rx buffers currently under processing in user mode        
-* + nbr of Rx buffers given to wlanpdd
-* + nbr of Rx buffers waiting for completion to user mode
-*
 *  @since S60 v3.1
 */
 class DEthernetFrameMemMngr
@@ -94,9 +89,9 @@
     *
     * @since S60 3.1
     * @return memory block that can be used for tx frame write, 
-    * NULL upon failure
+    *         NULL upon failure
     */
-    TDataBuffer* OnWriteEthernetFrame() const;
+    virtual TDataBuffer* OnWriteEthernetFrame() const;
 
     /**
     * Gets a memory block that can be used as rx frame buffer
@@ -123,6 +118,14 @@
     void FreeRxFrameMetaHeader( TDataBuffer* aMetaHeader );
     
     /**
+     * Frees the memory associated to a frame. 
+     * 
+     * @param aFrameToFreeInUserSpace User space pointer to the meta header
+     *        of the frame to be freed.
+     */ 
+    void FreeRxPacket( TDataBuffer* aFrameToFreeInUserSpace );
+    
+    /**
     * To be called when rx frame read cycle has ended.
     *
     * @since S60 3.1
@@ -134,19 +137,35 @@
     *         EFalse otherwise
     */
     TBool OnEthernetFrameRxComplete( 
-        const TDataBuffer*& aBufferStart, 
+        TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
-    * To be called when user mode issues a rx frame read request
+    * To be called when user mode client issues a frame Rx request
     *
     * @since S60 3.1
-    * @return ETrue if callee should complete the request immediadly 
-    * as their exist data to be completed, EFalse otherwise
+    * @return ETrue if callee should complete the request immediately 
+    *         as there exists Rx frame(s) which can be retrieved by the user
+    *         mode client.
+    *         EFalse otherwise
     */
-    TBool OnReadRequest();
+    virtual TBool OnReadRequest() = 0;
 
     /**
+     * Gets the highest priority frame (contained in a buffer allocated from
+     * the shared memory) from the Rx queues.
+     * Optionally frees the memory associated to a previously received frame. 
+     * 
+     * @param aFrameToFree Previously received frame which can now be freed.
+     *        NULL if nothing to free.
+     * @return Pointer to the Rx frame to be handled next.
+     *         NULL, if there are no frames available. If NULL is returned
+     *         the client should re-issue the asynchronous frame Rx request
+     *         (i.e. RequestFrame())
+     */ 
+    virtual TDataBuffer* GetRxFrame( TDataBuffer* aFrameToFree ) = 0;
+    
+    /**
     * Frees the specified Rx frame buffer
     *
     * @since S60 3.1
@@ -158,8 +177,8 @@
      * Allocates a Tx packet from the shared memory.
      * 
      * @param aLength Length of the requested Tx buffer in bytes
-     * @return Pointer to the meta header attached to the allocated packet, on
-     *         success.
+     * @return User space pointer to the meta header attached to the 
+     *         allocated packet, on success.
      *         NULL, in case of failure.
      */
     virtual TDataBuffer* AllocTxBuffer( TUint aLength );
@@ -181,7 +200,7 @@
      *         EFalse if the client is not allowed to call this method again
      *         (i.e. Tx flow is stopped) until it is re-allowed.
      */
-    TBool AddTxFrame( 
+    virtual TBool AddTxFrame( 
         TDataBuffer* aPacketInUserSpace, 
         TDataBuffer*& aPacketInKernSpace,
         TBool aUserDataTxEnabled );
@@ -198,7 +217,7 @@
      *         NULL, if there's no frame that could be transmitted, given the
      *         current status of the WHA Tx queues
      */ 
-    TDataBuffer* GetTxFrame( 
+    virtual TDataBuffer* GetTxFrame( 
         const TWhaTxQueueState& aTxQueueState,
         TBool& aMore );
     
@@ -220,7 +239,7 @@
      * @return ETrue if Tx should be resumed
      *         EFalse otherwise
      */
-    TBool ResumeClientTx( TBool aUserDataTxEnabled ) const;
+    virtual TBool ResumeClientTx( TBool aUserDataTxEnabled ) const;
     
     /** 
      * Determines if all protocol stack side client's Tx queues are empty
@@ -228,7 +247,7 @@
      * @return ETrue if all Tx queues are empty
      *         EFalse otherwise
      */
-    TBool AllTxQueuesEmpty() const;
+    virtual TBool AllTxQueuesEmpty() const;
     
     /**
     * Static creator of the class instance
@@ -272,10 +291,7 @@
         DWlanLogicalChannel& aParent, 
         WlanChunk*& aRxFrameMemoryPool ) :
         iReadStatus( ENotPending ), 
-        iFrameXferBlock( NULL ), 
-        iCountCompleted( 0 ), 
-        iCountTobeCompleted( 0 ),
-        iTxDataBuffer( NULL ), 
+        iFrameXferBlockBase( NULL ),
         iRxDataChunk( NULL ),
         iParent( aParent ),
         iRxFrameMemoryPool( aRxFrameMemoryPool ),
@@ -334,37 +350,10 @@
     *         EFalse otherwise
     */
     virtual TBool DoEthernetFrameRxComplete( 
-        const TDataBuffer*& aBufferStart, 
+        TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers ) = 0;
 
     /**
-    * Gets start address of Rx buffers (their offset addresses)
-    * that are waiting for completion to user mode
-    *
-    * @since S60 3.1
-    * @return see above statement
-    */
-    virtual TUint32* DoGetTobeCompletedBuffersStart() = 0;
-
-    /**
-    * Gets start address of Rx buffers (their offset addresses)
-    * that have been completed to user mode
-    *
-    * @since S60 3.1
-    * @return see above statement
-    */
-    virtual TUint32* DoGetCompletedBuffersStart() = 0;        
-
-    /**
-    * Gets called when user mode client issues a frame receive request 
-    * and Rx buffers have been completed to it. The completed Rx frame 
-    * buffers are freed.
-    *
-    * @since S60 3.1
-    */
-    virtual void DoFreeRxBuffers() = 0;
-
-    /**
     * Marks memory as not in use, meaning that it is not allocated 
     * and attached to calling process'es address space
     */
@@ -399,22 +388,8 @@
     /** state  of the rx frame read request */
     TFrameReadState    iReadStatus;
 
-    /** kernel address of xfer block */
-    RFrameXferBlock*    iFrameXferBlock;
-
-    /**
-    * amount of rx frame buffers that are 
-    * currently under processing in user mode
-    */
-    TUint32 iCountCompleted;
-
-    /**
-    * amount of rx frame buffers waiting completion to user mode
-    */
-    TUint32 iCountTobeCompleted;
-
-    /** kernel address of Tx-data buffer */
-    TDataBuffer*        iTxDataBuffer;
+    /** kernel address of xfer block; as base class pointer */
+    RFrameXferBlockBase* iFrameXferBlockBase;
 
     /** pointer to Rx area start in the kernel address space */
     TUint8*             iRxDataChunk;
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/FrameXferBlock.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/FrameXferBlock.h	Thu May 27 14:33:33 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: 25 %
+* %version: 26 %
 */
 
 #ifndef FRAMEXFERBLOCK_H
@@ -27,11 +27,6 @@
 #include "pack.h"
 #include "wllddcircularbuffer.h"
 
-/** Max number of completed Rx buffers */
-static const TUint KMaxCompletedRxBufs = 300;
-
-/** Max number of to be completed Rx buffers */
-static const TUint KMaxToBeCompletedRxBufs = KMaxCompletedRxBufs;
 
 /** 
 * This value (bytes) should be at least as large as the Tx offset required
@@ -132,7 +127,7 @@
 
 public:
 
-    typedef TUint32 TFrameType;
+    typedef TUint16 TFrameType;
 
     /** ethernet II frame */
     static const TFrameType KEthernetFrame      = 0;
@@ -229,7 +224,7 @@
     inline TUint8 UserPriority() const;
 
     /**
-    * Gets the RCPI value of a received frame
+    * Gets the RCPI value of the Rx frame
     *
     * @since S60 3.2
     * @return RCPI value
@@ -338,14 +333,15 @@
     /** Default Ctor */
     TDataBuffer() :
         iFrameType( KEthernetFrame ), 
-        iLength( 0 ), 
         iUp( 0 ), 
         iRcpi( 0 ),
+        iLength( 0 ), 
         iDestinationAddress( KZeroMacAddr ),
         iBufLength( 0 ),
         iOffsetToFrameBeginning( 0 ),
         iBufferOffsetAddr( sizeof( TDataBuffer ) ),
-        iFlags( 0 )
+        iFlags( 0 ),
+        iNext( NULL )
         {};
 
     /**
@@ -395,24 +391,20 @@
     /** type of the frame in buffer */
     TFrameType iFrameType;
         
+    /** 
+    * 802.1D User Priority of the frame
+    */
+    TUint8 iUp;
+
+    /** 
+    * RCPI of the received frame; range: [0..250]
+    */
+    TUint8 iRcpi;
+
     /** length of the data in buffer */
     TUint32 iLength;
     
     /** 
-    * 802.1D User Priority of the frame
-    * stored as a 32-bit value to keep the length of this object 32-bit
-    * aligned
-    */
-    TUint32 iUp;
-
-    /** 
-    * RCPI of the received frame; range: [0..250]
-    * stored as a 32-bit value to keep the length of this object 32-bit
-    * aligned
-    */
-    TUint32 iRcpi;
-
-    /** 
     * Destination address of the frame to be transmitted. Used only when
     * the address cannot be determined from the frame content  
     */
@@ -436,6 +428,9 @@
     /** may contain a combination of the flags defined for this class */
     TFlag iFlags;
     
+    /** pointer to the meta header of the next frame in the same Rx queue */ 
+    TDataBuffer* iNext;
+    
     /** 
     * Note! The total length of this object needs to be divisible by four
     * to enable the items following it to be correctly aligned. 
@@ -690,68 +685,22 @@
 
 #ifndef __KERNEL_MODE__ /* User mode */
     
-    /**
-    * Gets next Rx-data buffer that has data to be read
-    *
-    * @since S60 3.1
-    * @param aBuf OUT parameter where Rx-data buffers address that is to
-    * be read is copied
-    * @return ETrue Rx-data exists after this call still to read,
-    * otherwise EFalse
-    */
-    inline TBool GetNextRxDataBuffer( TDataBuffer*& aBuf );
-
     //////////////////////////////////////////////////////////////////////////
     // Rest of the methods are meant to be used only in the device driver code
     //////////////////////////////////////////////////////////////////////////
 
-    /**
-    * Set data chunk address
-    *
-    * Note! This method is executed in user mode context by the user mode
-    * client interface, i.e. not the client itself!
-    * @since S60 3.1
-    * @param aUserAddr user address of the buffer
-    */
-    inline void SetRxDataChunkField( TLinAddr aUserAddr );
-
+    /** 
+     * Initializes the object instance, with the address of this in user space.
+     * 
+     * @param aThisAddrUserSpace Address of this object in user space.
+     */
+    inline void UserInitialize( TUint32 aThisAddrUserSpace );
+    
 #endif /* User mode end */
 
 #ifdef __KERNEL_MODE__ /* Kernel mode */
     
     /**
-    * Completes Rx buffers to user space
-    *
-    * @since S60 3.1
-    * @param aRxCompletionBuffersArray Rx buffer addresses as offsets from
-    *        Rx memory pool beginning
-    * @param aNumOfCompleted number of buffers
-    */
-    void KeRxComplete( 
-        const TUint32* aRxCompletionBuffersArray, 
-        TUint32 aNumOfCompleted );
-
-    /**
-    * Gets the array of Rx buffers (their offset addresses) which have already
-    * been handled by the user space client
-    *
-    * @since S60 5.0
-    * @param aRxHandledBuffersArray Pointer to the beginning of the array
-    * @param aNumOfHandled Number of buffers (offset addresses) on the array
-    */
-    void KeGetHandledRxBuffers( 
-        const TUint32*& aRxHandledBuffersArray, 
-        TUint32& aNumOfHandled );
-
-    /**
-    * Notes, that all Rx buffers, which were completed to user space
-    * the previous time, are now free.
-    *
-    * @since S60 5.0
-    */
-    void KeAllUserSideRxBuffersFreed();
-
-    /**
     * Sets the Tx offset for every frame type which can be transmitted
     *
     * @since S60 5.0
@@ -763,8 +712,17 @@
     void KeSetTxOffsets( 
         TUint32 aEthernetFrameTxOffset,
         TUint32 aDot11FrameTxOffset,
-        TUint32 aSnapFrameTxOffset );    
+        TUint32 aSnapFrameTxOffset );
 
+    /**
+    * Returns the offset from a User space address to the corresponding address
+    * in the Kernel space in the shared memory chunk. 
+    * May also be negative.
+    * 
+    * @return The offset
+    */
+    inline TInt32 UserToKernAddrOffset() const;
+    
 protected:
     
     /**
@@ -788,39 +746,20 @@
     
 protected:    // Data
 
-    /** the beginning of the Rx data area in user address space */
-    TUint8*         iRxDataChunk;
-
-    /**
-    * number of Rx-data buffers that were completed by the device driver
+    /** Address of this object instance in the kernel mode address space */
+    TUint32 iThisAddrKernelSpace;
+    
+    /** 
+    * the offset from a User space address to the corresponding address
+    * in the Kernel space in the shared memory chunk. May also be negative 
     */
-    TUint32         iNumOfCompleted;
+    TInt32 iUserToKernAddrOffset;
 
-    /**
-    * index to iRxCompletedBuffers denoting the Rx buffer that is to be
-    * extracted next by the user application
-    */
-    TUint32         iCurrentRxBuffer;
-
-    /** 
-    * index of the first Rx buffer in iRxCompletedBuffers array
-    * - which the user side client has already handled and
-    *   which can therefore be freed & re-used AND
-    * - which hasn't been freed yet
-    */
-    TUint32         iFirstRxBufferToFree;
-    
     /** 
     * defines a Tx offset for every frame type which can be transmitted
     */
-    TUint32         iTxOffset[TDataBuffer::KFrameTypeMax];
+    TUint32 iTxOffset[TDataBuffer::KFrameTypeMax];
 
-    /** 
-    * array of TDataBuffer offset addresses from the memory pool start address,
-    * denoting Rx buffers which are ready to be read
-    */
-    TUint32         iRxCompletedBuffers[KMaxCompletedRxBufs];
-    
     /**
     * Note! The length of this object needs to be divisible by 4 to make
     * the objects following it to be aligned correctly
@@ -829,41 +768,32 @@
 
 #ifndef __KERNEL_MODE__ /* User mode */
 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // 
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 //
-inline TBool RFrameXferBlockBase::GetNextRxDataBuffer( TDataBuffer*& aBuf )
+inline void RFrameXferBlockBase::UserInitialize( 
+    TUint32 aThisAddrUserSpace)
     {
-    TBool ret( EFalse );
-
-    if ( iNumOfCompleted )
-        {
-        --iNumOfCompleted;
-        aBuf = reinterpret_cast<TDataBuffer*>(
-                // Rx memory pool user mode start address
-                iRxDataChunk + 
-                // offset from the memory pool start address
-                iRxCompletedBuffers[iCurrentRxBuffer]);
-                
-        ++iCurrentRxBuffer;
-        ret = ETrue;
-        }
-
-    return ret;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-inline void RFrameXferBlockBase::SetRxDataChunkField( TLinAddr aUserAddr )
-    {
-    iRxDataChunk = reinterpret_cast<TUint8*>(aUserAddr); 
+    iUserToKernAddrOffset = iThisAddrKernelSpace - aThisAddrUserSpace;
     }
 
 #endif /* User mode end */
 
+#ifdef __KERNEL_MODE__ /* Kernel mode */
+
+// -----------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
+// -----------------------------------------------------------------------------
+//
+inline TInt32 RFrameXferBlockBase::UserToKernAddrOffset() const
+    {
+    return iUserToKernAddrOffset;
+    }
+
+#endif /* Kernel mode end */
+
 
 /**
 * Ethernet frame transfer context block between user and kernel space
@@ -893,6 +823,7 @@
     * @return KErrNone on success,
     *         KErrOverflow if aLength is greater than the available space in
     *         the Tx buffer
+    *         KErrNoMemory if frame transfer memory hasn't been allocated
     */
     inline TInt AppendTxDataBuffer( 
         const TUint8* aData, 
@@ -924,12 +855,40 @@
 #ifdef __KERNEL_MODE__ /* Kernel mode */
     
     /**
-    * Initialises the buffer.
+    * Initializes Kernel side memory interface to shared memory between User
+    * and Kernel Space.
     *
     *  @param aTxBufLength
     */
-    inline void Initialize( TUint32 aTxBufLength );
+    void Initialize( TUint32 aTxBufLength );
+    
+    /**
+     * Adds the specified Rx frame (contained in a buffer allocated from the 
+     * shared memory) to the Rx queue
+     *  
+     * @param aFrame Meta header attached to the frame; as a kernel
+     *        space pointer.
+     */
+    void AddRxFrame( TDataBuffer* aFrame );
     
+    /**
+     * Gets the next frame from the Rx queue for passing it to
+     * the WLAN Mgmt client.
+     * 
+     * @return User space pointer to the meta header of the Rx frame to be
+     *         passed to the user mode client.
+     *         NULL, if there's no frame available.
+     */ 
+    TDataBuffer* GetRxFrame();
+    
+    /**
+     * Finds out if there is an Rx frame ready for user mode client retrieval
+     * 
+     * @return ETrue if an Rx frame is ready for retrival
+     *         EFalse otherwise
+     */ 
+    TBool RxFrameAvailable() const;
+        
 #endif /* Kernel mode end */
     
 private:
@@ -944,14 +903,20 @@
     
 private: // data
 
-    /** Tx-data buffer */
-    TDataBuffer*    iTxDataBuffer;
+    /** Tx data buffer */
+    TDataBuffer* iTxDataBuffer;
 
     /** 
     * stores the total capacity (length) of the Tx buffer (iTxDataBuffer) 
     * associated with this object instance
     */
-    TUint32         iTxBufLength;
+    TUint32 iTxBufLength;
+    
+    /** pointer to the meta header of the 1st frame in the Rx queue */
+    TDataBuffer* iRxQueueFront;
+    
+    /** pointer to the meta header of the last frame in the Rx queue */
+    TDataBuffer* iRxQueueRear;    
     };
 
 #ifndef __KERNEL_MODE__ /* User mode */
@@ -968,39 +933,46 @@
     TBool aMustNotBeEncrypted,
     const TMacAddress* aDestinationAddress )
     {
-    if ( aLength <= 
-        iTxBufLength - 
-        iTxOffset[aFrameType] - 
-        iTxDataBuffer->GetLength() )
+    if ( iTxDataBuffer )
         {
-        // provided data fits into buffer
-        
-        iTxDataBuffer->FrameType( aFrameType );
-        iTxDataBuffer->AppendBuffer( aData, aLength, iTxOffset[aFrameType] );
-        iTxDataBuffer->SetUserPriority( aUserPriority );
-
-        if ( aMustNotBeEncrypted )
+        if ( aLength <= 
+            iTxBufLength - 
+            iTxOffset[aFrameType] - 
+            iTxDataBuffer->GetLength() )
             {
-            iTxDataBuffer->KeSetFlags( 
-                TDataBuffer::KTxFrameMustNotBeEncrypted );
+            // provided data fits into buffer
+            
+            iTxDataBuffer->FrameType( aFrameType );
+            iTxDataBuffer->AppendBuffer( aData, aLength, iTxOffset[aFrameType] );
+            iTxDataBuffer->SetUserPriority( aUserPriority );
+    
+            if ( aMustNotBeEncrypted )
+                {
+                iTxDataBuffer->KeSetFlags( 
+                    TDataBuffer::KTxFrameMustNotBeEncrypted );
+                }
+            else
+                {
+                iTxDataBuffer->KeClearFlags( 
+                    TDataBuffer::KTxFrameMustNotBeEncrypted );
+                }
+    
+            if ( aDestinationAddress )
+                {
+                iTxDataBuffer->SetDestinationAddress( *aDestinationAddress );
+                }
+            
+            return KErrNone;
             }
         else
             {
-            iTxDataBuffer->KeClearFlags( 
-                TDataBuffer::KTxFrameMustNotBeEncrypted );
+            return KErrOverflow;        
             }
-
-        if ( aDestinationAddress )
-            {
-            iTxDataBuffer->SetDestinationAddress( *aDestinationAddress );
-            }
-        
-        return KErrNone;
         }
     else
         {
-        return KErrOverflow;        
-        }    
+        return KErrNoMemory;
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -1009,7 +981,10 @@
 //
 inline void RFrameXferBlock::ClearTxDataBuffer()
     {
-    iTxDataBuffer->SetLength( 0 );
+    if ( iTxDataBuffer )
+        {
+        iTxDataBuffer->SetLength( 0 );
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -1023,59 +998,32 @@
 
 #endif /* User mode end */
 
-#ifdef __KERNEL_MODE__ /* Kernel mode */
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-inline void RFrameXferBlock::Initialize( TUint32 aTxBufLength )
-    {
-    // perform base class initialization first
-    KeInitialize();
-    
-    iTxDataBuffer = NULL;
-    iTxBufLength = aTxBufLength;
-    }
-
-#endif  /* Kernel mode end */
 
 /**
 * Ethernet frame transfer context block between user and kernel space 
 * for the protocol stack side client 
 * 
 */
-class RFrameXferBlockProtocolStack : public RFrameXferBlock
+class RFrameXferBlockProtocolStack : public RFrameXferBlockBase
     {
 
 public:
 
-#ifndef __KERNEL_MODE__ /* User mode */
-    
-    /** 
-     * Initializes TX Data pool, with the address of this in user space.
-     * 
-     * @param aThisAddrUserSpace Address of this object in user space.
-     */
-    inline void UserInitialize( TUint32 aThisAddrUserSpace );
-    
-#endif /* User mode end */    
-
 #ifdef __KERNEL_MODE__ /* Kernel mode */
     
     /**
-     * Initialises Kernel's memory interface to shared memory between User
+     * Initializes Kernel side memory interface to shared memory between User
      * and Kernel Space.
      */ 
-    void Initialise();
+    void Initialize();
     
     /**
      * Allocates a Tx buffer from the shared memory.
      * 
-     * @param aTxBuf Pointer to the pre-allocated actual Tx buffer.
+     * @param aTxBuf Kernel space pointer to the pre-allocated actual Tx buffer
      * @param aBufLength Length of the Tx buffer.
-     * @return Pointer to the meta header attached to the allocated buffer, on
-     *         success.
+     * @return User space pointer to the meta header attached to the 
+     *         allocated buffer, on success.
      *         NULL, in case of allocation failure.
      */
     TDataBuffer* AllocTxBuffer( const TUint8* aTxBuf, TUint16 aBufLength );
@@ -1145,7 +1093,35 @@
      *         EFalse otherwise
      */
     inline TBool AllTxQueuesEmpty() const;
+        
+    /**
+     * Adds the specified Rx frame (contained in a buffer allocated from the 
+     * shared memory) to the relevant Rx queue according to its AC (i.e.
+     * priority).
+     *  
+     * @param aFrame Meta header attached to the frame; as a kernel
+     *        space pointer.
+     */
+    void AddRxFrame( TDataBuffer* aFrame );
 
+    /**
+     * Gets the highest priority frame from the Rx queues for passing it to
+     * the protocol stack side client.
+     * 
+     * @return User space pointer to the meta header of the Rx frame to be
+     *         passed to the user mode client.
+     *         NULL, if there's no frame available.
+     */ 
+    TDataBuffer* GetRxFrame();
+    
+    /**
+     * Finds out if there is an Rx frame ready for user mode client retrieval
+     * 
+     * @return ETrue if an Rx frame is ready for retrival
+     *         EFalse otherwise
+     */ 
+    inline TBool RxFrameAvailable() const;
+    
 #endif /* Kernel mode end */
     
 private:
@@ -1203,18 +1179,30 @@
     /** Tx frame meta header objects */
     TDataBuffer iDataBuffers[KTxPoolSizeInPackets];
     
-    /** Address of this object instance in the user mode address space */
-    TUint32 iThisAddrUserSpace;
+    /** pointer to the meta header of the 1st frame in the VO Rx queue */
+    TDataBuffer* iVoiceRxQueueFront;
+    
+    /** pointer to the meta header of the last frame in the VO Rx queue */
+    TDataBuffer* iVoiceRxQueueRear;
     
-    /** Address of this object instance in the kernel mode address space */
-    TUint32 iThisAddrKernelSpace;
+    /** pointer to the meta header of the 1st frame in the VI Rx queue */
+    TDataBuffer* iVideoRxQueueFront;
+    
+    /** pointer to the meta header of the last frame in the VI Rx queue */
+    TDataBuffer* iVideoRxQueueRear;
     
-    /** 
-    * the offset from a User space address to the corresponding address
-    * in the Kernel space in the shared memory chunk. May also be negative 
-    */
-    TInt32 iUserToKernAddrOffset;
-
+    /** pointer to the meta header of the 1st frame in the BE Rx queue */
+    TDataBuffer* iBestEffortRxQueueFront;
+    
+    /** pointer to the meta header of the last frame in the BE Rx queue */
+    TDataBuffer* iBestEffortRxQueueRear;
+    
+    /** pointer to the meta header of the 1st frame in the BG Rx queue */
+    TDataBuffer* iBackgroundRxQueueFront;
+    
+    /** pointer to the meta header of the last frame in the BG Rx queue */
+    TDataBuffer* iBackgroundRxQueueRear;
+    
     /**
     * Note! The length of this object needs to be divisible by 4 to make
     * the objects following it to be aligned correctly
@@ -1222,38 +1210,28 @@
     };
 
 
-#ifndef __KERNEL_MODE__ /* User mode */
-#include <e32debug.h>
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-inline void RFrameXferBlockProtocolStack::UserInitialize( 
-    TUint32 aThisAddrUserSpace)
-    {
-    iThisAddrUserSpace = aThisAddrUserSpace;
-    iUserToKernAddrOffset = iThisAddrKernelSpace - iThisAddrUserSpace;
-    }
-#endif /* User mode end */
-
 #ifdef __KERNEL_MODE__ /* Kernel mode */
 
 // -----------------------------------------------------------------------------
-// 
+// Note! This method is executed also in the context of the user mode client 
+// thread, but in supervisor mode
 // -----------------------------------------------------------------------------
 //
 inline void RFrameXferBlockProtocolStack::FreeTxPacket( TDataBuffer*& aPacket )
     {
-    aPacket->SetLength( 0 );
-    aPacket->SetUserPriority( 0 );
-    // put the packet to the Free Queue
-    iFreeQueue.PutPacket( aPacket );
-    aPacket = NULL;
+    if ( aPacket )
+        {
+        aPacket->SetLength( 0 );
+        aPacket->SetUserPriority( 0 );
+        // put the packet to the Free Queue
+        iFreeQueue.PutPacket( aPacket );
+        aPacket = NULL;
+        }
     }
 
 // -----------------------------------------------------------------------------
-// 
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
 // -----------------------------------------------------------------------------
 //
 inline TBool RFrameXferBlockProtocolStack::AllTxQueuesEmpty() const
@@ -1264,6 +1242,25 @@
              iBackgroundTxQueue.IsEmpty() ) ? ETrue : EFalse;
     }
 
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+inline TBool RFrameXferBlockProtocolStack::RxFrameAvailable() const
+    {
+    if ( reinterpret_cast<TBool>(iVoiceRxQueueFront) || 
+         reinterpret_cast<TBool>(iVideoRxQueueFront) || 
+         reinterpret_cast<TBool>(iBestEffortRxQueueFront) ||
+         reinterpret_cast<TBool>(iBackgroundRxQueueFront ) )
+        {
+        return ETrue;
+        }
+    else
+        {
+        return EFalse;
+        }
+    }
+
 #endif /* Kernel mode end */
 
 #endif // FRAMEXFERBLOCK_H
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/MgmtFrameMemMngr.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/MgmtFrameMemMngr.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 15 %
+* %version: 16 %
 */
 
 #ifndef MGMTFRAMEMMNGR_H
@@ -44,6 +44,9 @@
         TBool aUseCachedMemory,
         TInt aRxFrameBufAllocationUnit ) : 
         DEthernetFrameMemMngr( aParent, aRxFrameMemoryPool ),
+        iFrameXferBlock( NULL ),
+        iChunkKernelAddr( 0 ),
+        iTxDataBuffer( NULL ),
         iUseCachedMemory( aUseCachedMemory ),
         iRxFrameBufAllocationUnit ( aRxFrameBufAllocationUnit ),
         iChunkSize( 
@@ -52,7 +55,11 @@
         {};
 
     /** Dtor */
-    virtual ~MgmtFrameMemMngr() {};
+    virtual ~MgmtFrameMemMngr()
+        {
+        iFrameXferBlock = NULL;
+        iTxDataBuffer = NULL;
+        };
 
 protected:
 
@@ -107,51 +114,55 @@
     *         EFalse otherwise
     */
     virtual TBool DoEthernetFrameRxComplete( 
-        const TDataBuffer*& aBufferStart, 
+        TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
     * From DEthernetFrameMemMngr
-    * Gets start address of Rx buffers (their offset addresses)
-    * that are waiting for completion to user mode
-    *
-    * @since S60 3.1
-    * @return see above statement
-    */
-    virtual TUint32* DoGetTobeCompletedBuffersStart();
-
-    /**
-    * From DEthernetFrameMemMngr
-    * Gets start address of Rx buffers (their offset addresses)
-    * that have been completed to user mode
-    *
-    * @since S60 3.1
-    * @return see above statement
-    */
-    virtual TUint32* DoGetCompletedBuffersStart();
-
-    /**
-    * From DEthernetFrameMemMngr
-    * Gets called when user mode client issues a frame receive request 
-    * and Rx buffers have been completed to it. The completed Rx frame 
-    * buffers are freed.
-    *
-    * @since S60 3.1
-    */
-    virtual void DoFreeRxBuffers();
-
-    /**
-    * From DEthernetFrameMemMngr
     * Frees the specified Rx frame buffer
     *
     * @since S60 3.1
     * @param aBufferToFree The buffer to free
     */
     virtual void DoMarkRxBufFree( TUint8* aBufferToFree );
+    
+    /**
+    * From DEthernetFrameMemMngr
+    * To be called when user mode client issues a frame Rx request
+    *
+    * @return ETrue if callee should complete the request immediately 
+    *         as there exists Rx frame(s) which can be retrieved by the user
+    *         mode client.
+    *         EFalse otherwise
+    */
+    virtual TBool OnReadRequest();
+    
+    /**
+     * From DEthernetFrameMemMngr
+     * Gets the next frame (contained in a buffer allocated from
+     * the shared memory) from the Rx queue.
+     * Optionally frees the memory associated to a previously received frame. 
+     * 
+     * @param aFrameToFree User space pointer to previously received frame 
+     *        which can now be freed.
+     *        NULL if nothing to free.
+     * @return User space pointer to the Rx frame to be handled next.
+     *         NULL, if there are no frames available.
+     */ 
+    virtual TDataBuffer* GetRxFrame( TDataBuffer* aFrameToFreeInUserSpace );
 
 private:
 
     /**
+    * Gets a memory block that can be used for tx frame write
+    *
+    * @since S60 3.1
+    * @return memory block that can be used for tx frame write, 
+    *         NULL upon failure
+    */
+    virtual TDataBuffer* OnWriteEthernetFrame() const;
+
+    /**
     * Returns the number of extra bytes required to align Rx buffer start
     * address, to be returned to WHA layer, to allocation unit boundary
     * @return See above
@@ -171,27 +182,20 @@
     // Prohibit copy constructor.
     MgmtFrameMemMngr( const MgmtFrameMemMngr& );
     // Prohibit assigment operator.
-    MgmtFrameMemMngr& operator= ( const MgmtFrameMemMngr & ); 
+    MgmtFrameMemMngr& operator= ( const MgmtFrameMemMngr& ); 
     
 private:    // Data
 
+    /** kernel address of frame xfer block */
+    RFrameXferBlock* iFrameXferBlock;
+
     /** 
     * kernel address of the shared memory chunk
     */
     TLinAddr iChunkKernelAddr;
 
-    /** 
-    * array of TDataBuffer offset addresses, denoting Rx buffers,
-    * which are waiting here in kernel mode to be completed 
-    * to user mode, when the next frame receive request arrives
-    */
-    TUint32  iTobeCompletedBuffers[KMaxToBeCompletedRxBufs];
-
-    /** 
-    * array of TDataBuffer offset addresses, denoting Rx buffers, that are
-    * currently under processing in user mode
-    */
-    TUint32  iCompletedBuffers[KMaxCompletedRxBufs];
+    /** kernel address of Tx data buffer */
+    TDataBuffer* iTxDataBuffer;
 
     /** 
     * ETrue if cached frame transfer memory shall be used,
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 19 %
 */
 
 #ifndef RWLAN_LOGICAL_CHANNEL_H_
@@ -29,15 +29,6 @@
 #include <e32std.h> // for RChunk
 #endif
 
-// Enumeration values for control messages
-enum TWlanControl
-	{
-    EWlanSvControlInitBuffers,  // Allocate frame transfer memory for WLAN Mgmt
-                                // client
-    EWlanSvControlFreeBuffers   // Deallocate memory allocated by 
-                                // EWlanSvControlInitBuffers
-	};
-
 // Open parameters
 struct TOpenParam 
 	{
@@ -55,23 +46,42 @@
     TUint32 iFirmWareLength;    // length of firmware in bytes 	
 	};
 
-// Enumeration values for asynchronous requests. Do not exceed KMaxRequests!
-enum TWlanRequest
-    {
-	EWlanRequestNotify,        // request a notification
-	EWlanRequestFrame,         // frame Rx request
-	EWlanRequestSend,          // frame Tx request
-	EWlanCommand,		       // WLAN management command
-    EWlanInitSystem,           // internal init
-    EWlanFinitSystem,          // internal finit
-	EWlanMaxRequest
-    };
-
 class RWlanLogicalChannel : public RBusLogicalChannel
     {
-
 public:
 
+    // Enumeration values for control messages
+    enum TWlanControl
+        {
+        EWlanSvControlInitBuffers,  // Allocate frame transfer memory for WLAN Mgmt
+                                    // client
+        EWlanSvControlFreeBuffers   // Deallocate memory allocated by 
+                                    // EWlanSvControlInitBuffers
+        };
+
+    // Enumeration values for asynchronous requests. Do not exceed KMaxRequests!
+    enum TWlanRequest
+        {
+        EWlanRequestNotify,        // request a notification
+        EWlanRequestFrame,         // frame Rx request
+        EWlanRequestSend,          // frame Tx request
+        EWlanCommand,              // WLAN management command
+        EWlanInitSystem,           // internal init
+        EWlanFinitSystem,          // internal finit
+        EWlanMaxRequest
+        };
+
+    /** 
+    * Calls executed in the context of the client's thread, but in 
+    * supervisor mode
+    */
+    enum TControlFast
+        {
+        EWlanControlFastGetRxFrame = 0x0E000000
+        };
+    
+public:
+    
     /** 
       * Opens a channel to the WLAN device driver.
       *
@@ -153,7 +163,7 @@
     *
     * @since S60 3.1
     * @param aFrameXferBlock FrameXferBlock to be initialised by 
-    * the device driver.
+    *        the device driver.
     * @return KErrNone on success, any other on failure
     */
     inline TInt InitialiseBuffers( RFrameXferBlock*& aFrameXferBlock );
@@ -194,6 +204,20 @@
       */
     inline void CancelRxRequests();
 
+    /**
+     * Gets the next frame (contained in a buffer allocated from
+     * the shared memory) from the Rx queue.
+     * Optionally frees the memory associated to a previously received frame. 
+     * 
+     * @param aFrameToFree Previously received frame which can now be freed.
+     *        NULL if nothing to free.
+     * @return Pointer to the Rx frame to be handled next.
+     *         NULL, if there are no frames available. If NULL is returned
+     *         the client should re-issue the asynchronous frame Rx request
+     *         (i.e. RequestFrame())
+     */ 
+    inline TDataBuffer* GetRxFrame( TDataBuffer* aFrameToFree );    
+    
 private:
 
     inline TInt InitWlanSystem( TOpenParam& aOpenParam );
@@ -201,11 +225,6 @@
 private: // data
 
     /**
-     * has the WLAN system been initialized
-     */
-    TBool iWlanSystemInitialized;
-
-    /**
      * If a WLAN Management Command is executed asynchronously, this data
      * member is used to store the Management Command message - thus keeping
      * it valid until the asynchronous request is actually scheduled.
--- 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) ));
+    }
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/WlanLogicalChannel.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/WlanLogicalChannel.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 32 %
+* %version: 33 %
 */
 
 #ifndef DWLANLOGICALCHANNEL_H
@@ -139,18 +139,38 @@
 	
     /**
      * Process a function for this logical channel.
-     * This function is executed in the context of client's thread in 
-     * supervisor mode. All code executed in this mode MUST NOT
-     * take a lot of time and MUST NOT access the WHA layer.
      * @param aFunction Defines the operation/function to be performed.
      * @param param     Function specific parameter
      * @return function specific return value.
      */
-	virtual TAny* DoControlFast( TInt aFunction, TAny* param );
+	virtual TAny* DoControlFast( TInt aFunction, TAny* aParam );
 	
 private:
 
     /**
+     * Process a function for this logical channel.
+	 *
+     * @param aFunction Defines the operation/function to be performed.
+     * @param aParam Function specific parameter
+     * @return Function specific return value.
+     */
+    TAny* OnMgmtSideControlFast( TInt aFunction, TAny* aParam );
+    
+    /**
+     * Process a function for this logical channel.
+	 *
+     * @param aFunction Defines the operation/function to be performed.
+     * @param aParam Function specific parameter
+     * @param aTriggerTx ETrue if Tx operation should be triggered
+     *                   EFalse otherwise
+     * @return Function specific return value.
+     */
+    TAny* OnEthernetSideControlFast( 
+        TInt aFunction, 
+        TAny* aParam,
+        TBool& aTriggerTx );    
+    
+    /**
     * Called from statemachine when oid has been completed. 
     * Triggers handling of a new oid
     * @param aOid OID handled
@@ -190,7 +210,7 @@
     * @param aNumOfBuffers number of meta header pointers in the array
     */
     virtual void MgmtDataReceiveComplete( 
-        const TDataBuffer*& aBufferStart, 
+        TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
@@ -256,7 +276,7 @@
     *         EFalse otherwise
     */
     virtual TBool ProtocolStackDataReceiveComplete( 
-        const TDataBuffer*& aBufferStart, 
+        TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddlogicalchannelbase.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddlogicalchannelbase.h	Thu May 27 14:33:33 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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: 2 %
+* %version: 3 %
 */
 
 #ifndef D_WLANLOGICALCHANNELBASE_H
@@ -26,8 +26,9 @@
 
 /**
 * An abstract base class for a logical channel that provides a framework in 
-* which user-side client requests are executed in the context of a single 
-* kernel-side thread.
+* which user side client requests are executed in the context of a single 
+* kernel side thread or in the context of the client thread in supervisor 
+* mode
 *
 *  @since S60 v5.1
 */
@@ -73,9 +74,9 @@
   
     /**
      * Process a function for this logical channel.
-     * This function is executed in the context of client's thread in 
-     * supervisor mode. All code executed in this mode MUST not
-     * take a lot of time and MUST NOT access the WHA layer.
+     * This method is executed in the context of the user mode client 
+     * thread, but in supervisor mode. Code executed in this mode 
+     * MUST NOT take a lot of time.
      * @param aFunction Defines the operation/function to be performed.
      * @param param     Function specific parameter
      * @return function specific return value.
@@ -97,7 +98,7 @@
          * The smallest Fast Control Function ID that DoControlFast()
          * accepts.
          */
-        EMinControlFast = static_cast<TInt>(0x0F000000),
+        EMinControlFast = static_cast<TInt>(0x0E000000),
         
         /**
          * The largest Fast Control Function ID that DoControlFast()
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/DataFrameMemMngr.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/DataFrameMemMngr.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 19 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -120,23 +120,23 @@
                 TraceDump(MEMORY, (("WLANLDD: new WlanChunk: 0x%08x"), 
                     reinterpret_cast<TUint32>(iTxFrameMemoryPool)));
 
-                iFrameXferBlock = reinterpret_cast<RFrameXferBlock*>(
-                    start_of_mem  
-                    + KRxDataChunkSize 
-                    + sizeof( TDataBuffer ) 
-                    + KMgmtSideTxBufferLength
-                    + KProtocolStackSideTxDataChunkSize
-                    + sizeof( RFrameXferBlock ) );
-                
                 iFrameXferBlockProtoStack = 
-                    static_cast<RFrameXferBlockProtocolStack*>(iFrameXferBlock);
+                    reinterpret_cast<RFrameXferBlockProtocolStack*>(
+                        start_of_mem  
+                        + KRxDataChunkSize 
+                        + sizeof( TDataBuffer ) 
+                        + KMgmtSideTxBufferLength
+                        + KProtocolStackSideTxDataChunkSize
+                        + sizeof( RFrameXferBlock ) );
+
+                iFrameXferBlockBase = iFrameXferBlockProtoStack;
                 
                 TraceDump( INIT_LEVEL, 
                     (("WLANLDD: DataFrameMemMngr::DoOpenHandle: Nif RFrameXferBlock addr: 0x%08x"),
                     reinterpret_cast<TUint32>(iFrameXferBlockProtoStack) ) );
     
                 // initiliase xfer block
-                iFrameXferBlockProtoStack->Initialise();
+                iFrameXferBlockProtoStack->Initialize();
                 
                 iRxBufAlignmentPadding = iParent.RxBufAlignmentPadding();
                 
@@ -175,197 +175,103 @@
 // 
 // ---------------------------------------------------------------------------
 //
-void DataFrameMemMngr::DoFreeRxBuffers()
-    {
-    for ( TUint i = 0; i < iCountCompleted; ++i )
-        {
-        TDataBuffer* metaHdr ( reinterpret_cast<TDataBuffer*>(
-            iRxDataChunk + iCompletedBuffers[i]) );  
-        
-        // first free the actual Rx frame buffer if relevant
-        if ( metaHdr->KeFlags() & TDataBuffer::KDontReleaseBuffer )
-            {
-            // this buffer shall not be freed yet, so no action here
-            
-            TraceDump( RX_FRAME, 
-                (("WLANLDD: DataFrameMemMngr::DoFreeRxBuffers: don't free yet Rx buf at addr: 0x%08x"),
-                reinterpret_cast<TUint32>(metaHdr->KeGetBufferStart()) ) );            
-            }
-        else
-            {
-            TraceDump( RX_FRAME, 
-                (("WLANLDD: DataFrameMemMngr::DoFreeRxBuffers: free Rx buf at addr: 0x%08x"),
-                reinterpret_cast<TUint32>(metaHdr->KeGetBufferStart()) ) );
-    
-            iRxFrameMemoryPool->Free( 
-                metaHdr->KeGetBufferStart()
-                // take into account the alignment padding 
-                - iRxBufAlignmentPadding );
-            }
-        
-        // free the Rx frame meta header
-
-        TraceDump( RX_FRAME, 
-            (("WLANLDD: DataFrameMemMngr::DoFreeRxBuffers: free Rx meta header at addr: 0x%08x"),
-            reinterpret_cast<TUint32>(metaHdr)) );
-
-        iRxFrameMemoryPool->Free( metaHdr );        
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
 TBool DataFrameMemMngr::DoEthernetFrameRxComplete( 
-    const TDataBuffer*& aBufferStart, 
+    TDataBuffer*& aBufferStart, 
     TUint32 aNumOfBuffers )
     {
     TraceDump( RX_FRAME, 
-        (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: aNumOfBuffers: %d"), 
+        (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: "
+          "aNumOfBuffers: %d"), 
         aNumOfBuffers) );
 
-    if ( aNumOfBuffers + iCountTobeCompleted > KMaxToBeCompletedRxBufs )
-        {
-        // too little space reserved for Rx buffer handles
-        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-        }
-
     TBool ret( EFalse );
-
-    if ( iReadStatus == EPending )
-        {
-        // read pending
-        if ( !iCountTobeCompleted )
-            {
-            // no existing Rx buffers to complete in queue
-            // we may complete these ones on the fly
-            
-            // note the completed Rx buffers first so that we can change
-            // their addresses to offsets
-            assign( 
-                reinterpret_cast<TUint32*>(&aBufferStart), 
-                iCompletedBuffers, 
-                aNumOfBuffers );
-
-            // update the new Rx buffer start addresses added above to be 
-            // offsets from the Rx memory pool beginning
-            for( TUint i = 0; i < aNumOfBuffers; ++i )
-                {
-                TraceDump( RX_FRAME, 
-                    (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"), 
-                    iCompletedBuffers[i]) );        
-                
-                iCompletedBuffers[i] 
-                    -= reinterpret_cast<TUint32>(iRxDataChunk);
-
-                TraceDump( RX_FRAME, 
-                    (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"), 
-                    iCompletedBuffers[i]) );        
-                }
-
-            iCountCompleted = aNumOfBuffers;
-
-            iFrameXferBlock->KeRxComplete( iCompletedBuffers, iCountCompleted);
-            }
-        else
-            {
-            // existing rx buffers to complete in queue.
-            // We must append these at the rear and after that 
-            // complete the existing read request
-            assign( 
-                reinterpret_cast<TUint32*>(&aBufferStart),
-                iTobeCompletedBuffers + iCountTobeCompleted, 
-                aNumOfBuffers );
+    TDataBuffer** metaHdrPtrArray(&aBufferStart);
 
-            // update the new Rx buffer start addresses added above to be 
-            // offsets from the Rx memory pool beginning
-            for( TUint i = 0; i < aNumOfBuffers; ++i )
+    if ( iFrameXferBlockProtoStack )
+        {
+        for ( TUint i = 0; i < aNumOfBuffers; ++i )
+            {
+            if ( metaHdrPtrArray[i] )
                 {
-                TraceDump( RX_FRAME, 
-                    (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"), 
-                    iTobeCompletedBuffers[iCountTobeCompleted + i]) );
-
-                iTobeCompletedBuffers[iCountTobeCompleted + i] 
-                    -= reinterpret_cast<TUint32>(iRxDataChunk);
-
-                TraceDump( RX_FRAME, 
-                    (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"), 
-                    iTobeCompletedBuffers[iCountTobeCompleted + i]) );
+                iFrameXferBlockProtoStack->AddRxFrame( metaHdrPtrArray[i] );
                 }
-
-            iCountCompleted = iCountTobeCompleted + aNumOfBuffers;
-
-            iFrameXferBlock->KeRxComplete( 
-                iTobeCompletedBuffers, 
-                iCountCompleted );  
-
-            // note the completed Rx buffers
-            assign( iTobeCompletedBuffers, iCompletedBuffers, iCountCompleted );
-            iCountTobeCompleted = 0;
-            }
-
-        ret = ETrue;
-        }
-    else
-        {
-        // no read pending
-        // append at the rear
-        assign( 
-            reinterpret_cast<TUint32*>(&aBufferStart),
-            iTobeCompletedBuffers + iCountTobeCompleted, 
-            aNumOfBuffers );
-
-        // update the new Rx buffer start addresses added above to be 
-        // offsets from the Rx memory pool beginning
-        for( TUint i = 0; i < aNumOfBuffers; ++i )
-            {
-            TraceDump( RX_FRAME, 
-                (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"), 
-                iTobeCompletedBuffers[iCountTobeCompleted + i]) );        
-                
-            iTobeCompletedBuffers[iCountTobeCompleted + i] 
-                -= reinterpret_cast<TUint32>(iRxDataChunk);
-
-            TraceDump( RX_FRAME, 
-                (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"), 
-                iTobeCompletedBuffers[iCountTobeCompleted + i]) );        
             }
         
-        iCountTobeCompleted += aNumOfBuffers;
+        if ( iReadStatus == EPending )
+            {
+            ret = ETrue;
+            }
         }
-    
-    TraceDump( RX_FRAME, 
-        (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: end: iCountCompleted: %d"), 
-        iCountCompleted) );
-
-    TraceDump( RX_FRAME, 
-        (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: end: iCountTobeCompleted: %d"), 
-        iCountTobeCompleted) );
 
     return ret;
     }
 
 // ---------------------------------------------------------------------------
-// 
+//   
 // ---------------------------------------------------------------------------
 //
-TUint32* DataFrameMemMngr::DoGetTobeCompletedBuffersStart()
+TBool DataFrameMemMngr::OnReadRequest()
     {
-    return iTobeCompletedBuffers;
+    TBool ret( EFalse );
+
+    if ( IsMemInUse() && iFrameXferBlockProtoStack )
+        {
+        if ( iFrameXferBlockProtoStack->RxFrameAvailable() )
+            {
+            // there are Rx frames ready for the user mode client retrieval
+            ret = ETrue;
+            
+            // the frame Rx request won't be left pending as the callee will 
+            // complete it
+            iReadStatus = ENotPending;
+            }
+        else
+            {
+            // there are no Rx frames ready for the user mode client retrieval 
+            // the Rx request is left pending
+            iReadStatus = EPending;
+            }
+        }
+#ifndef NDEBUG
+    else
+        {
+        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+        }
+#endif        
+
+    TraceDump( RX_FRAME, 
+        (("WLANLDD: DataFrameMemMngr::OnReadRequest: ret (bool): %d"), 
+        ret) );
+
+    return ret;
     }
 
 // ---------------------------------------------------------------------------
-// 
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
 // ---------------------------------------------------------------------------
 //
-TUint32* DataFrameMemMngr::DoGetCompletedBuffersStart()
+TDataBuffer* DataFrameMemMngr::GetRxFrame( 
+    TDataBuffer* aFrameToFreeInUserSpace )
     {
-    return iCompletedBuffers;
+    TDataBuffer* rxFrame( NULL );
+    
+    if ( IsMemInUse() && iFrameXferBlockProtoStack )
+        {
+        if ( aFrameToFreeInUserSpace )
+            {            
+            FreeRxPacket( aFrameToFreeInUserSpace );
+            }
+        
+        rxFrame = iFrameXferBlockProtoStack->GetRxFrame();
+        }
+        
+    return rxFrame;
     }
 
 // ---------------------------------------------------------------------------
-// 
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
 // ---------------------------------------------------------------------------
 //
 TDataBuffer* DataFrameMemMngr::AllocTxBuffer( TUint aLength )
@@ -376,7 +282,10 @@
     
     TDataBuffer* metaHdr ( NULL );
 
-    if ( ( !IsMemInUse() ) || ( aLength > KMaxEthernetFrameLength ) )
+    if ( ( !IsMemInUse() ) ||
+         ( !iTxFrameMemoryPool ) ||
+         ( !iFrameXferBlockProtoStack ) ||
+         ( aLength > KMaxEthernetFrameLength ) )
         {
 #ifndef NDEBUG
         TraceDump( NWSA_TX_DETAILS, 
@@ -423,17 +332,66 @@
     }
 
 // ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
+TBool DataFrameMemMngr::AddTxFrame( 
+    TDataBuffer* aPacketInUserSpace, 
+    TDataBuffer*& aPacketInKernSpace,
+    TBool aUserDataTxEnabled )
+    {
+    if ( IsMemInUse() && iFrameXferBlockProtoStack )
+        {
+        return iFrameXferBlockProtoStack->AddTxFrame( 
+                    aPacketInUserSpace, 
+                    aPacketInKernSpace,
+                    aUserDataTxEnabled );
+        }
+    else
+        {
+        return EFalse;
+        }
+    }
+
+// ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
 //
+TDataBuffer* DataFrameMemMngr::GetTxFrame( 
+    const TWhaTxQueueState& aTxQueueState,
+    TBool& aMore )
+    {
+    if ( IsMemInUse() && iFrameXferBlockProtoStack )
+        {
+        return iFrameXferBlockProtoStack->GetTxFrame( aTxQueueState, aMore );
+        }
+    else
+        {
+        return NULL;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Note! This method is executed also in the context of the user mode client 
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
 void DataFrameMemMngr::FreeTxPacket( TDataBuffer*& aPacket )
     {
-    if ( IsMemInUse() )
+    if ( aPacket )
         {
-        // free the actual Tx buffer
-        iTxFrameMemoryPool->Free( aPacket->KeGetBufferStart() );
-        // free the meta header
-        iFrameXferBlockProtoStack->FreeTxPacket( aPacket );
+        if ( iTxFrameMemoryPool )
+            {
+            // free the actual Tx buffer
+            iTxFrameMemoryPool->Free( aPacket->KeGetBufferStart() );
+            }
+        
+        if ( iFrameXferBlockProtoStack )
+            {
+            // free the meta header
+            iFrameXferBlockProtoStack->FreeTxPacket( aPacket );
+            }
         }
     }
 
@@ -441,6 +399,39 @@
 // 
 // ---------------------------------------------------------------------------
 //
+TBool DataFrameMemMngr::ResumeClientTx( TBool aUserDataTxEnabled ) const 
+    {
+    TBool ret( EFalse );
+
+    if ( iFrameXferBlockProtoStack )
+        {
+        ret = iFrameXferBlockProtoStack->ResumeClientTx( aUserDataTxEnabled );
+        }
+    
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
+TBool DataFrameMemMngr::AllTxQueuesEmpty() const
+    {
+    TBool ret( EFalse );
+
+    if ( iFrameXferBlockProtoStack )
+        {
+        ret = iFrameXferBlockProtoStack->AllTxQueuesEmpty();
+        }
+    
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
 void DataFrameMemMngr::OnReleaseMemory( DThread& aThread )
     {
     TraceDump(INIT_LEVEL, ("WLANLDD: DataFrameMemMngr::OnReleaseMemory"));
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 24 %
+* %version: 25 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -170,8 +170,7 @@
     {
     MarkMemFree();
     
-    iFrameXferBlock = NULL;
-    iTxDataBuffer = NULL;
+    iFrameXferBlockBase = NULL;
     iRxDataChunk = NULL;
     }
 
@@ -181,79 +180,11 @@
 //
 TDataBuffer* DEthernetFrameMemMngr::OnWriteEthernetFrame() const
     {
-    if ( iTxDataBuffer->GetLength() >= sizeof( SEthernetHeader ) )
-        {
-        return iTxDataBuffer;
-        }
-    else
-        {
-        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-        return NULL;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TBool DEthernetFrameMemMngr::OnReadRequest()
-    {
-    TBool ret( EFalse );
-
-    if ( IsMemInUse() )
-        {
-        if ( iCountCompleted )
-            {
-            // free relevant buffers
-            DoFreeRxBuffers();
-            iCountCompleted = 0; // no buffers anymore in process in user mode
-            
-            // make sure that the same buffers are not tried to be
-            // freed again thru the incremental freeing method
-            iFrameXferBlock->KeAllUserSideRxBuffersFreed();
-            }
-
-        if ( iCountTobeCompleted )
-            {
-            // there are Rx buffers to be completed
-            
-            iFrameXferBlock->KeRxComplete( DoGetTobeCompletedBuffersStart(), 
-                iCountTobeCompleted );  
-            // mark the completed buffers
-            assign( DoGetTobeCompletedBuffersStart(), 
-                DoGetCompletedBuffersStart(), 
-                iCountTobeCompleted );
-            iCountCompleted = iCountTobeCompleted;
-            iCountTobeCompleted = 0;
-
-            ret = ETrue;
-             // the frame Rx request won't be pending as the callee shall 
-             // complete it
-            iReadStatus = ENotPending;
-            }
-        else
-            {
-            // there are no Rx buffers to be completed. The Rx request is
-            // left pending
-            iReadStatus = EPending;
-            }
-        }
-    else
-        {
-        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-        }
-
-    return ret;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-void DEthernetFrameMemMngr::DoMarkRxBufFree( TUint8* /*aBufferToFree*/ )
-    {
     // not supported in default handler
+#ifndef NDEBUG    
     os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif        
+    return NULL;
     }
 
 // ---------------------------------------------------------------------------
@@ -265,9 +196,9 @@
     TUint32 aDot11FrameTxOffset,
     TUint32 aSnapFrameTxOffset )
     {
-    if ( IsMemInUse() )
+    if ( IsMemInUse() && iFrameXferBlockBase )
         {
-        iFrameXferBlock->KeSetTxOffsets(
+        iFrameXferBlockBase->KeSetTxOffsets(
             aEthernetFrameTxOffset,
             aDot11FrameTxOffset,
             aSnapFrameTxOffset );
@@ -290,7 +221,7 @@
     else
         {
         // we are trying to acquire an Rx buffer but our user mode client 
-        // has not asked for the memorybuffer pool to be initialized. In this
+        // has not asked for the memory buffer pool to be initialized. In this
         // case NULL is returned, as no buffers are available
          TraceDump(RX_FRAME, 
             ("WLANLDD: DEthernetFrameMemMngr::OnGetEthernetFrameRxBuffer: not initialized => failed"));       
@@ -307,7 +238,7 @@
     {
     TDataBuffer* buffer ( NULL );
 
-    if ( IsMemInUse() )
+    if ( IsMemInUse() && iRxFrameMemoryPool )
         {
         buffer = reinterpret_cast<TDataBuffer*>(
             iRxFrameMemoryPool->Alloc( sizeof( TDataBuffer ), ETrue ) );
@@ -335,8 +266,13 @@
 //
 void DEthernetFrameMemMngr::FreeRxFrameMetaHeader( TDataBuffer* aMetaHeader )
     {
-    if ( IsMemInUse() )
+    if ( IsMemInUse() && iRxFrameMemoryPool )
         {
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: DEthernetFrameMemMngr::FreeRxFrameMetaHeader: "
+              "at addr: 0x%08x"),
+            reinterpret_cast<TUint32>(aMetaHeader)) );
+        
         iRxFrameMemoryPool->Free( aMetaHeader );
         }
     else
@@ -344,16 +280,74 @@
         // the whole Rx memory pool - including aMetaHeader - has already
         // been deallocated, so nothing is done in this case
         TraceDump( RX_FRAME, 
-            ("WLANLDD: MgmtFrameMemMngr::FreeRxFrameMetaHeader: Rx memory pool already deallocated; no action needed") );                
+            ("WLANLDD: MgmtFrameMemMngr::FreeRxFrameMetaHeader: Rx memory "
+             "pool already deallocated; no action needed") );                
         }    
     }
 
 // ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
+void DEthernetFrameMemMngr::FreeRxPacket( 
+    TDataBuffer* aFrameToFreeInUserSpace )
+    {
+    if ( IsMemInUse() && 
+         aFrameToFreeInUserSpace && 
+         iFrameXferBlockBase &&
+         iRxFrameMemoryPool )
+        {
+        TDataBuffer* frameToFreeInKernSpace ( 
+            reinterpret_cast<TDataBuffer*>(
+                reinterpret_cast<TUint8*>(
+                    aFrameToFreeInUserSpace) + 
+                iFrameXferBlockBase->UserToKernAddrOffset()) );
+        
+        // first free the actual Rx frame buffer if relevant
+        if ( frameToFreeInKernSpace->KeFlags() & 
+             TDataBuffer::KDontReleaseBuffer )
+            {
+            // this buffer shall not be freed yet, so no action here
+            
+            TraceDump( RX_FRAME, 
+                (("WLANLDD: DEthernetFrameMemMngr::FreeRxPacket: don't free "
+                  "yet Rx buf at addr: 0x%08x"),
+                reinterpret_cast<TUint32>(
+                    frameToFreeInKernSpace->KeGetBufferStart()) ) );            
+            }
+        else
+            {
+            TraceDump( RX_FRAME, 
+                (("WLANLDD: DEthernetFrameMemMngr::FreeRxPacket: free Rx buf "
+                  "at addr: 0x%08x"),
+                reinterpret_cast<TUint32>(
+                    frameToFreeInKernSpace->KeGetBufferStart()) ) );
+    
+            iRxFrameMemoryPool->Free( 
+                frameToFreeInKernSpace->KeGetBufferStart()
+                // take into account the alignment padding 
+                - iRxBufAlignmentPadding );
+            }
+        
+        // free the Rx frame meta header
+        
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: DEthernetFrameMemMngr::FreeRxPacket: "
+              "free metahdr at addr: 0x%08x"),
+            reinterpret_cast<TUint32>(frameToFreeInKernSpace)) );
+        
+        iRxFrameMemoryPool->Free( frameToFreeInKernSpace );
+        aFrameToFreeInUserSpace = NULL;
+        }
+    }
+
+// ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
 //
 TBool DEthernetFrameMemMngr::OnEthernetFrameRxComplete( 
-    const TDataBuffer*& aBufferStart, 
+    TDataBuffer*& aBufferStart, 
     TUint32 aNumOfBuffers )
     {
     TBool ret( EFalse );
@@ -394,10 +388,22 @@
     }
 
 // ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+void DEthernetFrameMemMngr::DoMarkRxBufFree( TUint8* /*aBufferToFree*/ )
+    {
+    // not suported in this default implementation 
+#ifndef NDEBUG    
+    os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif    
+    }
+
+// ---------------------------------------------------------------------------
 // This default implementation always returns NULL
 // ---------------------------------------------------------------------------
 //
-TDataBuffer* DEthernetFrameMemMngr::AllocTxBuffer( TUint aLength )
+TDataBuffer* DEthernetFrameMemMngr::AllocTxBuffer( TUint /*aLength*/ )
     {
     return NULL;
     }
@@ -407,22 +413,16 @@
 // ---------------------------------------------------------------------------
 //
 TBool DEthernetFrameMemMngr::AddTxFrame( 
-    TDataBuffer* aPacketInUserSpace, 
-    TDataBuffer*& aPacketInKernSpace,
-    TBool aUserDataTxEnabled )
+    TDataBuffer* /*aPacketInUserSpace*/, 
+    TDataBuffer*& /*aPacketInKernSpace*/,
+    TBool /*aUserDataTxEnabled*/ )
     {
-    if ( IsMemInUse() )
-        {
-        return (static_cast<RFrameXferBlockProtocolStack*>(
-            iFrameXferBlock))->AddTxFrame( 
-                aPacketInUserSpace, 
-                aPacketInKernSpace,
-                aUserDataTxEnabled );
-        }
-    else
-        {
-        return EFalse;
-        }
+    // not suported in this default implementation 
+#ifndef NDEBUG    
+    os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+    
+    return EFalse;
     }
 
 // ---------------------------------------------------------------------------
@@ -430,18 +430,15 @@
 // ---------------------------------------------------------------------------
 //
 TDataBuffer* DEthernetFrameMemMngr::GetTxFrame( 
-    const TWhaTxQueueState& aTxQueueState,
-    TBool& aMore )
+    const TWhaTxQueueState& /*aTxQueueState*/,
+    TBool& /*aMore*/ )
     {
-    if ( IsMemInUse() && iFrameXferBlock )
-        {
-        return (static_cast<RFrameXferBlockProtocolStack*>(
-            iFrameXferBlock))->GetTxFrame( aTxQueueState, aMore );
-        }
-    else
-        {
-        return NULL;
-        }
+    // not suported in this default implementation 
+#ifndef NDEBUG    
+    os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+    
+    return NULL;
     }
 
 // ---------------------------------------------------------------------------
@@ -451,17 +448,24 @@
 void DEthernetFrameMemMngr::FreeTxPacket( TDataBuffer*& /*aPacket*/ )
     {
     // not suported in this default implementation 
+#ifndef NDEBUG    
     os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
     }
 
 // ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
 //
-TBool DEthernetFrameMemMngr::ResumeClientTx( TBool aUserDataTxEnabled ) const 
+TBool DEthernetFrameMemMngr::ResumeClientTx( 
+    TBool /*aUserDataTxEnabled*/ ) const 
     {
-    return (static_cast<RFrameXferBlockProtocolStack*>(
-        iFrameXferBlock))->ResumeClientTx( aUserDataTxEnabled );
+    // not suported in this default implementation 
+#ifndef NDEBUG    
+    os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+    
+    return EFalse;
     }
 
 // ---------------------------------------------------------------------------
@@ -470,6 +474,10 @@
 //
 TBool DEthernetFrameMemMngr::AllTxQueuesEmpty() const
     {
-    return (static_cast<RFrameXferBlockProtocolStack*>(
-            iFrameXferBlock))->AllTxQueuesEmpty();
+    // not suported in this default implementation 
+#ifndef NDEBUG    
+    os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+    
+    return EFalse;
     }
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/FrameXferBlock.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/FrameXferBlock.cpp	Thu May 27 14:33:33 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: 16 %
+* %version: 17 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -32,83 +32,12 @@
 //
 void RFrameXferBlockBase::KeInitialize()
     {
-    iRxDataChunk = NULL;
-
-    for ( TUint32 i = 0; i < KMaxCompletedRxBufs; ++i )
-        {
-        iRxCompletedBuffers[i] = 0;
-        }
+    iThisAddrKernelSpace = reinterpret_cast<TUint32>(this);
 
     for ( TUint j = 0; j < TDataBuffer::KFrameTypeMax; ++j )
         {
         iTxOffset[j] = 0;
         }
-
-    iNumOfCompleted = 0;
-    iCurrentRxBuffer = 0;
-    iFirstRxBufferToFree = 0;    
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-void RFrameXferBlockBase::KeRxComplete( 
-    const TUint32* aRxCompletionBuffersArray, 
-    TUint32 aNumOfCompleted )
-    {
-    if ( aNumOfCompleted > KMaxCompletedRxBufs )
-        {
-        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-        }
-
-    assign( aRxCompletionBuffersArray, iRxCompletedBuffers, aNumOfCompleted );
-    iNumOfCompleted = aNumOfCompleted;
-    iCurrentRxBuffer = 0;
-    iFirstRxBufferToFree = 0;
-
-    for ( TUint i = 0; i < iNumOfCompleted; ++i )
-        {
-        TraceDump( RX_FRAME, 
-            (("WLANLDD: RFrameXferBlockBase::KeRxComplete: completed offset addr: 0x%08x"), 
-            iRxCompletedBuffers[i]) );
-        }    
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-void RFrameXferBlockBase::KeGetHandledRxBuffers( 
-    const TUint32*& aRxHandledBuffersArray, 
-    TUint32& aNumOfHandled )
-    { 
-    TUint32 numHandled ( iCurrentRxBuffer - iFirstRxBufferToFree );
-
-    // make sure that if an Rx buffer is currently being processed by the user
-    // side client, that buffer is not regarded as being already handled
-    numHandled = numHandled ? numHandled - 1 : numHandled;
-    
-    if ( numHandled )
-        {
-        aRxHandledBuffersArray = &(iRxCompletedBuffers[iFirstRxBufferToFree]);
-        aNumOfHandled = numHandled;
-        
-        iFirstRxBufferToFree += numHandled;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-void RFrameXferBlockBase::KeAllUserSideRxBuffersFreed()
-    {
-    iFirstRxBufferToFree = 0;
-    // need to reset also the current index, so that the difference of these
-    // two indexes is zero, and it then correctly indicates, that there are no
-    // Rx buffers which could be freed incrementally
-    iCurrentRxBuffer = 0;
     }
 
 // ---------------------------------------------------------------------------
@@ -133,17 +62,110 @@
         }
     }
 
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+void RFrameXferBlock::Initialize( TUint32 aTxBufLength )
+    {
+    // perform base class initialization first
+    KeInitialize();
+    
+    iTxDataBuffer = NULL;
+    iTxBufLength = aTxBufLength;
+    
+    iRxQueueFront = NULL;
+    iRxQueueRear = NULL;
+    }
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
 //
-void RFrameXferBlockProtocolStack::Initialise()
+void RFrameXferBlock::AddRxFrame( TDataBuffer* aFrame )
+    {
+    if ( aFrame )
+        {
+        aFrame->iNext = NULL;
+    
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlock::AddRxFrame: "
+              "add to queue metahdr addr: 0x%08x"), 
+            aFrame));
+        
+        if ( iRxQueueRear )
+            {
+            iRxQueueRear->iNext = aFrame;
+            iRxQueueRear = aFrame;
+            }
+        else
+            {
+            iRxQueueFront = aFrame;
+            iRxQueueRear = aFrame;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
+// -----------------------------------------------------------------------------
+//
+TDataBuffer* RFrameXferBlock::GetRxFrame()
+    {
+    TDataBuffer* aPacketInKernSpace( NULL );
+
+    if ( iRxQueueFront )
+        {
+        aPacketInKernSpace = iRxQueueFront;
+        
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlock::GetRxFrame: "
+              "krn metahdr addr: 0x%08x"), 
+            reinterpret_cast<TUint32>(aPacketInKernSpace)));
+        
+        iRxQueueFront = iRxQueueFront->iNext;
+        
+        if ( !iRxQueueFront )
+            {
+            // the queue became empty
+            iRxQueueRear = NULL;
+            }
+        
+        return reinterpret_cast<TDataBuffer*>(
+                   reinterpret_cast<TUint8*>(aPacketInKernSpace) 
+                   - iUserToKernAddrOffset);
+        }
+    else
+        {
+        // the Rx queue is empty
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlock::GetRxFrame: "
+              "no frames available")));
+        
+        // return NULL
+        return aPacketInKernSpace;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+TBool RFrameXferBlock::RxFrameAvailable() const
+    {
+    return reinterpret_cast<TBool>( iRxQueueFront );
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void RFrameXferBlockProtocolStack::Initialize()
     {
     // perform base class initialization
     KeInitialize();
     
-    iThisAddrKernelSpace = reinterpret_cast<TUint32>(this);
-    
     iVoiceTxQueue.DoInit();
     iVideoTxQueue.DoInit();
     iBestEffortTxQueue.DoInit();
@@ -161,10 +183,23 @@
         
         iFreeQueue.PutPacket( &iDataBuffers[i] );
         }
+    
+    iVoiceRxQueueFront = NULL;
+    iVoiceRxQueueRear = NULL;
+
+    iVideoRxQueueFront = NULL;
+    iVideoRxQueueRear = NULL;
+    
+    iBestEffortRxQueueFront = NULL;
+    iBestEffortRxQueueRear = NULL;
+    
+    iBackgroundRxQueueFront = NULL;
+    iBackgroundRxQueueRear = NULL;
     }
 
 // -----------------------------------------------------------------------------
-// 
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
 // -----------------------------------------------------------------------------
 //
 TDataBuffer* RFrameXferBlockProtocolStack::AllocTxBuffer( 
@@ -209,7 +244,8 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
 // -----------------------------------------------------------------------------
 //
 TBool RFrameXferBlockProtocolStack::AddTxFrame( 
@@ -219,6 +255,15 @@
     {
     TBool ret( ETrue );
     aPacketInKernSpace = NULL;
+
+    if ( !aPacketInUserSpace )
+        {
+#ifndef NDEBUG
+        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif        
+        return ETrue;
+        }
+    
     TDataBuffer* metaHdrInKernSpace ( reinterpret_cast<TDataBuffer*>(
         reinterpret_cast<TUint8*>(aPacketInUserSpace) + iUserToKernAddrOffset) );
     
@@ -455,6 +500,197 @@
 // 
 // -----------------------------------------------------------------------------
 //
+void RFrameXferBlockProtocolStack::AddRxFrame( TDataBuffer* aFrame )
+    {
+    if ( !aFrame )
+        {
+#ifndef NDEBUG
+        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif        
+        return;
+        }
+    
+    aFrame->iNext = NULL;
+
+    if ( aFrame->UserPriority() == 7 || aFrame->UserPriority() == 6 )
+        {
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlockProtocolStack::AddRxFrame: "
+              "add to VO queue metahdr addr: 0x%08x"), 
+            aFrame));
+        
+        if ( iVoiceRxQueueRear )
+            {
+            iVoiceRxQueueRear->iNext = aFrame;
+            iVoiceRxQueueRear = aFrame;
+            }
+        else
+            {
+            iVoiceRxQueueFront = aFrame;
+            iVoiceRxQueueRear = aFrame;
+            }
+        }
+    else if ( aFrame->UserPriority() == 5 || aFrame->UserPriority() == 4 )
+        {
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlockProtocolStack::AddRxFrame: "
+              "add to VI queue metahdr addr: 0x%08x"), 
+            aFrame));
+        
+        if ( iVideoRxQueueRear )
+            {
+            iVideoRxQueueRear->iNext = aFrame;
+            iVideoRxQueueRear = aFrame;
+            }
+        else
+            {
+            iVideoRxQueueFront = aFrame;
+            iVideoRxQueueRear = aFrame;
+            }
+        }
+    else if ( aFrame->UserPriority() == 2 || aFrame->UserPriority() == 1 )
+        {
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlockProtocolStack::AddRxFrame: "
+              "add to BG queue metahdr addr: 0x%08x"), 
+            aFrame));
+        
+        if ( iBackgroundRxQueueRear )
+            {
+            iBackgroundRxQueueRear->iNext = aFrame;
+            iBackgroundRxQueueRear = aFrame;
+            }
+        else
+            {
+            iBackgroundRxQueueFront = aFrame;
+            iBackgroundRxQueueRear = aFrame;
+            }
+        }
+    else 
+        {
+        // user priority is 3 or 0 or invalid
+
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlockProtocolStack::AddRxFrame: "
+              "add to BE queue metahdr addr: 0x%08x"), 
+            aFrame));
+        
+        if ( iBestEffortRxQueueRear )
+            {
+            iBestEffortRxQueueRear->iNext = aFrame;
+            iBestEffortRxQueueRear = aFrame;
+            }
+        else
+            {
+            iBestEffortRxQueueFront = aFrame;
+            iBestEffortRxQueueRear = aFrame;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
+// -----------------------------------------------------------------------------
+//
+TDataBuffer* RFrameXferBlockProtocolStack::GetRxFrame()
+    {
+    TDataBuffer* aPacketInKernSpace( NULL );
+
+    if ( iVoiceRxQueueFront )
+        {
+        aPacketInKernSpace = iVoiceRxQueueFront;
+        
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlockProtocolStack::GetRxFrame: from VO "
+              "queue; krn metahdr addr: 0x%08x"), 
+            reinterpret_cast<TUint32>(aPacketInKernSpace)));
+        
+        iVoiceRxQueueFront = iVoiceRxQueueFront->iNext;
+        
+        if ( !iVoiceRxQueueFront )
+            {
+            // the queue became empty
+            iVoiceRxQueueRear = NULL;
+            }
+        }
+    else if ( iVideoRxQueueFront )
+        {
+        aPacketInKernSpace = iVideoRxQueueFront;
+        
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlockProtocolStack::GetRxFrame: from VI "
+              "queue; krn metahdr addr: 0x%08x"), 
+            reinterpret_cast<TUint32>(aPacketInKernSpace)));
+        
+        iVideoRxQueueFront = iVideoRxQueueFront->iNext;
+        
+        if ( !iVideoRxQueueFront )
+            {
+            // the queue became empty        
+            iVideoRxQueueRear = NULL;
+            }
+        }
+    else if ( iBestEffortRxQueueFront )
+        {
+        aPacketInKernSpace = iBestEffortRxQueueFront;
+        
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlockProtocolStack::GetRxFrame: from BE "
+              "queue; krn metahdr addr: 0x%08x"), 
+            reinterpret_cast<TUint32>(aPacketInKernSpace)));
+        
+        iBestEffortRxQueueFront = iBestEffortRxQueueFront->iNext;
+        
+        if ( !iBestEffortRxQueueFront )
+            {
+            // the queue became empty        
+            iBestEffortRxQueueRear = NULL;
+            }
+        }
+    else if ( iBackgroundRxQueueFront )
+        {
+        aPacketInKernSpace = iBackgroundRxQueueFront;
+        
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlockProtocolStack::GetRxFrame: from BG "
+              "queue; krn metahdr addr: 0x%08x"), 
+            reinterpret_cast<TUint32>(aPacketInKernSpace)));
+        
+        iBackgroundRxQueueFront = iBackgroundRxQueueFront->iNext;
+        
+        if ( !iBackgroundRxQueueFront )
+            {
+            // the queue became empty
+            iBackgroundRxQueueRear = NULL;
+            }
+        }
+    else
+        {
+        // all Rx queues are empty; no action
+        }
+    
+    if ( aPacketInKernSpace )
+        {
+        return reinterpret_cast<TDataBuffer*>(
+                   reinterpret_cast<TUint8*>(aPacketInKernSpace) 
+                   - iUserToKernAddrOffset);
+        }
+    else
+        {
+        TraceDump( RX_FRAME, 
+            (("WLANLDD: RFrameXferBlockProtocolStack::GetRxFrame: "
+              "no frames available")));
+        
+        // return NULL
+        return aPacketInKernSpace;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
 TBool RFrameXferBlockProtocolStack::TxPossible(
     const TWhaTxQueueState& aWhaTxQueueState,
     TQueueId& aQueueId )
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/MgmtFrameMemMngr.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/MgmtFrameMemMngr.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 20 %
+* %version: 21 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -226,6 +226,8 @@
                     + KMgmtSideTxBufferLength 
                     + KProtocolStackSideTxDataChunkSize );
 
+                iFrameXferBlockBase = iFrameXferBlock;
+                
                 TraceDump( INIT_LEVEL, 
                     (("WLANLDD: MgmtFrameMemMngr::DoOpenHandle: Engine RFrameXferBlock addr: 0x%08x"),
                     reinterpret_cast<TUint32>(iFrameXferBlock) ) );
@@ -275,55 +277,6 @@
     TraceDump( RX_FRAME, 
         ("WLANLDD: MgmtFrameMemMngr::DoGetNextFreeRxBuffer") );
 
-    // if there are any Rx buffers which have been handled and
-    // can already be re-used, free them first
-    
-    const TUint32* rxHandledBuffersArray ( NULL );
-    TUint32 numOfHandled ( 0 );
-    
-    iFrameXferBlock->KeGetHandledRxBuffers(
-        rxHandledBuffersArray, 
-        numOfHandled );
-
-    if ( numOfHandled )
-        {
-        // there are buffers which can be freed, so free them
-        for ( TUint i = 0; i < numOfHandled; ++i )
-            {
-            // first free the actual Rx frame buffer
-
-            TraceDump( RX_FRAME, 
-                (("WLANLDD: MgmtFrameMemMngr::DoGetNextFreeRxBuffer: free Rx buf at addr: 0x%08x"),
-                reinterpret_cast<TUint32>(reinterpret_cast<TDataBuffer*>(
-                    iRxDataChunk 
-                    + rxHandledBuffersArray[i])->KeGetBufferStart()) ) );
-
-            iRxFrameMemoryPool->Free( 
-                reinterpret_cast<TDataBuffer*>(
-                    iRxDataChunk + rxHandledBuffersArray[i])->KeGetBufferStart()
-                    // take into account the alignment padding 
-                    - iRxBufAlignmentPadding );
-            
-            // then free the Rx frame meta header
-
-            TraceDump( RX_FRAME, 
-                (("WLANLDD: MgmtFrameMemMngr::DoGetNextFreeRxBuffer: free Rx meta header at addr: 0x%08x"),
-                reinterpret_cast<TUint32>( iRxDataChunk + rxHandledBuffersArray[i])) );
-
-            iRxFrameMemoryPool->Free( iRxDataChunk + rxHandledBuffersArray[i] );
-            }
-
-        // remove the buffers we freed above from the completed buffers of this
-        // object so that they are not tried to be freed again once the Mgmt
-        // Client issues the next Rx request
-
-        iCountCompleted -= numOfHandled;
-        assign( 
-            iCompletedBuffers + numOfHandled, 
-            iCompletedBuffers, 
-            iCountCompleted );
-        }
-
     // reserve a new Rx buffer. 
     
     TUint8* buffer ( NULL );
@@ -366,131 +319,33 @@
 // ---------------------------------------------------------------------------
 //
 TBool MgmtFrameMemMngr::DoEthernetFrameRxComplete( 
-    const TDataBuffer*& aBufferStart, 
+    TDataBuffer*& aBufferStart, 
     TUint32 aNumOfBuffers )
     {
     TraceDump( RX_FRAME, 
-        (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: aNumOfBuffers: %d"), 
+        (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: "
+          "aNumOfBuffers: %d"), 
         aNumOfBuffers) );
 
-    if ( aNumOfBuffers + iCountTobeCompleted > KMaxToBeCompletedRxBufs )
-        {
-        // too little space reserved for Rx buffer handles
-        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-        }
-
     TBool ret( EFalse );
-
-    if ( iReadStatus == EPending )
-        {
-        // read pending
-        if ( !iCountTobeCompleted )
-            {
-            // no existing Rx buffers to complete in queue
-            // we may complete these ones on the fly
-
-            // note the completed Rx buffers first so that we can change
-            // their addresses to offsets
-            assign( 
-                reinterpret_cast<TUint32*>(&aBufferStart), 
-                iCompletedBuffers, 
-                aNumOfBuffers );
-
-            // update the new Rx buffer start addresses added above to be 
-            // offsets from the Rx memory pool beginning
-            for( TUint i = 0; i < aNumOfBuffers; ++i )
-                {
-                TraceDump( RX_FRAME, 
-                    (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"), 
-                    iCompletedBuffers[i]) );        
-                
-                iCompletedBuffers[i] 
-                    -= reinterpret_cast<TUint32>(iRxDataChunk);
-
-                TraceDump( RX_FRAME, 
-                    (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"), 
-                    iCompletedBuffers[i]) );        
-                }
-
-            iCountCompleted = aNumOfBuffers;
-
-            iFrameXferBlock->KeRxComplete( iCompletedBuffers, iCountCompleted);
-            }
-        else
-            {
-            // existing rx buffers to complete in queue.
-            // We must append these at the rear and after that 
-            // complete the existing read request
-            assign( 
-                reinterpret_cast<TUint32*>(&aBufferStart),
-                iTobeCompletedBuffers + iCountTobeCompleted, 
-                aNumOfBuffers );
+    TDataBuffer** metaHdrPtrArray(&aBufferStart);
 
-            // update the new Rx buffer start addresses added above to be 
-            // offsets from the Rx memory pool beginning
-            for( TUint i = 0; i < aNumOfBuffers; ++i )
+    if ( iFrameXferBlock )
+        {
+        for ( TUint i = 0; i < aNumOfBuffers; ++i )
+            {
+            if ( metaHdrPtrArray[i] )
                 {
-                TraceDump( RX_FRAME, 
-                    (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"), 
-                    iTobeCompletedBuffers[iCountTobeCompleted + i]) );
-
-                iTobeCompletedBuffers[iCountTobeCompleted + i] 
-                    -= reinterpret_cast<TUint32>(iRxDataChunk);
-
-                TraceDump( RX_FRAME, 
-                    (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"), 
-                    iTobeCompletedBuffers[iCountTobeCompleted + i]) );
+                iFrameXferBlock->AddRxFrame( metaHdrPtrArray[i] );
                 }
-
-            iCountCompleted = iCountTobeCompleted + aNumOfBuffers;
-
-            iFrameXferBlock->KeRxComplete( 
-                iTobeCompletedBuffers, 
-                iCountCompleted );  
-
-            // note the completed Rx buffers
-            assign( iTobeCompletedBuffers, iCompletedBuffers, iCountCompleted );
-            iCountTobeCompleted = 0;
-            }
-
-        ret = ETrue;
-        }
-    else
-        {
-        // no read pending
-        // append at the rear
-        assign( 
-            reinterpret_cast<TUint32*>(&aBufferStart),
-            iTobeCompletedBuffers + iCountTobeCompleted, 
-            aNumOfBuffers );
-
-        // update the new Rx buffer start addresses added above to be 
-        // offsets from the Rx memory pool beginning
-        for( TUint i = 0; i < aNumOfBuffers; ++i )
-            {
-            TraceDump( RX_FRAME, 
-                (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"), 
-                iTobeCompletedBuffers[iCountTobeCompleted + i]) );        
-                
-            iTobeCompletedBuffers[iCountTobeCompleted + i] 
-                -= reinterpret_cast<TUint32>(iRxDataChunk);
-
-            TraceDump( RX_FRAME, 
-                (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"), 
-                iTobeCompletedBuffers[iCountTobeCompleted + i]) );        
             }
         
-        iCountTobeCompleted += aNumOfBuffers;
+        if ( iReadStatus == EPending )
+            {
+            ret = ETrue;
+            }
         }
 
-    TraceDump( RX_FRAME, 
-        (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: end: iCountCompleted: %d"), 
-        iCountCompleted) );
-
-    TraceDump( RX_FRAME, 
-        (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: end: iCountTobeCompleted: %d"), 
-        iCountTobeCompleted) );
-
     return ret;
     }
 
@@ -498,72 +353,13 @@
 // 
 // ---------------------------------------------------------------------------
 //
-TUint32* MgmtFrameMemMngr::DoGetTobeCompletedBuffersStart()
-    {
-    return iTobeCompletedBuffers;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TUint32* MgmtFrameMemMngr::DoGetCompletedBuffersStart()
-    {
-    return iCompletedBuffers;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-void MgmtFrameMemMngr::DoFreeRxBuffers()
-    {
-    if ( IsMemInUse() )
-        {
-        for ( TUint i = 0; i < iCountCompleted; ++i )
-            {
-            TDataBuffer* metaHdr ( reinterpret_cast<TDataBuffer*>(
-                    iRxDataChunk + iCompletedBuffers[i]) );  
-            
-            // first free the actual Rx frame buffer
-            TraceDump( RX_FRAME, 
-                (("WLANLDD: MgmtFrameMemMngr::DoFreeRxBuffers: free Rx buf at addr: 0x%08x"),
-                reinterpret_cast<TUint32>(metaHdr->KeGetBufferStart()) ) );
-    
-            iRxFrameMemoryPool->Free( 
-                metaHdr->KeGetBufferStart()
-                // take into account the alignment padding 
-                - iRxBufAlignmentPadding );                            
-            
-            // free the Rx frame meta header
-    
-            TraceDump( RX_FRAME, 
-                (("WLANLDD: MgmtFrameMemMngr::DoFreeRxBuffers: free Rx meta header at addr: 0x%08x"),
-                reinterpret_cast<TUint32>(metaHdr)) );
-    
-            iRxFrameMemoryPool->Free( metaHdr );        
-            }
-        }
-    else
-        {
-        // the whole Rx memory pool has already been deallocated, so nothing 
-        // is done in this case
-        TraceDump( RX_FRAME, 
-            ("WLANLDD: MgmtFrameMemMngr::DoFreeRxBuffers: Rx memory pool already deallocated; no action needed") );        
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
 void MgmtFrameMemMngr::DoMarkRxBufFree( TUint8* aBufferToFree )
     {
     TraceDump( RX_FRAME, 
         (("WLANLDD: MgmtFrameMemMngr::DoMarkRxBufFree: free Rx buf at addr: 0x%08x"),
         reinterpret_cast<TUint32>(aBufferToFree) ) );
 
-    if ( IsMemInUse() )
+    if ( IsMemInUse() && iRxFrameMemoryPool )
         {
         iRxFrameMemoryPool->Free( 
             aBufferToFree
@@ -575,25 +371,117 @@
         // the whole Rx memory pool - including aBufferToFree - has already
         // been deallocated, so nothing is done in this case
         TraceDump( RX_FRAME, 
-            ("WLANLDD: MgmtFrameMemMngr::DoMarkRxBufFree: Rx memory pool already deallocated; no action needed") );                
+            ("WLANLDD: MgmtFrameMemMngr::DoMarkRxBufFree: Rx memory pool already "
+             "deallocated; no action needed") );                
         }    
     }
 
 // ---------------------------------------------------------------------------
+//  
+// ---------------------------------------------------------------------------
+//
+TBool MgmtFrameMemMngr::OnReadRequest()
+    {
+    TBool ret( EFalse );
+
+    if ( IsMemInUse() && iFrameXferBlock )
+        {
+        if ( iFrameXferBlock->RxFrameAvailable() )
+            {
+            // there are Rx frames ready for the user mode client retrieval
+            ret = ETrue;
+            
+            // the frame Rx request won't be left pending as the callee will 
+            // complete it
+            iReadStatus = ENotPending;
+            }
+        else
+            {
+            // there are no Rx frames ready for the user mode client retrieval 
+            // the Rx request is left pending
+            iReadStatus = EPending;
+            }
+        }
+#ifndef NDEBUG
+    else
+        {
+        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+        }
+#endif        
+
+    TraceDump( RX_FRAME, 
+        (("WLANLDD: MgmtFrameMemMngr::OnReadRequest: ret (bool): %d"), 
+        ret) );
+
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
+TDataBuffer* MgmtFrameMemMngr::GetRxFrame( 
+    TDataBuffer* aFrameToFreeInUserSpace )
+    {
+    TDataBuffer* rxFrame( NULL );
+    
+    if ( IsMemInUse() && iFrameXferBlock )
+        {
+        if ( aFrameToFreeInUserSpace )
+            {
+            FreeRxPacket( aFrameToFreeInUserSpace );
+            }
+        
+        rxFrame = iFrameXferBlock->GetRxFrame();
+        }
+        
+    return rxFrame;
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+TDataBuffer* MgmtFrameMemMngr::OnWriteEthernetFrame() const
+    {
+    if ( iTxDataBuffer &&
+         ( iTxDataBuffer->GetLength() >= sizeof( SEthernetHeader ) ) )
+        {
+        return iTxDataBuffer;
+        }
+    else
+        {
+#ifndef NDEBUG    
+        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif        
+        return NULL;
+        }
+    }
+
+// ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
 //
 TInt MgmtFrameMemMngr::RxBufAlignmentPadding() const
     {
-    const TInt KMemMgrHdrLen = iRxFrameMemoryPool->HeaderSize();
-    const TInt KRemainder ( KMemMgrHdrLen % iRxFrameBufAllocationUnit );
-    TInt padding = KRemainder ? 
-        ( iRxFrameBufAllocationUnit - KRemainder ) : KRemainder;
+    if ( iRxFrameMemoryPool )
+        {
+        const TInt KMemMgrHdrLen = iRxFrameMemoryPool->HeaderSize();
+        const TInt KRemainder ( KMemMgrHdrLen % iRxFrameBufAllocationUnit );
+        TInt padding = KRemainder ? 
+            ( iRxFrameBufAllocationUnit - KRemainder ) : KRemainder;
+            
+        TraceDump(INIT_LEVEL, (("WLANLDD: MgmtFrameMemMngr::RxBufAlignmentPadding: %d"), 
+            padding));
         
-    TraceDump(INIT_LEVEL, (("WLANLDD: MgmtFrameMemMngr::RxBufAlignmentPadding: %d"), 
-        padding));
-    
-    return padding;
+        return padding;
+        }
+    else
+        {
+        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+        return 0;
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -634,5 +522,5 @@
         Kern::ChunkClose( iParent.SharedMemoryChunk() );
         iParent.SharedMemoryChunk() = NULL;
         MarkMemFree();
-        }    
+        }
     }
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WLanLogicalDevice.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WLanLogicalDevice.cpp	Thu May 27 14:33:33 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: 18 %
+* %version: 19 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -44,7 +44,7 @@
 #else        
     DWlanLogicalDevice* logicalDevice( new DWlanLogicalDevice );
 
-    if ( !(logicalDevice->IsValid()) )
+    if ( logicalDevice && !(logicalDevice->IsValid()) )
         {
         // something went wrong
         delete logicalDevice;
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WlanLogicalChannel.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WlanLogicalChannel.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 59 %
+* %version: 60 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -41,7 +41,8 @@
 const TUint32 KDmaTxMemSize = 4096; // equals to 1 MMU page on most systems
 
 // ---------------------------------------------------------------------------
-// 
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
 // ---------------------------------------------------------------------------
 //
 #ifndef RD_WLAN_DDK
@@ -271,6 +272,9 @@
     }
 
 // ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
+//
 // If an error occurs in this method, we set iPdd to NULL to prevent 
 // PDD object destruction in base class (DLogicalChannelBase) destructor.
 // DLogicalChannelBase destructor gets called as this logical channel instance
@@ -606,10 +610,11 @@
     
 
 // ---------------------------------------------------------------------------
-// 
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
 // ---------------------------------------------------------------------------
 //
-TAny* DWlanLogicalChannel::DoControlFast( TInt aFunction, TAny* param )
+TAny* DWlanLogicalChannel::DoControlFast( TInt aFunction, TAny* aParam )
     {
     TAny* ret( NULL );
     TBool triggerTx ( EFalse );    
@@ -621,9 +626,6 @@
         iClient));
     TraceDump(WLM_CMD_DETAILS, (("WLANLDD: function: 0x%x"), aFunction));
     
-    // Note! We are executing in the context of the client's thread, but
-    // in supervisor mode
-    
     // acquire mutex
     // Enter critical section before requesting the mutex as
     // we are executing in the context of a user mode thread
@@ -638,70 +640,24 @@
     TraceDump(MUTEX, 
         (("WLANLDD: DWlanLogicalChannel::DoControlFast: mutex acquired")));
     
-    switch ( aFunction )
+    if ( iUnit == KUnitWlan )
+        {
+        ret = OnMgmtSideControlFast( aFunction, aParam );
+        }
+    else if ( iUnit == KUnitEthernet )
         {
-        case RPcmNetCardIf::EControlFastAllocTxBuffer:
-            ret = iEthernetFrameMemMngr->AllocTxBuffer(
-                reinterpret_cast<TUint>(param) );
-            
-            if ( !ret && iAddTxFrameAllowed )
-                {
-                iAddTxFrameAllowed = EFalse;
-                
-                TraceDump( NWSA_TX, 
-                    ("WLANLDD: DWlanLogicalChannel::DoControlFast: stop flow from protocol stack") );        
-                }
-            break;
-            
-        case RPcmNetCardIf::EControlFastAddTxFrame:
-            {
-#ifndef NDEBUG
-            if ( !iAddTxFrameAllowed )
-                {
-                TraceDump(ERROR_LEVEL, 
-                    ("WLANLDD: DWlanLogicalChannel::DoControlFast: WARNING: AddTxFrame req. when flow ctrl is on"));
-                }
+        ret = OnEthernetSideControlFast( aFunction, aParam, triggerTx );
+        }
+    else
+        {
+        // unknown unit
+#ifndef NDEBUG            
+        TraceDump(ERROR_LEVEL, 
+            ("WLANLDD: DWlanLogicalChannel::DoControlFast: unknown unit"));
+        TraceDump(ERROR_LEVEL, (("WLANLDD: aFunction: %d"), aFunction));
+        TraceDump(ERROR_LEVEL, (("WLANLDD: unit: %d"), iUnit));
+        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
 #endif
-            if ( iEthernetFrameMemMngr->AllTxQueuesEmpty() )
-                {
-                triggerTx = ETrue;
-                }
-            
-            TDataBuffer* discardFrame ( NULL );
-            
-            ret = reinterpret_cast<TAny*>(iEthernetFrameMemMngr->AddTxFrame( 
-                reinterpret_cast<TDataBuffer*>(param),
-                discardFrame,
-                iUmac.UserDataTxEnabled() ));
-            
-            if ( discardFrame )
-                {
-                TraceDump( NWSA_TX_DETAILS, 
-                    (("WLANLDD: DWlanLogicalChannel::DoControlFast: have to drop tx frame of UP: %d"),
-                    reinterpret_cast<TDataBuffer*>(param)->UserPriority()) );
-                
-                iEthernetFrameMemMngr->FreeTxPacket( discardFrame );
-                }
-                
-            if ( !ret )
-                {
-                iAddTxFrameAllowed = EFalse;
-
-                TraceDump( NWSA_TX, 
-                    ("WLANLDD: DWlanLogicalChannel::DoControlFast: stop flow from protocol stack") );        
-                }
-            break;
-            }
-        default:
-#ifndef NDEBUG
-            TraceDump(ERROR_LEVEL, (("WLANLDD: unknown request: %d"), 
-                aFunction));
-            os_assert( 
-                (TUint8*)("WLANLDD: panic"), 
-                (TUint8*)(WLAN_FILE), 
-                __LINE__ );            
-#endif
-            break;
         }
     
     // release mutex
@@ -728,7 +684,7 @@
         // the lower priority thread will get paused and the higher priority 
         // thread will get scheduled (to execute the DFC), we don't want the 
         // higher priority thread to need to wait for the mutex. So we 
-        // released the mutex first in this code block and after that enque 
+        // released the mutex first in this code block and after that enqueue 
         // the DFC request.
         if ( !( iFlags & KTxTriggerArmed ) )
             {
@@ -741,6 +697,162 @@
     }
 
 // ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
+TAny* DWlanLogicalChannel::OnMgmtSideControlFast( 
+    TInt aFunction, 
+    TAny* aParam )
+    {
+    TAny* ret( NULL );
+    
+    switch ( aFunction )
+        {
+        // ==========================================================
+        // Get Rx frame
+        // ==========================================================        
+        case RWlanLogicalChannel::EWlanControlFastGetRxFrame:
+            if ( iEthernetFrameMemMngr )
+                {
+                ret = iEthernetFrameMemMngr->GetRxFrame( 
+                        reinterpret_cast<TDataBuffer*>(aParam) );
+                }
+            break;
+        // ==========================================================
+        // Unknown request
+        // ==========================================================        
+        default:
+#ifndef NDEBUG
+            TraceDump(ERROR_LEVEL, (("WLANLDD: unknown request: %d"), 
+                aFunction));
+            os_assert( 
+                (TUint8*)("WLANLDD: panic"), 
+                (TUint8*)(WLAN_FILE), 
+                __LINE__ );
+#endif
+            break;
+        }
+    
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
+TAny* DWlanLogicalChannel::OnEthernetSideControlFast( 
+    TInt aFunction, 
+    TAny* aParam,
+    TBool& aTriggerTx )
+    {
+    TAny* ret( NULL );    
+    aTriggerTx = EFalse;
+    
+    switch ( aFunction )
+        {
+        // ==========================================================
+        // Alloc Tx buffer
+        // ==========================================================        
+        case RPcmNetCardIf::EControlFastAllocTxBuffer:
+            if ( iEthernetFrameMemMngr )
+                {
+                ret = iEthernetFrameMemMngr->AllocTxBuffer(
+                    reinterpret_cast<TUint>(aParam) );
+                }
+            
+            if ( !ret && iAddTxFrameAllowed )
+                {
+                iAddTxFrameAllowed = EFalse;
+                
+                TraceDump( NWSA_TX, 
+                    ("WLANLDD: DWlanLogicalChannel::OnEthernetSideControlFast: "
+                     "stop flow from protocol stack") );        
+                }
+            break;            
+        // ==========================================================
+        // Add Tx frame
+        // ==========================================================        
+        case RPcmNetCardIf::EControlFastAddTxFrame:
+            {
+#ifndef NDEBUG
+            if ( !iAddTxFrameAllowed )
+                {
+                TraceDump(ERROR_LEVEL, 
+                    ("WLANLDD: DWlanLogicalChannel::OnEthernetSideControlFast: "
+                     "WARNING: AddTxFrame req. when flow ctrl is on"));
+                }
+#endif
+            if ( iEthernetFrameMemMngr && aParam )
+                {
+                if ( iEthernetFrameMemMngr->AllTxQueuesEmpty() )
+                    {
+                    aTriggerTx = ETrue;
+                    }
+                
+                TDataBuffer* discardFrame ( NULL );
+                
+                ret = reinterpret_cast<TAny*>(
+                          iEthernetFrameMemMngr->AddTxFrame( 
+                              reinterpret_cast<TDataBuffer*>(aParam),
+                              discardFrame,
+                              iUmac.UserDataTxEnabled() ));
+                
+                if ( discardFrame )
+                    {
+                    TraceDump( NWSA_TX_DETAILS, 
+                        (("WLANLDD: DWlanLogicalChannel::OnEthernetSideControlFast: "
+                          "have to drop tx frame of UP: %d"),
+                        reinterpret_cast<TDataBuffer*>(
+                            aParam)->UserPriority()) );
+                    
+                    iEthernetFrameMemMngr->FreeTxPacket( discardFrame );
+                    aTriggerTx = EFalse;
+                    }
+                }
+                
+            if ( !ret )
+                {
+                iAddTxFrameAllowed = EFalse;
+
+                TraceDump( NWSA_TX, 
+                    ("WLANLDD: DWlanLogicalChannel::OnEthernetSideControlFast: "
+                     "stop flow from protocol stack") );
+                }
+            break;
+            }            
+        // ==========================================================
+        // Get Rx frame
+        // ==========================================================        
+        case RPcmNetCardIf::EControlFastGetRxFrame:
+            {
+            if ( iEthernetFrameMemMngr )
+                {
+                ret = iEthernetFrameMemMngr->GetRxFrame( 
+                        reinterpret_cast<TDataBuffer*>(aParam) );
+                }
+            }
+            break;
+        // ==========================================================
+        // Unknown request
+        // ==========================================================        
+        default:
+#ifndef NDEBUG
+            TraceDump(ERROR_LEVEL, (("WLANLDD: unknown request: %d"), 
+                aFunction));
+            os_assert( 
+                (TUint8*)("WLANLDD: panic"), 
+                (TUint8*)(WLAN_FILE), 
+                __LINE__ );            
+#endif
+            break;
+        } // switch
+    
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
 //
@@ -748,7 +860,7 @@
     {
     if ( iUnit == KUnitWlan )
         {
-        if ( aMask & ( 1 << EWlanRequestNotify ) )
+        if ( aMask & ( 1 << RWlanLogicalChannel::EWlanRequestNotify ) )
             {
             TraceDump(INFO_LEVEL, 
                 ("WLANLDD: DWlanLogicalChannel::DoCancel: mgmt side notify cancel"));
@@ -758,7 +870,7 @@
                 iClient, iWlanRequestNotifyStatus, KErrServerTerminated );
             iWlanRequestNotifyStatus = NULL;
             }        
-        else if ( aMask & ( 1 << EWlanRequestFrame ) )
+        else if ( aMask & ( 1 << RWlanLogicalChannel::EWlanRequestFrame ) )
             {
             TraceDump(INFO_LEVEL, 
                 ("WLANLDD: DWlanLogicalChannel::DoCancel: mgmt side frame read cancel"));
@@ -770,7 +882,8 @@
         else
             {
             TraceDump(ERROR_LEVEL, 
-                (("WLANLDD: DWlanLogicalChannel::DoCancel: mgmt side unhandled mask panic: 0x%08x"), 
+                (("WLANLDD: DWlanLogicalChannel::DoCancel: mgmt side "
+                  "unhandled mask panic: 0x%08x"), 
                 aMask));
             os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
             }        
@@ -798,7 +911,8 @@
         else
             {
             TraceDump(ERROR_LEVEL, 
-                (("WLANLDD: DWlanLogicalChannel::DoCancel: user side unhandled mask panic: 0x%08x"), 
+                (("WLANLDD: DWlanLogicalChannel::DoCancel: user side "
+                  "unhandled mask panic: 0x%08x"), 
                 aMask));
             os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
             }        
@@ -816,11 +930,13 @@
 // ---------------------------------------------------------------------------
 //
 TBool DWlanLogicalChannel::ProtocolStackDataReceiveComplete( 
-    const TDataBuffer*& aBufferStart,
+    TDataBuffer*& aBufferStart,
     TUint32 aNumOfBuffers )
     {
-    if ( iEthernetFrameMemMngr->OnEthernetFrameRxComplete( aBufferStart, 
-        aNumOfBuffers ) )
+    if ( iEthernetFrameMemMngr && 
+         iEthernetFrameMemMngr->OnEthernetFrameRxComplete( 
+             aBufferStart, 
+             aNumOfBuffers ) )
         {
         Kern::RequestComplete( iClient, iEthernetReceiveFrameStatus, KErrNone );
         iEthernetReceiveFrameStatus = NULL;
@@ -903,13 +1019,17 @@
     TraceDump(UMAC_PROTO_CALLBACK, 
         (("WLANLDD: aCompletionCode: %d"), aCompletionCode));
 
-    iEthernetFrameMemMngr->FreeTxPacket( aMetaHeader );
+    if ( iEthernetFrameMemMngr )
+        {
+        iEthernetFrameMemMngr->FreeTxPacket( aMetaHeader );
+        }
 
     TxProtocolStackData();
     
     if ( !iAddTxFrameAllowed )
         {
-        if ( iResumeTxStatus && 
+        if ( iResumeTxStatus &&
+             iEthernetFrameMemMngr &&
              iEthernetFrameMemMngr->ResumeClientTx( 
                  iUmac.UserDataTxEnabled() ) )
             {
@@ -980,18 +1100,24 @@
 //
 void DWlanLogicalChannel::TxManagementData()
     {
-    TDataBuffer* buffer = iEthernetFrameMemMngr->OnWriteEthernetFrame();
-
-    if ( !buffer )
+    TDataBuffer* buffer( NULL );
+    
+    if ( iEthernetFrameMemMngr )
         {
-        TraceDump(ERROR_LEVEL, 
-            ("WLANLDD: DWlanLogicalChannel::TxManagementData: "
-             "panic, no buffer"));
-        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+        buffer = iEthernetFrameMemMngr->OnWriteEthernetFrame();
+        }
+
+    if ( buffer )
+        {
+        iUmac.WriteMgmtFrame( *buffer );
         }
     else
         {
-        iUmac.WriteMgmtFrame( *buffer );
+#ifndef NDEBUG
+        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+        Kern::RequestComplete( 
+            iClient, iWlanSendFrameStatus, KErrGeneral );
         }
     }
 
@@ -1001,7 +1127,7 @@
 //
 void DWlanLogicalChannel::TxProtocolStackData()
     {
-#ifndef NDEBUG    
+#ifndef NDEBUG
     TUint packetsSubmitted ( 0 );
 #endif
     
@@ -1049,7 +1175,13 @@
 //
 TBool DWlanLogicalChannel::OnReadEthernetFrameRequest()
     {
-    const TBool ret = iEthernetFrameMemMngr->OnReadRequest();
+    TBool ret( EFalse );
+    
+    if ( iEthernetFrameMemMngr )
+        {
+        ret = iEthernetFrameMemMngr->OnReadRequest();
+        }
+    
     return ret;
     }
 
@@ -1451,17 +1583,17 @@
 
     switch ( aReqNo )
         {
-        case EWlanInitSystem:
+        case RWlanLogicalChannel::EWlanInitSystem:
             // bootup the chip and the system
             iWlanGeneralRequestStatus = aStatus; 
             InitSystem( a1, sizeof(TOpenParam) );
             break;
-        case EWlanFinitSystem:
+        case RWlanLogicalChannel::EWlanFinitSystem:
             // power down the chip and the system
             iWlanGeneralRequestStatus = aStatus; 
             FinitSystem();
             break;
-        case EWlanCommand:
+        case RWlanLogicalChannel::EWlanCommand:
             // management command
             iWlanGeneralRequestStatus = aStatus; 
 
@@ -1502,13 +1634,13 @@
                 output_buffer.iData, 
                 output_buffer.iLen );
             break;
-        case EWlanRequestNotify:
+        case RWlanLogicalChannel::EWlanRequestNotify:
             // store the USER mode indication address;
             iIndicationBuffer = static_cast<TIndication*>(a1);
             iWlanRequestNotifyStatus = aStatus;
             IndicationRequest( static_cast<TIndication*>(a1) );
             break;
-        case EWlanRequestFrame:
+        case RWlanLogicalChannel::EWlanRequestFrame:
             if ( OnReadEthernetFrameRequest() )
                 {
                 // rx data to be completed exists
@@ -1525,7 +1657,7 @@
                 iWlanReceiveFrameStatus = aStatus;
                 }
             break;
-        case EWlanRequestSend:
+        case RWlanLogicalChannel::EWlanRequestSend:
             iWlanSendFrameStatus = aStatus;
 
             TxManagementData();
@@ -1728,7 +1860,7 @@
     TAny* /*a2*/ )
     {
     TInt ret( KErrNone );
-    if ( aFunction == EWlanSvControlInitBuffers )
+    if ( aFunction == RWlanLogicalChannel::EWlanSvControlInitBuffers )
         {
         // initiliaze buffers for wlan mgmt client data xfer
         if ( a1 )
@@ -1749,7 +1881,7 @@
             os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
             }
         }
-    else if ( aFunction == EWlanSvControlFreeBuffers )
+    else if ( aFunction == RWlanLogicalChannel::EWlanSvControlFreeBuffers )
         {
         // free wlan mgmt client data xfer buffers
         OnReleaseEthernetFrameBuffers();        
@@ -1891,13 +2023,16 @@
     if ( iEthernetFrameMemMngr )
         {
         TraceDump(NWSA_TX_DETAILS, 
-            (("WLANLDD: DWlanLogicalChannel::SetMgmtSideTxOffsets: aEthernetFrameTxOffset: %d"),
+            (("WLANLDD: DWlanLogicalChannel::SetMgmtSideTxOffsets: "
+              "aEthernetFrameTxOffset: %d"),
             aEthernetFrameTxOffset ));
         TraceDump(NWSA_TX_DETAILS, 
-            (("WLANLDD: DWlanLogicalChannel::SetMgmtSideTxOffsets: aDot11FrameTxOffset: %d"),
+            (("WLANLDD: DWlanLogicalChannel::SetMgmtSideTxOffsets: "
+              "aDot11FrameTxOffset: %d"),
             aDot11FrameTxOffset ));
         TraceDump(NWSA_TX_DETAILS, 
-            (("WLANLDD: DWlanLogicalChannel::SetMgmtSideTxOffsets: aSnapFrameTxOffset: %d"),
+            (("WLANLDD: DWlanLogicalChannel::SetMgmtSideTxOffsets: "
+              "aSnapFrameTxOffset: %d"),
             aSnapFrameTxOffset ));
 
         iEthernetFrameMemMngr->SetTxOffsets( 
@@ -1934,12 +2069,13 @@
 // ---------------------------------------------------------------------------
 //
 void DWlanLogicalChannel::MgmtDataReceiveComplete( 
-    const TDataBuffer*& aBufferStart, 
+    TDataBuffer*& aBufferStart, 
     TUint32 aNumOfBuffers )
     {
-    if ( iEthernetFrameMemMngr->OnEthernetFrameRxComplete( 
-        aBufferStart, 
-        aNumOfBuffers ) )
+    if ( iEthernetFrameMemMngr && 
+         ( iEthernetFrameMemMngr->OnEthernetFrameRxComplete( 
+               aBufferStart, 
+               aNumOfBuffers ) ) )
         {
         Kern::RequestComplete( iClient, iWlanReceiveFrameStatus, KErrNone );
         iWlanReceiveFrameStatus = NULL;
@@ -2174,23 +2310,32 @@
 void DWlanLogicalChannel::ReleaseIndicationListEntry(
     TIndicationListEntry* aEntry )
     {
-    aEntry->next = NULL;
-
-    if ( !iFreeIndicationListHead )
+    if ( aEntry )
         {
-        iFreeIndicationListHead = aEntry;
+        aEntry->next = NULL;
+    
+        if ( !iFreeIndicationListHead )
+            {
+            iFreeIndicationListHead = aEntry;
+            }
+        else
+            {
+            TIndicationListEntry* tmp = iFreeIndicationListHead;
+    
+            while ( tmp->next )
+                {
+                tmp = tmp->next;
+                }
+    
+            tmp->next = aEntry;
+            }
         }
+#ifndef NDEBUG
     else
         {
-        TIndicationListEntry* tmp = iFreeIndicationListHead;
-
-        while ( tmp->next )
-            {
-            tmp = tmp->next;
-            }
-
-        tmp->next = aEntry;
+        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );        
         }
+#endif        
     }
 
 // ---------------------------------------------------------------------------
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp	Thu May 27 14:33:33 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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: 2 %
+* %version: 3 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -41,7 +41,8 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+// Note! This method is executed in the context of the user mode client 
+// thread, but in supervisor mode
 // ---------------------------------------------------------------------------
 //
 TInt DWlanLogicalChannelBase::Request( TInt aReqNo, TAny* a1, TAny* a2 )
--- a/wlan_bearer/wlannwif/etherpkt/CardDll.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlannwif/etherpkt/CardDll.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 13 %
 */
 
 #include <nifmbuf.h>
@@ -82,7 +82,7 @@
 
     User::LeaveIfError( iCard.Open() );
 
-    User::LeaveIfError( iCard.InitialiseBuffers( iFrameXferBlock ) );
+    User::LeaveIfError( iCard.InitialiseBuffers() );
   }
 
 
--- a/wlan_bearer/wlannwif/etherpkt/receiver_hw.cpp	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlannwif/etherpkt/receiver_hw.cpp	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 13 %
 */
 
 #include <nifmbuf.h>
@@ -31,7 +31,8 @@
 //
 CReceiver::CReceiver( CPcCardPktDrv* aParent ) : 
     CActive(EPriorityStandard),
-    iParent(aParent)
+    iParent(aParent),
+    iFrameToFree( NULL )
     {
     }
 
@@ -67,6 +68,7 @@
     {
     DEBUG("CReceiver::~CReceiver()");
     Cancel();
+    iFrameToFree = NULL;
     }
 
 // ---------------------------------------------------------
@@ -98,7 +100,11 @@
     {
     DEBUG("CReceiver::RunL()" );
 
-    while( iParent->iFrameXferBlock->GetNextRxDataBuffer( iDataBuffer ) )
+    TUint rxCount( 0 );
+    const TUint KMaxRxCount( 4 );
+    
+    while( ( rxCount < KMaxRxCount ) &&
+           ( iDataBuffer = iParent->iCard.GetRxFrame( iFrameToFree ) ) != NULL )
         {
         TUint8* buf = iDataBuffer->GetBuffer();
         TUint32 len = iDataBuffer->GetLength();
@@ -126,10 +132,27 @@
                 iParent->iParent->Process( pFrame, bufOrig, iDataBuffer->UserPriority() );
                 }
             }
+            
+        iFrameToFree = iDataBuffer;
+        ++rxCount;
+		DEBUG1("CReceiver::RunL() - %u packet(s) processed", rxCount );
         }
 
-    if( iParent->CardOpen() )
+    if ( rxCount == KMaxRxCount )
         {
-        QueueRead();
+		DEBUG("CReceiver::RunL() - yield");
+		
+        SetActive();
+        TRequestStatus* status = &iStatus;
+        User::RequestComplete( status, KErrNone );
+        }
+    else
+        {
+        iFrameToFree = NULL;
+            
+        if( iParent->CardOpen() )
+            {
+            QueueRead();
+            }
         }
     }
--- a/wlan_bearer/wlannwif/inc/carddrv.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlannwif/inc/carddrv.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: 10 %
 */
 
 #ifndef __CARDDRV_H__
@@ -139,9 +139,6 @@
     CReceiver* iReceiver;
     /** */
     RPcmNetCardIf iCard;
-
-    /** */
-    RFrameXferBlockProtocolStack* iFrameXferBlock;
     
 	};
 
--- a/wlan_bearer/wlannwif/inc/receiver_hw.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_bearer/wlannwif/inc/receiver_hw.h	Thu May 27 14:33:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: 8 %
 */
 
 #ifndef _RECEIVER_HW_H_
@@ -82,6 +82,9 @@
     /** */
     TDataBuffer* iDataBuffer;
     
+	/** Rx frame to free */
+    TDataBuffer* iFrameToFree;
+
     };
 
 #endif //_RECEIVER_HW_H_
--- a/wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h	Thu May 27 14:33:33 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 "Eclipse Public License v1.0"
@@ -18,7 +18,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: 8 %
 */
 
 #ifndef WLANINTERNALPSKEYS_H
--- a/wlan_plat/wlan_management_api/inc/wlanerrorcodes.h	Fri May 14 17:41:09 2010 +0300
+++ b/wlan_plat/wlan_management_api/inc/wlanerrorcodes.h	Thu May 27 14:33:33 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: 7 %
 */
 
 #ifndef WLANERRORCODES_H