Catchup to latest Symbian^4 GCC_SURGE
authorWilliam Roberts <williamr@symbian.org>
Thu, 22 Jul 2010 16:49:43 +0100
branchGCC_SURGE
changeset 37 1ff9bf2737cf
parent 29 d1f0fe5eccbe (current diff)
parent 36 1c425781161e (diff)
Catchup to latest Symbian^4
package_definition.xml
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/group/wlmserversrv.mmh
wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11State.h
wlan_info/wlan_metadata/wlan_metadata.mrp
wlanapitest/wlanhaitest/common/inc/DataWrapperBase.h
wlanapitest/wlanhaitest/common/src/DataWrapperBase.cpp
wlanapitest/wlanhaitest/group/bld.inf
wlanapitest/wlanhaitest/group/device.cfg
wlanapitest/wlanhaitest/group/release.txt
wlanapitest/wlanhaitest/group/testdriversetup.bat
wlanapitest/wlanhaitest/group/testdriversetup.pl
wlanapitest/wlanhaitest/group/wlanhaitest.mrp
wlanapitest/wlanhaitest/testsuites/group/bld.inf
wlanapitest/wlanhaitest/testsuites/wlan/wlanhai.driver
wlanapitest/wlanhaitest/wlan/group/T_Wlan.mmp
wlanapitest/wlanhaitest/wlan/group/bld.inf
wlanapitest/wlanhaitest/wlan/group/t_wlan.iby
wlanapitest/wlanhaitest/wlan/group/t_wlan_binaries.iby
wlanapitest/wlanhaitest/wlan/group/t_wlan_testdata.iby
wlanapitest/wlanhaitest/wlan/group/user_input.oby
wlanapitest/wlanhaitest/wlan/inc/T_CCommsDatabaseData.h
wlanapitest/wlanhaitest/wlan/inc/T_CCommsDbTableViewData.h
wlanapitest/wlanhaitest/wlan/inc/T_RConnectionData.h
wlanapitest/wlanhaitest/wlan/inc/T_RFileData.h
wlanapitest/wlanhaitest/wlan/inc/T_RSocketData.h
wlanapitest/wlanhaitest/wlan/inc/T_RSocketServData.h
wlanapitest/wlanhaitest/wlan/inc/T_WlanDriverServer.h
wlanapitest/wlanhaitest/wlan/inc/T_WlanDriverServer.inl
wlanapitest/wlanhaitest/wlan/inc/T_WlanMgmtClientData.h
wlanapitest/wlanhaitest/wlan/inc/T_WlanScanInfoData.h
wlanapitest/wlanhaitest/wlan/pkg/t_wlan.bat
wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-connection.script
wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-instantiate.script
wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-transfer.script
wlanapitest/wlanhaitest/wlan/src/T_CCommsDatabaseData.cpp
wlanapitest/wlanhaitest/wlan/src/T_CCommsDbTableViewData.cpp
wlanapitest/wlanhaitest/wlan/src/T_RConnectionData.cpp
wlanapitest/wlanhaitest/wlan/src/T_RFileData.cpp
wlanapitest/wlanhaitest/wlan/src/T_RSocketData.cpp
wlanapitest/wlanhaitest/wlan/src/T_RSocketServData.cpp
wlanapitest/wlanhaitest/wlan/src/T_WlanDriverServer.cpp
wlanapitest/wlanhaitest/wlan/src/T_WlanMgmtClientData.cpp
wlanapitest/wlanhaitest/wlan/src/T_WlanScanInfoData.cpp
wlanapitest/wlanhaitest/wlan/testdata/devlon52/t_wlan.ini
wlanapitest/wlanhaitest/wlan/testdata/devlon52/t_wlan.tcs
wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-connection.ini
wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-instantiate.ini
wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-transfer.ini
wlanapitest/wlanhaitest/wlan/testdata/t_wlan_environment.ini
wlanapitest/wlanhaitest/wlan/testdata/tube/t_wlan.ini
wlanapitest/wlanhaitest/wlan/testdata/tube/t_wlan.tcs
--- a/package_definition.xml	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SystemDefinition schema="3.0.0">
-  <package id="wlan" name="WLAN" levels="hw low mid high tools test">
-    <collection id="wlan_bearer" name="WLAN Bearer" level="hw">
-      <component id="wlanpsmplugin" filter="s60" name="WLAN PSM Plugin" class="plugin">
-        <unit bldFile="wlan_bearer/wlanpsmplugin/group"/>
-      </component>
-      <component id="wlanagent" filter="s60" name="WLAN Agent">
-        <unit bldFile="wlan_bearer/wlanagent/group"/>
-      </component>
-      <component id="wlandbif_cd" filter="s60" name="WLAN CommsDat interface">
-        <unit bldFile="wlan_bearer/wlandbif_cd/group"/>
-      </component>
-      <component id="wlanengine" filter="s60" name="WLAN Engine">
-        <unit bldFile="wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/group"/>
-      </component>
-      <component id="wlanldd" filter="s60" name="WLAN LDD">
-        <unit bldFile="wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/group"/>
-      </component>
-      <component id="wlannwif" filter="s60" name="WLAN Network Interface">
-        <unit bldFile="wlan_bearer/wlannwif/group"/>
-      </component>
-    </collection>
-    <collection id="wlanapitest" name="WLAN API Tests" level="test">
-      <component id="wlanhaitest" name="WLAN HAI Tests" introduced="^2" purpose="development" filter="test">
-        <unit mrp="wlanapitest/wlanhaitest/group/wlanhaitest.mrp" bldFile="wlanapitest/wlanhaitest/group"/>
-      </component>
-    </collection>
-    <collection id="wlan_info" name="WLAN Info" level="test">
-      <component id="wlan_pub" filter="s60" name="WLAN Public Interfaces" class="api">
-        <unit bldFile="wlan_pub/group"/>
-      </component>
-      <component id="wlan_plat" filter="s60" name="WLAN Platform Interfaces" class="api">
-        <unit bldFile="wlan_plat/group"/>
-      </component>
-      <component id="wlan_metadata" name="WLAN Metadata" class="config" introduced="^2" purpose="development" target="desktop">
-        <unit mrp="wlan_info/wlan_metadata/wlan_metadata.mrp"/>
-      </component>
-    </collection>
-  </package>
-</SystemDefinition>
--- a/wlan_bearer/wlandbif_cd/src/wdbifwlansettings.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlandbif_cd/src/wdbifwlansettings.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12.1.1 %
+* %version: 14 %
 */
 
 //  INCLUDE FILES
@@ -167,7 +167,13 @@
         ReadWepKeysL(aSettings);           
         TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL, Wep keys succesfully read")));
         }
-    else if( aSettings.SecurityMode > Wep)
+    else if( aSettings.SecurityMode == Wlan8021x )
+        {
+        aSettings.WPAKeyLength = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanWpaKeyLength));
+        TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.WPAKeyLength: %d"),
+            aSettings.WPAKeyLength));
+        }
+    else if( aSettings.SecurityMode > Wlan8021x )
         {
         aSettings.WPAKeyLength = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanWpaKeyLength));
         TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.WPAKeyLength: %d"),
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/abs_wlan_eapol_callback_interface.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/abs_wlan_eapol_callback_interface.h	Thu Jul 22 16:49:43 2010 +0100
@@ -114,6 +114,12 @@
         core_type_list_c< protected_setup_credential_c > & credential_list ) = 0;
 
     /**
+     * The complete_disassociation() function completes disassociation function.
+     */
+    virtual core_error_e complete_disassociation(
+        network_id_c * receive_network_id ) = 0;
+
+    /**
      * The handle_error() function tells about error from EAPOL side.
      */
     virtual void handle_error(
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_connection_data.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_connection_data.h	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 33 %
+* %version: 34 %
 */
 
 #ifndef CORE_CONNECTION_DATA_H
@@ -468,6 +468,23 @@
         const core_mac_address_s& bssid );
 
     /**
+     * Get the status of the ongoing authentication.
+     *
+     * @since S60 v3.1
+     * @return The status of the ongoing authentication. 
+     */
+    core_error_e eapol_auth_failure() const;
+
+    /**
+     * Set the status of the ongoing authentication.
+     *
+     * @since S60 v3.1
+     * @param error The status of the ongoing authentication. 
+     */
+    void set_eapol_auth_failure(
+        core_error_e error );
+
+    /**
      * Return the list of active traffic streams.
      *
      * @since S60 v3.2
@@ -501,6 +518,23 @@
         bool_t is_eapol_connecting );
 
     /**
+     * Check whether EAPOL is disconnecting.
+     *
+     * @since S60 v3.1
+     * @return Whether EAPOL is disconnecting.
+     */    
+    bool_t is_eapol_disconnecting() const;
+    
+    /**
+     * Set the status of EAPOL disconnecting.
+     *
+     * @since S60 v3.1
+     * @param is_eapol_disconnecting Whether EAPOL is disconnecting.
+     */
+    void set_eapol_disconnecting(
+        bool_t is_eapol_disconnecting );
+    
+    /**
      * Check whether disconnection is ongoing.
      *
      * @since S60 v3.2
@@ -751,15 +785,21 @@
     /** The BSSID currently being authenticated against. */
     core_mac_address_s eapol_auth_bssid_m;
 
+    /** Status of the currently ongoing authentication. */
+    core_error_e eapol_auth_failure_m;
+
     /** List of active traffic streams. */
     core_traffic_stream_list_c traffic_stream_list_m;
 
     /** List of virtual traffic streams. */
     core_virtual_traffic_stream_list_c virtual_traffic_stream_list_m;
-    
+
     /** Whether EAPOL is connecting. */
     bool_t is_eapol_connecting_m;
-    
+
+    /** Whether EAPOL is disconnecting. */
+    bool_t is_eapol_disconnecting_m;
+
     /** Whether disconnection is ongoing. */
     bool_t is_disconnecting_m;
 
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_eapol_handler.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_eapol_handler.h	Thu Jul 22 16:49:43 2010 +0100
@@ -192,6 +192,12 @@
         core_type_list_c< protected_setup_credential_c > & credential_list );
 
     /**
+     * From abs_wlan_eapol_callback_interface_c 
+     */
+    virtual core_error_e complete_disassociation(
+        network_id_c * receive_network_id );
+
+    /**
      * From abs_wlan_eapol_callback_interface_c
      */
     virtual void handle_error(
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_handle_bss_lost.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_handle_bss_lost.h	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: 12 %
 */
 
 #ifndef CORE_OPERATION_HANDLE_BSS_LOST_H
@@ -41,6 +41,7 @@
     enum core_state_e
         {
         core_state_init = core_base_state_next,
+        core_state_eapol_disassociated,
         core_state_set_tx_level,
         core_state_set_tx_level_success,
         core_state_scan_start,
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_release.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_release.h	Thu Jul 22 16:49:43 2010 +0100
@@ -37,6 +37,7 @@
     enum core_state_e
         {
         core_state_init = core_base_state_next,
+        core_state_eapol_disassociated,
         core_state_disable_user_data,
         core_state_tx_power_level,
         core_state_disconnect,
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_unload_drivers.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_unload_drivers.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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/inc/core_sub_operation_wpa_connect.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_sub_operation_wpa_connect.h	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 28 %
+* %version: 29 %
 */
 
 #ifndef CORE_SUB_OPERATION_WPA_CONNECT_H
@@ -65,6 +65,7 @@
         core_state_req_state_notification,
         core_state_bss_lost,
         core_state_user_cancel,
+        core_state_user_cancel_disassociated,
         core_state_MAX
         };
 
@@ -190,6 +191,12 @@
     /**
      * From abs_wlan_eapol_callback_interface_c
      */
+    core_error_e complete_disassociation(
+        network_id_c * receive_network_id );
+    
+    /**
+     * From abs_wlan_eapol_callback_interface_c
+     */
     void handle_error(
         wlan_eapol_if_error_e errorcode,
         wlan_eapol_if_message_type_function_e function );
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_wlan_eapol_if_message.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_wlan_eapol_if_message.h	Thu Jul 22 16:49:43 2010 +0100
@@ -90,6 +90,7 @@
     wlan_eapol_if_message_type_function_update_wlan_database_reference_values       = 21,
     wlan_eapol_if_message_type_function_complete_start_wpx_fast_roam_reassociation  = 22,
     wlan_eapol_if_message_type_function_new_protected_setup_credentials             = 23,
+    wlan_eapol_if_message_type_function_complete_disassociation                     = 37
     };
 
 
@@ -752,6 +753,8 @@
     core_error_e parse_new_protected_setup_credentials(
         core_type_list_c< protected_setup_credential_c > & credential_list );
 
+    core_error_e parse_complete_disassociation(
+        network_id_c * receive_network_id );
 
     void debug_print();
     
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_connection_data.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_connection_data.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 37 %
+* %version: 38 %
 */
 
 #include "core_connection_data.h"
@@ -52,9 +52,11 @@
     is_eapol_authentication_started_m( false_t ),
     is_eapol_authenticating_m( false_t ),
     eapol_auth_bssid_m( ZERO_MAC_ADDR ),
+    eapol_auth_failure_m( core_error_ok ),
     traffic_stream_list_m( ),
     virtual_traffic_stream_list_m( ),
     is_eapol_connecting_m( false_t ),
+    is_eapol_disconnecting_m( false_t ),
     is_disconnecting_m( false_t ),
     last_roam_reason_m( core_roam_reason_none ),
     last_roam_failed_reason_m( core_roam_failed_reason_none ),
@@ -672,6 +674,23 @@
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //
+core_error_e core_connection_data_c::eapol_auth_failure() const
+    {
+    return eapol_auth_failure_m;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void core_connection_data_c::set_eapol_auth_failure(
+    core_error_e error )
+    {
+    eapol_auth_failure_m = error;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
 core_traffic_stream_list_c& core_connection_data_c::traffic_stream_list()
     {
     return traffic_stream_list_m;
@@ -705,6 +724,23 @@
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //
+bool_t core_connection_data_c::is_eapol_disconnecting() const
+    {
+    return is_eapol_disconnecting_m;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void core_connection_data_c::set_eapol_disconnecting(
+    bool_t is_eapol_disconnecting )
+    {
+    is_eapol_disconnecting_m = is_eapol_disconnecting;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
 bool_t core_connection_data_c::is_disconnecting() const
     {
     return is_disconnecting_m;
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_eapol_handler.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_eapol_handler.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -110,6 +110,17 @@
             send_unencrypted );
         }
 
+    if ( !server_m->get_connection_data()->current_ap_data() )
+        {
+        /**
+         * EAPOL might try to send packets after a failed connection attempt,
+         * filter them out. This check is only valid when no handler is registered.
+         */
+        DEBUG( "core_eapol_handler_c::packet_send() - not connected or attempting connection, ignoring" );
+
+        return core_error_ok;
+        }
+
     server_m->send_data_frame(
         *server_m->get_connection_data()->current_ap_data(),
         core_frame_type_ethernet,
@@ -582,6 +593,20 @@
                 }
             break;
             }
+        case wlan_eapol_if_message_type_function_complete_disassociation:
+            {
+            network_id_c network_id( NULL, 0, NULL, 0, 0 );
+            
+            error = function.parse_complete_disassociation(
+                &network_id );
+            if ( error == core_error_ok )
+                {
+                error = complete_disassociation(
+                    &network_id );
+                }
+            break;
+
+            }
         case wlan_eapol_if_message_type_function_none:
         default:
             DEBUG1( "core_eapol_handler_c::send_data() - Error: unknown function %i", func );
@@ -853,6 +878,69 @@
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //
+core_error_e core_eapol_handler_c::complete_disassociation(
+    network_id_c * receive_network_id )
+    {
+    DEBUG( "core_eapol_handler_c::complete_disassociation()" );
+
+    if( !server_m->get_connection_data() ||
+        !server_m->get_connection_data()->is_eapol_disconnecting() )
+        {
+        DEBUG( "core_eapol_handler_c::handle_wlan_authentication_state() - complete_disassociation received while not disconnecting, ignoring" );
+
+        return core_error_general;
+        }
+
+    const core_mac_address_s cur_bssid(
+        server_m->get_connection_data()->eapol_auth_bssid() );
+    const core_mac_address_s bssid(
+        receive_network_id->source() );
+    DEBUG6( "core_eapol_handler_c::complete_disassociation() - function BSSID is %02X:%02X:%02X:%02X:%02X:%02X",
+        bssid.addr[0], bssid.addr[1], bssid.addr[2], 
+        bssid.addr[3], bssid.addr[4], bssid.addr[5] );
+    DEBUG6( "core_eapol_handler_c::complete_disassociation() - current BSSID is %02X:%02X:%02X:%02X:%02X:%02X",
+        cur_bssid.addr[0], cur_bssid.addr[1], cur_bssid.addr[2], 
+        cur_bssid.addr[3], cur_bssid.addr[4], cur_bssid.addr[5] );
+    DEBUG1( "core_eapol_handler_c::complete_disassociation() - EAPOL authentication failure status is %u",
+        server_m->get_connection_data()->eapol_auth_failure() );
+
+    bool_t is_eapol_authentication_started(
+        server_m->get_connection_data()->is_eapol_authentication_started() );
+    DEBUG( "core_eapol_handler_c::complete_disassociation() - marking is_eapol_authenticating as false" );
+    server_m->get_connection_data()->set_eapol_authenticating(
+        false_t );
+    DEBUG( "core_eapol_handler_c::complete_disassociation() - marking is_eapol_authentication_started as false" );
+    server_m->get_connection_data()->set_eapol_authentication_started(
+        false_t );
+    DEBUG( "core_eapol_handler_c::complete_disassociation() - marking is_eapol_disconnecting as false" );
+    server_m->get_connection_data()->set_eapol_disconnecting(
+        false_t );
+
+    /**
+     * We only care about the pending status notification in case the authentication
+     * has been started by us, otherwise we'll just ignore it. 
+     */
+    if ( is_eapol_authentication_started )
+        {
+        DEBUG( "core_eapol_handler_c::complete_disassociation() - completing request" );
+        server_m->request_complete(
+            REQUEST_ID_CORE_INTERNAL,
+            server_m->get_connection_data()->eapol_auth_failure() );
+        }
+    else
+        {
+        DEBUG( "core_eapol_handler_c::complete_disassociation() - completing request (authentication not started)" );
+        server_m->request_complete(
+            REQUEST_ID_CORE_INTERNAL,
+            core_error_ok );
+        }
+
+    return core_error_ok;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
 void core_eapol_handler_c::handle_error(
     wlan_eapol_if_error_e errorcode,
     wlan_eapol_if_message_type_function_e function )
@@ -974,8 +1062,18 @@
         return;
         }
 
+    server_m->get_connection_data()->set_eapol_auth_failure(
+        eapol_wlan_authentication_state_to_error( state )  );
+
+    if ( server_m->get_connection_data()->is_eapol_disconnecting() )
+        {
+        DEBUG( "core_ap_data_c::instance() - disassociation pending, request cannot be completed yet" );
+
+        return;
+        }
+
     bool_t is_authentication_started( server_m->get_connection_data()->is_eapol_authenticating() );
-    
+
     DEBUG( "core_eapol_handler_c::handle_wlan_authentication_state() - marking is_eapol_authenticating as false" );
     server_m->get_connection_data()->set_eapol_authenticating(
         false_t );
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_delete_ts.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_delete_ts.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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_get_available_iaps.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_get_available_iaps.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 41 %
+* %version: 42 %
 */
 
 #include "core_operation_get_available_iaps.h"
@@ -1017,7 +1017,7 @@
         }
     
     u8_t treshold_val = 
-        static_cast<u8_t>(server_m->get_core_settings().rcp_improve_boundary());
+        static_cast<u8_t>( server_m->get_device_settings().rcpi_trigger );
         
     /**
      * Loop through the IAP list.
@@ -1039,22 +1039,30 @@
                 iap->id );            
 
             u32_t* iap_id = new u32_t;
+            bool_t is_match_found( true_t );
             if( iap_id )
                 {
-                if ( server_m->get_core_settings().is_iap_id_in_weak_list( iap->id) ) 
+                if ( server_m->get_core_settings().is_iap_id_in_weak_list( iap->id ) ) 
                     {
                     DEBUG( "core_operation_get_available_iaps_c::remove_matching_iaps() - IAP ID is in weak list" );
                     
                     if ( ap_data.rcpi() > treshold_val )
                         {
-                        DEBUG( "core_operation_get_available_iaps_c::remove_matching_iaps() - RCPI improved enough, remove IAP ID from weak list" );
+                        DEBUG1( "core_operation_get_available_iaps_c::remove_matching_iaps() - RCPI improved enough (%u), remove IAP ID from weak list",
+                            ap_data.rcpi() );
                         *iap_id = iap->id;
                         iap_id_list_m.append( iap_id );
             		    iap_id = NULL;
                         
                         server_m->get_core_settings().remove_iap_id_from_weak_list( iap->id );
                         }
+                    else
+                        {
+                        DEBUG2( "core_operation_get_available_iaps_c::remove_matching_iaps() - RCPI not improved enough (%u vs %u)",
+                            ap_data.rcpi(), treshold_val );
 
+                        is_match_found = false_t;
+                        }
                     }
                 else
                     {
@@ -1066,19 +1074,22 @@
 
             /** Using a temporary pointer to guarantee list iterator working. */
             core_iap_data_s* temp = iap;
-            
             iap = iap_data_list_m.next();
-            core_error_e ret = iap_data_list_m.remove( temp );
-            if( ret != core_error_ok )
+            if( is_match_found )
                 {
-                if( iap )
+                core_error_e ret = iap_data_list_m.remove( temp );
+                if( ret != core_error_ok )
                     {
-                    DEBUG1("core_operation_get_available_iaps_c::remove_matching_iaps() - error while removing IAP entry (%d)",
-                        iap->id );                   
+                    if( iap )
+                        {
+                        DEBUG1("core_operation_get_available_iaps_c::remove_matching_iaps() - error while removing IAP entry (%d)",
+                            iap->id );
+                        }
                     }
+
+                delete temp;
                 }
 
-            delete temp;
             temp = NULL;
             delete iap_id;
             iap_id = NULL;
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_bss_lost.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_bss_lost.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 33 %
+* %version: 34 %
 */
 
 #include "core_operation_handle_bss_lost.h"
@@ -151,34 +151,6 @@
                 }
 
             /**
-             * If the connection is lost when EAPOL is doing (re-)authentication,
-             * EAPOL must be notified.
-             */
-            if ( server_m->get_connection_data()->is_eapol_authenticating() &&
-                 ( server_m->get_connection_data()->iap_data().is_eap_used() ||
-                   server_m->get_connection_data()->iap_data().is_wapi_used() ) )
-                {
-                network_id_c network_id(
-                    &bssid.addr[0],
-                    MAC_ADDR_LEN,
-                    &server_m->own_mac_addr().addr[0],
-                    MAC_ADDR_LEN,
-                    server_m->get_eapol_instance().ethernet_type() );
-
-                DEBUG( "core_operation_handle_bss_lost_c::next_state() - marking is_eapol_authenticating as false" );
-                server_m->get_connection_data()->set_eapol_authenticating(
-                    false_t );
-
-                DEBUG6( "core_operation_handle_bss_lost_c::next_state() - EAPOL disassociation from BSSID %02X:%02X:%02X:%02X:%02X:%02X",
-                    bssid.addr[0], bssid.addr[1], bssid.addr[2],
-                    bssid.addr[3], bssid.addr[4], bssid.addr[5] );
-
-                server_m->get_eapol_instance().disassociation( &network_id );
-                }
-
-            operation_state_m = core_state_set_tx_level;            
-
-            /**
              * Check the channels that were previously reported to be active.
              */
             server_m->get_scan_list().get_channels_by_ssid(
@@ -201,6 +173,47 @@
             server_m->get_scan_list().remove_entries_by_bssid(
                 bssid );
 
+            /**
+             * If the connection is lost when EAPOL is doing (re-)authentication,
+             * EAPOL must be notified.
+             */
+            if ( ( server_m->get_connection_data()->is_eapol_authenticating() ||
+                   reason_m == core_bss_lost_reason_failed_reauthentication ) &&
+                 ( server_m->get_connection_data()->iap_data().is_eap_used() ||
+                   server_m->get_connection_data()->iap_data().is_wapi_used() ) )
+                {
+                network_id_c network_id(
+                    &bssid.addr[0],
+                    MAC_ADDR_LEN,
+                    &server_m->own_mac_addr().addr[0],
+                    MAC_ADDR_LEN,
+                    server_m->get_eapol_instance().ethernet_type() );
+
+                DEBUG( "core_operation_handle_bss_lost_c::next_state() - marking is_eapol_authenticating as false" );
+                server_m->get_connection_data()->set_eapol_authenticating(
+                    false_t );
+
+                DEBUG6( "core_operation_handle_bss_lost_c::next_state() - EAPOL disassociation from BSSID %02X:%02X:%02X:%02X:%02X:%02X",
+                    bssid.addr[0], bssid.addr[1], bssid.addr[2],
+                    bssid.addr[3], bssid.addr[4], bssid.addr[5] );
+                DEBUG( "core_operation_handle_bss_lost_c::next_state() - marking is_eapol_disconnecting as true" );
+                server_m->get_connection_data()->set_eapol_disconnecting(
+                    true );
+                server_m->get_connection_data()->set_eapol_auth_failure(
+                    core_error_eapol_failure );
+
+                server_m->get_eapol_instance().disassociation( &network_id );
+                operation_state_m = core_state_eapol_disassociated;
+
+                return core_error_request_pending;
+                }
+
+            return goto_state( core_state_eapol_disassociated );
+            }            
+        case core_state_eapol_disassociated:
+            {            
+            operation_state_m = core_state_set_tx_level;            
+
             server_m->get_core_settings().roam_metrics().set_roam_ts_userdata_disabled();
 
             drivers_m->disable_user_data(
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_delete_ts.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_delete_ts.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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_operation_release.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_release.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17 %
+* %version: 18 %
 */
 
 #include "core_operation_release.h"
@@ -175,10 +175,21 @@
                 DEBUG6( "core_operation_release_c::next_state() - EAPOL disassociation from BSSID %02X:%02X:%02X:%02X:%02X:%02X",
                     bssid.addr[0], bssid.addr[1], bssid.addr[2],
                     bssid.addr[3], bssid.addr[4], bssid.addr[5] );
+                DEBUG( "core_operation_release_c::next_state() - marking is_eapol_disconnecting as true" );
+                server_m->get_connection_data()->set_eapol_disconnecting(
+                    true );
 
                 server_m->get_eapol_instance().disassociation( &network );
+                operation_state_m = core_state_eapol_disassociated;
+
+                return core_error_request_pending;
                 }
 
+            return goto_state( core_state_eapol_disassociated );
+            }
+        case core_state_eapol_disassociated:
+            {
+            DEBUG( "core_operation_release_c::next_state() - core_state_eapol_disassociated" );
             // disable user data
             drivers_m->disable_user_data( request_id_m );
             operation_state_m = core_state_disable_user_data;
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_roam.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_roam.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 76.1.2 %
+* %version: 76.1.3 %
 */
 
 #include "core_operation_roam.h"
@@ -433,6 +433,12 @@
                         bssid.addr[0], bssid.addr[1], bssid.addr[2],
                         bssid.addr[3], bssid.addr[4], bssid.addr[5] );
 
+                    /**
+                     * is_eapol_disconnecting is not updated here because this disassociation
+                     * is for the previous AP and thus we don't really care when this
+                     * request gets completed.
+                     */
+
                     server_m->get_eapol_instance().disassociation( &network );
                     }
                 }
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_roam_update_ts.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_roam_update_ts.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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_sub_operation_wpa_connect.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_wpa_connect.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 59 %
+* %version: 59.1.1 %
 */
 
 #include "core_sub_operation_wpa_connect.h"
@@ -102,6 +102,8 @@
                 true_t );
             server_m->get_connection_data()->set_eapol_auth_bssid(
                 ZERO_MAC_ADDR );
+            server_m->get_connection_data()->set_eapol_auth_failure(
+                core_error_ok );
 
             eapol_auth_type_m = core_tools_c::eap_authentication_type(
                 server_m->get_connection_data()->iap_data(),
@@ -634,9 +636,17 @@
             DEBUG6( "core_sub_operation_wpa_connect_c::next_state() - EAPOL disassociation from BSSID %02X:%02X:%02X:%02X:%02X:%02X",
                 current_bssid_m.addr[0], current_bssid_m.addr[1], current_bssid_m.addr[2],
                 current_bssid_m.addr[3], current_bssid_m.addr[4], current_bssid_m.addr[5] );
+            DEBUG( "core_sub_operation_wpa_connect_c::next_state() - marking is_eapol_disconnecting as true" );
+            server_m->get_connection_data()->set_eapol_disconnecting(
+                true );
 
             server_m->get_eapol_instance().disassociation( &network );
-
+            operation_state_m = core_state_user_cancel_disassociated;
+            
+            break;
+            }
+        case core_state_user_cancel_disassociated:
+            {
             /** The connection attempt failed, we are no longer connected. */
             is_connected_m = false_t;            
 
@@ -770,10 +780,28 @@
 // ---------------------------------------------------------------------------
 //
 core_error_e core_sub_operation_wpa_connect_c::disassociate(
-    network_id_c * /*receive_network_id*/,
+    network_id_c * receive_network_id,
     const bool_t /* self_disassociation */ )
     {
     DEBUG( "core_sub_operation_wpa_connect_c::disassociate()" );
+
+    const core_mac_address_s bssid(
+        receive_network_id->source() );
+    DEBUG6( "core_sub_operation_wpa_connect_c::disassociate() - function BSSID is %02X:%02X:%02X:%02X:%02X:%02X",
+        bssid.addr[0], bssid.addr[1], bssid.addr[2], 
+        bssid.addr[3], bssid.addr[4], bssid.addr[5] );
+    DEBUG6( "core_sub_operation_wpa_connect_c::disassociate() - EAPOL disassociation from BSSID %02X:%02X:%02X:%02X:%02X:%02X",
+        current_bssid_m.addr[0], current_bssid_m.addr[1], current_bssid_m.addr[2],
+        current_bssid_m.addr[3], current_bssid_m.addr[4], current_bssid_m.addr[5] );
+    if( operation_state_m == core_state_req_state_notification &&
+        bssid == current_bssid_m )
+        {
+        DEBUG( "core_sub_operation_wpa_connect_c::disassociate() - marking is_eapol_disconnecting as true" );
+        server_m->get_connection_data()->set_eapol_disconnecting(
+            true );
+
+        server_m->get_eapol_instance().disassociation( receive_network_id );
+        }
     
     return core_error_ok;
     }
@@ -932,6 +960,18 @@
     return core_error_ok;
     }
 
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+core_error_e core_sub_operation_wpa_connect_c::complete_disassociation(
+    network_id_c * /* receive_network_id */ )
+    {
+    DEBUG( "core_sub_operation_wpa_connect_c::complete_disassociation()" );
+
+    ASSERT( false_t );
+
+    return core_error_ok;
+    }
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
@@ -960,9 +1000,10 @@
 
             asynch_goto( core_state_init, CORE_TIMER_IMMEDIATELY );
             }
-        else if ( function == wlan_eapol_if_message_type_function_complete_association
+        else if ( ( function == wlan_eapol_if_message_type_function_complete_association
                || function == wlan_eapol_if_message_type_function_complete_reassociation
-               || function == wlan_eapol_if_message_type_function_complete_wpx_fast_roam_reassociation  )
+               || function == wlan_eapol_if_message_type_function_complete_wpx_fast_roam_reassociation  ) &&
+               eapol_auth_type_m == wlan_eapol_if_eapol_key_authentication_type_wpx_fast_roam )
             {
             DEBUG( "core_sub_operation_wpa_connect_c::handle_error() - (WPX fast-roam) (re-)association failed" );
             asynch_goto( core_state_req_association_failed, CORE_TIMER_IMMEDIATELY );
@@ -1011,23 +1052,14 @@
         DEBUG6( "core_sub_operation_wpa_connect_c::notify() - EAPOL disassociation from BSSID %02X:%02X:%02X:%02X:%02X:%02X",
             current_bssid_m.addr[0], current_bssid_m.addr[1], current_bssid_m.addr[2],
             current_bssid_m.addr[3], current_bssid_m.addr[4], current_bssid_m.addr[5] );
+        DEBUG( "core_sub_operation_wpa_connect_c::next_state() - marking is_eapol_disconnecting as true" );
+        server_m->get_connection_data()->set_eapol_disconnecting(
+            true );
+        server_m->get_connection_data()->set_eapol_auth_failure(
+            core_error_eapol_failure );
 
         server_m->get_eapol_instance().disassociation( &network );
 
-        if ( indication != core_am_indication_wlan_media_disconnect )
-            {
-            DEBUG( "core_sub_operation_wpa_connect_c::notify() - marking is_eapol_authenticating as false" );
-            server_m->get_connection_data()->set_eapol_authenticating(
-                false_t );
-            DEBUG( "core_sub_operation_wpa_connect_c::notify() - marking is_eapol_authentication_started as false" );
-            server_m->get_connection_data()->set_eapol_authentication_started(
-                false_t );
-
-            asynch_goto( core_state_bss_lost );
-
-            return true_t;
-            }
-
         /**
          * EAPOL indication will move the state machine forward.
          */
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_traffic_stream_list_iter.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_traffic_stream_list_iter.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_virtual_traffic_stream_list_iter.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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_common/wlanengine_common_3.1/src/core_wlan_eapol_if_message.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_wlan_eapol_if_message.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: 14 %
 */
 
 #include "core_wlan_eapol_if_message.h"
@@ -4059,4 +4059,43 @@
     return core_error_ok;
     }
 
-
+core_error_e core_wlan_eapol_if_function_c::parse_complete_disassociation(
+    network_id_c * receive_network_id )
+    {
+    DEBUG( "core_wlan_eapol_if_function_c::parse_complete_disassociation()" );
+    ASSERT( receive_network_id );
+
+    core_error_e error( core_error_ok );
+
+    first();
+    if ( is_done() )
+        {
+        DEBUG( "core_wlan_eapol_if_function_c::parse_complete_disassociation() - message is empty" );
+        return core_error_not_found;
+        }
+
+    // Check function
+    if ( current()->get_parameter_type() != wlan_eapol_if_message_type_function )
+        {
+        return core_error_not_found;
+        }
+
+    u32_t function_value(0);
+    current()->get_parameter_data( &function_value );
+    wlan_eapol_if_message_type_function_e func( static_cast<wlan_eapol_if_message_type_function_e>( function_value ) );
+    if ( func != wlan_eapol_if_message_type_function_complete_disassociation )
+        {
+        return core_error_not_found;
+        }
+    
+    next();
+
+    // Check function parameters
+    error = parse_network_id( receive_network_id );
+    if ( error != core_error_ok )
+        {
+        return error;
+        }
+
+    return core_error_ok;
+    }
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/bwinscw/wlmserveru.def	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/bwinscw/wlmserveru.def	Thu Jul 22 16:49:43 2010 +0100
@@ -1,7 +1,7 @@
 EXPORTS
 	?CancelCreateTrafficStream@RWLMServer@@QAEXXZ @ 1 NONAME ; void RWLMServer::CancelCreateTrafficStream(void)
 	?GetScanResults@RWLMServer@@QAEXAAVScanList@@ABVTDesC8@@AAHAAIAAVTRequestStatus@@@Z @ 2 NONAME ; void RWLMServer::GetScanResults(class ScanList &, class TDesC8 const &, int &, unsigned int &, class TRequestStatus &)
-	?RunProtectedSetup@RWLMServer@@QAEXAAVTRequestStatus@@KAAVTDes8@@@Z @ 3 NONAME ; void RWLMServer::RunProtectedSetup(class TRequestStatus &, unsigned long, class TDes8 &)
+	?RunProtectedSetup@RWLMServer@@QAEXAAVTRequestStatus@@ABV?$TBuf8@$0CA@@@ABV?$TBuf8@$07@@AAVTDes8@@@Z @ 3 NONAME ; void RWLMServer::RunProtectedSetup(class TRequestStatus &, class TBuf8<32> const &, class TBuf8<8> const &, class TDes8 &)
 	?RemoveIapSsidList@RWLMServer@@QAEHI@Z @ 4 NONAME ; int RWLMServer::RemoveIapSsidList(unsigned int)
 	?ClearPacketStatistics@RWLMServer@@QAEXXZ @ 5 NONAME ; void RWLMServer::ClearPacketStatistics(void)
 	?AddIapSsidList@RWLMServer@@QAEHIABV?$CArrayFixFlat@V?$TBuf8@$0CA@@@@@@Z @ 6 NONAME ; int RWLMServer::AddIapSsidList(unsigned int, class CArrayFixFlat<class TBuf8<32> > const &)
Binary file wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/conf/wlanengine.confml has changed
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmserveru.def	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmserveru.def	Thu Jul 22 16:49:43 2010 +0100
@@ -19,7 +19,7 @@
 	_ZN10RWLMServer17ActivateNotifiesLER10MWLMNotifym @ 18 NONAME
 	_ZN10RWLMServer17GetConnectionRCPIERl @ 19 NONAME
 	_ZN10RWLMServer17RemoveIapSsidListEj @ 20 NONAME
-	_ZN10RWLMServer17RunProtectedSetupER14TRequestStatusmR5TDes8 @ 21 NONAME
+	_ZN10RWLMServer17RunProtectedSetupER14TRequestStatusRK5TBuf8ILi32EERKS2_ILi8EER5TDes8 @ 21 NONAME
 	_ZN10RWLMServer18CancelDirectedRoamEv @ 22 NONAME
 	_ZN10RWLMServer18ConfigureMulticastEjRK11TMacAddress @ 23 NONAME
 	_ZN10RWLMServer18GetAcTrafficStatusER11TFixedArrayI19TWlmAcTrafficStatusLi4EE @ 24 NONAME
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/group/wlmserversrv.mmh	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/group/wlmserversrv.mmh	Thu Jul 22 16:49:43 2010 +0100
@@ -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/rwlmserver.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/rwlmserver.h	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 25 %
+* %version: 27 %
 */
 
 #ifndef RWLMSERVER_H
@@ -365,12 +365,15 @@
         /**
          * Run Protected Setup.
          * @param aStatus  Status of the calling active object.
-         * @param aId IAP ID of network which user has selected to be configured.
+         * @param aSsid SSID of the network to configure.
+         * @param aWpsPin PIN value to be used. "00000000" (string of eight zeros)
+         *                if push button method is used.
          * @param Results of a successful Protected Setup operation.
          */
         IMPORT_C void RunProtectedSetup(
             TRequestStatus& aStatus,
-            TUint32 aId,
+            const TWlanSsid& aSsid,
+            const TWlanWpsPin& aWspPin,  
             TDes8& aCredentials );
 
         /**
@@ -592,6 +595,13 @@
 
         /** Buffer for storing BSSID to roam to. */
         TPckgBuf<TMacAddress> iRoamBssidPckg; 
+
+        /** Buffer for storing SSID for Protected setup. */
+        TPckgBuf<TWlanSsid> iWlanSsidPckg; 
+
+        /** Buffer for storing pincode for Protected setup. */
+        TPckgBuf<TWlanWpsPin> iWlanWpsPinPckg; 
+
     };
 
 #endif // RWLMSERVER_H
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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/wlanconversionutil.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanconversionutil.h	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 34 %
+* %version: 35 %
 */
 
 #ifndef WLANCONVERSIONUTIL_H
@@ -83,6 +83,16 @@
         static void ConvertSSID(
             TSSID& aAmSSID,
             const core_ssid_s& aCoreSSID );
+        
+        /**
+        * ConvertWpaPreSharedKey
+        * @since Series 60 3.0
+        * @param aWpaPreSharedKey (OUT)
+        * @param aWspPin (IN)
+        */    
+        static void ConvertWpaPreSharedKey(
+            core_wpa_preshared_key_s& aWpaPreSharedKey,
+            const TDesC8& aWspPin );
 
         /**
         * ConvertScanRate
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlandevicesettings.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlandevicesettings.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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/wlanmgmtimpl.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanmgmtimpl.h	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 21 %
+* %version: 22 %
 */
 
 #ifndef WLANMGMTIMPL_H
@@ -307,15 +307,20 @@
         /**
          * (From MWlanMgmtInterface)
          * Start Protected Setup.
+         *
          * @param aStatus Status of the calling active object. On successful
          *                completion contains KErrNone, otherwise one of the
          *                system-wide error codes.
-         * @param aId Service ID of network which user has selected to be configured.
+         * @param aSsid SSID of the network to configure.
+         * @param aWpsPin PIN value to be used. "00000000" (string of eight zeros)
+         *                if push button method is used.
          * @param aCredentials Results of a successful Protected Setup operation.
-        */
+         * @sa \link psetup Protected Setup-specific error codes \endlink.
+         */
         virtual void RunProtectedSetup(
             TRequestStatus& aStatus,
-            TUint32 aId,
+            const TWlanSsid& aSsid,
+            const TWlanWpsPin& aWpsPin,
             CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials );
 
         /**
@@ -765,7 +770,8 @@
         CProtectedSetupRequest(
             CWlanMgmtImpl& aCallback,
             RWLMServer& aServer,
-            TUint32 aId,
+            const TWlanSsid& aSsid,
+            const TWlanWpsPin& aWpsPin,
             CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials );
 
         /**
@@ -811,8 +817,11 @@
         // Interface to RWLMServer
         RWLMServer& iServer;
 
-        // Service ID of network which user has selected to be configured.
-        TUint32 iServiceId;
+        // SSID of the network to configure.
+        TWlanSsid iSsid;
+
+        // PIN value to be used. 
+        TWlanWpsPin iWpsPin;
 
         // Results of a successful Protected Setup operation.
         CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& iCredentials;
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatformdata.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.inl	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmsystemnotify.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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/rwlmserver.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/rwlmserver.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 28 %
+* %version: 30 %
 */
 
 #include <in_sock.h>
@@ -541,13 +541,18 @@
 //
 EXPORT_C void RWLMServer::RunProtectedSetup(
     TRequestStatus& aStatus,
-    TUint32 aId,
+    const TWlanSsid& aSsid,
+    const TWlanWpsPin& aWspPin,  
     TDes8& aCredentials )
     {
     DEBUG( "RWLMServer::RunProtectedSetup(TRequestStatus)" );
 
     aStatus = KRequestPending;
-    TIpcArgs params( aId, &aCredentials );
+    
+    iWlanSsidPckg = aSsid;
+    iWlanWpsPinPckg = aWspPin;
+    
+    TIpcArgs params( &iWlanSsidPckg, &iWlanWpsPinPckg, &aCredentials );
 
     // Send the command
     SendReceive( ERunProtectedSetup, params, aStatus );
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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/wlanconversionutil.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanconversionutil.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 86 %
+* %version: 87 %
 */
 
 #include <in_sock.h>
@@ -104,6 +104,21 @@
     }
 
 // ---------------------------------------------------------
+// TWlanConversionUtil::ConvertWpaPreSharedKey()
+// ---------------------------------------------------------
+//
+void TWlanConversionUtil::ConvertWpaPreSharedKey(
+    core_wpa_preshared_key_s& aWpaPreSharedKey,
+    const TDesC8& aWspPin )
+    {        
+    Mem::Copy(
+        aWpaPreSharedKey.key_data,
+        aWspPin.Ptr(),
+        aWspPin.Length() );
+    aWpaPreSharedKey.key_length = aWspPin.Length();
+    }
+
+// ---------------------------------------------------------
 // TWlanConversionUtil::ConvertScanRate()
 // ---------------------------------------------------------
 //
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtframehandler.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtframehandler.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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.
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtimpl.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtimpl.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 31 %
+* %version: 32 %
 */
 
 // INCLUDE FILES
@@ -530,7 +530,8 @@
 //
 void CWlanMgmtImpl::RunProtectedSetup(
     TRequestStatus& aStatus,
-    TUint32 aId,
+    const TWlanSsid& aSsid,
+    const TWlanWpsPin& aWpsPin,
     CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials )
     {
     TraceDump( INFO_LEVEL, ( _L( "CWlanMgmtImpl::RunProtectedSetup()" ) ) );
@@ -540,7 +541,7 @@
     aStatus = KRequestPending;
     iPendingProtectedSetupStatus = &aStatus;
 
-    iProtectedSetupRequest = new CProtectedSetupRequest( *this, iServer, aId, aCredentials );
+    iProtectedSetupRequest = new CProtectedSetupRequest( *this, iServer, aSsid, aWpsPin, aCredentials );
     if ( !iProtectedSetupRequest )
         {
         User::RequestComplete( iPendingProtectedSetupStatus, KErrNoMemory );
@@ -1140,12 +1141,14 @@
 CProtectedSetupRequest::CProtectedSetupRequest( 
     CWlanMgmtImpl& aCallback, 
     RWLMServer& aServer, 
-    TUint32 aId,
+    const TWlanSsid& aSsid,
+    const TWlanWpsPin& aWpsPin, 
     CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) :
     CActive( CActive::EPriorityStandard ),
     iCallback( aCallback ),
     iServer( aServer ),
-    iServiceId( aId ),
+    iSsid( aSsid ),
+    iWpsPin( aWpsPin ),
     iCredentials ( aCredentials ),
     iCredentialsBuf( iCredentialsStorage )
     {
@@ -1168,7 +1171,7 @@
 void CProtectedSetupRequest::IssueRequest()
     {
     TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::IssueRequest()" ) ) );
-    iServer.RunProtectedSetup( iStatus, iServiceId, iCredentialsBuf );
+    iServer.RunProtectedSetup( iStatus, iSsid, iWpsPin, iCredentialsBuf );
     SetActive();
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanticktimer.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -0,0 +1,134 @@
+/*
+* 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: 2 %
+*/
+
+#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()
+    {
+    Cancel();
+    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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatformdata.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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/wlmscanrequest.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmscanrequest.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -29,7 +29,7 @@
     {
     DEBUG( "CWlmScanRequest::NewL()" );
 
-    CWlmScanRequest* self = new CWlmScanRequest(
+    CWlmScanRequest* self = new (ELeave) CWlmScanRequest(
         aClient );
     CleanupStack::PushL( self );
     self->ConstructL();
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 106 %
+* %version: 109 %
 */
 
 #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 );
                 
                 }
             }
@@ -2394,7 +2396,7 @@
         if( IsSessionActive( completedMapEntry ) )
             {
             TPckg<TWlmProtectedSetupCredentials> outPckg( tmp );
-            completedMapEntry.iMessage.Write( 1, outPckg );
+            completedMapEntry.iMessage.Write( 2, outPckg );
             }
 
         if( status == core_error_ok && IsSessionActive( completedMapEntry ) )
@@ -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,46 +4388,53 @@
 	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 );
 		return;
 		}
-    
-    // Get WlanSettings and secondarySSID list
-    // (lanServiceId specifies the table row in wlansettings)
-    SWLANSettings iapData;
-    RArray<TWlanSecondarySsid> secondarySsidList;
-    TInt lanServiceId = aMessage.Int0();
-    TRAPD( err, GetIapSettingsL( lanServiceId, iapData, secondarySsidList ) ) ;
-    if( err != KErrNone )
+        
+    TPckgBuf<TWlanSsid> ssidPckg;
+    TInt ret( aMessage.Read( 0, ssidPckg ) );
+    if( ret != KErrNone )
         {
-        DEBUG1( "CWlmServer::RunProtectedSetup() - GetIapSettingsL leaved with %d",
-            err );
-        secondarySsidList.Close();
-        aMessage.Complete( err );
+        aMessage.Complete( ret );
         return;
         }
-    secondarySsidList.Close();
-
-    // Type conversion
+    
+    TPckgBuf<TWlanWpsPin> wpsPinPckg;
+    ret = aMessage.Read( 1, wpsPinPckg );
+    if( ret != KErrNone )
+        {
+        aMessage.Complete( ret );
+        return;
+        }
+    
     core_iap_data_s* coreIapData = new core_iap_data_s;
     if( !coreIapData )
         {
         aMessage.Complete( KErrNoMemory );
         return;
         }
-
-    TWLMOverrideSettings override = { 0 };
-    TWlanConversionUtil::ConvertIapSettings(
-        *coreIapData, 
-        iapData, 
-        ETrue, // dhcp usage is not important here
-        override );
-
-
-    // Create a list for the results.
+    
+    coreIapData->id = 0;
+    coreIapData->op_mode = core_operating_mode_infrastructure;
+    coreIapData->security_mode = core_security_mode_protected_setup;
+    coreIapData->wpa_preshared_key_in_use = ETrue; 
+    coreIapData->is_wpa_overriden = ETrue;
+    
+    // Type conversion
+    TWlanConversionUtil::ConvertSSID(
+         coreIapData->ssid,
+         ssidPckg() );
+    
+    // Type conversion
+    TWlanConversionUtil::ConvertWpaPreSharedKey(
+         coreIapData->wpa_preshared_key,
+         wpsPinPckg() );
+    
+    // Create a list for the results.  
     core_type_list_c<core_iap_data_s>* iapDataList = new core_type_list_c<core_iap_data_s>;
     if( iapDataList == NULL )
         {
@@ -5013,7 +5026,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 +5245,7 @@
 	if( iIsStartupComplete )
 	    {
 	    // Enable background scanning
-	    iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
+	    iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
 	    }
 	}
 
@@ -5242,10 +5255,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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.h	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 105 %
+* %version: 107 %
 */
 
 #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.
@@ -1310,11 +1310,13 @@
     * @param aQueueId Id of the queue/AC via which the frame will be 
     *                 transmitted
     * @param aEtherType Ethernet type of the frame
+    * @param aDot11FrameType 802.11 frame type
     * @return To which power management mode to change; if any at all
     */
     inline TPowerMgmtModeChange OnFrameTx( 
         WHA::TQueueId aQueueId,
-        TUint16 aEtherType );
+        TUint16 aEtherType,
+        T802Dot11FrameControlTypeMask aDot11FrameType = E802Dot11FrameTypeData );
 
     /** 
     * To be called when accepting an Rx frame
@@ -1333,6 +1335,16 @@
         TDaType aDaType );
                         
     /**
+    * To be called when receiving the PS Mode Error indication
+    * 
+    * Informs Dynamic Power Mode Manager about the indication.
+    * Determines the need to make a power mode transition.
+    *
+    * @return To which power management mode to change; if any at all
+    */
+    inline TPowerMgmtModeChange OnPsModeErrorIndication();
+    
+    /**
     * Sets the dynamic power mode transition algorithm parameters
     *
     * @since S60 3.1
@@ -1415,6 +1427,12 @@
     inline void FreezePwrModeMgmtTrafficOverride();
 
     /**
+    * Restores the Active mode parameters of dynamic power mode management 
+    * back to their WLAN Mgmt Client provided values
+    */
+    inline void RestorePwrModeMgmtParameters();
+
+    /**
     * To be called upon Active to Light PS timer timeout
     *
     * @since S60 v5.1
@@ -1760,7 +1778,15 @@
     *
     * @since S60 3.2
     */
-    void OnKeepAliveTimerTimeout();    
+    inline void OnKeepAliveTimerTimeout();
+    
+    /** 
+    * Are we currently in Voice over WLAN Call state
+    * 
+    * @return ETrue if we are
+    *         EFalse if we are not
+    */
+    inline TBool InVoiceCallState() const;
     
     /**
      * Insert new RCPI value into the Signal Predictor.
@@ -1804,13 +1830,27 @@
         WHA::TRcpi aRcpiWarnLevel );
 
     /**
-     * Adds a WLAN feature supported by us to the list of those supported
-     * features which are indicated in BSS membership selector
+     * Adds the specified WLAN feature supported by us to the list of those 
+     * supported features which are indicated in BSS membership selector
      *
      * @param aFeature Feature to add
      */
     void AddBssMembershipFeature( T802Dot11BssMembershipSelector aFeature );
-
+    
+    /**
+     * Removes the specified WLAN feature from our list of those supported
+     * features which are indicated in BSS membership selector
+     *
+     * @param aFeature Feature to remove
+     */
+    void RemoveBssMembershipFeature( TUint8 aItem );
+    
+    /**
+     * Clears (i.e. makes empty) our list of features which are indicated 
+     * in BSS membership selector
+     */
+    inline void ClearBssMembershipFeatureList();
+    
     /**
      * Checks if the specified item is a WLAN feature indicated in BSS 
      * membership selector and if it is supported by us
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.inl	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.inl	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 77 %
+* %version: 79 %
 */
 
 #include "umacconnectcontext.h"
@@ -420,7 +420,7 @@
 // 
 // ---------------------------------------------------------------------------
 //
-inline const TUint16 WlanContextImpl::ScanResponseFrameBodyLength() const
+inline TUint16 WlanContextImpl::ScanResponseFrameBodyLength() const
     {
     return iConnectContext.iScanResponseFrameBodyLength;
     }
@@ -1610,9 +1610,13 @@
 //
 inline TPowerMgmtModeChange WlanContextImpl::OnFrameTx( 
     WHA::TQueueId aQueueId,
-    TUint16 aEtherType )
+    TUint16 aEtherType,
+    T802Dot11FrameControlTypeMask aDot11FrameType )
     {
-    return iDynamicPowerModeCntx.OnFrameTx( aQueueId, aEtherType );
+    return iDynamicPowerModeCntx.OnFrameTx( 
+        aQueueId, 
+        aEtherType, 
+        aDot11FrameType );
     }
 
 // ---------------------------------------------------------------------------
@@ -1636,6 +1640,15 @@
 // 
 // ---------------------------------------------------------------------------
 //
+inline TPowerMgmtModeChange WlanContextImpl::OnPsModeErrorIndication()
+    {
+    return iDynamicPowerModeCntx.OnPsModeErrorIndication();
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
 inline void WlanContextImpl::SetPowerModeManagementParameters(
     TUint32 aToLightPsTimeout,
     TUint16 aToLightPsFrameThreshold,
@@ -1693,6 +1706,15 @@
 // 
 // ---------------------------------------------------------------------------
 //
+inline void WlanContextImpl::RestorePwrModeMgmtParameters()
+    {
+    iDynamicPowerModeCntx.RestoreActiveModeParameters();
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
 inline TBool WlanContextImpl::OnActiveToLightPsTimerTimeout()
     {
     return iDynamicPowerModeCntx.OnActiveToLightPsTimerTimeout();
@@ -2059,6 +2081,15 @@
 // 
 // ---------------------------------------------------------------------------
 //
+inline TBool WlanContextImpl::InVoiceCallState() const
+    {
+    return iNullSendController.InVoiceCallState();
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
 inline TBool WlanContextImpl::InsertNewRcpiIntoPredictor( 
     TInt64 aTimestamp, 
     WHA::TRcpi aRcpi )
@@ -2100,6 +2131,18 @@
         aRcpiWarnLevel );
     }
 
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+inline void WlanContextImpl::ClearBssMembershipFeatureList()
+    {
+    os_memset( 
+        &iOurBssMembershipFeatureArray, 
+        KUnallocated, 
+        sizeof( iOurBssMembershipFeatureArray ) );
+    }
+
 // ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11Associated.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11Associated.h	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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: 46 %
+* %version: 47 %
 */
 
 #ifndef WLANDOT11ASSOCIATED_H
@@ -511,37 +511,6 @@
         TBool aMulticastData );            
 
     /**
-    * Adds a multicast MAC address and starts to filter (Rx) multicast 
-    * traffic sent to any other MAC addresses than those that have been 
-    * specified using this method
-    * @param aCtxImpl statemachine context
-    * @param aMacAddr The address to be added
-    * @return ETrue if a state change occurred in the state machine 
-    *         EFalse otherwise
-    */
-    virtual TBool AddMulticastAddr(
-        WlanContextImpl& aCtxImpl,
-        const TMacAddress& aMacAddr );
-        
-    /**
-    * Removes a multicast MAC address from multicast (Rx) filtering
-    * configuration. So any packet that we receive and which has been sent
-    * to the multicast address in question is not accepted any more (i.e. 
-    * it is filtered).
-    * However, if there are no addresses left in the multicast (Rx) filtering
-    * configuration after this remove, the multicast filtering is disabled
-    * and all (otherwise acceptable) multicast packets are accepted again.
-    * @param aCtxImpl statemachine context
-    * @param aMacAddr The address to be removed
-    * @return ETrue if a state change occurred in the state machine 
-    *         EFalse otherwise
-    */
-    virtual TBool RemoveMulticastAddr(
-        WlanContextImpl& aCtxImpl,
-        TBool aRemoveAll,
-        const TMacAddress& aMacAddr );
-
-    /**
      * From MWlanUserEvent
      * Add/set (or replace) a broadcast WEP key
      *
@@ -582,16 +551,6 @@
             TUint32 aMaxTxMSDULifetime );
         
     /**
-    * Sets the WHA::KMibDot11GroupAddressesTable MIB
-    * 
-    * @param aCtxImpl statemachine context
-    * @return ETrue if a state change occurred in the state machine 
-    *         EFalse otherwise
-    */
-    TBool SetGroupAddressesTableMib(
-        WlanContextImpl& aCtxImpl );
-
-    /**
     * If the power mgmt mode needs to be changed - based on 
     * aPowerMgmtModeChange - proceeds with the necessary actions
     * 
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11InfrastructureMode.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11InfrastructureMode.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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: 34 %
+* %version: 35 %
 */
 
 #ifndef WLANDOT11INFRASTRUCTUREMODE_H
@@ -274,14 +274,6 @@
         WHA::TRcpi aRcpi );
 
     /**
-    * Indicates that the WLAN device has detected problems in the power
-    * save mode operation of the AP
-    * 
-    * @param aCtxImpl global statemachine context
-    */
-    virtual void DoPsModeErrorIndication( WlanContextImpl& aCtxImpl );
-    
-    /**
     * Voice Call Entry timer timeout function
     *
     * @since S60 v3.2
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11State.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11State.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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: 57 %
+* %version: 58 %
 */
 
 #ifndef WLANDOT11STATE_H
@@ -859,6 +859,37 @@
         const TMacAddress& aMacAddr );
 
     /**
+    * Adds a multicast MAC address and starts to filter (Rx) multicast 
+    * traffic sent to any other MAC addresses than those that have been 
+    * specified using this method
+    * @param aCtxImpl statemachine context
+    * @param aMacAddr The address to be added
+    * @return ETrue if a state change occurred in the state machine 
+    *         EFalse otherwise
+    */
+    virtual TBool AddMulticastAddr(
+        WlanContextImpl& aCtxImpl,
+        const TMacAddress& aMacAddr );
+        
+    /**
+    * Removes a multicast MAC address from multicast (Rx) filtering
+    * configuration. So any packet that we receive and which has been sent
+    * to the multicast address in question is not accepted any more (i.e. 
+    * it is filtered).
+    * However, if there are no addresses left in the multicast (Rx) filtering
+    * configuration after this remove, the multicast filtering is disabled
+    * and all (otherwise acceptable) multicast packets are accepted again.
+    * @param aCtxImpl statemachine context
+    * @param aMacAddr The address to be removed
+    * @return ETrue if a state change occurred in the state machine 
+    *         EFalse otherwise
+    */
+    virtual TBool RemoveMulticastAddr(
+        WlanContextImpl& aCtxImpl,
+        TBool aRemoveAll,
+        const TMacAddress& aMacAddr );
+
+    /**
     * Set transmission power level. 
     * This has to be legal at the current region.
     * @param aCtxImpl statemachine context
@@ -1122,6 +1153,16 @@
         const TSnapHeader& aSnapHeader );        
 
     /**
+    * Sets the WHA::KMibDot11GroupAddressesTable MIB
+    * 
+    * @param aCtxImpl statemachine context
+    * @return ETrue if a state change occurred in the state machine 
+    *         EFalse otherwise
+    */
+    TBool SetGroupAddressesTableMib(
+        WlanContextImpl& aCtxImpl );
+
+    /**
      * Sets the beacon lost count value
      *
      * @since S60 v3.1
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacProtocolStackSideUmacCb.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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/inc/umacactivemodepowermodemgr.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacactivemodepowermodemgr.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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: 9 %
+* %version: 10 %
 */
 
 #ifndef WLAN_ACTIVE_MODE_POWER_MODE_MGR
@@ -26,13 +26,22 @@
 
 class WlanContextImpl;
 
+
 /**
 * Class implementing infrastructure mode dynamic power mode management 
 * algorithm for Active mode (CAM)
 */
 class WlanActiveModePowerModeMgr : public WlanPowerModeMgrBase
-    {    
-
+    {
+    
+public:
+    /** 
+    * Default Rx/Tx frame count threshold for considering change to Light 
+    * PS mode.
+    * This value is used if another value hasn't been provided
+    */
+    static const TUint KDefaultToLightPsFrameThreshold = 1;
+    
 public:
     
     /** Ctor */
@@ -62,6 +71,7 @@
     * @param aCtxImpl global statemachine context
     * @param aQueueId Id of the queue/AC via which the frame will be transmitted
     * @param aEtherType Ethernet type of the frame
+    * @param aDot11FrameType 802.11 frame type
     * @param aIgnoreThisFrame shall this frame be ignored from dynamic power 
     *                         mode management perspective
     * @return To which power management mode to change; if any at all
@@ -70,6 +80,7 @@
         WlanContextImpl& aCtxImpl, 
         WHA::TQueueId aQueueId,
         TUint16 aEtherType,
+        T802Dot11FrameControlTypeMask aDot11FrameType,
         TBool aIgnoreThisFrame );
 
     /** 
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacactivemodepowermodemgr.inl	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacactivemodepowermodemgr.inl	Thu Jul 22 16:49:43 2010 +0100
@@ -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: 4 %
+* %version: 5 %
 */
 
 // -----------------------------------------------------------------------------
@@ -27,6 +27,15 @@
     TUint aToLightPsFrameThreshold,
     TUint16 aUapsdRxFrameLengthThreshold )
     {
+    OsTracePrint( KPwrStateTransition, (TUint8*)
+        ("UMAC: WlanActiveModePowerModeMgr::SetParameters: "
+         "aToLightPsFrameThreshold: %d"),
+        aToLightPsFrameThreshold );
+    OsTracePrint( KPwrStateTransition, (TUint8*)
+        ("UMAC: WlanActiveModePowerModeMgr::SetParameters: "
+         "aUapsdRxFrameLengthThreshold: %d"),
+        aUapsdRxFrameLengthThreshold );
+
     iToLightPsFrameThreshold = aToLightPsFrameThreshold;
     iUapsdRxFrameLengthThreshold = aUapsdRxFrameLengthThreshold;    
     }
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdeeppsmodepowermodemgr.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdeeppsmodepowermodemgr.h	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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: 3 %
+* %version: 4 %
 */
 
 #ifndef WLAN_DEEP_PS_MODE_POWER_MODE_MGR
@@ -42,6 +42,14 @@
     virtual ~WlanDeepPsModePowerModeMgr();
     
     /**
+    * Sets the dynamic power mode transition algorithm parameters
+    *
+    * @param aUapsdRxFrameLengthThreshold received frame 
+    *        payload length (in bytes) threshold in U-APSD network
+    */
+    void SetParameters( TUint16 aUapsdRxFrameLengthThreshold );
+    
+    /**
     * To be called when transmitting a frame
     *
     * @since S60 5.1
@@ -49,6 +57,7 @@
     * @param aCtxImpl global statemachine context
     * @param aQueueId Id of the queue/AC via which the frame will be transmitted
     * @param aEtherType Ethernet type of the frame
+    * @param aDot11FrameType 802.11 frame type
     * @param aIgnoreThisFrame shall this frame be ignored from dynamic power 
     *                         mode management perspective
     * @return To which power management mode to change; if any at all
@@ -57,6 +66,7 @@
         WlanContextImpl& aCtxImpl, 
         WHA::TQueueId aQueueId,
         TUint16 aEtherType,
+        T802Dot11FrameControlTypeMask aDot11FrameType,
         TBool aIgnoreThisFrame );
 
     /** 
@@ -80,6 +90,15 @@
         TUint aPayloadLength,
         TDaType aDaType );
     
+    /**
+    * From WlanPowerModeMgrBase
+    * To be called upon receiving the PS Mode Error indication
+    * Determines the need to make a power mode transition
+    *
+    * @return To which power management mode to change; if any at all
+    */
+    virtual TPowerMgmtModeChange OnPsModeErrorIndication();
+    
     /** 
     * From WlanPowerModeMgrBase
     * Resets the state of the object 
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdot11infrastructurenormalmode.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdot11infrastructurenormalmode.h	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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: 10 %
+* %version: 11 %
 */
 
 #ifndef C_WLANDOT11INFRASTRUCTURENORMALMODE_H
@@ -54,6 +54,16 @@
         WlanContextImpl& aCtxImpl );  
         
     /**
+    * Indicates that the WLAN device has detected problems in the power
+    * save mode operation of the AP
+    * 
+    * @param aCtxImpl global statemachine context
+    * @return ETrue if a state change occurred in the state machine
+    *         EFalse otherwise
+    */
+    virtual void DoPsModeErrorIndication( WlanContextImpl& aCtxImpl );
+    
+    /**
     * Active to Light PS timer timeout function
     *
     * @since S60 v5.1
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdynamicpowermodemgmtcntx.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdynamicpowermodemgmtcntx.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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: 12 %
+* %version: 13 %
 */
 
 #ifndef WLAN_DYNAMIC_POWER_MODE_MGMT_CNTX
@@ -66,11 +66,13 @@
     * @since S60 3.1
     * @param aQueueId Id of the queue/AC via which the frame will be transmitted
     * @param aEtherType Ethernet type of the frame
+    * @param aDot11FrameType 802.11 frame type
     * @return To which power management mode to change; if any at all
     */
     TPowerMgmtModeChange OnFrameTx( 
         WHA::TQueueId aQueueId, 
-        TUint16 aEtherType );
+        TUint16 aEtherType,
+        T802Dot11FrameControlTypeMask aDot11FrameType );
 
     /** 
     * To be called when accepting an Rx frame
@@ -89,6 +91,14 @@
         TDaType aDaType );
                         
     /**
+    * To be called upon receiving the PS Mode Error indication
+    * Determines the need to make a power mode transition
+    *
+    * @return To which power management mode to change; if any at all
+    */
+    TPowerMgmtModeChange OnPsModeErrorIndication();
+    
+    /**
     * To be called upon Active to Light PS timer timeout
     *
     * @since S60 v5.1
@@ -194,6 +204,12 @@
     */
     void FreezeTrafficOverride();
 
+    /**
+    * Restores the Ative mode parameters back to their WLAN Mgmt Client 
+    * provided values
+    */
+    inline void RestoreActiveModeParameters();
+    
 private:
     
     /** 
@@ -322,7 +338,25 @@
     * @return ETrue if Background AC traffic shall be ignored
     */
     inline TBool StayInPsDespiteLegacyBackgroundTraffic() const;
-        
+    
+    /** 
+    * Sets special parameters for the Active mode.
+    * To be used when switching to Active upen receiving PsModeError 
+    * indication from WHA layer.
+    * The Wlan Mgmt Client provided Active mode parameters can be restored
+    * with RestoreActiveModeParameters()
+    */
+    inline void SetPsModeErrorActiveModeParameters();
+
+    /** 
+    * Sets special parameters for the Active mode.
+    * To be used when switching to Active upon transmitting our keep alive 
+    * frame or an ARP frame.
+    * The Wlan Mgmt Client provided Active mode parameters can be restored
+    * with RestoreActiveModeParameters()
+    */
+    inline void SetKeepAliveActiveModeParameters();
+    
     // Prohibit copy constructor
     WlanDynamicPowerModeMgmtCntx( 
         const WlanDynamicPowerModeMgmtCntx& );
@@ -331,7 +365,15 @@
         ( const WlanDynamicPowerModeMgmtCntx& );
 
 private:    // Data
-        
+
+    /** for backing up the parameters related to Active mode */
+    struct SActiveParamsBackup
+        {
+        TUint32 iToLightPsTimeout;
+        TUint16 iToLightPsFrameThreshold;
+        TUint16 iUapsdRxFrameLengthThreshold;
+        };
+    
     /** flag value to store state transition need internally */
     TBool                       iStateChange; 
     /** stores the flags defined below */
@@ -383,18 +425,27 @@
     /** ToDeepPsTimer started */
     static const TUint32 KToDeepPsTimerStarted = ( 1 << 10 );
     
-    // time interval in microseconds after which transition from Active
-    // mode to Light PS mode is considered. 
+    /** 
+    * time interval in microseconds after which transition from Active
+    * mode to Light PS mode is considered.
+    */ 
     TUint32 iToLightPsTimeout;
 
-    // time interval in microseconds after which the frame counter
-    // used when considering transition from Light PS to Active mode is reset.
+    /**
+    * time interval in microseconds after which the frame counter
+    * used when considering transition from Light PS to Active mode is reset.
+    */
     TUint32 iToActiveTimeout;
 
-    // time interval in microseconds after which transition from Light PS
-    // mode to Deep PS mode is considered. 
+    /**
+    * time interval in microseconds after which transition from Light PS
+    * mode to Deep PS mode is considered.
+    */ 
     TUint32 iToDeepPsTimeout;
-
+    
+    /** for backing up the parameters related to Active mode */
+    SActiveParamsBackup iActiveParamsBackup;
+    
     /** currently active power management mode context */
     WlanPowerModeMgrBase*       iActiveCntx;
     /** context for active mode */
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdynamicpowermodemgmtcntx.inl	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacdynamicpowermodemgmtcntx.inl	Thu Jul 22 16:49:43 2010 +0100
@@ -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,9 +16,21 @@
 */
 
 /*
-* %version: 5 %
+* %version: 6 %
 */
 
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+inline void WlanDynamicPowerModeMgmtCntx::RestoreActiveModeParameters()
+    {
+    iToLightPsTimeout = iActiveParamsBackup.iToLightPsTimeout;
+    iActiveModeCntx.SetParameters( 
+        iActiveParamsBackup.iToLightPsFrameThreshold, 
+        iActiveParamsBackup.iUapsdRxFrameLengthThreshold );
+    }
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
@@ -109,3 +121,37 @@
     {    
     return ( iFlags & KStayInPsDespiteLegacyBackgroundTraffic );
     }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+inline void WlanDynamicPowerModeMgmtCntx::SetPsModeErrorActiveModeParameters()
+    {
+    const TUint32 KToLightPsTimeout( 1000000 ); // 1 second
+    const TUint16 KToLightPsFrameThreshold( 4 );
+    const TUint16 KUapsdRxFrameLengthThreshold(
+        WlanPowerModeMgrBase::KDefaultUapsdRxFrameLengthThreshold );
+    
+    iToLightPsTimeout = KToLightPsTimeout;
+    iActiveModeCntx.SetParameters( 
+        KToLightPsFrameThreshold, 
+        KUapsdRxFrameLengthThreshold );
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+inline void WlanDynamicPowerModeMgmtCntx::SetKeepAliveActiveModeParameters()
+    {
+    const TUint32 KToLightPsTimeout( 20000 ); // 20ms
+    const TUint16 KToLightPsFrameThreshold( 1 );
+    const TUint16 KUapsdRxFrameLengthThreshold(
+        WlanPowerModeMgrBase::KDefaultUapsdRxFrameLengthThreshold );
+    
+    iToLightPsTimeout = KToLightPsTimeout;
+    iActiveModeCntx.SetParameters( 
+        KToLightPsFrameThreshold, 
+        KUapsdRxFrameLengthThreshold );
+    }
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umaclightpsmodepowermodemgr.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umaclightpsmodepowermodemgr.h	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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: 3 %
+* %version: 4 %
 */
 
 #ifndef WLAN_LIGHT_PS_MODE_POWER_MODE_MGR
@@ -65,6 +65,7 @@
     * @param aCtxImpl global statemachine context
     * @param aQueueId Id of the queue/AC via which the frame will be transmitted
     * @param aEtherType Ethernet type of the frame
+    * @param aDot11FrameType 802.11 frame type
     * @param aIgnoreThisFrame shall this frame be ignored from dynamic power 
     *                         mode management perspective
     * @return To which power management mode to change; if any at all
@@ -73,6 +74,7 @@
         WlanContextImpl& aCtxImpl, 
         WHA::TQueueId aQueueId,
         TUint16 aEtherType,
+        T802Dot11FrameControlTypeMask aDot11FrameType,
         TBool aIgnoreThisFrame );
 
     /** 
@@ -98,6 +100,15 @@
     
     /**
     * From WlanPowerModeMgrBase
+    * To be called upon receiving the PS Mode Error indication
+    * Determines the need to make a power mode transition
+    *
+    * @return To which power management mode to change; if any at all
+    */
+    virtual TPowerMgmtModeChange OnPsModeErrorIndication();
+    
+    /**
+    * From WlanPowerModeMgrBase
     * To be called upon Light PS to Active timer timeout
     *
     * @since S60 5.1
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacnullsendcontroller.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacnullsendcontroller.h	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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 WLAN_NULL_SEND_CONTROLLER
@@ -172,6 +172,14 @@
     * @since S60 3.2
     */
     void OnKeepAliveTimerTimeout();
+    
+    /** 
+    * Are we currently in Voice over WLAN Call state
+    * 
+    * @return ETrue if we are
+    *         EFalse if we are not
+    */
+    inline TBool InVoiceCallState() const;
 
 private:
     
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacnullsendcontroller.inl	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacnullsendcontroller.inl	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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"
@@ -17,7 +17,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 11 %
 */
 
 // Default Voice Call Entry timeout
@@ -38,7 +38,7 @@
 
 // Default Keep Alive timeout
 // This value is used if no other value has been provided
-const TUint32 KDefaultKeepAliveTimeout = 200000000; // 200 s
+const TUint32 KDefaultKeepAliveTimeout = 60000000; // 60 s
 
 // Default value for frame payload length threashold of a potential 
 // carrier of downlink Voice over WLAN Call data, which is erroneously 
@@ -221,3 +221,12 @@
         // during a Voice Call
         }
     }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+inline TBool WlanNullSendController::InVoiceCallState() const
+    {
+    return static_cast<TBool>(iFlags & KInVoiceCallState);
+    }
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacpowermodemgrbase.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacpowermodemgrbase.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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: 12 %
+* %version: 13 %
 */
 
 #ifndef WLAN_POWER_MODE_MGR_BASE_H
@@ -32,6 +32,7 @@
 
 class WlanContextImpl;
 
+
 /**
 * Common base class for classes implementing dynamic power mode transition 
 * algorithm between PS and active mode in infrastructure mode 
@@ -39,6 +40,10 @@
 class WlanPowerModeMgrBase
     {
 public:
+    // Default frame payload length threshold value (in bytes) for U-APSD
+    static const TUint32 KDefaultUapsdRxFrameLengthThreshold = 400;
+
+public:
 
     /** Dtor */
     virtual ~WlanPowerModeMgrBase();
@@ -51,6 +56,7 @@
     * @param aCtxImpl global statemachine context
     * @param aQueueId Id of the queue/AC via which the frame will be transmitted
     * @param aEtherType Ethernet type of the frame
+    * @param aDot11FrameType 802.11 frame type
     * @param aIgnoreThisFrame shall this frame be ignored from dynamic power 
     *                         mode management perspective
     * @return To which power management mode to change; if any at all
@@ -59,6 +65,7 @@
         WlanContextImpl& aCtxImpl, 
         WHA::TQueueId aQueueId,
         TUint16 aEtherType,
+        T802Dot11FrameControlTypeMask aDot11FrameType,
         TBool aIgnoreThisFrame ) = 0;
 
     /** 
@@ -83,6 +90,14 @@
         TDaType aDaType ) = 0;
 
     /**
+    * To be called upon receiving the PS Mode Error indication
+    * Determines the need to make a power mode transition
+    *
+    * @return To which power management mode to change; if any at all
+    */
+    virtual TPowerMgmtModeChange OnPsModeErrorIndication();
+    
+    /**
     * To be called upon Active to Light PS timer timeout
     *
     * @since S60 v5.1
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacContextImpl.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacContextImpl.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 72 %
+* %version: 73 %
 */
 
 #include "config.h"
@@ -104,10 +104,7 @@
 
     os_memset( &iWHASettings, 0, sizeof( iWHASettings ) );
 
-    os_memset( 
-        &iOurBssMembershipFeatureArray, 
-        KUnallocated, 
-        sizeof( iOurBssMembershipFeatureArray ) );
+    ClearBssMembershipFeatureList();
 
     os_memset( 
         &iHtBlockAckConfigure, 
@@ -1770,6 +1767,34 @@
 // 
 // -----------------------------------------------------------------------------
 //
+void WlanContextImpl::RemoveBssMembershipFeature( TUint8 aItem )
+    {
+    TUint8 i ( 0 );
+
+    do
+        {
+        if ( aItem == iOurBssMembershipFeatureArray[i] )
+            {
+            iOurBssMembershipFeatureArray[i] = KUnallocated;
+
+            OsTracePrint( KUmacDetails, (TUint8*)
+                ("UMAC: WlanContextImpl::RemoveBssMembershipFeature: "
+                 "feature %d removed"),
+                aItem );
+
+            break;
+            }
+        else
+            {
+            ++i;
+            }
+        } while ( i != KMaxNumOfWlanFeatures );
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
 TBool WlanContextImpl::BssMembershipFeatureSupported( TUint8 aItem ) const
     {
     TBool supported ( EFalse );
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 96 %
+* %version: 99 %
 */
 
 #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 ) )
@@ -1996,7 +1995,7 @@
         const TPowerMgmtModeChange KPowerMgmtModeChange ( 
             aCtxImpl.OnFrameTx( queue_id, etherType ) );
         
-        // if any change change is needed regarding our power mgmt mode,
+        // if any change is needed regarding our power mgmt mode,
         // proceed with it
         stateChange = PowerMgmtModeChange( aCtxImpl, KPowerMgmtModeChange );        
         }
@@ -2157,177 +2156,6 @@
 // 
 // ---------------------------------------------------------------------------
 //
-TBool WlanDot11Associated::AddMulticastAddr(
-    WlanContextImpl& aCtxImpl,
-    const TMacAddress& aMacAddr )
-    {
-    TBool stateTransitionOccurred( EFalse );
-    
-    OsTracePrint( 
-        KWlmCmdDetails, 
-        (TUint8*)
-        ("UMAC: WlanDot11Associated::AddMulticastAddr(): addr to be added:"),
-        aMacAddr);
-
-    if ( aCtxImpl.MulticastFilteringDisAllowed() )
-        {
-        OsTracePrint( 
-            KWlmCmdDetails, 
-            (TUint8*)
-            ("UMAC: WlanDot11Associated::AddMulticastAddr(): Multicast filtering disallowed"));
-            
-        OnOidComplete( aCtxImpl, KErrGeneral );        
-        }
-    else
-        {        
-        if ( aCtxImpl.WHASettings().iNumOfGroupTableEntrys > 
-             aCtxImpl.MulticastAddressCount() )
-            {
-            // wha layer is able to take in an address
-            
-            // 1st try to add the address to our own internal bookkeeping
-            WlanContextImpl::TGroupAddStatus addStatus = 
-                aCtxImpl.AddMulticastAddress( aMacAddr );
-
-            switch ( addStatus )
-                {
-                case WlanContextImpl::EOk:
-                    OsTracePrint( 
-                        KWlmCmdDetails, 
-                        (TUint8*)
-                        ("UMAC: WlanDot11Associated::AddMulticastAddr(): Address will be added to the MIB"));
-                    // the address needed to be added and adding went ok.
-                    // Now update the group addresses MIB
-                    stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl ); 
-                    break;
-                case WlanContextImpl::EAlreadyExists: 
-                    OsTracePrint( 
-                        KWlmCmdDetails, 
-                        (TUint8*)
-                        ("UMAC: WlanDot11Associated::AddMulticastAddr(): Address already exists"));
-                    // the specified address already exists so there's no need
-                    // to update the group addresses MIB
-                    // just complete the request with OK status
-                    OnOidComplete( aCtxImpl );
-                    stateTransitionOccurred = EFalse;           
-                    break;
-                case WlanContextImpl::EFull:
-                    OsTracePrint( 
-                        KWlmCmdDetails, 
-                        (TUint8*)
-                        ("UMAC: WlanDot11Associated::AddMulticastAddr(): Internal address table full; disallow multicast filtering"));
-                    // we are not able to take in any more addresses.
-                    // We will totally disable the multicast filtering
-                    // and we won't allow it to be enabled any more during 
-                    // the current nw connection
-                    //
-                    aCtxImpl.ResetMulticastAddresses();               
-                    aCtxImpl.MulticastFilteringDisAllowed( ETrue );
-                    stateTransitionOccurred = 
-                        SetGroupAddressesTableMib( aCtxImpl );
-                    break;
-                default:
-                    // programming error
-                    OsTracePrint( KErrorLevel, (TUint8*)
-                        ("UMAC: addStatus: %d"), addStatus );
-                    OsAssert( (TUint8*)("UMAC: panic"), 
-                        (TUint8*)(WLAN_FILE), __LINE__ );
-                }
-            }
-        else
-            {
-            OsTracePrint( 
-                KWlmCmdDetails, 
-                (TUint8*)
-                ("UMAC: WlanDot11Associated::AddMulticastAddr(): WHA not able to accept address; disallow multicast filtering"));
-            // wha layer is not able to take in an address. Either this is one 
-            // address too many, or it doesn't support even a single address.
-            // In either case we will totally disable the multicast filtering
-            // and we won't allow it to be enabled any more during the current 
-            // nw connection
-            aCtxImpl.ResetMulticastAddresses();               
-            aCtxImpl.MulticastFilteringDisAllowed( ETrue );
-            stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );
-            }
-        }
-
-    // signal caller whether a state transition occurred or not
-    return stateTransitionOccurred;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-TBool WlanDot11Associated::RemoveMulticastAddr(
-    WlanContextImpl& aCtxImpl,
-    TBool aRemoveAll,
-    const TMacAddress& aMacAddr )
-    {
-    TBool stateTransitionOccurred( EFalse );
-    
-    OsTracePrint( 
-        KWlmCmdDetails, 
-        (TUint8*)
-        ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): addr to be removed:"),
-        aMacAddr);
-
-    if ( aCtxImpl.MulticastFilteringDisAllowed() )
-        {
-        OsTracePrint( 
-            KWlmCmdDetails, 
-            (TUint8*)
-            ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): Multicast filtering disallowed"));
-        // filtering is not allowed currently so there can't be any addresses
-        // to remove. Just complete the request with OK status            
-        OnOidComplete( aCtxImpl );        
-        }
-    else
-        {
-        if ( aRemoveAll )        
-            {
-            OsTracePrint( 
-                KWlmCmdDetails, 
-                (TUint8*)
-                ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): remove all"));
-            // remove all addresses; naturally will also disable filtering
-            aCtxImpl.ResetMulticastAddresses();
-            stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );            
-            }
-        else
-            {            
-            // 1st remove the specified address from our own internal 
-            // bookkeeping, if it exists
-            if ( aCtxImpl.RemoveMulticastAddress( aMacAddr ) )
-                {
-                OsTracePrint( 
-                    KWlmCmdDetails, 
-                    (TUint8*)
-                    ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): removing the specified address"));
-                // it existed, so update the group addresses MIB, too
-                stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );                 
-                }
-            else
-                {
-                OsTracePrint( 
-                    KWlmCmdDetails, 
-                    (TUint8*)
-                    ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): specified address doesn't exist, nothing to do"));
-                // it did't exist, so there's nothing to remove
-                // Just complete the request with OK status            
-                OnOidComplete( aCtxImpl );                    
-                }
-            }
-        }
-
-    // signal caller whether a state transition occurred or not
-    return stateTransitionOccurred;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
 TBool WlanDot11Associated::AddBroadcastWepKey(
     WlanContextImpl& aCtxImpl,
     TUint32 aKeyIndex,             
@@ -2395,89 +2223,6 @@
 // 
 // ---------------------------------------------------------------------------
 //
-TBool WlanDot11Associated::SetGroupAddressesTableMib(
-    WlanContextImpl& aCtxImpl )
-    {
-    const TMacAddress* multicastAddresses( NULL );
-    const TUint32 nbrOfAddrs( 
-        aCtxImpl.GetMulticastAddresses( multicastAddresses ) );
-
-    TUint32 mibLength(  
-        // mib header length
-        WHA::Sdot11GroupAddressesTable::KHeaderSize
-        // + mib data length
-        + ( sizeof( TMacAddress ) * nbrOfAddrs ) );
-
-    // align length of MIB to 4-byte boundary
-    mibLength = Align4( mibLength );
-    
-    OsTracePrint( 
-        KWlmCmdDetails, 
-        (TUint8*)
-        ("UMAC: WlanDot11Associated::SetGroupAddressesTableMib(): mibLength: %d"), 
-        mibLength );        
-
-    // allocate memory for the mib to write
-    WHA::Sdot11GroupAddressesTable* mib 
-        = static_cast<WHA::Sdot11GroupAddressesTable*>
-        (os_alloc( mibLength )); 
-
-    if ( !mib )
-        {
-        // allocation failed
-        // simulate macnotresponding error
-        OsTracePrint( KWarningLevel, (TUint8*)
-            ("UMAC: WlanDot11Associated::SetGroupAddressesTableMib(): memory allocating failed") );
-        return DoErrorIndication( aCtxImpl, WHA::KErrorMacNotResponding );
-        }
-    
-    if ( nbrOfAddrs )
-        {
-        // at least one address exists, so enable multicast address filtering
-        mib->iEnable = ETrue;
-        }
-    else
-        {
-        // no addresses, so disable filtering
-        mib->iEnable = EFalse;
-        OsTracePrint( KWlmCmdDetails, (TUint8*)
-            ("UMAC: WlanDot11Associated::SetGroupAddressesTableMib(): no addresses; disable filtering") );
-        }
-
-    mib->iNumOfAddrs = nbrOfAddrs;
-    
-    // copy the multicast addresses after the mib header
-    os_memcpy( mib->iAddrData,
-               reinterpret_cast<TUint8*>(const_cast<TMacAddress*>(
-                    multicastAddresses)),
-               ( sizeof( TMacAddress ) * nbrOfAddrs ) );
-        
-    WlanWsaWriteMib& wha_cmd = aCtxImpl.WsaWriteMib();
-        
-    wha_cmd.Set( 
-        aCtxImpl, 
-        WHA::KMibDot11GroupAddressesTable, 
-        mibLength, 
-        mib );
-        
-    // change global state: entry procedure triggers action
-    ChangeState( aCtxImpl, 
-        *this,              // prev state
-        wha_cmd,            // next state
-        // the ACT
-        KCompleteManagementRequest
-        );   
-
-    os_free( mib ); // release the allocated memory
-
-    // signal caller that a state transition occurred
-    return ETrue;
-    }         
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
 TBool WlanDot11Associated::PowerMgmtModeChange(
     WlanContextImpl& aCtxImpl,
     TPowerMgmtModeChange aPowerMgmtModeChange )
@@ -2490,7 +2235,7 @@
         
         if ( aPowerMgmtModeChange == EToActive )
             {
-            aCtxImpl.DesiredDot11PwrMgmtMode( WHA::KPsDisable );                
+            aCtxImpl.DesiredDot11PwrMgmtMode( WHA::KPsDisable );
             }
         else if ( aPowerMgmtModeChange == EToLightPs )
             {
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11InfrastructureMode.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11InfrastructureMode.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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: 63 %
+* %version: 64 %
 */
 
 #include "config.h"
@@ -788,19 +788,6 @@
 // 
 // ---------------------------------------------------------------------------
 //
-void WlanDot11InfrastructureMode::DoPsModeErrorIndication( 
-    WlanContextImpl& aCtxImpl )
-    {
-    OsTracePrint( KWlmIndication, (TUint8*)
-        ("UMAC: WlanDot11InfrastructureMode::DoPsModeErrorIndication") ); 
-    
-    OnInDicationEvent( aCtxImpl, EPsModeError );    
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
 TBool WlanDot11InfrastructureMode::OnVoiceCallEntryTimerTimeout( 
     WlanContextImpl& aCtxImpl )
     {
@@ -925,6 +912,7 @@
     
     TUint32 lengthOfFrame( 0 );
     T802Dot11FrameControlTypeMask frameType( E802Dot11FrameTypeDataNull );
+    WHA::TQueueId queue_id( WHA::ELegacy );
 
     // copy Null Data frame to tx-buffer to correct offset
     // client doesn't need to take care of the tx buffer header space
@@ -972,7 +960,7 @@
             }
 
         // determine Tx queue
-        const WHA::TQueueId queue_id( QueueId( aCtxImpl, start_of_frame ) );
+        queue_id = QueueId( aCtxImpl, start_of_frame );
         
         // send the Null Data frame by pushing it to packet scheduler
         aCtxImpl.PushPacketToPacketScheduler( 
@@ -982,13 +970,24 @@
                 frameType,
                 NULL,
                 EFalse,
-                EFalse );
+                EFalse,
+                ETrue );
         }                
     else
         {
         // we didn't get a Tx buffer so we can't submit a frame send request.
         status = EFalse;
         }
-        
+
+    TUint16 KetherType( 0 ); // N/A in this case
+    // check if we need to change power mgmt mode; no matter whether we 
+    // actually managed to send a frame or not
+    const TPowerMgmtModeChange KPowerMgmtModeChange ( 
+        aCtxImpl.OnFrameTx( queue_id, KetherType, frameType ) );
+    
+    // if any change is needed regarding our power mgmt mode,
+    // proceed with it
+    PowerMgmtModeChange( aCtxImpl, KPowerMgmtModeChange );
+    
     return status;                
     }
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11SoftReset.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11SoftReset.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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: 28 %
+* %version: 29 %
 */
 
 #include "config.h"
@@ -137,6 +137,7 @@
     // we are breaking an existing join so we have to reset some
     // state variables and settings
     aCtxImpl.CurrentDot11PwrMgmtMode( WHA::KPsDisable );
+    aCtxImpl.RestorePwrModeMgmtParameters();
     aCtxImpl.Reassociate( EFalse );
     aCtxImpl.QosEnabled( EFalse );
     aCtxImpl.UapsdEnabled( EFalse );
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 86 %
+* %version: 89 %
 */
 
 #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
         {
@@ -3058,6 +3057,185 @@
     return ret;
     }
 
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+TBool WlanDot11State::AddMulticastAddr(
+    WlanContextImpl& aCtxImpl,
+    const TMacAddress& aMacAddr )
+    {
+    TBool stateTransitionOccurred( EFalse );
+    
+    OsTracePrint( 
+        KWlmCmdDetails, 
+        (TUint8*)
+        ("UMAC: WlanDot11State::AddMulticastAddr(): addr to be added:"),
+        aMacAddr);
+
+    if ( aCtxImpl.MulticastFilteringDisAllowed() )
+        {
+        OsTracePrint( 
+            KWlmCmdDetails, 
+            (TUint8*)
+            ("UMAC: WlanDot11State::AddMulticastAddr(): Multicast filtering "
+             "disallowed"));
+            
+        OnOidComplete( aCtxImpl, KErrGeneral );        
+        }
+    else
+        {        
+        if ( aCtxImpl.WHASettings().iNumOfGroupTableEntrys > 
+             aCtxImpl.MulticastAddressCount() )
+            {
+            // wha layer is able to take in an address
+            
+            // 1st try to add the address to our own internal bookkeeping
+            WlanContextImpl::TGroupAddStatus addStatus = 
+                aCtxImpl.AddMulticastAddress( aMacAddr );
+
+            switch ( addStatus )
+                {
+                case WlanContextImpl::EOk:
+                    OsTracePrint( 
+                        KWlmCmdDetails, 
+                        (TUint8*)
+                        ("UMAC: WlanDot11State::AddMulticastAddr(): Address "
+                         "will be added to the MIB"));
+                    // the address needed to be added and adding went ok.
+                    // Now update the group addresses MIB
+                    stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl ); 
+                    break;
+                case WlanContextImpl::EAlreadyExists: 
+                    OsTracePrint( 
+                        KWlmCmdDetails, 
+                        (TUint8*)
+                        ("UMAC: WlanDot11State::AddMulticastAddr(): Address "
+                         "already exists"));
+                    // the specified address already exists so there's no need
+                    // to update the group addresses MIB
+                    // just complete the request with OK status
+                    OnOidComplete( aCtxImpl );
+                    stateTransitionOccurred = EFalse;           
+                    break;
+                case WlanContextImpl::EFull:
+                    OsTracePrint( 
+                        KWlmCmdDetails, 
+                        (TUint8*)
+                        ("UMAC: WlanDot11State::AddMulticastAddr(): Internal "
+                         "address table full; disallow multicast filtering"));
+                    // we are not able to take in any more addresses.
+                    // We will totally disable the multicast filtering
+                    // and we won't allow it to be enabled any more during 
+                    // the current nw connection
+                    //
+                    aCtxImpl.ResetMulticastAddresses();               
+                    aCtxImpl.MulticastFilteringDisAllowed( ETrue );
+                    stateTransitionOccurred = 
+                        SetGroupAddressesTableMib( aCtxImpl );
+                    break;
+                default:
+                    // programming error
+                    OsTracePrint( KErrorLevel, (TUint8*)
+                        ("UMAC: addStatus: %d"), addStatus );
+                    OsAssert( (TUint8*)("UMAC: panic"), 
+                        (TUint8*)(WLAN_FILE), __LINE__ );
+                }
+            }
+        else
+            {
+            OsTracePrint( 
+                KWlmCmdDetails, 
+                (TUint8*)
+                ("UMAC: WlanDot11State::AddMulticastAddr(): WHA not able to "
+                 "accept address; disallow multicast filtering"));
+            // wha layer is not able to take in an address. Either this is one 
+            // address too many, or it doesn't support even a single address.
+            // In either case we will totally disable the multicast filtering
+            // and we won't allow it to be enabled any more during the current 
+            // nw connection
+            aCtxImpl.ResetMulticastAddresses();               
+            aCtxImpl.MulticastFilteringDisAllowed( ETrue );
+            stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );
+            }
+        }
+
+    // signal caller whether a state transition occurred or not
+    return stateTransitionOccurred;
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+TBool WlanDot11State::RemoveMulticastAddr(
+    WlanContextImpl& aCtxImpl,
+    TBool aRemoveAll,
+    const TMacAddress& aMacAddr )
+    {
+    TBool stateTransitionOccurred( EFalse );
+    
+    OsTracePrint( 
+        KWlmCmdDetails, 
+        (TUint8*)
+        ("UMAC: WlanDot11State::RemoveMulticastAddr(): addr to be removed:"),
+        aMacAddr);
+
+    if ( aCtxImpl.MulticastFilteringDisAllowed() )
+        {
+        OsTracePrint( 
+            KWlmCmdDetails, 
+            (TUint8*)
+            ("UMAC: WlanDot11State::RemoveMulticastAddr(): Multicast filtering "
+             "disallowed"));
+        // filtering is not allowed currently so there can't be any addresses
+        // to remove. Just complete the request with OK status            
+        OnOidComplete( aCtxImpl );        
+        }
+    else
+        {
+        if ( aRemoveAll )        
+            {
+            OsTracePrint( 
+                KWlmCmdDetails, 
+                (TUint8*)
+                ("UMAC: WlanDot11State::RemoveMulticastAddr(): remove all"));
+            // remove all addresses; naturally will also disable filtering
+            aCtxImpl.ResetMulticastAddresses();
+            stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );            
+            }
+        else
+            {            
+            // 1st remove the specified address from our own internal 
+            // bookkeeping, if it exists
+            if ( aCtxImpl.RemoveMulticastAddress( aMacAddr ) )
+                {
+                OsTracePrint( 
+                    KWlmCmdDetails, 
+                    (TUint8*)
+                    ("UMAC: WlanDot11State::RemoveMulticastAddr(): removing "
+                     "the specified address"));
+                // it existed, so update the group addresses MIB, too
+                stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );                 
+                }
+            else
+                {
+                OsTracePrint( 
+                    KWlmCmdDetails, 
+                    (TUint8*)
+                    ("UMAC: WlanDot11State::RemoveMulticastAddr(): specified "
+                     "address doesn't exist, nothing to do"));
+                // it did't exist, so there's nothing to remove
+                // Just complete the request with OK status            
+                OnOidComplete( aCtxImpl );                    
+                }
+            }
+        }
+
+    // signal caller whether a state transition occurred or not
+    return stateTransitionOccurred;
+    }
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
@@ -3070,6 +3248,16 @@
     OsTracePrint( KUmacDetails, 
         (TUint8*)("UMAC: WlanDot11State::InitNetworkConnect") );
 
+    // 1st clear our BSS Membership feature list
+    aCtxImpl.ClearBssMembershipFeatureList();
+    
+    if ( aCtxImpl.WHASettings().iCapability & WHA::SSettings::KHtOperation )
+        {
+        // wlanpdd indicates HT support. Record that in our BSS Membership
+        // features
+        aCtxImpl.AddBssMembershipFeature( E802Dot11HtPhy );
+        }
+    
     const SScanResponseFixedFields* scanResponseFixedFields = 
         reinterpret_cast<const SScanResponseFixedFields*>( 
             aScanResponseFrameBody );
@@ -3121,9 +3309,6 @@
         return EFalse;
         }
 
-    // network capabilities are met -> proceed
-
-
     // initialize element locator for locating IEs from the scan response 
     // frame body
     WlanElementLocator elementLocator( 
@@ -3133,69 +3318,7 @@
 
     TUint8 elementDatalength( 0 );
     const TUint8* elementData( NULL );
-    
-    //=============================================
-    // do we meet mandatory network rates
-    //=============================================
-
-    // locate supported rates IE
-    if ( elementLocator.InformationElement( 
-        E802Dot11SupportedRatesIE,
-        elementDatalength, 
-        &elementData ) == WlanElementLocator::EWlanLocateOk )
-        {
-        // ...and store it to our context
-        aCtxImpl.GetApSupportedRatesIE().SetIeData( 
-            elementData, 
-            elementDatalength );        
-        }
-    else
-        {
-        OsTracePrint( KWarningLevel, (TUint8*)
-            ("UMAC: WlanDot11State::InitNetworkConnect: supported rates IE not found -> abort") );
-
-        return EFalse;
-        }
-
-    // locate extended supported rates information element
-    if ( elementLocator.InformationElement( 
-        E802Dot11ExtendedRatesIE,
-        elementDatalength, 
-        &elementData ) == WlanElementLocator::EWlanLocateOk )
-        {
-        OsTracePrint( KInfoLevel, (TUint8*)
-            ("UMAC: WlanDot11State::InitNetworkConnect: E802Dot11ExtendedRatesIE present") );
-
-        // ...and store it to our context
-        aCtxImpl.GetApExtendedSupportedRatesIE().SetIeData( elementData, elementDatalength );
-
-        // check if we meet mandatory rates; in this case check also extended supported rates
-        if ( !AreSupportedRatesMet( aCtxImpl, ETrue ) )
-            {
-            OsTracePrint( KWarningLevel, (TUint8*)
-                ("UMAC: WlanDot11State::InitNetworkConnect: rates not met -> abort") );
-
-            return EFalse;
-            }
-        }
-    else
-        {
-        OsTracePrint( KInfoLevel, (TUint8*)
-            ("UMAC: WlanDot11State::InitNetworkConnect: E802Dot11ExtendedRatesIE not present") );
-
-        // check if we meet mandatory rates; in this case extended supported rates 
-        // don't need to be checked
-        if ( !AreSupportedRatesMet( aCtxImpl, EFalse ) )
-            {
-            OsTracePrint( KWarningLevel, 
-                (TUint8*)("UMAC: WlanDot11State::InitNetworkConnect: rates not met -> abort") );
-
-            return EFalse;
-            }            
-        }
-
-    // mandatory network rates are met -> proceed
-    
+        
     //=============================================
     // determine the channel of the network
     //=============================================
@@ -3394,6 +3517,66 @@
         }
 
     //=============================================
+    // do we meet mandatory network rates
+    //=============================================
+
+    // locate supported rates IE
+    if ( elementLocator.InformationElement( 
+        E802Dot11SupportedRatesIE,
+        elementDatalength, 
+        &elementData ) == WlanElementLocator::EWlanLocateOk )
+        {
+        // ...and store it to our context
+        aCtxImpl.GetApSupportedRatesIE().SetIeData( 
+            elementData, 
+            elementDatalength );        
+        }
+    else
+        {
+        OsTracePrint( KWarningLevel, (TUint8*)
+            ("UMAC: WlanDot11State::InitNetworkConnect: supported rates IE not found -> abort") );
+
+        return EFalse;
+        }
+
+    // locate extended supported rates information element
+    if ( elementLocator.InformationElement( 
+        E802Dot11ExtendedRatesIE,
+        elementDatalength, 
+        &elementData ) == WlanElementLocator::EWlanLocateOk )
+        {
+        OsTracePrint( KInfoLevel, (TUint8*)
+            ("UMAC: WlanDot11State::InitNetworkConnect: E802Dot11ExtendedRatesIE present") );
+
+        // ...and store it to our context
+        aCtxImpl.GetApExtendedSupportedRatesIE().SetIeData( elementData, elementDatalength );
+
+        // check if we meet mandatory rates; in this case check also extended supported rates
+        if ( !AreSupportedRatesMet( aCtxImpl, ETrue ) )
+            {
+            OsTracePrint( KWarningLevel, (TUint8*)
+                ("UMAC: WlanDot11State::InitNetworkConnect: rates not met -> abort") );
+
+            return EFalse;
+            }
+        }
+    else
+        {
+        OsTracePrint( KInfoLevel, (TUint8*)
+            ("UMAC: WlanDot11State::InitNetworkConnect: E802Dot11ExtendedRatesIE not present") );
+
+        // check if we meet mandatory rates; in this case extended supported rates 
+        // don't need to be checked
+        if ( !AreSupportedRatesMet( aCtxImpl, EFalse ) )
+            {
+            OsTracePrint( KWarningLevel, 
+                (TUint8*)("UMAC: WlanDot11State::InitNetworkConnect: rates not met -> abort") );
+
+            return EFalse;
+            }            
+        }
+
+    //=============================================
     // determine U-APSD usage for the ACs/Tx queues
     //=============================================
     DetermineAcUapsdUsage( aCtxImpl );
@@ -4091,6 +4274,91 @@
     return EFalse;    
     }
 
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+TBool WlanDot11State::SetGroupAddressesTableMib(
+    WlanContextImpl& aCtxImpl )
+    {
+    const TMacAddress* multicastAddresses( NULL );
+    const TUint32 nbrOfAddrs( 
+        aCtxImpl.GetMulticastAddresses( multicastAddresses ) );
+
+    TUint32 mibLength(  
+        // mib header length
+        WHA::Sdot11GroupAddressesTable::KHeaderSize
+        // + mib data length
+        + ( sizeof( TMacAddress ) * nbrOfAddrs ) );
+
+    // align length of MIB to 4-byte boundary
+    mibLength = Align4( mibLength );
+    
+    OsTracePrint( 
+        KWlmCmdDetails, 
+        (TUint8*)
+        ("UMAC: WlanDot11State::SetGroupAddressesTableMib(): mibLength: %d"), 
+        mibLength );        
+
+    // allocate memory for the mib to write
+    WHA::Sdot11GroupAddressesTable* mib 
+        = static_cast<WHA::Sdot11GroupAddressesTable*>
+        (os_alloc( mibLength )); 
+
+    if ( !mib )
+        {
+        // allocation failed
+        // simulate macnotresponding error
+        OsTracePrint( KWarningLevel, (TUint8*)
+            ("UMAC: WlanDot11State::SetGroupAddressesTableMib(): memory "
+             "allocation failed") );
+        return DoErrorIndication( aCtxImpl, WHA::KErrorMacNotResponding );
+        }
+    
+    if ( nbrOfAddrs )
+        {
+        // at least one address exists, so enable multicast address filtering
+        mib->iEnable = ETrue;
+        }
+    else
+        {
+        // no addresses, so disable filtering
+        mib->iEnable = EFalse;
+        OsTracePrint( KWlmCmdDetails, (TUint8*)
+            ("UMAC: WlanDot11State::SetGroupAddressesTableMib(): no addresses; "
+             "disable filtering") );
+        }
+
+    mib->iNumOfAddrs = nbrOfAddrs;
+    
+    // copy the multicast addresses after the mib header
+    os_memcpy( mib->iAddrData,
+               reinterpret_cast<TUint8*>(const_cast<TMacAddress*>(
+                    multicastAddresses)),
+               ( sizeof( TMacAddress ) * nbrOfAddrs ) );
+        
+    WlanWsaWriteMib& wha_cmd = aCtxImpl.WsaWriteMib();
+        
+    wha_cmd.Set( 
+        aCtxImpl, 
+        WHA::KMibDot11GroupAddressesTable, 
+        mibLength, 
+        mib );
+        
+    // change global state: entry procedure triggers action
+    ChangeState( aCtxImpl, 
+        *this,              // prev state
+        wha_cmd,            // next state
+        // the ACT
+        KCompleteManagementRequest
+        );   
+
+    os_free( mib ); // release the allocated memory
+
+    // signal caller that a state transition occurred
+    return ETrue;
+    }
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
@@ -4734,6 +5002,9 @@
         // nw supported it. We achieve that by handling the target nw as
         // a non-HT nw
         aCtxImpl.HtSupportedByNw( EFalse );
+        // in this case we need to remove HT also from our BSS membership 
+        // feature list
+        aCtxImpl.RemoveBssMembershipFeature( E802Dot11HtPhy );
         
         OsTracePrint( KInfoLevel, (TUint8*)
             ("UMAC: WlanDot11State::HandleDot11n: TKIP as pairwise cipher "
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Synchronize.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Synchronize.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 29 %
+* %version: 30 %
 */
 
 #include "config.h"
@@ -497,6 +497,9 @@
     // Light PS is the initial desired PS mode configuration
     aCtxImpl.SetDesiredPsModeConfig( 
         aCtxImpl.ClientLightPsModeConfig() );
+    // also make sure that the dynamic power mode managemen parameters are in
+    // their WLAN Mgmt Client provided values
+    aCtxImpl.RestorePwrModeMgmtParameters();
     
     // check do we meet the requirements for the network
     // and construct necessary objects for doing the connection
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacMacState.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacMacState.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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: 76 %
+* %version: 77 %
 */
 
 #include "config.h"
@@ -97,13 +97,15 @@
 // -----------------------------------------------------------------------------
 //
 TBool WlanMacState::SetRcpiTriggerLevel(
-    WlanContextImpl& /*aCtxImpl*/,
+    WlanContextImpl& aCtxImpl,
     TUint32 /*aRcpiTrigger*/ )          
     {
     // not supported in default handler
+#ifndef NDEBUG                
     OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-
-    return EFalse;
+#endif
+    OnOidComplete( aCtxImpl, KErrNotSupported );
+    return EFalse; // no state change
     }
 
 // -----------------------------------------------------------------------------
@@ -111,7 +113,7 @@
 // -----------------------------------------------------------------------------
 //
 TBool WlanMacState::AddBroadcastWepKey(
-    WlanContextImpl& /*aCtxImpl*/,
+    WlanContextImpl& aCtxImpl,
     TUint32 /*aKeyIndex*/, 
     TBool /*aUseAsDefaulKey*/,        
     TUint32 /*aKeyLength*/,                      
@@ -119,8 +121,11 @@
     const TMacAddress& /*aMac*/ )    
     {
     // not supported in default handler
+#ifndef NDEBUG                
     OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-    return EFalse;
+#endif
+    OnOidComplete( aCtxImpl, KErrNotSupported );
+    return EFalse; // no state change
     }
 
 // -----------------------------------------------------------------------------
@@ -197,7 +202,7 @@
 // ---------------------------------------------------------------------------
 //
 TBool WlanMacState::Connect(
-    WlanContextImpl& /*aCtxImpl*/,
+    WlanContextImpl& aCtxImpl,
     const TSSID& /*aSSID*/,                 
     const TMacAddress& /*aBSSID*/,          
     TUint16 /*aAuthAlgorithmNbr*/,      
@@ -209,19 +214,25 @@
     TUint16 /*aIeDataLength*/ )
     {
     // not supported in default handler
+#ifndef NDEBUG                
     OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-    return EFalse;
+#endif
+    OnOidComplete( aCtxImpl, KErrNotSupported );
+    return EFalse; // no state change
     }
 
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
 //
-TBool WlanMacState::Disconnect( WlanContextImpl& /*aCtxImpl*/ )
+TBool WlanMacState::Disconnect( WlanContextImpl& aCtxImpl )
     {
     // not supported in default handler
+#ifndef NDEBUG                
     OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-    return EFalse;
+#endif
+    OnOidComplete( aCtxImpl, KErrNotSupported );
+    return EFalse; // no state change
     }
 
 // -----------------------------------------------------------------------------
@@ -321,7 +332,7 @@
 // -----------------------------------------------------------------------------
 //
 TBool WlanMacState::StartIBSS(
-    WlanContextImpl& /*aCtxImpl*/,
+    WlanContextImpl& aCtxImpl,
     const TSSID& /*aSSID*/,                 
     TUint32 /*aBeaconInterval*/,            
     TUint32 /*aAtim*/,                      
@@ -329,8 +340,11 @@
     TEncryptionStatus /*aEncryptionStatus*/ )
     {
     // not supported in default handler
+#ifndef NDEBUG                
     OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-    return EFalse;
+#endif
+    OnOidComplete( aCtxImpl, KErrNotSupported );
+    return EFalse; // no state change
     }
 
 // -----------------------------------------------------------------------------
@@ -366,8 +380,7 @@
     TUint32 /*aMaxChannelTime*/,
     TBool /*aSplitScan*/ )
     {
-    OnOidComplete( aCtxImpl, KErrGeneral );
-    
+    OnOidComplete( aCtxImpl, KErrNotSupported );
     return EFalse; // no state change
     }
 
@@ -400,7 +413,7 @@
 // -----------------------------------------------------------------------------
 //
 TBool WlanMacState::Configure(
-    WlanContextImpl& /*aCtxImpl*/,
+    WlanContextImpl& aCtxImpl,
     TUint32 /*aRTSThreshold*/,              
     TUint32 /*aMaxTxMSDULifetime*/,
     TUint32 /*aVoiceCallEntryTimeout*/,
@@ -413,8 +426,11 @@
     TUint32 /*aSpMinIndicationInterval*/ )         
     {
     // not supported in default handler
+#ifndef NDEBUG                
     OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-    return EFalse;
+#endif
+    OnOidComplete( aCtxImpl, KErrNotSupported );
+    return EFalse; // no state change
     }
 
 // -----------------------------------------------------------------------------
@@ -580,14 +596,17 @@
 // -----------------------------------------------------------------------------
 //
 TBool WlanMacState::ConfigureTxQueueIfNecessary( 
-        WlanContextImpl& /*aCtxImpl*/,
-        TQueueId /*aQueueId*/,
-        TUint16 /*aMediumTime*/,
-        TUint32 /*aMaxTxMSDULifetime*/ )
+    WlanContextImpl& aCtxImpl,
+    TQueueId /*aQueueId*/,
+    TUint16 /*aMediumTime*/,
+    TUint32 /*aMaxTxMSDULifetime*/ )
     {
     // not supported in default handler
+#ifndef NDEBUG                
     OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-    return EFalse;            
+#endif
+    OnOidComplete( aCtxImpl, KErrNotSupported );
+    return EFalse; // no state change
     }
 
 // -----------------------------------------------------------------------------
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacProtocolStackSideUmacCb.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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_common/umac_common/src/UmacWsaConfigure.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacWsaConfigure.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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: 23 %
+* %version: 24 %
 */
 
 #include "config.h"
@@ -171,14 +171,7 @@
             ("UMAC: WlanWsaConfigure::Entry: iMcsFeedback: %d"), 
             aCtxImpl.WHASettings().iHtCapabilities.iMcsFeedback );
         }
-#endif
-    
-    if ( aCtxImpl.WHASettings().iCapability & WHA::SSettings::KHtOperation )
-        {
-        // wlanpdd indicates HT support. Record that in our BSS Membership
-        // features
-        aCtxImpl.AddBssMembershipFeature( E802Dot11HtPhy );        
-        }
+#endif    
     }
 
 // -----------------------------------------------------------------------------
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacactivemodepowermodemgr.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacactivemodepowermodemgr.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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: 13 %
+* %version: 14 %
 */
 
 #include "config.h"
@@ -24,11 +24,6 @@
 #include "UmacContextImpl.h"
 
 
-// Default Rx/Tx frame count threshold for considering change to Light PS mode.
-// This value is used if another value hasn't been provided
-const TUint KDefaultToLightPsFrameThreshold = 1;
-
-
 // ================= MEMBER FUNCTIONS =======================
 
 // ---------------------------------------------------------------------------
@@ -57,6 +52,7 @@
     WlanContextImpl& /*aCtxImpl*/, 
     WHA::TQueueId /*aQueueId*/,
     TUint16 aEtherType,
+    T802Dot11FrameControlTypeMask aDot11FrameType,
     TBool aIgnoreThisFrame )
     {
     if ( aEtherType == KEapolType ||
@@ -69,7 +65,7 @@
         }
     else
         {
-        if ( aIgnoreThisFrame )
+        if ( aIgnoreThisFrame || aDot11FrameType == E802Dot11FrameTypeDataNull )
             { 
             // for these frames we don't increment the Tx counter
     
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdeeppsmodepowermodemgr.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdeeppsmodepowermodemgr.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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: 3 %
+* %version: 4 %
 */
 
 #include "config.h"
@@ -42,32 +42,53 @@
     {
     }
 
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void WlanDeepPsModePowerModeMgr::SetParameters(
+    TUint16 aUapsdRxFrameLengthThreshold )
+    {
+    iUapsdRxFrameLengthThreshold = aUapsdRxFrameLengthThreshold;
+    }
+
 // ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
 //
 TPowerMgmtModeChange WlanDeepPsModePowerModeMgr::OnFrameTx( 
-    WlanContextImpl& /*aCtxImpl*/, 
+    WlanContextImpl& aCtxImpl, 
     WHA::TQueueId /*aQueueId*/,
     TUint16 aEtherType,
-    TBool /*aIgnoreThisFrame*/ )
+    T802Dot11FrameControlTypeMask aDot11FrameType,
+    TBool aIgnoreThisFrame )
     {
     TPowerMgmtModeChange powerMgmtModeChange( ENoChange );
 
     if ( aEtherType == KEapolType ||
-         aEtherType == KWaiType )
+         aEtherType == KWaiType ||
+         aDot11FrameType == E802Dot11FrameTypeDataNull ||
+         ( aEtherType == KArpType && 
+           !(aCtxImpl.UapsdUsedForVoice() && aCtxImpl.InVoiceCallState()) ) ) 
         {
         powerMgmtModeChange = EToActive;
 
         OsTracePrint( KPwrStateTransition, (TUint8*)
-            ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameTx: EAPOL or WAI frame; change to Active") );            
+            ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameTx: EAPOL, WAI or keep "
+             "alive frame or ARP in non- U-APSD WoWLAN call state; change to "
+			 "Active") );
         }
-    else
+    else if ( !aIgnoreThisFrame )
         {
         powerMgmtModeChange = EToLightPs; 
 
         OsTracePrint( KPwrStateTransition, (TUint8*)
-            ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameTx: change to Light PS") );            
+            ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameTx: change to Light"
+             " PS") );            
+        }
+    else
+        {
+        // no action needed
         }
     
     return powerMgmtModeChange;    
@@ -78,11 +99,11 @@
 // ---------------------------------------------------------------------------
 //
 TPowerMgmtModeChange WlanDeepPsModePowerModeMgr::OnFrameRx( 
-    WlanContextImpl& /*aCtxImpl*/,
-    WHA::TQueueId /*aAccessCategory*/,
+    WlanContextImpl& aCtxImpl,
+    WHA::TQueueId aAccessCategory,
     TUint16 aEtherType,
-    TBool /*aIgnoreThisFrame*/,
-    TUint /*aPayloadLength*/,
+    TBool aIgnoreThisFrame,
+    TUint aPayloadLength,
     TDaType aDaType ) 
     {
     TPowerMgmtModeChange powerMgmtModeChange( ENoChange );
@@ -93,22 +114,36 @@
         powerMgmtModeChange = EToActive;
 
         OsTracePrint( KPwrStateTransition, (TUint8*)
-            ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameRx: EAPOL or WAI frame; change to Active") );            
-        }
-    else if ( aDaType == EBroadcastAddress ) 
-        {
-        // no action needed
-        
-        OsTracePrint( KPwrStateTransition, (TUint8*)
-            ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameRx: bcast frame; no state change") );            
+            ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameRx: EAPOL or WAI frame;"
+             " change to Active") );            
         }
     else
         {
-        powerMgmtModeChange = EToLightPs;        
+        if ( CountThisFrame( 
+                aCtxImpl, 
+                aAccessCategory,
+                aEtherType,
+                aIgnoreThisFrame, 
+                aPayloadLength, 
+                iUapsdRxFrameLengthThreshold,
+                aDaType ) )
+            {
+            powerMgmtModeChange = EToLightPs;        
 
-        OsTracePrint( KPwrStateTransition, (TUint8*)
-            ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameRx: change to Light PS") );            
+            OsTracePrint( KPwrStateTransition, (TUint8*)
+                ("UMAC: WlanDeepPsModePowerModeMgr::OnFrameRx: change to Light"
+                 " PS") );            
+            }
         }
     
-    return powerMgmtModeChange;    
+    return powerMgmtModeChange;
     }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+TPowerMgmtModeChange WlanDeepPsModePowerModeMgr::OnPsModeErrorIndication()
+    {
+    return EToActive;
+    }
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdot11infrastructurenormalmode.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdot11infrastructurenormalmode.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -17,7 +17,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: 15 %
 */
 
 #include "config.h"
@@ -56,6 +56,28 @@
 // 
 // ---------------------------------------------------------------------------
 //
+void WlanDot11InfrastructureNormalMode::DoPsModeErrorIndication( 
+    WlanContextImpl& aCtxImpl )
+    {
+    OsTracePrint( KWlmIndication, (TUint8*)
+        ("UMAC: WlanDot11InfrastructureMode::DoPsModeErrorIndication") );
+    
+    // as the lower layers indicate that there is a problem with the PS
+    // operation of the current AP, we want to be in CAM mode for as long
+    // as there's data activity. So, check if we need a mode change to be
+    // in CAM now
+    const TPowerMgmtModeChange KPowerMgmtModeChange ( 
+        aCtxImpl.OnPsModeErrorIndication() );
+    
+    // if any change is needed regarding our power mgmt mode,
+    // proceed with it
+    PowerMgmtModeChange( aCtxImpl, KPowerMgmtModeChange );
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
 TBool WlanDot11InfrastructureNormalMode::OnActiveToLightPsTimerTimeout( 
     WlanContextImpl& aCtxImpl )
     {
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdynamicpowermodemgmtcntx.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacdynamicpowermodemgmtcntx.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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: 14 %
+* %version: 15 %
 */
 
 #include "config.h"
@@ -55,6 +55,11 @@
     iActiveCntx( NULL ),
     iWlanContextImpl( aWlanCtxImpl ) 
     {
+    iActiveParamsBackup.iToLightPsTimeout = KDefaultToLightPsTimeout;
+    iActiveParamsBackup.iToLightPsFrameThreshold = 
+        WlanActiveModePowerModeMgr::KDefaultToLightPsFrameThreshold;
+    iActiveParamsBackup.iUapsdRxFrameLengthThreshold = 
+        WlanPowerModeMgrBase::KDefaultUapsdRxFrameLengthThreshold;
     os_memset( iIgnoreTraffic, 0, sizeof( iIgnoreTraffic ) );
     }
 
@@ -158,7 +163,8 @@
 //
 TPowerMgmtModeChange WlanDynamicPowerModeMgmtCntx::OnFrameTx( 
     WHA::TQueueId aQueueId,
-    TUint16 aEtherType )
+    TUint16 aEtherType,
+    T802Dot11FrameControlTypeMask aDot11FrameType )
     {
     TPowerMgmtModeChange powerMgmtModeChange( ENoChange );
 
@@ -172,13 +178,23 @@
                 iWlanContextImpl, 
                 aQueueId,
                 aEtherType,
+                aDot11FrameType,
                 iIgnoreTraffic[aQueueId] );
             
             if ( powerMgmtModeChange != ENoChange )
                 {
+                iStateChange = ETrue;
+            
                 // as we will do a mode change, cancel any possibly running 
                 // power mode management timers
                 CancelTimeouts();
+                
+                if ( aDot11FrameType == E802Dot11FrameTypeDataNull ||
+                     aEtherType == KArpType )
+                    {
+                    // modify temporarily the Active mode parameters
+                    SetKeepAliveActiveModeParameters();
+                    }
                 }
             }        
         else
@@ -230,6 +246,8 @@
             
             if ( powerMgmtModeChange != ENoChange )
                 {
+                iStateChange = ETrue;
+            
                 // as we will do a mode change, cancel any possibly running 
                 // power mode management timers
                 CancelTimeouts();
@@ -260,6 +278,57 @@
 // 
 // ---------------------------------------------------------------------------
 //
+TPowerMgmtModeChange WlanDynamicPowerModeMgmtCntx::OnPsModeErrorIndication()
+    {
+    TPowerMgmtModeChange powerMgmtModeChange( ENoChange );
+
+    if ( iActiveCntx )
+        {
+        // we have an active context, i.e. we are doing power mode mgmt
+        
+        if ( !iStateChange )
+            {
+            powerMgmtModeChange = iActiveCntx->OnPsModeErrorIndication();
+            
+            if ( powerMgmtModeChange != ENoChange )
+                {
+                iStateChange = ETrue;
+                
+                // as we will do a mode change, cancel any possibly running 
+                // power mode management timers
+                CancelTimeouts();
+                
+                // modify temporarily the Active mode parameters
+                SetPsModeErrorActiveModeParameters();
+                }
+            }
+        else
+            {
+            // state change already signalled from this power mode context, 
+            // don't do it more than once. No action needed
+            OsTracePrint( KPwrStateTransition, (TUint8*)
+                ("UMAC: WlanDynamicPowerModeMgmtCntx::OnPsModeErrorIndication: "
+                 "statechange already signalled") );
+            }
+        }
+    else
+        {
+        // dynamic power mode mgmt is not active => "No change" will be 
+        // returned. No action needed
+        }
+        
+    OsTracePrint( KPwrStateTransition, (TUint8*)
+        ("UMAC: WlanDynamicPowerModeMgmtCntx::OnPsModeErrorIndication: "
+         "statechange: %d"),
+        powerMgmtModeChange );
+    
+    return powerMgmtModeChange;
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
 TBool WlanDynamicPowerModeMgmtCntx::OnActiveToLightPsTimerTimeout()
     {
     if ( ( iActiveCntx == &iActiveModeCntx ) && 
@@ -274,6 +343,11 @@
             ("UMAC: WlanDynamicPowerModeMgmtCntx::OnActiveToLightPsTimerTimeout: change state: %d"),
             iStateChange );
         
+        // make sure that the WLAN Mgmt Client provided Active mode 
+        // parameter values are again used the next time by default
+        //
+        RestoreActiveModeParameters();
+        
         if ( !iStateChange )
             {
             RegisterToLightPsTimeout();
@@ -292,6 +366,11 @@
         // In all these cases the timeout is not relevant and we take no action
         OsTracePrint( KPwrStateTransition, (TUint8*)
             ("UMAC: WlanDynamicPowerModeMgmtCntx::OnActiveToLightPsTimerTimeout: not relevant timeout") );
+        
+        // however, make sure that the WLAN Mgmt Client provided Active mode
+        // parameter values are again used the next time by default
+        //
+        RestoreActiveModeParameters();        
         }
     
     return iStateChange;
@@ -406,6 +485,15 @@
         aToActiveFrameThreshold,
         aToDeepPsFrameThreshold,
         aUapsdRxFrameLengthThreshold );
+    
+    iDeepPsModeCntx.SetParameters( aUapsdRxFrameLengthThreshold );
+    
+    // take also a backup of the Active mode parameters
+    //
+    iActiveParamsBackup.iToLightPsTimeout = aToLightPsTimeout;
+    iActiveParamsBackup.iToLightPsFrameThreshold = aToLightPsFrameThreshold;
+    iActiveParamsBackup.iUapsdRxFrameLengthThreshold = 
+        aUapsdRxFrameLengthThreshold;    
     }
 
 // ---------------------------------------------------------------------------
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umaclightpsmodepowermodemgr.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umaclightpsmodepowermodemgr.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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: 3 %
+* %version: 4 %
 */
 
 #include "config.h"
@@ -59,49 +59,54 @@
 // ---------------------------------------------------------------------------
 //
 TPowerMgmtModeChange WlanLightPsModePowerModeMgr::OnFrameTx( 
-    WlanContextImpl& /*aCtxImpl*/, 
+    WlanContextImpl& aCtxImpl, 
     WHA::TQueueId /*aQueueId*/,
     TUint16 aEtherType,
+    T802Dot11FrameControlTypeMask aDot11FrameType,
     TBool aIgnoreThisFrame )
     {
     TPowerMgmtModeChange powerMgmtModeChange( ENoChange );
 
     if ( aEtherType == KEapolType ||
-         aEtherType == KWaiType )
+         aEtherType == KWaiType ||
+         aDot11FrameType == E802Dot11FrameTypeDataNull ||
+         ( aEtherType == KArpType && 
+           !(aCtxImpl.UapsdUsedForVoice() && aCtxImpl.InVoiceCallState())) )
         {
         powerMgmtModeChange = EToActive;
 
         OsTracePrint( KPwrStateTransition, (TUint8*)
-            ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: EAPOL or WAI frame; change to Active") );            
+            ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: EAPOL, WAI or keep "
+             "alive frame or ARP in non- U-APSD WoWLAN call state; change to "
+			 "Active") );
+        }
+    else if ( !aIgnoreThisFrame )
+        {
+        OsTracePrint( KPwrStateTransition, (TUint8*)
+            ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: count this frame") );
+
+        ++iToActiveFrameCount;
+        ++iToDeepPsFrameCount;
+        
+        if ( iToActiveFrameCount >= iToActiveFrameThreshold )
+            {
+            powerMgmtModeChange = EToActive;
+
+            OsTracePrint( KPwrStateTransition, (TUint8*)
+                ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: threshold "
+                 "exceeded; change to Active") );            
+            }
         }
     else
         {
-        if ( !aIgnoreThisFrame )
-            {
-            OsTracePrint( KPwrStateTransition, (TUint8*)
-                ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: count this frame") );
-
-            ++iToActiveFrameCount;
-            ++iToDeepPsFrameCount;
-            
-            if ( iToActiveFrameCount >= iToActiveFrameThreshold )
-                {
-                powerMgmtModeChange = EToActive;
-
-                OsTracePrint( KPwrStateTransition, (TUint8*)
-                    ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: threshold exceeded; change to Active") );            
-                }
-            }
-        else
-            {
-            OsTracePrint( KPwrStateTransition, (TUint8*)
-                ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: do no count this frame") );
-            
-            // no further action needed
-            }
+        OsTracePrint( KPwrStateTransition, (TUint8*)
+            ("UMAC: WlanLightPsModePowerModeMgr::OnFrameTx: do not count "
+             "this frame") );
+        
+        // no action needed
         }
     
-    return powerMgmtModeChange;    
+    return powerMgmtModeChange;
     }
 
 // ---------------------------------------------------------------------------
@@ -157,6 +162,15 @@
 // 
 // ---------------------------------------------------------------------------
 //
+TPowerMgmtModeChange WlanLightPsModePowerModeMgr::OnPsModeErrorIndication()
+    {
+    return EToActive;
+    }
+        
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
 TBool WlanLightPsModePowerModeMgr::OnLightPsToActiveTimerTimeout(
     WlanContextImpl& aCtxImpl )
     {
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacnullsendcontroller.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacnullsendcontroller.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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: 15 %
+* %version: 16 %
 */
 
 #include "config.h"
@@ -397,32 +397,17 @@
     
     iFlags &= ~KKeepAliveTimerArmed;
 
-    TUint32 KTimeAfterLatestTx ( 
-        static_cast<TUint32>(os_systemTime() - iLatestTx) );
-    
-    if ( KTimeAfterLatestTx >= iKeepAliveTimeout )
+    // request a regular Null Data frame to be sent
+    // however, if there is a frame Tx (of any frame) already pending OR
+    // we use U-APSD for Voice and we are on a VoWLAN call
+    // we won't request a new frame to be sent. 
+    if ( !iWlanContextImpl.UnsentTxPackets() &&
+         !( iWlanContextImpl.UapsdUsedForVoice() && InVoiceCallState() ) )
         {
-        // request a regular Null Data frame to be sent
-    
-        // however, if there is a frame Tx (of any frame) already pending, 
-        // we won't request a new frame to be sent. 
-        if ( !iWlanContextImpl.UnsentTxPackets() )
+        if ( !iNullSender.TxNullDataFrame( iWlanContextImpl, EFalse ) )
             {
-            if ( !iNullSender.TxNullDataFrame( iWlanContextImpl, EFalse ) )
-                {
-                // frame was not sent because we didn't get a Tx buffer.
-                // In this case we'll skip the sending
-                // However, we need to re-arm the timer to trigger the next
-                // Null Data frame sending
-                RegisterKeepAliveTimeout( iKeepAliveTimeout );
-                }
-            }
-        else
-            {
-            // frame Tx already pending, so we don't ask a Null Data to be sent
-            OsTracePrint( KUmacDetails, (TUint8*)
-                ("UMAC: WlanNullSendController::OnKeepAliveTimerTimeout: frame Tx already pending. New Null Data Tx request skipped") );
-            
+            // frame was not sent because we didn't get a Tx buffer.
+            // In this case we'll skip the sending
             // However, we need to re-arm the timer to trigger the next
             // Null Data frame sending
             RegisterKeepAliveTimeout( iKeepAliveTimeout );
@@ -430,9 +415,15 @@
         }
     else
         {
-        // No need to send keep alive; yet. Re-arm the timer with 
-        // a suitable timeout relative to the time of the latest frame Tx
-        RegisterKeepAliveTimeout( iKeepAliveTimeout - KTimeAfterLatestTx );        
+        // we don't ask a Null Data to be sent
+        OsTracePrint( KUmacDetails, (TUint8*)
+            ("UMAC: WlanNullSendController::OnKeepAliveTimerTimeout: frame Tx "
+             "already pending OR U-APSD used for Voice and we are in VoWLAN"
+             "call => Null Data Tx request skipped") );
+        
+        // However, we need to re-arm the timer to trigger the next
+        // Null Data frame sending
+        RegisterKeepAliveTimeout( iKeepAliveTimeout );
         }
     }
 
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacpowermodemgrbase.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/umacpowermodemgrbase.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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,16 +16,13 @@
 */
 
 /*
-* %version: 8 %
+* %version: 9 %
 */
 
 #include "config.h"
 #include "umacpowermodemgrbase.h"
 #include "UmacContextImpl.h"
 
-// Default frame payload length threshold value (in bytes) for U-APSD
-const TUint32 KUapsdRxFrameLengthThreshold = 400;
-
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -34,7 +31,7 @@
 // ---------------------------------------------------------------------------
 //
 WlanPowerModeMgrBase::WlanPowerModeMgrBase() : 
-    iUapsdRxFrameLengthThreshold( KUapsdRxFrameLengthThreshold )
+    iUapsdRxFrameLengthThreshold( KDefaultUapsdRxFrameLengthThreshold )
     {
     }
 
@@ -50,6 +47,15 @@
 // 
 // ---------------------------------------------------------------------------
 //
+TPowerMgmtModeChange WlanPowerModeMgrBase::OnPsModeErrorIndication()
+    {
+    return ENoChange;
+    }
+        
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
 TBool WlanPowerModeMgrBase::OnActiveToLightPsTimerTimeout()
     {
     return EFalse;
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EthernetFrameMemMngr.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/FrameXferBlock.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/MgmtFrameMemMngr.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/WlanLogicalChannel.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddlogicalchannelbase.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/DataFrameMemMngr.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/FrameXferBlock.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/MgmtFrameMemMngr.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WLanLogicalDevice.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WlanLogicalChannel.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 59 %
+* %version: 61 %
 */
 
 #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
@@ -633,86 +635,37 @@
 #else
     iOsa->MutexAcquire();
 #endif
-    NKern::ThreadLeaveCS();
     
     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
-    // Enter critical section before releasing the mutex as
-    // we are executing in the context of a user mode thread
-    NKern::ThreadEnterCS();    
 #ifndef RD_WLAN_DDK
     Kern::MutexSignal( iMutex );
 #else
     iOsa->MutexRelease();
 #endif 
+    // and exit from critical section
     NKern::ThreadLeaveCS();
     
     TraceDump(MUTEX, 
@@ -728,7 +681,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 +694,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 +857,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 +867,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 +879,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 +908,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 +927,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 +1016,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 +1097,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 +1124,7 @@
 //
 void DWlanLogicalChannel::TxProtocolStackData()
     {
-#ifndef NDEBUG    
+#ifndef NDEBUG
     TUint packetsSubmitted ( 0 );
 #endif
     
@@ -1049,7 +1172,13 @@
 //
 TBool DWlanLogicalChannel::OnReadEthernetFrameRequest()
     {
-    const TBool ret = iEthernetFrameMemMngr->OnReadRequest();
+    TBool ret( EFalse );
+    
+    if ( iEthernetFrameMemMngr )
+        {
+        ret = iEthernetFrameMemMngr->OnReadRequest();
+        }
+    
     return ret;
     }
 
@@ -1451,17 +1580,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 +1631,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 +1654,7 @@
                 iWlanReceiveFrameStatus = aStatus;
                 }
             break;
-        case EWlanRequestSend:
+        case RWlanLogicalChannel::EWlanRequestSend:
             iWlanSendFrameStatus = aStatus;
 
             TxManagementData();
@@ -1728,7 +1857,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 +1878,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 +2020,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 +2066,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 +2307,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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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/eabi/wlanprotou.def	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlannwif/eabi/wlanprotou.def	Thu Jul 22 16:49:43 2010 +0100
@@ -53,7 +53,7 @@
 	_ZThn12_N27CWlanMetaConnectionProviderD1Ev @ 52 NONAME ; #<thunk>#
 	_ZThn20_N14CLANLinkCommon9ReceivedLERKN8Messages13TRuntimeCtxIdERKNS0_7TNodeIdERNS0_14TSignatureBaseE @ 53 NONAME ; #<thunk>#
 	_ZThn20_N27CWlanMetaConnectionProvider9ReceivedLERKN8Messages13TRuntimeCtxIdERKNS0_7TNodeIdERNS0_14TSignatureBaseE @ 54 NONAME ; #<thunk>#
-	_ZThn96_N14CLANLinkCommon11GetControlLERK6TDesC8 @ 55 NONAME ; #<thunk>#
-	_ZThn96_N14CLANLinkCommon5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 56 NONAME ; #<thunk>#
-	_ZThn96_N14CLANLinkCommon6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 57 NONAME ; #<thunk>#
+	_ZThn100_N14CLANLinkCommon11GetControlLERK6TDesC8 @ 55 NONAME ; #<thunk>#
+	_ZThn100_N14CLANLinkCommon5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 56 NONAME ; #<thunk>#
+	_ZThn100_N14CLANLinkCommon6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 57 NONAME ; #<thunk>#
 
--- a/wlan_bearer/wlannwif/etherpkt/CardDll.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlannwif/etherpkt/CardDll.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlannwif/etherpkt/receiver_hw.cpp	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlannwif/inc/carddrv.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_bearer/wlannwif/inc/receiver_hw.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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_info/wlan_metadata/wlan_metadata.mrp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#
-# Copyright (c) 2009 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"
-# 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: 
-#
-
-component           wlan_metadata
-source   \sf\os\wlan\wlan_info\wlan_metadata 
-source   \sf\os\wlan\package_definition.xml
-source   \sf\os\wlan\distribution.policy.s60
-notes_source      \component_defs\release.src
-ipr T 
--- a/wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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 Jun 18 16:16:46 2010 +0100
+++ b/wlan_plat/wlan_management_api/inc/wlanerrorcodes.h	Thu Jul 22 16:49:43 2010 +0100
@@ -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
--- a/wlan_plat/wlan_management_api/inc/wlanmgmtcommon.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_plat/wlan_management_api/inc/wlanmgmtcommon.h	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 11 %
 */
 
 #ifndef WLANMGMTCOMMON_H
@@ -29,6 +29,9 @@
 /** The maximum SSID length. */
 const TUint KWlanMaxSsidLength = 32;
 
+/** The maximum WPS PIN length. */
+const TUint KWlanMaxWpsPinLength = 8;
+
 /** The maximum BSSID length. */
 const TUint KWlanMaxBssidLength = 6;
 
@@ -48,6 +51,9 @@
 /** Data structure for storing the SSID of a WLAN network. */
 typedef TBuf8<KWlanMaxSsidLength> TWlanSsid;
 
+/** Data structure for storing the WPS Pin. */
+typedef TBuf8<KWlanMaxWpsPinLength> TWlanWpsPin;
+
 /** Data structure for storing the BSSID of a BSS. */
 typedef TBuf8<KWlanMaxBssidLength> TWlanBssid;
 
--- a/wlan_plat/wlan_management_api/inc/wlanmgmtinterface.h	Fri Jun 18 16:16:46 2010 +0100
+++ b/wlan_plat/wlan_management_api/inc/wlanmgmtinterface.h	Thu Jul 22 16:49:43 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 16 %
+* %version: 17 %
 */
 
 #ifndef WLANMGMTINTERFACE_H
@@ -215,13 +215,16 @@
          * @param aStatus Status of the calling active object. On successful
          *                completion contains KErrNone, otherwise one of the
          *                system-wide error codes.
-         * @param aId Service ID of network which user has selected to be configured.
+         * @param aSsid SSID of the network to configure.
+         * @param aWpsPin PIN value to be used. "00000000" (string of eight zeros)
+         *                if push button method is used.
          * @param aCredentials Results of a successful Protected Setup operation.
          * @sa \link psetup Protected Setup-specific error codes \endlink.
          */
         virtual void RunProtectedSetup(
             TRequestStatus& aStatus,
-            TUint32 aId,
+            const TWlanSsid& aSsid,
+            const TWlanWpsPin& aWpsPin,
             CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) = 0;
 
         /**
@@ -410,6 +413,7 @@
          */
         virtual TInt StartAggressiveBgScan(
             TUint aInterval ) = 0;
+
     };
 
 #endif // WLANMGMTINTERFACE_H
--- a/wlanapitest/wlanhaitest/common/inc/DataWrapperBase.h	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#ifndef DATA_WRAPPER_BASE_H
-#define DATA_WRAPPER_BASE_H
-
-//	EPOC includes
-#include <datawrapper.h>
-#define SECS_TO_MS(x)  (x*1000000)
-
-_LIT(KConsname,				"Test Console");
-
-class CDataWrapperBase : public CDataWrapper
-	{
-public:
-	class TEnumEntryTable
-		{
-	public:
-		const TDesC&	iString;
-		TInt			iValue;
-		};
-
-public:
-	TBool					GetBoolFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TBool& aResult);
-	TBool					GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
-	TBool					GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
-	TBool					GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
-	TBool					GetUintFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aResult);
-	TBool 					KeyPress();
-	void 					Timedelay(TInt aTimeoutInSecs);
-	virtual void			InitialiseL();
-	inline RFs&				FileServer() { return iFs; }
-	inline CConsoleBase*	GetConsole() { return(Console::NewL(KConsname,TSize(KConsFullScreen,KConsFullScreen)));}
-	void 					GetValidationBool(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage);
-	void    				GetValidationInt(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage);
-	void 					GetValidationUint(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage);
-	TBool					GetArrayFromConfig(const TDesC& aSectName, const TDesC& aKeyName, RPointerArray<HBufC>& aResult);
-	TBool					GetEnumFromConfig(const TDesC& aSectName, const TDesC& aKeyName, const TEnumEntryTable* aTable, TInt& aResult);
-	
-protected:
-	CDataWrapperBase();
-	virtual ~CDataWrapperBase();
-
-private:
-	TBool	GetCommandStringParameterL(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
-	TBool 	KeyCheck();
-
-private:
-	// Included ini files
-	RPointerArray<CIniData>	iInclude;
-	RPointerArray<HBufC>	iBuffer;
-	RFs                     iFs;
-	RTimer					iTimer;
-	};
-
-#endif // DATA_WRAPPER_BASE_H
--- a/wlanapitest/wlanhaitest/common/src/DataWrapperBase.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,517 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-#include "datawrapperbase.h"
-
-/*@{*/
-///	Constant Literals used.
-_LIT(KPrefixHex,			"0x");
-_LIT(KPrefixOctal,			"0");
-_LIT(KSuffixBinary,			"b");
-
-_LIT(KIncludeSection,		"include");
-_LIT(KFile,					"file%d");
-_LIT(KMatch,				"*{*,*}*");
-_LIT(KStart,				"{");
-_LIT(KSeparator,			",");
-_LIT(KEnd,					"}");
-_LIT(KDataRead,				"INI READ : %S %S %S");
-_LIT(KLogMissingParameter,	"Missing parameter '%S'");
-_LIT(KExpected,				"expected");
-/*@}*/
-
-CDataWrapperBase::CDataWrapperBase()
-:	CDataWrapper()
-	{
-	}
-
-/**
- * Public destructor
- */
-CDataWrapperBase::~CDataWrapperBase()
-	{
-	iInclude.ResetAndDestroy();
-	iBuffer.ResetAndDestroy();
-	iFs.Close();
-	}
-
-void CDataWrapperBase::InitialiseL()
-	{
-	iTimer.CreateLocal();
-	CDataWrapper::InitialiseL();
-	TBuf<KMaxTestExecuteCommandLength>	tempStore;
-	TPtrC		fileName;
-	TBool		moreData=ETrue;
-	TBool		index=0;
-	while ( moreData )
-		{
-		tempStore.Format(KFile(), ++index);
-		moreData=GetStringFromConfig(KIncludeSection, tempStore, fileName);
-
-		if (moreData)
-			{
-			CIniData*	iniData=CIniData::NewL(fileName);
-			CleanupStack::PushL(iniData);
-			iInclude.Append(iniData);
-			CleanupStack::Pop(iniData);
-			}
-		}
-	User::LeaveIfError(iFs.Connect());
-	}
-
-/**
- * Reads the value present from the test steps ini file within the mentioned section name and key name
- * Copies the value to the TBool reference passed in possible values TRUE, FALSE
- * @param aSectName - Section within the test steps ini file
- * @param aKeyName - Name of a key within a section
- * @return aResult - The value of the boolean
- * @return TBool - ETrue for found, EFalse for not found 
- */
-TBool CDataWrapperBase::GetBoolFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TBool& aResult)
-	{
-	TBool	ret=EFalse;
-	TPtrC	result;
-	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
-	if ( err != KErrNone )
-		{
-		ret=EFalse;
-		}
-	if ( ret )
-		{
-		_LIT(KTrue,"true");
-		aResult=(result.FindF(KTrue) != KErrNotFound);
-		}
-
-	return ret;
-	}
-
-/**
- * Reads the value present from the test steps ini file within the mentioned section name and key name
- * Copies the value to the TInt reference passed in
- * @param aSectName - Section within the test steps ini file
- * @param aKeyName - Name of a key within a section
- * @return aResult - The value of the integer
- * @return TBool - ETrue for found, EFalse for not found 
- */
-TBool CDataWrapperBase::GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult)
-	{
-	TPtrC	result;
-	TBool	ret=EFalse;
-	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
-	if ( err != KErrNone )
-		{
-		ret=EFalse;
-		}
-	if ( ret )
-		{
-		TLex	lex(result);
-		ret=(lex.Val(aResult)==KErrNone);
-		}
-
-	return ret;
-	}
-
-/**
- * Reads the value present from the test steps ini file within the mentioned section name and key name
- * Copies the value to the TPtrC reference passed in
- * @param aSectName - Section within the test steps ini file
- * @param aKeyName - Name of a key within a section
- * @return aResult - Reference to the string on the heap
- * @return TBool - ETrue for found, EFalse for not found 
- */
-TBool CDataWrapperBase::GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult)
-	{
-	TBool	ret=EFalse;
-	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, aResult));
-	if ( err != KErrNone )
-		{
-		ret=EFalse;
-		}
-	return ret;
-	}
-
-/**
- * Reads the value present from the test steps ini file within the mentioned section name and key name
- * Copies the value to the TInt reference passed in. The value can optionally be prefixed with 0x
- * @param aSectName - Section within the test steps ini file
- * @param aKeyName - Name of a key within a section
- * @return aResult - The integer value of the Hex input
- * @return TBool - ETrue for found, EFalse for not found 
- */	
-TBool CDataWrapperBase::GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult)
-	{
-	TPtrC	result;
-	TBool	ret=EFalse;
-	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
-	if ( err != KErrNone )
-		{
-		ret=EFalse;
-		}
-	if ( ret )
-		{
-		TLex	lex;
-		if( result.FindC(KPrefixHex)==KErrNone )
-			{
-			lex=result.Mid(KPrefixHex().Length());
-			}
-		else
-			{
-			lex=result;
-			}
-		ret=(lex.Val((TUint &)aResult, EHex)==KErrNone);
-		}
-
-	return ret;
-	}
-
-/**
- * Reads the value present from the test steps ini file within the mentioned section name and key name
- * Copies the value to the TUint reference passed in.
- * If the value is prefixed with 0x the value is read as a hexadecimal value
- * If the value is suffixed with b the value is read as a binary value
- * If the value is prefixed with a 0 the value is read as an octal value
- * If it does not match the above it is read in as an integer
- * @param aSectName - Section within the test steps ini file
- * @param aKeyName - Name of a key within a section
- * @return aResult - The integer value of the Hex input
- * @return TBool - ETrue for found, EFalse for not found 
- */	
-TBool CDataWrapperBase::GetUintFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aResult)
-	{
-	TPtrC	result;
-	TBool	ret=EFalse;
-	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
-	if ( err != KErrNone )
-		{
-		ret=EFalse;
-		}
-	if ( ret )
-		{
-		TLex	lex(result);
-		if( result.FindC(KPrefixHex)==KErrNone )
-			{
-			lex=result.Mid(KPrefixHex().Length());
-			ret=(lex.Val(aResult, EHex)==KErrNone);
-			}
-		else
-			{
-			TInt	binarySuffixPosition=result.Length()-KSuffixBinary().Length();
-			if ( result.FindC(KSuffixBinary)==binarySuffixPosition )
-				{
-				lex=result.Left(binarySuffixPosition);
-				ret=(lex.Val(aResult, EBinary)==KErrNone);
-				}
-			else
-				{
-				if( result.FindC(KPrefixOctal)==KErrNone )
-					{
-					ret=(lex.Val(aResult, EOctal)==KErrNone);
-					}
-				else
-					{
-					TInt	intResult;
-					ret=(lex.Val(intResult)==KErrNone);
-					if ( ret )
-						{
-						aResult=(TUint)intResult;
-						}
-					}
-				}
-			}
-		}
-
-	return ret;
-	}
-
-TBool CDataWrapperBase::GetCommandStringParameterL(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult)
-	{
-	TBool	ret=EFalse;
-
-	if ( aSectName.Length()!=0 )
-		{
-		ret=CDataWrapper::GetStringFromConfig(aSectName, aKeyName, aResult);
-
-		for ( TInt index=iInclude.Count(); (index>0) && (!ret); )
-			{
-			ret=iInclude[--index]->FindVar(aSectName, aKeyName, aResult);
-			}
-		}
-
-	if ( ret )
-		{
-		if ( aResult.Match(KMatch)!=KErrNotFound )
-			{
-			//	We have an entry of the format
-			//	entry =*{section,entry}*
-			//	where * is one or more characters
-			//	We need to construct this from other data in the ini file replacing {*,*}
-			//	with the data from
-			//	[section]
-			//	entry =some_value
-			HBufC*	buffer=HBufC::NewLC(aResult.Length());
-			buffer->Des().Copy(aResult);
-
-			TInt	startLength=KStart().Length();
-			TInt	sparatorLength=KSeparator().Length();
-			TInt	endLength=KEnd().Length();
-			TInt	bufferLength;
-			TInt	start;
-			TInt	sparator;
-			TInt	end;
-			TPtrC	remaining;
-			TLex	lex;
-			do
-				{
-				bufferLength=buffer->Length();
-				start=buffer->Find(KStart);
-
-				remaining.Set(buffer->Des().Right(bufferLength-start-startLength));
-				sparator=remaining.Find(KSeparator);
-				remaining.Set(remaining.Right(remaining.Length()-sparator-sparatorLength));
-				sparator += (start + startLength);
-
-				end=remaining.Find(KEnd) + sparator + sparatorLength;
-
-				TPtrC	sectionName(buffer->Ptr()+start+startLength, sparator-start-startLength);
-				TPtrC	keyName(buffer->Ptr()+sparator+sparatorLength, end-sparator-sparatorLength);
-				sectionName.Set(TLex(sectionName).NextToken());
-				keyName.Set(TLex(keyName).NextToken());
-
-				TInt	entrySize=0;
-				TPtrC	entryData;
-				TBool	found=CDataWrapper::GetStringFromConfig(sectionName, keyName, entryData);
-				for ( TInt index=iInclude.Count(); (index>0) && (!found);  )
-					{
-					found=iInclude[--index]->FindVar(sectionName, keyName, entryData);
-					}
-				if ( found )
-					{
-					entrySize=entryData.Length();
-					}
-
-				TInt	newLength=start + bufferLength - end - endLength + entrySize;
-				HBufC*	bufferNew=HBufC::NewLC(newLength);
-				bufferNew->Des().Copy(buffer->Ptr(), start);
-				if ( entrySize>0 )
-					{
-					bufferNew->Des().Append(entryData);
-					}
-				bufferNew->Des().Append(buffer->Ptr() + end + endLength, bufferLength - end - endLength);
-				CleanupStack::Pop(bufferNew);
-				CleanupStack::PopAndDestroy(buffer);
-				buffer=bufferNew;
-				CleanupStack::PushL(buffer);
-				}
-			while ( buffer->Match(KMatch)!=KErrNotFound );
-			iBuffer.Append(buffer);
-			CleanupStack::Pop(buffer);
-			aResult.Set(*buffer);
-			INFO_PRINTF4(KDataRead, &aSectName, &aKeyName , &aResult);
-			}
-		}
-
-	return ret;
-	}
-
-
-/** 
- *Utility function to produce time delay
- * @param aTimeoutInSecs Times in micro seconds
- */
-void CDataWrapperBase::Timedelay(TInt aTimeoutInSecs)
-	{
-	TRequestStatus	status;
-	iTimer.After(status, aTimeoutInSecs);
-	User::WaitForRequest(status);
-	}
-
-
-/** Validates the returned valua as a Bool. Compares aValue with the expected result in the ini file and Sets the block result to EFail if not equal.
- *	@param aSection - Section within the ini file to read the expected value
- *	@param aValue	 - The value we need to validate
- *  @param aForceValidation - ETrue forces validation if there's a missing parameter.
- *  @param aErrorMessage	- Contains a descriptor with a custom error message
- *  @return - Print error messages to log file
- *  @return - Sets test block result
- */
-void CDataWrapperBase::GetValidationBool(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage)
-	{
-	TBool	expectedValue;
-	TBool	ret=GetBoolFromConfig(aSection, KExpected(), expectedValue);
-	if ( !ret )
-		{
-		if ( aForceValidation )
-			{
-			ERR_PRINTF2(KLogMissingParameter, & KExpected);
-			SetBlockResult(EFail);
-			}
-		}
-	else
-		{
-		if ( aValue!=expectedValue )
-			{
-			SetBlockResult(EFail);
-			ERR_PRINTF1(aErrorMessage);
-			ERR_PRINTF3(_L("Retrived Value(%d) != expectedValue(%d)"), aValue, expectedValue);
-			}
-		}
-	}
-
-
-/** 
- * Validates the returned valua as a TInt. Compares aValue with the expected result in the ini file and Sets the block result to EFail if not equal.
- *	@param aSection - Section within the ini file to read the expected value
- *	@param aValue	 - The value we need to validate
- *  @param aForceValidation - ETrue forces validation if there's a missing parameter.
- *  @param aErrorMessage	- Contains a descriptor with a custom error message
- *  @return - Print error messages to log file
- *  @return - Sets test block result
- */
-void CDataWrapperBase::GetValidationInt(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage)
-	{
-	TInt	expectedValue;
-	TBool	ret=GetIntFromConfig(aSection, KExpected(), expectedValue);
-	if ( !ret )
-		{
-		if ( aForceValidation )
-			{
-			ERR_PRINTF2(KLogMissingParameter, &KExpected());
-			SetBlockResult(EFail);
-			}
-		}
-	else
-		{
-		if ( aValue!=expectedValue )
-			{
-			SetBlockResult(EFail);
-			ERR_PRINTF1(aErrorMessage);
-			ERR_PRINTF3(_L("Retrived Value(%d) != expectedValue(%d)"), aValue, expectedValue);
-			}
-		}
-	}
-
-/** 
- * Validates the returned valua as a TUint. Compares aValue with the expected result in the ini file and Sets the block result to EFail if not equal.
- *	@param aSection - Section within the ini file to read the expected value
- *	@param aValue	 - The value we need to validate
- *  @param aForceValidation - ETrue forces validation if there's a missing parameter.
- *  @param aErrorMessage	- Contains a descriptor with a custom error message
- *  @return - Print error messages to log file
- *  @return - Sets test block result
- */
-void CDataWrapperBase::GetValidationUint(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage)
-	{
-	TUint	expectedValue;
-	TBool	ret=GetUintFromConfig(aSection, KExpected(), expectedValue);
-	if ( !ret )
-		{
-		if ( aForceValidation )
-			{
-			ERR_PRINTF2(KLogMissingParameter, &KExpected());
-			SetBlockResult(EFail);
-			}
-		}
-	else
-		{
-		if ( aValue!=expectedValue )
-			{
-			SetBlockResult(EFail);
-			ERR_PRINTF1(aErrorMessage);
-			ERR_PRINTF3(_L("Retrived Value(%d) != expectedValue(%d)"), aValue, expectedValue);
-			}
-		}
-	}
-
-
-/**
- *   Return array of string parameters i.e. key=a1,a2,a3 returns array which contains
- *   String a1, a2 and a3.
- *   @return ret - EFalse if can't get a String parameter from Config file.  ETrue if KErrNone
- */
-TBool CDataWrapperBase::GetArrayFromConfig(const TDesC& aSectName, const TDesC& aKeyName, RPointerArray<HBufC>& aResult)
-	{
-	TBool	ret=EFalse;
-	TPtrC completeArray;
-	
-	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, completeArray));
-	if ( err != KErrNone )
-		{
-		ret=EFalse;
-		}
-
-    TLex16 lex(completeArray); // Here we have the array as a string i.e. "a1,a2,a3"
-    TBuf<256> buf;
-    TChar chr;
-    
-    while(!lex.Eos())
-        {
-        chr = lex.Get();
-        // Check if there was a list separator
-        if (chr == ',')
-            {
-            HBufC* param = buf.AllocLC();
-            buf.Zero();
-            aResult.Append(param);
-            CleanupStack::Pop(param); // pointer to buf is stored in RPointerArray
-            }
-        // If not separator character we can store the character into array
-        else
-            {
-            buf.Append(chr);
-            }
-        }
-    // Remember to put last token into array (,a3)
-    HBufC* param = buf.AllocLC();
-    aResult.Append(param);
-    CleanupStack::Pop(param);
-    
-    return ret;
-	}
-
-
-TBool CDataWrapperBase::GetEnumFromConfig(const TDesC& aSectName, const TDesC& aKeyName, const TEnumEntryTable* aTable, TInt& aResult)
-	{
-	TPtrC	str;
-	TBool	ret=GetStringFromConfig(aSectName, aKeyName, str);
-
-	if ( ret )
-		{
-		TBool	found=EFalse;
-		TInt	index=0;
-		while ( (aTable[index].iValue!=-1) && !found )
-			{
-			if ( aTable[index].iString==str )
-				{
-				found=ETrue;
-				aResult=aTable[index].iValue;
-				}
-			else
-				{
-				++index;
-				}
-			}
-
-		if ( !found )
-			{
-			ret=GetIntFromConfig(aSectName, aKeyName, aResult);
-			}
-		}
-
-	return ret;
-	}
-
--- a/wlanapitest/wlanhaitest/group/bld.inf	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-
-#include "../wlan/group/bld.inf"
--- a/wlanapitest/wlanhaitest/group/device.cfg	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-
-
-// Used within the build process to export the correct files for the supported devices
-// Uncomment only one of the devices definied in  listed below
-
-#define TEST_DEVICE_DEVLON52
-//#define TEST_DEVICE_TUBE
--- a/wlanapitest/wlanhaitest/group/release.txt	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-NOTESRC_RELEASER
-Nokia Corporation
-
-NOTESRC_RELEASE_REASON
-WLAN SALT
--- a/wlanapitest/wlanhaitest/group/testdriversetup.bat	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-@rem
-@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-perl testdriversetup.pl
--- a/wlanapitest/wlanhaitest/group/testdriversetup.pl	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#
-# Copyright (c) 2005-2009 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"
-# 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: 
-#
-#
-use Cwd;
-
-my $theEpocRoot=$ENV{EPOCROOT};
-my $epoc32Location="$theEpocRoot.\\epoc32";
-
-my $currentDirectory=cwd;
-$currentDirectory =~ s/Group//i;
-$currentDirectory =~ s/\//\\/g;
-
-my $currentDrive = substr($currentDirectory,0,2);
-
-my	$cmd="TestDriver config";
-my	$suite="file:/$currentDrive$epoc32Location\\testdriver\\salt\\wlanhai.driver";
-$suite =~ s.\\./.g;
-$suite =~ s\/./\/\g;
-
-$cmd .= " --bldclean OFF";
-$cmd .= " --bldmake OFF";
-$cmd .= " -e $currentDrive$theEpocRoot";
-$cmd .= " -x $currentDrive$epoc32Location\\testdriver\\salt";
-$cmd .= " --repos $currentDrive$epoc32Location\\testdriver\\Repository";
-$cmd .= " -c $currentDrive$epoc32Location\\testdriver\\Results";
-$cmd .= " -i $currentDirectory";
-$cmd .= " -s $suite";
-$cmd .= " --source $currentDirectory";
-$cmd .= " --tp $currentDirectory";
-$cmd .= " --testexec auto";
-$cmd .= " --statlite false";
-$cmd .= " --teflite true";
-$cmd .= " --commdb overwrite";
-system("$cmd");
--- a/wlanapitest/wlanhaitest/group/wlanhaitest.mrp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2005-2009 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"
-# 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: 
-#
-#
-component		wlanhaitest
-source			\sf\os\wlan\wlanapitest\wlanhaitest
-notes_source	\sf\os\wlan\wlanapitest\wlanhaitest\group\release.txt
-ipr				T
--- a/wlanapitest/wlanhaitest/testsuites/group/bld.inf	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-
-PRJ_TESTEXPORTS
-../wlan/wlanhai.driver				/epoc32/testdriver/salt/wlanhai.driver
\ No newline at end of file
--- a/wlanapitest/wlanhaitest/testsuites/wlan/wlanhai.driver	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<driver:driver xmlns:driver="http://www.symbian.com/TestDriver">
-	<task name="wlanhai" timeout="0">
-		<transferToSymbian>
-		</transferToSymbian>
-		<task name="wlan">
-			<executeOnPC>
-				<build testBuild="true" URI="${sourceroot}\group\">
-					<componentName>t_wlan</componentName>
-				</build>
-			</executeOnPC>
-			<transferToSymbian>
-				<transfer move="false" PCPath="${epocroot}\epoc32\data\c\nt\wlan\t_wlan.ini" SymbianPath="$:\nt\wlan\t_wlan.ini"/>
-				<transfer move="false" PCPath="${epocroot}\epoc32\data\c\nt\wlan\t_wlan_environment.ini" SymbianPath="$:\nt\wlan\t_wlan_environment.ini"/>		
-			</transferToSymbian>
-			<task name="validation">
-				<task name="manual">
-				</task>
-				<task name="automated">
-					<task name="networking-wlan-validation-automated-instantiate" timeout="1000">
-						<transferToSymbian>
-							<transfer move="false" PCPath="${epocroot}\epoc32\data\c\nt\wlan\networking-wlan-validation-automated-instantiate.ini" SymbianPath="$:\nt\wlan\networking-wlan-validation-automated-instantiate.ini"/>
-						</transferToSymbian>
-						<executeOnSymbian>
-							<testExecuteScript PCPath="${epocroot}\epoc32\data\c\nt\wlan\networking-wlan-validation-automated-instantiate.script" SymbianPath="$:\nt\wlan\networking-wlan-validation-automated-instantiate.script">
-								<testCasesList operator="exclude">
-									<testCase target="${epocroot}\epoc32\data\c\nt\wlan\t_wlan.tcs"/>
-								</testCasesList>
-							</testExecuteScript>
-						</executeOnSymbian>
-					</task>
-					<task name="networking-wlan-validation-automated-connection" timeout="1000">
-						<transferToSymbian>
-							<transfer move="false" PCPath="${epocroot}\epoc32\data\c\nt\wlan\networking-wlan-validation-automated-connection.ini" SymbianPath="$:\nt\wlan\networking-wlan-validation-automated-connection.ini"/>
-						</transferToSymbian>
-						<executeOnSymbian>
-							<testExecuteScript PCPath="${epocroot}\epoc32\data\c\nt\wlan\networking-wlan-validation-automated-connection.script" SymbianPath="$:\nt\wlan\networking-wlan-validation-automated-connection.script">
-								<testCasesList operator="exclude">
-									<testCase target="${epocroot}\epoc32\data\c\nt\wlan\t_wlan.tcs"/>
-								</testCasesList>
-							</testExecuteScript>
-						</executeOnSymbian>
-					</task>
-					<task name="networking-wlan-validation-automated-transfer" timeout="1000">
-						<transferToSymbian>
-							<transfer move="false" PCPath="${epocroot}\epoc32\data\c\nt\wlan\networking-wlan-validation-automated-transfer.ini" SymbianPath="$:\nt\wlan\networking-wlan-validation-automated-transfer.ini"/>
-						</transferToSymbian>
-						<executeOnSymbian>
-							<testExecuteScript PCPath="${epocroot}\epoc32\data\c\nt\wlan\networking-wlan-validation-automated-transfer.script" SymbianPath="$:\nt\wlan\networking-wlan-validation-automated-transfer.script">
-								<testCasesList operator="exclude">
-									<testCase target="${epocroot}\epoc32\data\c\nt\wlan\t_wlan.tcs"/>
-								</testCasesList>
-							</testExecuteScript>
-						</executeOnSymbian>
-					</task>
-				</task>
-			</task>
-			<task name="performance">
-				<task name="manual">
-				</task>
-				<task name="automated">
-				</task>
-			</task>
-			<task name="conformance" timeout="0">
-				<task name="manual">
-				</task>
-				<task name="automated">
-				</task>
-			</task>
-			<task name="stress">
-				<task name="manual">
-				</task>
-				<task name="automated">
-				</task>
-			</task>
-		</task>
-	</task>
-</driver:driver>
--- a/wlanapitest/wlanhaitest/wlan/group/T_Wlan.mmp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-#include <platform_paths.hrh>
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-TARGET			t_wlan.exe
-TARGETTYPE		exe
-UID				0x102863E6 0xA00041CB
-VENDORID		0x70000001
-
-capability		All -Tcb
-
-SOURCEPATH		../src
-
-SOURCE			../../common/src/datawrapperbase.cpp
-SOURCE			t_wlandriverserver.cpp
-SOURCE          t_wlanmgmtclientdata.cpp
-SOURCE          t_wlanscaninfodata.cpp
-SOURCE			t_rsocketservdata.cpp
-SOURCE			t_rconnectiondata.cpp
-SOURCE			t_ccommsdatabasedata.cpp
-SOURCE			t_ccommsdbtableviewdata.cpp
-SOURCE          t_rsocketdata.cpp
-SOURCE			t_rfiledata.cpp
-
-USERINCLUDE		../inc
-USERINCLUDE		../../common/inc 
-
-
-SYSTEMINCLUDE	/epoc32/include
-SYSTEMINCLUDE	/epoc32/include/test
-SYSTEMINCLUDE	/epoc32/include/kernel
-SYSTEMINCLUDE   /epoc32/include/ecom
-SYSTEMINCLUDE   /epoc32/include/mw
-
-LIBRARY			testexecuteutils.lib
-LIBRARY			testexecutelogclient.lib
-LIBRARY			iniparser.lib
-LIBRARY         euser.lib
-LIBRARY			ecom.lib
-LIBRARY			flogger.lib
-LIBRARY			commdb.lib
-LIBRARY			esock.lib
-LIBRARY			insock.lib
-LIBRARY			wlandbif.lib
-LIBRARY			efsrv.lib
-LIBRARY			eikcore.lib
-LIBRARY			apengine.lib     
-
-SMPSAFE
--- a/wlanapitest/wlanhaitest/wlan/group/bld.inf	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-
-#include "../../group/device.cfg"
-#include "../../testsuites/group/bld.inf"
-
-PRJ_TESTEXPORTS
-t_wlan.iby								   		/epoc32/rom/haitests/t_wlan.iby
-t_wlan_binaries.iby								/epoc32/rom/haitests/t_wlan_binaries.iby
-t_wlan_testdata.iby								/epoc32/rom/haitests/t_wlan_testdata.iby
-
-../pkg/t_wlan.bat								c:/nt/wlan/t_wlan.bat
-
-../scripts/networking-wlan-validation-automated-connection.script		c:/nt/wlan/networking-wlan-validation-automated-connection.script
-../scripts/networking-wlan-validation-automated-instantiate.script		c:/nt/wlan/networking-wlan-validation-automated-instantiate.script
-../scripts/networking-wlan-validation-automated-transfer.script			c:/nt/wlan/networking-wlan-validation-automated-transfer.script
-../testdata/networking-wlan-validation-automated-connection.ini			c:/nt/wlan/networking-wlan-validation-automated-connection.ini
-../testdata/networking-wlan-validation-automated-instantiate.ini		c:/nt/wlan/networking-wlan-validation-automated-instantiate.ini
-../testdata/networking-wlan-validation-automated-transfer.ini			c:/nt/wlan/networking-wlan-validation-automated-transfer.ini
-../testdata/t_wlan_environment.ini										c:/nt/wlan/t_wlan_environment.ini
-
-#if defined(TEST_DEVICE_DEVLON52)
-../testdata/devlon52/t_wlan.ini			c:/nt/wlan/t_wlan.ini
-../testdata/devlon52/t_wlan.tcs			c:/nt/wlan/t_wlan.tcs
-#endif
-
-#if defined(TEST_DEVICE_TUBE)
-../testdata/tube/t_wlan.ini			    c:/nt/wlan/t_wlan.ini
-../testdata/tube/t_wlan.tcs			    c:/nt/wlan/t_wlan.tcs
-#endif
-
-PRJ_TESTMMPFILES
-t_wlan.mmp
--- a/wlanapitest/wlanhaitest/wlan/group/t_wlan.iby	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-
-#if (!defined __T_WLAN_IBY__)
-#define __T_WLAN_IBY__
-
-//Test Includes
-#include <..\haitests\t_wlan_binaries.iby>
-#include <..\haitests\t_wlan_testdata.iby>
-
-#endif
--- a/wlanapitest/wlanhaitest/wlan/group/t_wlan_binaries.iby	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-
-#if (!defined __T_WLAN_BINARIES_IBY__)
-#define __T_WLAN_BINARIES_IBY__
-
-#if (!defined EKA2)
-file=\Epoc32\Release\armv5\urel\t_wlan.exe		\sys\bin\t_wlan.exe
-#else
-file=\Epoc32\Release\armv5\urel\t_wlan.exe		\sys\bin\t_wlan.exe
-#endif
-
-#endif
--- a/wlanapitest/wlanhaitest/wlan/group/t_wlan_testdata.iby	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-
-#if (!defined __T_WLAN_TESTDATA_IBY__)
-#define __T_WLAN_TESTDATA_IBY__
-
-data=EPOCROOT##Epoc32\data\c\nt\wlan\t_wlan.bat														nt\wlan\t_wlan.bat
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-connection.script			nt\wlan\networking-wlan-validation-automated-connection.script
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-instantiate.script		nt\wlan\networking-wlan-validation-automated-instantiate.script
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-transfer.script			nt\wlan\networking-wlan-validation-automated-transfer.script
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-connection.ini			nt\wlan\networking-wlan-validation-automated-connection.ini
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-instantiate.ini			nt\wlan\networking-wlan-validation-automated-instantiate.ini
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-transfer.ini				nt\wlan\networking-wlan-validation-automated-transfer.ini
-data=EPOCROOT##Epoc32\data\c\nt\wlan\t_wlan_environment.ini											nt\wlan\t_wlan_environment.ini
-data=EPOCROOT##Epoc32\data\c\nt\wlan\t_wlan.ini														nt\wlan\t_wlan.ini
-data=EPOCROOT##Epoc32\data\c\nt\wlan\t_wlan.tcs														nt\wlan\t_wlan.tcs
-
-#endif
--- a/wlanapitest/wlanhaitest/wlan/group/user_input.oby	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-
-file=\Epoc32\Release\armv5\urel\testexecutelogclient.dll		\sys\bin\testexecutelogclient.dll
-file=\Epoc32\Release\armv5\urel\testexecutelogengine.exe		\sys\bin\testexecutelogengine.exe
-file=\Epoc32\Release\armv5\urel\cinidata.dll					\sys\bin\cinidata.dll
-file=\Epoc32\Release\armv5\urel\RFileLoggerClient.dll			\sys\bin\RFileLoggerClient.dll
-file=\Epoc32\Release\armv5\urel\RFileLoggerServer.exe			\sys\bin\RFileLoggerServer.exe
-file=\Epoc32\Release\armv5\urel\testexecute.exe					\sys\bin\testexecute.exe
-file=\Epoc32\Release\armv5\urel\testexecuteutils.dll			\sys\bin\testexecuteutils.dll
-data=\Epoc32\data\c\system\data\testexecute.ini					\system\data\testexecute.ini
-
-file=\Epoc32\Release\armv5\urel\statapi.exe						\sys\bin\statapi.exe
-data=\Epoc32\data\c\system\data\stat.ini						\system\data\stat.ini
--- a/wlanapitest/wlanhaitest/wlan/inc/T_CCommsDatabaseData.h	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#ifndef T_CCOMMSDATABASEDATA_H_
-#define T_CCOMMSDATABASEDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//Epoc includes
-#include <commdb.h>						
-
-class CT_CCommsDatabaseData: public CDataWrapperBase
-	{
-public:
-	static CT_CCommsDatabaseData* NewL();
-	virtual ~CT_CCommsDatabaseData();
-
-public:	
-	virtual TAny* GetObject();
-	virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);	
-
-protected:
-	CT_CCommsDatabaseData();
-	void ConstructL();
-
-private:
-	void DoCmdNewL();
-	void DoCmdDestructor();
-	void DestroyData();
-	
-private:
-	/**
-	 * Wrapped object
-	 */
-	CCommsDatabase* iCommsDat;
-	
-	};
-
-#endif /*T_CCOMMSDATABASEDATA_H_*/
--- a/wlanapitest/wlanhaitest/wlan/inc/T_CCommsDbTableViewData.h	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#ifndef T_CCOMMSDBTABLEVIEWDATA_H_
-#define T_CCOMMSDBTABLEVIEWDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//Epoc includes
-#include <commdb.h>						
-
-class CT_CCommsDbTableViewData: public CDataWrapperBase
-	{
-public:
-	static CT_CCommsDbTableViewData* NewL();
-	virtual ~CT_CCommsDbTableViewData();
-
-public:	
-	virtual TAny* GetObject();
-	virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);	
-
-protected:
-	CT_CCommsDbTableViewData();
-	void ConstructL();
-
-private:
-     void DoCmdNewL(const TTEFSectionName& aSection);
-     void DoCmdDestructor();
-     void DestroyData();
-	
-private:
-	/**
-	 * Wrapped object
-	 */
-	 CCommsDbTableView* iSearchView;
-	
-	};
-
-#endif /*T_CCOMMSDBTABLEVIEW_H_*/
--- a/wlanapitest/wlanhaitest/wlan/inc/T_RConnectionData.h	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-
-#ifndef T_RCONNECTIONDATA_H_
-#define T_RCONNECTIONDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
- 
-//Epoc includes
-#include <es_sock.h> //RConnection
-
-class CT_RConnectionData: public CDataWrapperBase
-	{
-	public:
-	static CT_RConnectionData* NewL();
-	virtual ~CT_RConnectionData();
-
-public:	
-	virtual TAny* GetObject();
-	virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);	
-
-protected:
-	CT_RConnectionData();
-	void ConstructL();
-
-private:
-   void DoCmdOpen(const TTEFSectionName& aSection);
-   void DoCmdStart(const TTEFSectionName& aSection);   
-   void DoCmdClose();
-   void Close();
-
-private:
-	/**
-	 * Wrapped object
-	 */
-	RConnection* 			iConnection;
-	};
-#endif /*T_RCONNECTIONDATA_H_*/
--- a/wlanapitest/wlanhaitest/wlan/inc/T_RFileData.h	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-
-#ifndef T_RFILEDATA_H_
-#define T_RFILEDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-class CT_RFileData: public CDataWrapperBase
-	{
-public:
-	static CT_RFileData* NewL();
-	virtual ~CT_RFileData();
-
-public:	
-	virtual TAny* GetObject();
-	virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);			 
-
-protected:
-	CT_RFileData();
-	void ConstructL();
-
-private:
-  	void DoCmdGenerateFile(const TTEFSectionName& aSection);
-
-private:
- 	/**
- 	 * For create a file
- 	 */
- 	RFile*		iFile;
-
-    /**
-     * Handle for file server session
-     */
- 	RFs			iFs;
-	};
-	
-#endif /*T_RFILEDATA_H_*/
--- a/wlanapitest/wlanhaitest/wlan/inc/T_RSocketData.h	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#ifndef T_RSOCKETDATA_H_
-#define T_RSOCKETDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//Epoc includes
-#include <es_sock.h> // RSocketServ, RConnection
-#include <in_sock.h> // KAfInet
-#include <activecallback.h>
-#include <f32file.h>
-
-
-class CT_RSocketData: public CDataWrapperBase
-	{
-public:
-	static CT_RSocketData* NewL();
-	void RunL(CActive* aActive, TInt aIndex);
-	virtual ~CT_RSocketData();
-
-public:	
-	virtual TAny* GetObject();
-	void ErrorMessage(const TInt aMessage);
-	virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);		
-
-protected:
-	CT_RSocketData();
-	void ConstructL();
-
-private:
-	void DoCmdOpen(const TTEFSectionName& aSection);	
-	void DoCmdConnect(const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
-	void DoCmdShutdown(const TInt aAsyncErrorIndex);			
-	void DoCmdClose();
-	void DoCmdHttpGet();
-	void DoCmdCheckSupportedRates(const TTEFSectionName& aSection);
-	void DoCmdUploadSendHTTPPost(const TTEFSectionName& aSection);
-    void CreateHTTPHeaderStart(TDes8& aRequest, TInt aDataSize, TDesC& aFileServer,TDesC& clientID,TDesC& serverScript);
-	void SendFileToSocketL(const TDesC& aFilename);
-	TInt ReadFileSizeL(const TDesC& aFilename);
-	void CreateHTTPHeaderEnd(TDes8& aRequest);
-	TBool CheckSupportedRates(const TDesC8& aSupportedRates, const TUint8 aRate);
-	void Shutdown();
-	void DoCmdDownloadSendHTTPGet(const TTEFSectionName& aSection, const TInt aAsyncErrorIndex );
-	void DoCmdRecvOneOrMore(const TTEFSectionName& aSection);	
-	void Close();	
-	TReal ThroughputInMegaBits( TTimeIntervalMicroSeconds aDuration, TInt aTotalTransferred );
-	void RecvOneOrMore(TRequestStatus& status);	
-
-private:
-	/**
-	 * Wrapped object
-	 */
-	RSocket*			iSocket;
-	/**
-	 * Used in the command DoCmdDownloadSendHTTPGet for RSocket::Write
-	 */
-	CActiveCallback* 	iActiveCallback;
-	/**
-	 * Used in the command DoCmdConnect for RSocket::Connect
-	 */
-	CActiveCallback* 	iActCallConnectSocket;
-	/**
-	 * Used in the command DoCmdConnectSocket for RSocket::Connect
-	 */
-	CActiveCallback* 	iActCallShutDownSocket;		
-	/**
-	 * Flag to review if the Socket is Open with RSocket::Connect
-	 */
-	TBool 				iSocketOpened;
-	/**
-	 * flag to review if the Socket was shutdown
-	 */
-	TBool 				iSocketStarted;		
-	/**
-	 * Async data
-	 */
-	TInt 			    iAsyncErrorIndex;
-	/**
-	 * Buffer for Download in DoCmdReceiveHTTPResponse command
-	 */
-	HBufC8* 			iDownloadBuffer;
-	/**
-	 * Buffer for Upload in SendFileToSocket 
-	 */
-	HBufC8* 			iUploadBuffer;
-	/**
-	 * Header for response HTPP
-	 */
-	RBuf8   			iHttpResponseHeader;
-	/**
-	 * Download throughput
-	 */
-	TReal 				iDownloadThroughput;
-	/**
-	 * Handle for Filse server session
-	 */
-	RFs 				iFs;
-	/**
-	 * Upload throughput
-	 */
-	TReal               iUploadThroughput;
-	/**
-	 * Bytes received in DoCmdHttpGet
-	 */
-	TInt                itotalReceived;
-	};
-
-#endif /*T_RSOCKETDATA_H_*/
--- a/wlanapitest/wlanhaitest/wlan/inc/T_RSocketServData.h	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#ifndef T_RSOCKETSERVDATA_H_
-#define T_RSOCKETSERVDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//Epoc includes
-#include <es_sock.h> // RSocketServ, RConnection
-
-class CT_RSocketServData: public CDataWrapperBase
-	{
-public:
-	static CT_RSocketServData* NewL();
-	virtual ~CT_RSocketServData();
-
-public:	
-	virtual TAny* GetObject();
-	virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);		
-	void SetIapID(TUint32 );
-	TUint32 GetIapID(){return iIapID;}
-
-protected:
-	CT_RSocketServData();
-	void ConstructL();
-
-private:
-	void DoCmdSetOutgoingIap(const TTEFSectionName& aSection);
-	void DoCmdConnect();
-	void DoCmdClose();
-	void Close();
-	
-private:
-	/**
-	 * Wrapped object
-	 */
-	RSocketServ*	iSocketServ;
-	/**
-	 * Flag to review RSocketServ is in Connected state
-	 */
-	TBool			iSocketServConnected;
-	/**
-	 * Store de ID of the IAP
-	 */
-	TUint32			iIapID;
-	
-	};
-#endif /*T_RSOCKETSERVDATA_H_*/
--- a/wlanapitest/wlanhaitest/wlan/inc/T_WlanDriverServer.h	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#ifndef T_WLAN_DRIVER_SERVER_H
-#define T_WLAN_DRIVER_SERVER_H
-
-//Epoc includes
-#include <testserver2.h>
-
-/**
- * This wrapper class extends the test server and creates test server for Wlan driver
- */
-class CT_WlanDriverServer : public CTestServer2
-	{
-private:
-	class CT_WlanDriverBlock : public CTestBlockController
-		{
-	public:
-		inline CT_WlanDriverBlock();
-		inline ~CT_WlanDriverBlock();
-
-		CDataWrapper* CreateDataL( const TDesC& aData );
-		};
-
-public:
-	static CT_WlanDriverServer* NewL();
-	inline CTestBlockController* CreateTestBlock();
-	};
-
-#include "t_wlandriverserver.inl"
-
-#endif // T_WLAN_DRIVER_SERVER_H
--- a/wlanapitest/wlanhaitest/wlan/inc/T_WlanDriverServer.inl	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-CT_WlanDriverServer::CT_WlanDriverBlock::CT_WlanDriverBlock()
-:	CTestBlockController()
-	{
-	}
-
-CT_WlanDriverServer::CT_WlanDriverBlock::~CT_WlanDriverBlock()
-	{
-	}
-
-CTestBlockController* CT_WlanDriverServer::CreateTestBlock()
-	{
-	return new CT_WlanDriverBlock();
-	}
--- a/wlanapitest/wlanhaitest/wlan/inc/T_WlanMgmtClientData.h	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#ifndef T_WLANMGMTCLIENTDATA_H_
-#define T_WLANMGMTCLIENTDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//forward 
-class CWlanMgmtClient;
-
-class CT_WlanMgmtClientData: public CDataWrapperBase
-	{
-public:
-	static CT_WlanMgmtClientData* NewL();
-	~CT_WlanMgmtClientData();
-	
-public:
-	virtual TAny* GetObject();	
-	virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);	
-	
-protected:
-	CT_WlanMgmtClientData();
-	void ConstructL();
-	
-private:
-	void DoCmdNewL();	
-	void DoCmdGetScanResults(const TTEFSectionName& aSection);	
-	void DoCmdDestructor();
-	void DestroyData();
-	
-private:
-	/**
-	 * Wrapped object
-	 */
-	CWlanMgmtClient* iData;
-
-};
-
-
-#endif /*T_WLANMGMTCLIENTDATA_H_*/
--- a/wlanapitest/wlanhaitest/wlan/inc/T_WlanScanInfoData.h	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-
-#ifndef T_WLANSCANINFODATA_H_
-#define T_WLANSCANINFODATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//forward class
-class CWlanScanInfo;
-
-class CT_WlanScanInfoData: public CDataWrapperBase
-	{
-public:
-	static CT_WlanScanInfoData* NewL();
-	~CT_WlanScanInfoData();
-	
-public:
-	virtual TAny* GetObject();	
-	virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
-
-protected:
-	CT_WlanScanInfoData();
-	void ConstructL();
-
-private:
-	 void DoCmdNewL(const TTEFSectionName& aSection);
-	 void DoCmdDestructor();
-	 void DestroyData();
-	 void DoCmdInformationElement(const TTEFSectionName& aSection);
-
-private:
-	/**
-	 * Wrapped object
-	 */
-	CWlanScanInfo* iData;
-	/**
-	 * For storing ECom instance UID (needed when destroying the instance)
-	 */
-	TUid iScanInfoInstanceIdentifier;
-   };
-
-#endif /*T_WLANSCANINFODATA_H_*/
-
-   
\ No newline at end of file
--- a/wlanapitest/wlanhaitest/wlan/pkg/t_wlan.bat	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-@rem
-@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-testexecute c:\nt\wlan\networking-wlan-validation-automated-connection.script	-tcx c:\nt\wlan\t_wlan.tcs
-testexecute c:\nt\wlan\networking-wlan-validation-automated-instantiate.script	-tcx c:\nt\wlan\t_wlan.tcs
-testexecute c:\nt\wlan\networking-wlan-validation-automated-transfer.script		-tcx c:\nt\wlan\t_wlan.tcs
\ No newline at end of file
--- a/wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-connection.script	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,357 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-//! @file
-//! @SYMTestSuiteName networking-wlan-validation-automated-connection
-//! @SYMScriptTestEnvironment This test script requires a basic ROM.
-//
-// Tests all public elements of the RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// classes as a means of confidence that the APIs work as expected.
-// 
-// The purpose is to provide a regression test suite of PublishedAll
-// APIs for: RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// The tests are fully automated.
-//
-
-
-
-LOAD_SUITE T_Wlan
-
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0001
-
-//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0001
-//!@SYMAPI
-//!                CWlanMgmtClient::NewL();
-//!                REComSession::CreateImplementationL(TUid, TUid{ref});
-//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//!                MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
-//!                REComSession::DestroyedImplementation(TUid);
-//!@SYMAuthor			alavariega
-//!@SYMCreationDate		23/06/2008
-//!@SYMTestCaseDesc		Wlan scan
-//!@SYMTestActions
-//!                1.- Instantiate management client. Scan for broadcasted Wireless network names; SSIDs: NewL
-//!                2.- Instantiate Scan Info. Check that the given SSIDs were found:NewL ( WlanScanUid = {UID, Uid} )
-//!                3.- GetScanResults ( scaninfo = wlansinf )
-//!                4.- SelectScanInfo ( DEFAULT_SSID_Ssid = {IAP,Iap} )
-//!                5.- Destroy Scan information: ~
-//!                6.- Destroy management client: ~
-//!@SYMTestStatus		Verified
-//!@SYMTestPriority		Normal
-//!@SYMTestExpectedResults
-//!                TEF reports the test case passed.
-//!@SYMTestType			CIT
-
-	START_TEST_BLOCK	100	T_Wlan	\nt\wlan\networking-wlan-validation-automated-connection.ini
-		CREATE_OBJECT	WlanMgmtClient		wmgmtcnt
-		CREATE_OBJECT	WlanScanInfo		wlansinf
-		COMMAND		wmgmtcnt		NewL
-		COMMAND		wlansinf		NewL			NETWORKING-Wlan-Connection-0001-0001-NewL_command02
-		COMMAND		wmgmtcnt		GetScanResults			NETWORKING-Wlan-Connection-0001-0001-GetScanResults_command03
-		COMMAND		wlansinf		InformationElement			NETWORKING-Wlan-Connection-0001-0001-InformationElement_command04
-		COMMAND		wlansinf		~
-		COMMAND		wmgmtcnt		~
-	END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0001
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0002
-
-//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0002
-//!@SYMAPI
-//!                CCommsDatabase::NewL(TBool);
-//!                CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//!                CWlanMgmtClient::NewL();
-//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//!                MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
-//!                CCommsDbTableView::GotoFirstRecord();
-//!                CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//!                CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//!                CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//!                CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//!                CWLanSettings::Disconnect();
-//!                CCommsDbTableView::GotoNextRecord();
-//!                RSocketServ::Connect(TUint);
-//!                RSocket::Open(RSocketServ{ref}, TUint);
-//!                RConnection::Start(TConnPref{ref});
-//!                RConnection::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//!                RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//!                RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//!                Shutdown(TShutdown,TRequestStatus{ref});
-//!@SYMAuthor			alavariega
-//!@SYMCreationDate		23/06/2008
-//!@SYMTestCaseDesc		Wlan connect
-//!@SYMTestActions
-//!                1.- Instantiate a CCOMMSDB : NewL
-//!                2.- instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb     = comsdb )
-//!                3.- SetOutgoingIap ( WLANIAP  = {IAP,Iap}; DEFAULT_SSID   = {IAP,Ssid}; commsdbtableview = comsdbtblview )
-//!                4.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//!                5.- Destroy a CCOMMSDB object: ~
-//!                6.- ConnectSocketServ
-//!                7.- OpenRConnection ( socketserv  = scktserv )
-//!                8.- StartRConnection ( socketserv  = scktserv )
-//!                9.- OpenSocket ( socketserv  = scktserv; connection  = rcntion )
-//!                10.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
-//!                11.- HttpGet
-//!                12.- ShutDownSocket
-//!                13.- CloseSocket
-//!                14.- CloseConnection
-//!                15.- CloseSocketServ
-//!                
-
-//!@SYMTestStatus		Verified
-//!@SYMTestPriority		Normal
-//!@SYMTestExpectedResults
-//!                Connect to a WLAN with no errors
-//!@SYMTestType			CIT
-
-	START_TEST_BLOCK	600	T_Wlan	\nt\wlan\networking-wlan-validation-automated-connection.ini
-		CREATE_OBJECT	CCommsDatabase		comsdb
-		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
-		CREATE_OBJECT	RSocketServ		scktserv
-		CREATE_OBJECT	RConnection		rcntion
-		CREATE_OBJECT	RSocket		rsckt
-		COMMAND		comsdb		NewL
-		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Connection-0002-0001-NewL_command02
-		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Connection-0002-0001-SetOutgoingIap_command03
-		COMMAND		comsdbtblview		~
-		COMMAND		comsdb		~
-		COMMAND		scktserv		Connect
-		COMMAND		rcntion		Open			NETWORKING-Wlan-Connection-0002-0001-Open_command07
-		COMMAND		rcntion		Start			NETWORKING-Wlan-Connection-0002-0001-Start_command08
-		COMMAND		rsckt		Open			NETWORKING-Wlan-Connection-0002-0001-Open_command09
-		COMMAND		rsckt		Connect			NETWORKING-Wlan-Connection-0002-0001-Connect_command10
-		OUTSTANDING
-		COMMAND		 rsckt		HttpGet
-		COMMAND		rsckt		Shutdown
-		OUTSTANDING
-		COMMAND		rsckt		Close
-		COMMAND		rcntion		Close
-		COMMAND		scktserv		Close
-	END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0002
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0003
-
-//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0003
-//!@SYMAPI
-//!                CCommsDatabase::NewL(TBool);
-//!                CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//!                CWlanMgmtClient::NewL();
-//!                REComSession::CreateImplementationL(TUid, TUid{ref});
-//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//!                MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
-//!                CCommsDbTableView::GotoFirstRecord();
-//!                CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//!                CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//!                CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//!                CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//!                CWLanSettings::Disconnect();
-//!                CCommsDbTableView::GotoNextRecord();
-//!                RSocketServ::Connect(TUint);
-//!                RConnection::Open(RSocketServ{ref}, TUint);
-//!                RConnection::Start(TConnPref{ref});
-//!                REComSession::DestroyedImplementation(TUid);
-//!                RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//!                RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//!                RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//!                RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!                
-//!@SYMAuthor			alavariega
-//!@SYMCreationDate		23/06/2008
-//!@SYMTestCaseDesc		Wlan Connection to 802.11b Router
-//!@SYMTestActions
-//!                1.- InstantiateMgmtClient: NewL
-//!                2.- InstantiateScanInfo: NewL   ( WlanScanUid = {UID, Uid} )
-//!                3.- Instantiate a CCOMMSDB: NewL
-//!                4.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//!                5.- GetScanResultsL ( scaninfo = wlansinf )
-//!                6.- SelectScanInfo ( DEFAULT_SSID_Ssid = {IAP80211b,Iap} )
-//!                7.- CheckSupportedRates ( rate  = 2; scaninfo = wlansinf )
-//!                8.- CheckSupportedRates ( rate  = 4; scaninfo = wlansinf )
-//!                9.- CheckSupportedRates ( rate  = 11; scaninfo = wlansinf )
-//!                10.- CheckSupportedRates ( rate  = 22; scaninfo = wlansinf )
-//!                11.- SetOutgoingIap ( WLANIAP = {IAP,Iap};DEFAULT_SSID = {IAP80211b,Iap}; commsdbtableview = comsdbtblview )
-//!                12.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//!                13.- Destroy a CCOMMSDB object: ~
-//!                14.- ConnectSocketServ
-//!                15.- OpenRConnection ( socketserv = scktserv )
-//!                16.- StartRConnection ( socketserv = scktserv )
-//!                17.- OpenSocket ( socketserv = scktserv;connection = rcntion )
-//!                18.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
-//!                19.- HttpGet
-//!                20.- ShutDownSocket
-//!                21.- CloseSocket
-//!                22.- CloseConnection
-//!                23.- CloseSocketServ
-//!                24.- DestroyScanInfo: ~
-//!                25.- DestroyMgmtClient: ~
-//!@SYMTestStatus		Verified
-//!@SYMTestPriority		Normal
-//!@SYMTestExpectedResults
-//!                Test case passes if the DUT can connect to the WLAN 802.11b router broadcasting the defined SSID.
-//!@SYMTestType			CIT
-
-	START_TEST_BLOCK	600	T_Wlan	\nt\wlan\networking-wlan-validation-automated-connection.ini
-		CREATE_OBJECT	WlanMgmtClient		wmgmtcnt
-		CREATE_OBJECT	WlanScanInfo		wlansinf
-		CREATE_OBJECT	CCommsDatabase		comsdb
-		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
-		CREATE_OBJECT	RSocketServ		scktserv
-		CREATE_OBJECT	RConnection		rcntion
-		CREATE_OBJECT	RSocket		rsckt
-		COMMAND		wmgmtcnt		NewL
-		COMMAND		wlansinf		NewL			NETWORKING-Wlan-Connection-0003-0001-NewL_command02
-		COMMAND		comsdb		NewL
-		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Connection-0003-0001-NewL_command04
-		COMMAND		wmgmtcnt		GetScanResults			NETWORKING-Wlan-Connection-0003-0001-GetScanResults_command05
-		COMMAND		wlansinf		InformationElement			NETWORKING-Wlan-Connection-0003-0001-InformationElement_command06
-		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command07
-		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command08
-		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command09
-		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command10
-		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Connection-0003-0001-SetOutgoingIap_command12
-		COMMAND		comsdbtblview		~
-		COMMAND		comsdb		~
-		COMMAND		scktserv		Connect
-		COMMAND		rcntion		Open			NETWORKING-Wlan-Connection-0003-0001-Open_command16
-		COMMAND		rcntion		Start			NETWORKING-Wlan-Connection-0003-0001-Start_command17
-		COMMAND		rsckt		Open			NETWORKING-Wlan-Connection-0003-0001-Open_command18
-		COMMAND		rsckt		Connect			NETWORKING-Wlan-Connection-0003-0001-Connect_command19
-		OUTSTANDING
-		COMMAND		 rsckt		HttpGet
-		COMMAND		rsckt		Shutdown
-		OUTSTANDING
-		COMMAND		rsckt		Close
-		COMMAND		rcntion		Close
-		COMMAND		scktserv		Close
-		COMMAND		wlansinf		~
-		COMMAND		wmgmtcnt		~
-	END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0003
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0004
-
-//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0004
-//!@SYMAPI
-//!                CCommsDatabase::NewL(TBool);
-//!                CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//!                CWlanMgmtClient::NewL();
-//!                REComSession::CreateImplementationL(TUid, TUid{ref});
-//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//!                MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
-//!                CCommsDbTableView::GotoFirstRecord();
-//!                CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//!                CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//!                CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//!                CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//!                CWLanSettings::Disconnect();
-//!                CCommsDbTableView::GotoNextRecord();
-//!                RSocketServ::Connect(TUint);
-//!                RConnection::Open(RSocketServ{ref}, TUint);
-//!                RConnection::Start(TConnPref{ref});
-//!                REComSession::DestroyedImplementation(TUid);
-//!                RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//!                RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//!                RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//!                RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!                
-//!@SYMAuthor			alavariega
-//!@SYMCreationDate		23/06/2008
-//!@SYMTestCaseDesc		Wlan Connection to 802.11g Router
-//!@SYMTestActions
-//!                1.- InstantiateMgmtClient: NewL
-//!                2.- InstantiateScanInfo: NewL   ( WlanScanUid = {UID, Uid} )
-//!                3.- Instantiate a CCOMMSDB: NewL
-//!                4.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb     = comsdb)
-//!                5.- GetScanResultsL ( scaninfo = wlansinf )
-//!                6.- SelectScanInfo ( DEFAULT_SSID_Ssid = {IAP80211g,Iap} )
-//!                7.- CheckSupportedRates ( rate  = 2;scaninfo = wlansinf )
-//!                8.- CheckSupportedRates ( rate  = 4;scaninfo = wlansinf )
-//!                9.- CheckSupportedRates ( rate  = 11;scaninfo = wlansinf )
-//!                10.- CheckSupportedRates ( rate = 22;scaninfo = wlansinf )
-//!                11.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP80211g,Iap}; commsdbtableview = comsdbtblview )
-//!                12.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//!                13.- Destroy a CCOMMSDB object: ~
-//!                14.- ConnectSocketServ
-//!                15.- OpenRConnection ( socketserv = scktserv )
-//!                16.- StartRConnection ( socketserv = scktserv )
-//!                17.- OpenSocket ( socketserv = scktserv; connection  = rcntion)
-//!                18.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port ={DownloadServer,Port} )
-//!                19.- HttpGet
-//!                20.- ShutDownSocket
-//!                21.- CloseSocket
-//!                22.- CloseConnection
-//!                23.- CloseSocketServ
-//!                24.- DestroyScanInfo: ~
-//!                25.- DestroyMgmtClient: ~
-//!@SYMTestStatus		Verified
-//!@SYMTestPriority		Normal
-//!@SYMTestExpectedResults
-//!                Test case passes if the DUT can connect to the WLAN 802.11g router broadcasting the defined SSID.
-//!@SYMTestType			CIT
-
-	START_TEST_BLOCK	600	T_Wlan	\nt\wlan\networking-wlan-validation-automated-connection.ini
-		CREATE_OBJECT	WlanMgmtClient		wmgmtcnt
-		CREATE_OBJECT	WlanScanInfo		wlansinf
-		CREATE_OBJECT	CCommsDatabase		comsdb
-		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
-		CREATE_OBJECT	RSocketServ		scktserv
-		CREATE_OBJECT	RConnection		rcntion
-		CREATE_OBJECT	RSocket		rsckt
-		COMMAND		wmgmtcnt		NewL
-		COMMAND		wlansinf		NewL			NETWORKING-Wlan-Connection-0004-0001-NewL_command02
-		COMMAND		comsdb		NewL
-		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Connection-0004-0001-NewL_command04
-		COMMAND		wmgmtcnt		GetScanResults			NETWORKING-Wlan-Connection-0004-0001-GetScanResults_command05
-		COMMAND		wlansinf		InformationElement			NETWORKING-Wlan-Connection-0004-0001-InformationElement_command06
-		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command07
-		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command08
-		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command09
-		COMMAND		rsckt		CheckSupportedRates			NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command10
-		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Connection-0004-0001-SetOutgoingIap_command12
-		COMMAND		comsdbtblview		~
-		COMMAND		comsdb		~
-		COMMAND		scktserv		Connect
-		COMMAND		rcntion		Open			NETWORKING-Wlan-Connection-0004-0001-Open_command16
-		COMMAND		rcntion		Start			NETWORKING-Wlan-Connection-0004-0001-Start_command17
-		COMMAND		rsckt		Open			NETWORKING-Wlan-Connection-0004-0001-Open_command18
-		COMMAND		rsckt		Connect			NETWORKING-Wlan-Connection-0004-0001-Connect_command19
-		OUTSTANDING
-		COMMAND		 rsckt		HttpGet
-		COMMAND		rsckt		Shutdown
-		OUTSTANDING
-		COMMAND		rsckt		Close
-		COMMAND		rcntion		Close
-		COMMAND		scktserv		Close
-		COMMAND		wlansinf		~
-		COMMAND		wmgmtcnt		~
-	END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0004
-
-DELAY 10000
--- a/wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-instantiate.script	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-//! @file
-//! @SYMTestSuiteName networking-wlan-validation-automated-instantiate
-//! @SYMScriptTestEnvironment This test script requires a basic ROM.
-//
-// Tests all public elements of the RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// classes as a means of confidence that the APIs work as expected.
-// 
-// The purpose is to provide a regression test suite of PublishedAll
-// APIs for: RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// The tests are fully automated.
-//
-
-
-
-LOAD_SUITE T_Wlan
-
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0001
-
-//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0001
-//!@SYMAPI
-//!                REComSession::CreateImplementationL(TUid, TUid{ref});
-//!                REComSession::DestroyedImplementation(TUid);
-//!@SYMAuthor			alavariega
-//!@SYMCreationDate		23/06/2008
-//!@SYMTestCaseDesc		Instantiate ScanInfo
-//!@SYMTestActions
-//!                1.- Instantiate WLAN Scan Info: NewL ( WlanScanUid = {UID, Uid} )
-//!                2.- Destroy Scan Info: ~
-//!@SYMTestStatus		Verified
-//!@SYMTestPriority		Normal
-//!@SYMTestExpectedResults
-//!                Instantiate WLAN Scan Info with no errors
-//!@SYMTestType			CIT
-
-	START_TEST_BLOCK	100	T_Wlan	\nt\wlan\networking-wlan-validation-automated-instantiate.ini
-		CREATE_OBJECT	WlanScanInfo		wlansinf
-		COMMAND		wlansinf		NewL			NETWORKING-Wlan-Instantiate-0001-0001-NewL_command01
-		COMMAND		wlansinf		~
-	END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0001
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0002
-
-//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0002
-//!@SYMAPI
-//!                CWlanMgmtClient::NewL();
-//!                
-//!@SYMAuthor			alavariega
-//!@SYMCreationDate		23/06/2008
-//!@SYMTestCaseDesc		Instantiate WlanMgmtClient
-//!@SYMTestActions
-//!                1.- Instantiate WLAN Mgmt Client: NewL
-//!                2.- Destroy Mgmt Client: ~
-//!@SYMTestStatus		Verified
-//!@SYMTestPriority		Normal
-//!@SYMTestExpectedResults
-//!                Instantiate WLAN Management Client with no errors
-//!@SYMTestType			CIT
-
-	START_TEST_BLOCK	100	T_Wlan	\nt\wlan\networking-wlan-validation-automated-instantiate.ini
-		CREATE_OBJECT	WlanMgmtClient		wmgmtcnt
-		COMMAND		wmgmtcnt		NewL
-		COMMAND		wmgmtcnt		~
-	END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0002
-
-DELAY 10000
--- a/wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-transfer.script	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,361 +0,0 @@
-//
-// Copyright (c) 2005-2009 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"
-// 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: 
-//
-//
-//! @file
-//! @SYMTestSuiteName networking-wlan-validation-automated-transfer
-//! @SYMScriptTestEnvironment This test script requires a basic ROM.
-//
-// Tests all public elements of the RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// classes as a means of confidence that the APIs work as expected.
-// 
-// The purpose is to provide a regression test suite of PublishedAll
-// APIs for: RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// The tests are fully automated.
-//
-
-
-
-LOAD_SUITE T_Wlan
-
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0001
-
-//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0001
-//!@SYMAPI
-//!                CCommsDatabase::NewL(TBool);
-//!                CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//!                CWlanMgmtClient::NewL()
-//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//!                MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr}) ;
-//!                CCommsDbTableView::GotoFirstRecord();
-//!                CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//!                CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//!                CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//!                CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//!                CWLanSettings::Disconnect();
-//!                CCommsDbTableView::GotoNextRecord();
-//!                RSocketServ::Connect(TUint);
-//!                RConnection::Open(RSocketServ{ref}, TUint);
-//!                RConnection::Start(TConnPref{ref});
-//!                RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//!                RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//!                RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//!                RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!                
-//!@SYMAuthor			alavariega
-//!@SYMCreationDate		23/06/2008
-//!@SYMTestCaseDesc		Wlan Download 100kB to User Disk
-//!@SYMTestActions
-//!                1.- Instantiate a CCOMMSDB: NewL
-//!                2.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//!                3.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP,Ssid} ; commsdbtableview = comsdbtblview )
-//!                4.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//!                5.- Destroy a CCOMMSDB object: ~
-//!                6.- ConnectSocketServ
-//!                7.- OpenRConnection socketserv ( socketserv  = scktserv )
-//!                8.- StartRConnection socketserv ( socketserv  = scktserv )
-//!                9.- OpenSocket( socketserv = scktserv; connection = rcntion )
-//!                10.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
-//!                11.- DownloadSendHTTPGet ( Host =  {DownloadServer,Ip}; File = /nokia/0100k.bin )
-//!                12.- ReceiveHTTPResponse( Save = {driveC,mmc}\0100k.bin )
-//!                13.- ShutDownSocket
-//!                14.- CloseSocket
-//!                15.- CloseConnection
-//!                16.- CloseSocketServ
-//!@SYMTestStatus		Verified
-//!@SYMTestPriority		Normal
-//!@SYMTestExpectedResults
-//!                TEF reports the test case passed.
-//!@SYMTestType			CIT
-
-	START_TEST_BLOCK	600	T_Wlan	\nt\wlan\networking-wlan-validation-automated-transfer.ini
-		CREATE_OBJECT	CCommsDatabase		comsdb
-		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
-		CREATE_OBJECT	RSocketServ		scktserv
-		CREATE_OBJECT	RConnection		rcntion
-		CREATE_OBJECT	RSocket		rsckt
-		COMMAND		comsdb		NewL
-		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Transfer-0001-0001-NewL_command02
-		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Transfer-0001-0001-SetOutgoingIap_command03
-		COMMAND		comsdbtblview		~
-		COMMAND		comsdb		~
-		COMMAND		scktserv		Connect
-		COMMAND		rcntion		Open			NETWORKING-Wlan-Transfer-0001-0001-Open_command07
-		COMMAND		rcntion		Start			NETWORKING-Wlan-Transfer-0001-0001-Start_command08
-		COMMAND		rsckt		Open			NETWORKING-Wlan-Transfer-0001-0001-Open_command09
-		COMMAND		rsckt		Connect			NETWORKING-Wlan-Transfer-0001-0001-Connect_command10
-		OUTSTANDING
-		COMMAND		rsckt		DownloadSendHTTPGet			NETWORKING-Wlan-Transfer-0001-0001-DownloadSendHTTPGet_command11
-		OUTSTANDING
-		COMMAND		rsckt		RecvOneOrMore			NETWORKING-Wlan-Transfer-0001-0001-RecvOneOrMore_command12
-		COMMAND		rsckt		Shutdown
-		OUTSTANDING
-		COMMAND		rsckt		Close
-		COMMAND		rcntion		Close
-		COMMAND		scktserv		Close
-	END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0001
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0002
-
-//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0002
-//!@SYMAPI
-//!                CCommsDatabase::NewL(TBool);
-//!                CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//!                CWlanMgmtClient::NewL()
-//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//!                MWlanScanInfoBase::InformationElement(TUint8, TUint8{ref}, const TUint8{ptr}{ptr}) ;
-//!                CCommsDbTableView::GotoFirstRecord();
-//!                CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//!                CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//!                CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//!                CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//!                CWLanSettings::Disconnect();
-//!                CCommsDbTableView::GotoNextRecord();
-//!                RSocketServ::Connect(TUint);
-//!                RConnection::Open(RSocketServ{ref}, TUint);
-//!                RConnection::Start(TConnPref{ref});
-//!                RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//!                RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//!                RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//!                RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!                
-//!@SYMAuthor			alavariega
-//!@SYMCreationDate		23/06/2008
-//!@SYMTestCaseDesc		Wlan Download 10kB to Memory Card
-//!@SYMTestActions
-//!                1.- Instantiate a CCOMMSDB: NewL 
-//!                2.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//!                3.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP,Ssid};  commsdbtableview = comsdbtblview )
-//!                4.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//!                5.- Destroy a CCOMMSDB object: ~
-//!                6.- ConnectSocketServ
-//!                7.- OpenRConnection ( socketserv  = scktserv )
-//!                8.- StartRConnection socketserv ( socketserv = scktserv )
-//!                9.- OpenSocket ( socketserv = scktserv; connection = rcntion )
-//!                10.- ConnectSocket ( Ip =  {DownloadServer,Ip}; Port ={DownloadServer,Port} )
-//!                11.- DownloadSendHTTPGet ( Host =  {DownloadServer,Ip}; File = /nokia/0010k.bin )
-//!                12.- ReceiveHTTPResponse ( Save = {driveE,mmc}\0010k.bin )
-//!                13.- ShutDownSocket
-//!                14.- CloseSocket
-//!                15.- CloseConnection
-//!                16.- CloseSocketServ
-//!@SYMTestStatus		Verified
-//!@SYMTestPriority		Normal
-//!@SYMTestExpectedResults
-//!                TEF reports the test case passed.
-//!@SYMTestType			CIT
-
-	START_TEST_BLOCK	600	T_Wlan	\nt\wlan\networking-wlan-validation-automated-transfer.ini
-		CREATE_OBJECT	CCommsDatabase		comsdb
-		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
-		CREATE_OBJECT	RSocketServ		scktserv
-		CREATE_OBJECT	RConnection		rcntion
-		CREATE_OBJECT	RSocket		rsckt
-		COMMAND		comsdb		NewL
-		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Transfer-0002-0001-NewL_command02
-		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Transfer-0002-0001-SetOutgoingIap_command03
-		COMMAND		comsdbtblview		~
-		COMMAND		comsdb		~
-		COMMAND		scktserv		Connect
-		COMMAND		rcntion		Open			NETWORKING-Wlan-Transfer-0002-0001-Open_command07
-		COMMAND		rcntion		Start			NETWORKING-Wlan-Transfer-0002-0001-Start_command08
-		COMMAND		rsckt		Open			NETWORKING-Wlan-Transfer-0002-0001-Open_command09
-		COMMAND		rsckt		Connect			NETWORKING-Wlan-Transfer-0002-0001-Connect_command10
-		OUTSTANDING
-		COMMAND		rsckt		DownloadSendHTTPGet			NETWORKING-Wlan-Transfer-0002-0001-DownloadSendHTTPGet_command11
-		OUTSTANDING
-		COMMAND		rsckt		RecvOneOrMore			NETWORKING-Wlan-Transfer-0002-0001-RecvOneOrMore_command12
-		COMMAND		rsckt		Shutdown
-		OUTSTANDING
-		COMMAND		rsckt		Close
-		COMMAND		rcntion		Close
-		COMMAND		scktserv		Close
-	END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0002
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0003
-
-//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0003
-//!@SYMAPI
-//!                CCommsDatabase::NewL(TBool);
-//!                CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//!                CWlanMgmtClient::NewL()
-//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//!                MWlanScanInfoBase::InformationElement(TUint8, TUint8{ref}, const TUint8{ptr}{ptr}) ;
-//!                CCommsDbTableView::GotoFirstRecord();
-//!                CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//!                CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//!                CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//!                CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//!                CWLanSettings::Disconnect();
-//!                CCommsDbTableView::GotoNextRecord();
-//!                RSocketServ::Connect(TUint);
-//!                RConnection::Open(RSocketServ{ref}, TUint);
-//!                RConnection::Start(TConnPref{ref});
-//!                RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//!                RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//!                RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//!                RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!                
-//!@SYMAuthor			alavariega
-//!@SYMCreationDate		23/06/2008
-//!@SYMTestCaseDesc		Wlan Download 10MB to User Disk
-//!@SYMTestActions
-//!                1.- Instantiate a CCOMMSDB: NewL
-//!                2.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//!                3.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP,Ssid}; commsdbtableview = comsdbtblview)
-//!                4.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//!                5.- Destroy a CCOMMSDB object: ~
-//!                6.-ConnectSocketServ
-//!                7.-OpenRConnection ( socketserv = scktserv )
-//!                8.- StartRConnection ( socketserv = scktserv )
-//!                9.- OpenSocket socketserv connection( socketserv = scktserv; connection = rcntion )
-//!                10.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
-//!                11.- DownloadSendHTTPGet ( Host = {DownloadServer,Ip}; File = /nokia/10MB.bin )
-//!                12.- ReceiveHTTPResponse ( Save = {driveC,mmc}\10MB.bin )
-//!                13.-ShutDownSocket
-//!                14.- CloseSocket
-//!                15.- CloseConnection
-//!                16.- CloseSocketServer
-//!@SYMTestStatus		Verified
-//!@SYMTestPriority		Normal
-//!@SYMTestExpectedResults
-//!                Download a 10MB file to User Disk with no errors
-//!@SYMTestType			CIT
-
-	START_TEST_BLOCK	6000000	T_Wlan	\nt\wlan\networking-wlan-validation-automated-transfer.ini
-		CREATE_OBJECT	CCommsDatabase		comsdb
-		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
-		CREATE_OBJECT	RSocketServ		scktserv
-		CREATE_OBJECT	RConnection		rcntion
-		CREATE_OBJECT	RSocket		rsckt
-		COMMAND		comsdb		NewL
-		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Transfer-0003-0001-NewL_command02
-		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Transfer-0003-0001-SetOutgoingIap_command03
-		COMMAND		comsdbtblview		~
-		COMMAND		comsdb		~
-		COMMAND		scktserv		Connect
-		COMMAND		rcntion		Open			NETWORKING-Wlan-Transfer-0003-0001-Open_command07
-		COMMAND		rcntion		Start			NETWORKING-Wlan-Transfer-0003-0001-Start_command08
-		COMMAND		rsckt		Open			NETWORKING-Wlan-Transfer-0003-0001-Open_command09
-		COMMAND		rsckt		Connect			NETWORKING-Wlan-Transfer-0003-0001-Connect_command10
-		OUTSTANDING
-		COMMAND		rsckt		DownloadSendHTTPGet			NETWORKING-Wlan-Transfer-0003-0001-DownloadSendHTTPGet_command11
-		OUTSTANDING
-		COMMAND		rsckt		RecvOneOrMore			NETWORKING-Wlan-Transfer-0003-0001-RecvOneOrMore_command12
-		COMMAND		rsckt		Shutdown
-		OUTSTANDING
-		COMMAND		rsckt		Close
-		COMMAND		rcntion		Close
-		COMMAND		scktserv		Close
-	END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0003
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0004
-
-//!@SYMTestCaseID		NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0004
-//!@SYMAPI
-//!                CCommsDatabase::NewL(TBool);
-//!                CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//!                CWlanMgmtClient::NewL()
-//!                MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//!                MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
-//!                CCommsDbTableView::GotoFirstRecord();
-//!                CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//!                CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//!                CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//!                CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//!                CWLanSettings::Disconnect();
-//!                CCommsDbTableView::GotoNextRecord();
-//!                RSocketServ::Connect(TUint);
-//!                RConnection::Open(RSocketServ{ref}, TUint);
-//!                RConnection::Start(TConnPref{ref});
-//!                RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//!                RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//!                RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//!                RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!                
-//!@SYMAuthor			alavariega
-//!@SYMCreationDate		23/06/2008
-//!@SYMTestCaseDesc		Wlan Upload 10MB from User Disk
-//!@SYMTestActions
-//!                1.- Instantiate a CCOMMSDB: NewL
-//!                2.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//!                3.- GenerateFile ( File = {driveC,mmc}\10mb2.bin; Size   = 10485760 )
-//!                4.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP,Ssid}; commsdbtableview  = comsdbtblview )
-//!                5.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//!                6.- Destroy a CCOMMSDB object: ~
-//!                7.- ConnectSocketServ
-//!                8.-OpenRConnection ( socketserv = scktserv )
-//!                9.- StartRConnection ( socketserv = scktserv )
-//!                10.- OpenSocket ( socketserv = scktserv; connection   = rcntion )
-//!                11.- ConnectSocket ( Ip = {UploadServer,Ip}; Port = {UploadServer,Port} )
-//!                12.- UploadSendHTTPPost ( File  = {driveC,mmc}\10mb2.bin; FileServer = 10mb2.bin; clientID = SALT; serverScript = /dy/upload/upfile.php )
-//!                13.- ReceiveHTTPResponse ( Save = KNullDesC )
-//!                14.- ShutDownSocket
-//!                15.- CloseSocket
-//!                16.- CloseConnection
-//!                17.- CloseSocketServ
-//!@SYMTestStatus		Verified
-//!@SYMTestPriority		Normal
-//!@SYMTestExpectedResults
-//!                Upload a 10MB from User Disk with no errors
-//!@SYMTestType			CIT
-
-	START_TEST_BLOCK	6000000	T_Wlan	\nt\wlan\networking-wlan-validation-automated-transfer.ini
-		CREATE_OBJECT	CCommsDatabase		comsdb
-		CREATE_OBJECT	CCommsDbTableView		comsdbtblview
-		CREATE_OBJECT	RSocketServ		scktserv
-		CREATE_OBJECT	RConnection		rcntion
-		CREATE_OBJECT	RSocket		rsckt
-		CREATE_OBJECT	RFile		rfile
-		COMMAND		comsdb		NewL
-		COMMAND		comsdbtblview		NewL			NETWORKING-Wlan-Transfer-0004-0001-NewL_command02
-		COMMAND		rfile		GenerateFile			NETWORKING-Wlan-Transfer-0004-0001-GenerateFile_command03
-		COMMAND		scktserv		SetOutgoingIap			NETWORKING-Wlan-Transfer-0004-0001-SetOutgoingIap_command04
-		COMMAND		comsdbtblview		~
-		COMMAND		comsdb		~
-		COMMAND		scktserv		Connect
-		COMMAND		rcntion		Open			NETWORKING-Wlan-Transfer-0004-0001-Open_command08
-		COMMAND		rcntion		Start			NETWORKING-Wlan-Transfer-0004-0001-Start_command09
-		COMMAND		rsckt		Open			NETWORKING-Wlan-Transfer-0004-0001-Open_command10
-		COMMAND		rsckt		Connect			NETWORKING-Wlan-Transfer-0004-0001-Connect_command11
-		OUTSTANDING
-		COMMAND		rsckt		UploadSendHTTPPost			NETWORKING-Wlan-Transfer-0004-0001-UploadSendHTTPPost_command12
-		COMMAND		rsckt		RecvOneOrMore			NETWORKING-Wlan-Transfer-0004-0001-RecvOneOrMore_command13
-		COMMAND		rsckt		Shutdown
-		OUTSTANDING
-		COMMAND		rsckt		Close
-		COMMAND		rcntion		Close
-		COMMAND		scktserv		Close
-	END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0004
-
-DELAY 10000
-
--- a/wlanapitest/wlanhaitest/wlan/src/T_CCommsDatabaseData.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#include "t_ccommsdatabasedata.h"
-
-/*@{*/
-//LIT's for commands of CT_CCommsDatabaseData
-_LIT(KCmdNewL,					"NewL");
-_LIT(KCmdDestructor,			"~");
-/*@}*/
-
-/**
- * Two phase constructor
- *
- * @leave	system wide error
- */
-CT_CCommsDatabaseData* CT_CCommsDatabaseData::NewL()
-	{
-	CT_CCommsDatabaseData* ret = new (ELeave) CT_CCommsDatabaseData();
-	CleanupStack::PushL(ret);
-	ret->ConstructL();
-	CleanupStack::Pop(ret);
-	return ret;
-	}
-
-/**
- * Public destructor
- */
-CT_CCommsDatabaseData::~CT_CCommsDatabaseData()
-	{
-	DestroyData();
-	}
-
-/**
- * Private constructor. First phase construction
- */
-
-CT_CCommsDatabaseData::CT_CCommsDatabaseData()
-:	iCommsDat(NULL)
-	{
-	}
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return	N/A
- *
- * @pre		None
- * @post	None
- *
- * @leave	system wide error
- */
-void CT_CCommsDatabaseData::ConstructL()
-	{
-	}
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return	pointer to the object that the data wraps
- */
-TAny* CT_CCommsDatabaseData::GetObject()
-	{
-	return iCommsDat;
-	}
-
-/**
- * Process a command read from the Ini file
- * @param aCommand 			The command to process
- * @param aSection			The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex	Command index dor async calls to returns errors to
- * @return TBool			ETrue if the command is process
- * @leave					system wide error
- */
-TBool CT_CCommsDatabaseData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName&/* aSection*/, const TInt /*aAsyncErrorIndex*/)
-	{
-	TBool ret = ETrue;
-	
-	if(aCommand == KCmdNewL)
-		{
-		DoCmdNewL();
-		}
-	else if(aCommand == KCmdDestructor)
-		{
-		DoCmdDestructor();
-		}
-	else
-		{
-		ERR_PRINTF1(_L("Unknown command."));
-		ret = EFalse;
-		}
-	
-	return ret;
-	}
-
-
-/**
- * Command to create an Instance of CCommsDatabase class
- * @param 
- * @return 
- */
-void CT_CCommsDatabaseData::DoCmdNewL()
-	{
-	INFO_PRINTF1(_L("*START* CT_CCommsDatabaseData::DoCmdNewL"));
-	DestroyData();
-	
-	TRAPD(err,iCommsDat = CCommsDatabase::NewL(ETrue));	
-	if(err!=KErrNone)
-		 {
-		 ERR_PRINTF2(_L("CCommsDatabase* commsDat = CCommsDatabase::NewL(ETrue) left with error %d"), err);
-		 SetError(err);
-		 }
-	else
-		{
-		INFO_PRINTF1(_L("CCommsDatabase* commsDat = CCommsDatabase::NewL(ETrue) was create"));
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_CCommsDatabaseData::DoCmdNewL"));
-	}
-
-/**
- * Command to destroy an Instance of CCommsDatabase class
- * @param
- * @return
- */
-void CT_CCommsDatabaseData::DoCmdDestructor()
-	{
-	INFO_PRINTF1(_L("*START* CT_CCommsDatabaseData::DoCmdDestructor"));
-	DestroyData();
- 	INFO_PRINTF1(_L("*END* CT_CCommsDatabaseData::DoCmdDestructor"));
-	}
-
-/**
- *Helper function to DoCmdDelete command
- * @param
- * @return
- */
-void CT_CCommsDatabaseData::DestroyData()
-	{
-	if(iCommsDat)
-		{
-	    delete iCommsDat;
-	    iCommsDat = NULL;
-		}
-	}
--- a/wlanapitest/wlanhaitest/wlan/src/T_CCommsDbTableViewData.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,185 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-
-#include "t_ccommsdbtableviewdata.h"
-
-// CommsDat preferences setting class.
-#include <cdbpreftable.h>
-#include <commdbconnpref.h>
-
-/*@{*/
-//LIT for the data read from the ini file
-_LIT(KCommsDb,				"commsdb");
-/*@}*/
-
-/*@{*/
-//LIT's for the commands
-_LIT(KCmdNewL,				"NewL");
-_LIT(KCmdDestructor,		"~");
-/*@}*/
-
-/**
- * Two phase constructor
- *
- * @leave	system wide error
- */
-CT_CCommsDbTableViewData* CT_CCommsDbTableViewData::NewL()
-	{
-	CT_CCommsDbTableViewData* ret = new (ELeave) CT_CCommsDbTableViewData();
-	CleanupStack::PushL(ret);
-	ret->ConstructL();
-	CleanupStack::Pop(ret);
-	return ret;
-	}
-
-/**
- * Public destructor
- */
-CT_CCommsDbTableViewData::~CT_CCommsDbTableViewData()
-	{
-	DestroyData();
-	}
-
-/**
- * Private constructor. First phase construction
- */
-CT_CCommsDbTableViewData::CT_CCommsDbTableViewData()
-:	iSearchView(NULL)
-	{
-	}
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return	N/A
- *
- * @pre		None
- * @post	None
- *
- * @leave	system wide error
- */
-void CT_CCommsDbTableViewData::ConstructL()
-	{
-	}
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return	pointer to the object that the data wraps
- */
-TAny* CT_CCommsDbTableViewData::GetObject()
-	{
-	return iSearchView;
-	}
-
-/**
-* Process a command read from the Ini file
-* @param aCommand 			The command to process
-* @param aSection			The section get from the *.ini file of the project T_Wlan
-* @param aAsyncErrorIndex	Command index dor async calls to returns errors to
-* @return TBool			    ETrue if the command is process
-* @leave					system wide error
-*/
-
-TBool CT_CCommsDbTableViewData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt/* aAsyncErrorIndex*/)
-	{
-	TBool ret = ETrue;
-	if(aCommand == KCmdNewL)
-		{
-		DoCmdNewL(aSection);
-		}
-	else if(aCommand == KCmdDestructor)
-		{
-		DoCmdDestructor();
-		}
-	else
-		{
-		ERR_PRINTF1(_L("Unknown command."));
-		ret = EFalse;
-		}
-	return ret;
-	}
-
-
-
-
-/**
- * Command to create an instance of CCommsDbTableView class
- * @param aSection			The section in the ini file for this command
- * @return 
- */
-void CT_CCommsDbTableViewData::DoCmdNewL(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_CCommsDbTableViewData::DoCmdNewL"));
-	DestroyData();
-	
-	TPtrC commsDbName;
-	const TUint32 KIAPMask = 0xffffffff;
-	TBool	dataOk = ETrue;
-	
-	//param from the ini file
-	if(!GetStringFromConfig(aSection, KCommsDb, commsDbName))
-		{
-        ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KCommsDb);
-        SetBlockResult(EFail);
-    	dataOk = EFalse;
-		}
-	
-	if (dataOk)
-		{
-		CCommsDatabase* acommsDat = static_cast<CCommsDatabase*>(GetDataObjectL(commsDbName));
-	  	//CCommsDatabase* acommsDat = CCommsDatabase::NewL(ETrue);
-		//iSearchView = acommsDat->OpenIAPTableViewMatchingBearerSetLC( KIAPMask, ECommDbConnectionDirectionOutgoing );
-		iSearchView = acommsDat->OpenIAPTableViewMatchingBearerSetLC( KIAPMask, ECommDbConnectionDirectionOutgoing );
-		CleanupStack::Pop();
-		}
-  	
-  	INFO_PRINTF1(_L("*END* CT_CCommsDbTableViewData::DoCmdNewL"));
-	}
-/**
- * Command for delete an instance of CCommsDbTableView class
- * @param
- * @return
- */
-void CT_CCommsDbTableViewData::DoCmdDestructor()
-	{
-	INFO_PRINTF1(_L("*START* CT_CCommsDbTableViewData::DoCmdDestructor"));
-	
-	//CleanupStack::Pop(iSearchView);
-	DestroyData();
-	
-	INFO_PRINTF1(_L("*END* CT_CCommsDbTableViewData::DoCmdDestructor"));
-	}
-
-/**
- * Helper function for the command DoCmdDelete
- * @param
- * @return
- */
-void CT_CCommsDbTableViewData::DestroyData()
-	{
-	if (iSearchView)
-		{
-		delete iSearchView;
-		iSearchView = NULL;
-		}
-	}
--- a/wlanapitest/wlanhaitest/wlan/src/T_RConnectionData.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,254 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#include "t_rconnectiondata.h"
-#include "t_rsocketservdata.h"
-#include <commdbconnpref.h>
-
-/*@{*/
-//LIT param read from the ini file
-_LIT(KSocketServ,				"socketserv");
-/*@}*/
-
-/*@{*/
-//LITs for commands
-_LIT(KCmdOpen,					"Open");
-_LIT(KCmdStart,					"Start");
-_LIT(KCmdClose,					"Close");
-/*@}*/
-
-
-/**
- * Two phase constructor
- *
- * @leave	system wide error
- */
-CT_RConnectionData* CT_RConnectionData::NewL()
-	{
-	CT_RConnectionData * ret = new (ELeave)CT_RConnectionData();
-	CleanupStack::PushL(ret);
-	ret->ConstructL();
-	CleanupStack::Pop(ret);
-	return ret;
-	}
-
-/**
- * Public destructor
- */
-CT_RConnectionData::~CT_RConnectionData()
-	{
-	if (iConnection)
-		{
-		delete iConnection;
-		iConnection = NULL;
-		}
-	}
-
-/**
- * Private constructor. First phase construction
- */
-CT_RConnectionData::CT_RConnectionData()
-:	iConnection(NULL)
-	{	
-	}
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return	N/A
- *
- * @pre		None
- * @post	None
- *
- * @leave	system wide error
- */
-void CT_RConnectionData::ConstructL()
-	{
-	iConnection = new (ELeave)RConnection();
-	}
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return	pointer to the object that the data wraps
- */
-TAny* CT_RConnectionData::GetObject()
-	{
-	 return iConnection;
-	}
-
-/**
- * Process a command read from the Ini file
- * @param aCommand 			The command to process
- * @param aSection			The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex	Command index dor async calls to returns errors to
- * @return TBool			ETrue if the command is process
- * @leave					system wide error
- */
-TBool CT_RConnectionData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
-	{
-	TBool ret = ETrue;
-	if(aCommand == KCmdOpen)
-		{
-		DoCmdOpen(aSection);
-		}
-	else if(aCommand == KCmdStart)
-		{
-		DoCmdStart(aSection);
-		}	
-	else if(aCommand == KCmdClose)
-		{
-		DoCmdClose();
-		}
-	else
-		{
-		ERR_PRINTF1(_L("Unknown command."));
-		ret= EFalse;
-		}
-	return ret;
-	}
-
-
-/**
- * Command to open a connection (RConnection::Open). The errors are management
- * with SetError() and SetBlockResult().
- * @param  aSection				Section in the ini file for this command
- * @return 
- */
-void CT_RConnectionData::DoCmdOpen(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_RConnectionData::DoCmdOpen"));
-	TBool dataOk = ETrue;
-	
-	// read param from the ini file
-	TPtrC socketServName;
-	if(!GetStringFromConfig(aSection, KSocketServ, socketServName))
-		{
-        ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSocketServ);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-	
-	if (dataOk)
-		{
-		RSocketServ* iSocketServ = static_cast<RSocketServ*>(GetDataObjectL(socketServName));
-
-		// Open a connection
-		TInt err = iConnection->Open(*iSocketServ);
-		if(err ==  KErrNone)
-			{
-			INFO_PRINTF1(_L("The connection was opened"));
-			}
-		else
-			{
-			ERR_PRINTF2(_L("iConnection->Open( iSocketServ ) Failed with error %d"), err);
-			SetError(err);		
-			}
-		
-		INFO_PRINTF1(_L("*END* CT_RConnectionData::DoCmdOpen"));
-		}
-	}
-
-/**
- * Command to Start a connection with the ID IAP given before in the wrapper CT_RSocketServData. The
- * errors are management with SetError() and SetBlockResult()
- * @param aSection				Section in the ini file for this command
- * @return
- */
-void CT_RConnectionData::DoCmdStart(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_RConnectionData::DoCmdStart"));
-	TBool dataOk = ETrue;
-	
-	// read a param from the ini file
-	TPtrC socketServName;
-	if(!GetStringFromConfig(aSection, KSocketServ, socketServName))
-		{        
-        ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSocketServ);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-	
-	if (dataOk)
-		{
-		TInt err(KErrNone);
-		TUint32 id;
-		
-		// Get complete wrapper
-		CT_RSocketServData* iSocketServ = static_cast<CT_RSocketServData*>(GetDataWrapperL(socketServName));
-		INFO_PRINTF2(_L("iSocketServ: %S"), &socketServName);
-		
-		if(iSocketServ != NULL)
-			{
-			// Start the connection using the given (WLAN) access point
-			id = iSocketServ->GetIapID();
-			INFO_PRINTF2(_L("CT_RConnectionData::DoCmdStart: Start RConnection, using IAP [%d]"), id);
-			
-			TCommDbConnPref* connPref = new (ELeave) TCommDbConnPref;
-			connPref->SetIapId(id);
-			connPref->SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
-			connPref->SetDirection( ECommDbConnectionDirectionOutgoing );	
-			connPref->SetBearerSet(KCommDbBearerUnknown);
-			
-			INFO_PRINTF1(_L("CT_RConnectionData: Starting connection"));
-			// Wait before the connection is really made
-			// Wait time is 8 seconds.
-			err = iConnection->Start( *connPref ) ;
-			if(err != KErrNone)
-				{
-				 ERR_PRINTF2(_L("iConnection->Start( connPref ) Fail: %d "),err);		 
-				 SetError(err);
-				}
-			}
-		else
-			{
-			ERR_PRINTF1(_L("CT_RConnectionData::DoCmdStart: iSocketServ is NULL"));
-			SetBlockResult(EFail);
-			}
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_RConnectionData::DoCmdStart"));
-	}
-
-
-/**
- * Command to close a connection(RConnection::Close)
- * @param
- * @return
- */
-void CT_RConnectionData::DoCmdClose()
-	{
-	INFO_PRINTF1(_L("*START* CT_RConnectionData::DoCmdClose"));
-	Close();
-	INFO_PRINTF1(_L("*END* CT_RConnectionData::DoCmdClose"));
-	}
-
-/**
- * Helper function for the command DoCmdConnection
- * @param
- * @return
- */
-
-void CT_RConnectionData::Close()
-	{
-	INFO_PRINTF1(_L("Closing connection"));
-	iConnection->Close();
-	}
--- a/wlanapitest/wlanhaitest/wlan/src/T_RFileData.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#include "t_rfiledata.h"
-
-/*@{*/
-//LIT for the command DoCmdGenerateFile
-_LIT(KCmdGenerateFile,				"GenerateFile");
-/*@}*/
-
-/*@{*/
-//LITs for param reads from the ini file
-_LIT(KFile,						"File");
-_LIT(KSize,						"Size");
-/*@}*/
-
-
-/**
- * Two phase constructor
- *
- * @leave	system wide error
- */
-CT_RFileData* CT_RFileData::NewL()
-	{
-	CT_RFileData* ret = new (ELeave) CT_RFileData();
-	CleanupStack::PushL(ret);
-	ret->ConstructL();
-	CleanupStack::Pop(ret);
-	return ret;
-	}
-
-/**
- * Public destructor
- */
-CT_RFileData::~CT_RFileData() 
-	{
-	iFs.Close();
-	
-	if (iFile)
-		{
-		delete iFile;
-		iFile = NULL;
-		}
-	}
-
-/**
- * Private constructor. First phase construction
- */
-CT_RFileData::CT_RFileData()
-:	iFile(NULL),
-	iFs()
-	{
-	}
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return	N/A
- *
- * @pre		None
- * @post	None
- *
- * @leave	system wide error
- */
-void CT_RFileData::ConstructL()
-	{
-	iFile = new (ELeave)RFile();
-	}
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return	pointer to the object that the data wraps
- */
-TAny* CT_RFileData::GetObject()
-	{
-	return iFile;
-	}
-
-/**
- * Process a command read from the Ini file
- * @param aCommand 			The command to process
- * @param aSection			The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex	Command index dor async calls to returns errors to
- * @return TBool			ETrue if the command is process
- * @leave					system wide error
- */
-
-TBool CT_RFileData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
-	{
-	TBool ret =ETrue;
-	if(aCommand == KCmdGenerateFile())
-		{
-		 DoCmdGenerateFile(aSection);
-		}
-	else
-		{
-		ERR_PRINTF1(_L("Unknown command."));
-		ret = EFalse;
-		}
-	return ret;
-	}
-
-
-/**
- * Command to generate a file for uploading in a host. If there are errors, SetBlockResult() and SetError() 
- * are used for management.
- * @param aSection				Section in the ini file for this command
- * @return
- */
-void CT_RFileData::DoCmdGenerateFile(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_RFileData::DoCmdGenerateFile"));
-	
-	TBool dataOk = ETrue;
-	
-	TPtrC file;
-	if(!GetStringFromConfig(aSection, KFile, file))
-		{
-        ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KFile);       
-        SetBlockResult(EFail);
-        dataOk = EFalse;
-		}
-
-	TInt size;
-	if(!GetIntFromConfig(aSection, KSize, size))
-		{
-        ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSize);
-        SetBlockResult(EFail);
-        dataOk = EFalse;
-		}
-
-	if (dataOk)
-		{
-		INFO_PRINTF1(_L("Connect RFs"));
-
-		CleanupClosePushL( iFs );
-		CleanupClosePushL( *iFile );
-		
-		TInt err = iFs.Connect();
-		if(err == KErrNone)
-			{
-			INFO_PRINTF1(_L("Replace file"));
-			err = iFile->Replace( iFs, file, EFileShareAny|EFileWrite );
-			if(err == KErrNone)
-				{
-				INFO_PRINTF1(_L("Set file size"));
-				err = iFile->SetSize( size );
-				if(err != KErrNone)
-					{
-					ERR_PRINTF2(_L("CT_RFileData::DoCmdGenerateFile: file.SetSize(...) Failed with error %d"), err);
-					SetError(err);
-					}
-				}
-			else
-				{
-				ERR_PRINTF2(_L("CT_RFileData::DoCmdGenerateFile: file.Replace(...) Failed with error %d"), err);
-				SetError(err);
-				}
-			}
-		else
-			{
-			ERR_PRINTF2(_L("CT_RFileData::DoCmdGenerateFile: fs.Connect() Failed with error %d"), err);
-			SetError(err);
-			}
-		
-		INFO_PRINTF1(_L("Close RFile handle"));
-		CleanupStack::PopAndDestroy( iFile );
-		INFO_PRINTF1(_L("Close RFs handle"));	
-		CleanupStack::PopAndDestroy( &iFs );	
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_RFileData::DoCmdGenerateFile"));
-	}
--- a/wlanapitest/wlanhaitest/wlan/src/T_RSocketData.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1359 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#include <wlanscaninfo.h>
-#include "t_rsocketdata.h"
-
-/*@{*/
-// LITs from the ini file
-_LIT( KSocketServ,				"socketserv");
-_LIT( KConnection,				"connection");
-_LIT( KScanInfo,				"scaninfo");
-_LIT( KAddress,					"Ip");
-_LIT( KPort,					"Port");
-_LIT( KFile,					"File");
-_LIT( KSave,					"Save");
-_LIT( KARates,					"rate");
-_LIT( KFileServer,				"FileServer");
-/*@}*/
-
-/*@{*/
-// Upload
-_LIT(KNullFile,				    "KNullDesC");
-/*@}*/
-
-/*@{*/
-// LITs for the commands
-_LIT( KCmdOpen,					"Open");
-_LIT( KCmdConnect,				"Connect");
-_LIT( KCmdHttpGet,				"HttpGet");
-_LIT( KCmdDownloadSendHTTPGet,	"DownloadSendHTTPGet");
-_LIT( KCmdRecvOneOrMore,     	"RecvOneOrMore");
-_LIT( KCmdUploadSendHTTPPost,	"UploadSendHTTPPost");
-_LIT( KCmdCheckSupportedRates,	"CheckSupportedRates");
-_LIT( KCmdShutdown,				"Shutdown");
-_LIT( KCmdClose,				"Close");
-/*@}*/
-
-/*@{*/
-// Constants for creating a HTTP request in the command DoCmdDownloadSendHTTPGet
-_LIT8( KHTTPGET, 				"GET");
-_LIT8( KHTTPSeparator, 			" ");
-_LIT8( KHTTPSuffix, 			"HTTP/1.1");
-_LIT( KHostS, 					"Host");
-_LIT8( KLineFeed,				"\r\n");
-_LIT8( KEmptyLine, 				"\r\n\r\n");
-_LIT8( KHeaderEndMark, 			"\r\n\r\n" );
-_LIT8( KContentLengthField,		"Content-Length: ");
-_LIT8( KFieldEnd, 				"\r\n" );
-_LIT8( KGETHTTP, 				"GET / HTTP/1.0\r\n\r\n" );
-/*@}*/
-
-/*@{*/
-// Constants for CreateHTTPHeaderStart
-_LIT8(KHTTPPOST, 				"POST");
-_LIT8(KLineBreak,				"\r\n");
-_LIT(KClientID,					"clientID");
-_LIT(KServerScript,				"serverScript"); 
-_LIT8(KFrom,					"From:");
-_LIT8(KHosts,					"Host:");
-_LIT8(KContentType,				"Content-Type:");
-_LIT8(KContentLength,			"Content-Length:");
-_LIT8(KContentDisposition,		"Content-Disposition:");
-_LIT8(KMultipartType,			"multipart/form-data;");
-_LIT8(KOctetType,				"application/octet-stream");
-_LIT8(KBoundary,				"boundary=---------------------------sg976436h73");
-_LIT8(KBoundaryStart,			"-----------------------------sg976436h73");
-_LIT8(KDisposition,				"form-data; name=\"userfile\"; filename=");
-_LIT8(KBackS,					"\"");
-_LIT8(KBoundaryEnd,				"-----------------------------sg976436h73--");
-/*@}*/
-
-
-const TInt KHttpHeaderBufferIncrement = 4096;
-// Const for supported rates
-// The first bit includes information about BSSBasicRateSet,
-// mask it out
-
-const TUint32 KBasicRateMask = 0x7F;
-// 802.11g supported speed rate
-const TUint8 K80211Rate1Mbit = 2;
-const TUint8 K80211Rate2Mbit = 4;            
-const TUint8 K80211Rate5Mbit = 11;
-const TUint8 K80211Rate11Mbit = 22;
-const TUint8 K80211Rate12Mbit = 24;
-const TUint8 K80211Rate18Mbit = 36;
-const TUint8 K80211Rate22Mbit = 44;
-const TUint8 K80211Rate24Mbit = 48;
-const TUint8 K80211Rate33Mbit = 66;
-const TUint8 K80211Rate36Mbit = 72;
-const TUint8 K80211Rate48Mbit = 96;
-const TUint8 K80211Rate54Mbit = 108;
-
-
-
-
-
-
-
-/**
- * Two phase constructor
- *
- * @leave	system wide error
- */
-CT_RSocketData* CT_RSocketData::NewL()
-	{
-	CT_RSocketData * ret = new (ELeave)CT_RSocketData();
-	CleanupStack::PushL(ret);
-	ret->ConstructL();
-	CleanupStack::Pop(ret);
-	return ret;
-	}
-
-/*
- *RunL method for management Active callbacks
- * @param aActive	param to review which active call back is being fished
- * @param aIndex
- * @return void
- */
-void CT_RSocketData::RunL(CActive* aActive, TInt /*aIndex*/)
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketData::RunL"));
-    DecOutstanding(); // One of the async calls has completed 
-    TInt err(KErrNone);
-    if(aActive == iActiveCallback)
-    	{
-        INFO_PRINTF1(_L("active call back for Write Socket."));
-    	err = iActiveCallback->iStatus.Int();
-    	if(err != KErrNone)
-    		{
-    		ERR_PRINTF1(_L("iSocket->Write(...) Fail"));
-    		SetError(err);
-    		}
-    	else
-    		{
-    		INFO_PRINTF2(_L("CT_RSocketData::SendHTTPGet [%d]"), iActiveCallback->iStatus.Int());	
-        	INFO_PRINTF1(_L("Asynchronous task has completed. RunL  called"));
-    		}    	
-    	}
-    else if(aActive == iActCallConnectSocket)
-    	{
-        INFO_PRINTF1(_L("active call back for Connect Socket."));
-    	err = iActCallConnectSocket->iStatus.Int();
-    	if(err != KErrNone)
-    		{
-    		ERR_PRINTF1(_L("iSocket->Connect(...) Fail"));
-    		SetError(err);
-    		}
-    	else
-    		{
-    		INFO_PRINTF1(_L("CT_RSocketData::DoCmdConnect(...) success"));
-    		iSocketOpened = ETrue;
-    		}
-    	}
-    else if(aActive == iActCallShutDownSocket)
-    	{
-        INFO_PRINTF1(_L("active call back for Shutdown Socket."));
-    	err = iActCallShutDownSocket->iStatus.Int();
-    	if(err != KErrNone)
-    		{
-    		 ERR_PRINTF2(_L("iSocket->Shutdown(...): [%d] Fail"),iActCallShutDownSocket->iStatus.Int());
-    		 SetError(err);
-    		}
-    	else
-    		{
-    		INFO_PRINTF1(_L("CT_RSocketData::Shutdown success"));
-    		iSocketStarted = EFalse;	
-    		}
-    	}
-    else
-    	{
-    	ERR_PRINTF1(_L("An unchecked active object completed"));
-    	SetBlockResult(EFail);
-    	}
-    
-    INFO_PRINTF1(_L("*END* CT_RSocketData::RunL"));
-	}
-/*
- * public destructor
- */
-CT_RSocketData::~CT_RSocketData()
-	{
-	if (iSocketStarted)
-		{
-		INFO_PRINTF1(_L("CT_RSocketData: Shutting down socket"));
-		Shutdown();
-		}
-	if (iSocketOpened)
-		{
-		Close();
-		}
-	if (iDownloadBuffer)
-		{
-		delete iDownloadBuffer;
-		iDownloadBuffer = NULL;
-		}
-	if (iSocket)
-		{
-		delete iSocket;
-		iSocket = NULL;	
-		}
-	if (iActiveCallback)
-		{
-		delete iActiveCallback;
-		iActiveCallback = NULL;	
-		}
-	if (iActCallShutDownSocket)
-		{
-		delete iActCallShutDownSocket;
-		iActCallShutDownSocket = NULL;
-		}
-	if (iActCallConnectSocket)
-		{
-		delete iActCallConnectSocket;
-		iActCallConnectSocket =	 NULL;
-		}
-	
-	iFs.Close();
-
-	if (iUploadBuffer)
-		{
-		delete iUploadBuffer;
-		iUploadBuffer = NULL;
-		}
-	}
-
-/**
- * Private constructor. First phase construction
- * 
- */
-CT_RSocketData::CT_RSocketData()
-:	iSocket(NULL),
-	iActiveCallback(NULL),
-	iActCallConnectSocket(NULL),
-	iActCallShutDownSocket(NULL),	
-	iSocketOpened(EFalse),
-	iSocketStarted(EFalse),	
-	iAsyncErrorIndex(0),
-	iDownloadBuffer(NULL),
-	iUploadBuffer(NULL),
-	iHttpResponseHeader(),
-	iDownloadThroughput(0.0),	
-	iFs(),
-	iUploadThroughput(0.0),
-	itotalReceived(0)
-	{
-
-	}
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return	N/A
- *
- * @pre		None
- * @post	None
- *
- * @leave	system wide error
- */
-void CT_RSocketData::ConstructL()
-	{	 
-   	 const TInt KDefaultBufferSize = 4096;
-   	 TInt err(KErrNone);
-   	 iSocket = new (ELeave) RSocket(); 
-	 iActiveCallback = CActiveCallback::NewL(*this);
-	 iActCallConnectSocket = CActiveCallback::NewL(*this);
-	 iActCallShutDownSocket = CActiveCallback::NewL(*this);		
-	 iDownloadBuffer = HBufC8::NewL( KDefaultBufferSize);		
-	 iUploadBuffer = HBufC8::NewL(KDefaultBufferSize);		 
-	 err = iFs.Connect();
-	 if(err != KErrNone)
-		 {
-		 SetError(err);
-		 }
-	}
-
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return	pointer to the object that the data wraps
- */
-TAny* CT_RSocketData::GetObject()
-	{
-	return iSocket;
-	}
-
-
-
-/**
- * Process a command read from the Ini file
- * @param aCommand 			The command to process
- * @param aSection			The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex	Command index for async calls to returns errors to
- * @return TBool			ETrue if the command is process
- * @leave					system wide error
- * 
- */	
-TBool CT_RSocketData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
-	{
-	TBool ret =  ETrue;		
-	if(aCommand == KCmdOpen )
-		{
-		DoCmdOpen(aSection);
-		}
-	else if(aCommand == KCmdConnect)
-		{
-		DoCmdConnect(aSection,aAsyncErrorIndex);
-		}
-	else if(aCommand == KCmdDownloadSendHTTPGet)
-		{
-		DoCmdDownloadSendHTTPGet(aSection,aAsyncErrorIndex);
-		}
-	else if(aCommand == KCmdRecvOneOrMore)
-		{
-		DoCmdRecvOneOrMore(aSection);
-		}
-	else if(aCommand == KCmdUploadSendHTTPPost)
-		{
-		DoCmdUploadSendHTTPPost(aSection);
-		}
-	else if(aCommand == KCmdShutdown)
-		{
-		DoCmdShutdown(aAsyncErrorIndex);
-		}
-	else if(aCommand == KCmdClose)
-		{
-		DoCmdClose();
-		}
-	else if(aCommand == KCmdHttpGet)
-		{
-		DoCmdHttpGet();
-		}
-	else if(aCommand == KCmdCheckSupportedRates)
-		{
-		DoCmdCheckSupportedRates(aSection);
-		}	
-	else
-		{
-		ERR_PRINTF1(_L("Unknown command."));
-		ret = EFalse;
-		}
-	return ret;
-	}
-
-
-
-
-/**
- * Open the Socket from RSocket. The errors are management with SetError() and SetBlockResult().
- * @param aSection				Section in the ini file for this command.
- * @return 
- */
-void CT_RSocketData::DoCmdOpen(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdOpen"));
-	TBool dataOk = ETrue;
-	
-	TPtrC connectionName;
-	if(! GetStringFromConfig(aSection, KConnection, connectionName))
-		{
-		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KConnection);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-
-	TPtrC socketServName;
-	if(! GetStringFromConfig(aSection, KSocketServ, socketServName))
-		{
-		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSocketServ);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-
-	if (dataOk)
-		{
-		INFO_PRINTF1(_L("Opening a TCP/IP socket"));
-		
-		RConnection* rConnection = static_cast<RConnection*>(GetDataObjectL(connectionName)); 	
-		RSocketServ* rSocketServ = static_cast<RSocketServ*>(GetDataObjectL(socketServName));
-		
-		if(rConnection != NULL && rSocketServ != NULL)
-			{
-			TInt error = iSocket->Open( *rSocketServ, KAfInet, KSockStream, KProtocolInetTcp, *rConnection );
-			
-			if(error == KErrNone)
-				{
-				iSocketOpened = ETrue;
-				}
-			else
-				{
-				ERR_PRINTF2(_L("Socket opening failed [%d]"), error);
-				SetError(error);
-				}
-			}
-		else
-			{
-			if(rConnection == NULL)
-				{
-				ERR_PRINTF2(_L("rConnection is NULL: %S"),rConnection);
-				SetBlockResult(EFail);
-				}
-
-			if(rSocketServ == NULL) 
-				{
-				INFO_PRINTF2(_L("rSocketServ is NULL: %S"),rSocketServ);
-				SetBlockResult(EFail);
-				}
-			}
-		}
-
-	INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdOpen"));
-	}
-
-/**
- * Command to Connect a Socket of RSocket.
- * @param aSection				Section to read from the ini file
- * @param aAsyncErrorIndex      Command index for async calls to returns errors to
- * @return
- */
-void CT_RSocketData::DoCmdConnect(const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdConnect"));
-	TBool dataOk = ETrue;
-	
-	//Getting from the .ini the IP Address
-	TPtrC aIpAddr;
-	if(!GetStringFromConfig( aSection, KAddress, aIpAddr ))
-    	{
-    	ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KAddress);
-    	SetBlockResult(EFail);
-    	dataOk = EFalse;
-    	}
-	
-	//Getting the port from the file ini
-	TInt aPort;
-	if(!GetIntFromConfig( aSection, KPort,aPort ))
-    	{
-    	ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KPort);
-    	SetBlockResult(EFail);
-    	dataOk = EFalse;
-    	}
-	
-	if(dataOk)
-		{
-		// Set the IP Address
-		TInetAddr inetAddr;
-		TInt err = inetAddr.Input( aIpAddr ) ;
-		if(err == KErrNone)
-			{
-			INFO_PRINTF2(_L("Remote IP: %S"), &aIpAddr );
-			INFO_PRINTF2( _L("Port: %d"), aPort );
-			// Set the port
-			inetAddr.SetPort( aPort );	
-			// Connect an IP through the Port 80
-			iSocket->Connect( inetAddr, iActCallConnectSocket->iStatus );
-			iActCallConnectSocket->Activate(aAsyncErrorIndex);
-			IncOutstanding();
-			}
-		else
-			{
-			 ERR_PRINTF2(_L("inetAddr.Input( aIpAddr ) Failed with error %d"), err);
-			 SetError(err);
-			}
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdConnect"));
-	}
-
-/**
- * Command to send the HTTP Get, using the socket Write.
- * @param aSection				Section to read from the ini file
- * @param aAsyncErrorIndex		Command index for async calls to returns errors to
- * @return 
- */
-void CT_RSocketData::DoCmdDownloadSendHTTPGet(const TTEFSectionName& aSection, const TInt aAsyncErrorIndex )
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdDownloadSendHTTPGet"));
-	TBool dataOk = ETrue;
-	
-	// Read params from the ini file
-	TPtrC aHost;	
-	if(!GetStringFromConfig( aSection, KHostS, aHost))
-		{
-		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KHostS);
-    	SetBlockResult(EFail);
-    	dataOk = EFalse;
-		}
-
-	TPtrC aFilename;
-	if(!GetStringFromConfig( aSection, KFile, aFilename ))
-    	{
-    	ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KFile);
-    	SetBlockResult(EFail);
-    	dataOk = EFalse;
-    	}
-
-	if (dataOk)
-		{
-		const TInt KMaxHostNameLength(256);
-		if( aHost.Length() > KMaxHostNameLength )
-			{
-			ERR_PRINTF1(_L("Host is too long, cannot send HTTP request"));
-	    	SetBlockResult(EFail);
-			}
-		else if( aFilename.Length() > KMaxFileName )
-			{
-			ERR_PRINTF1(_L("Filename is too long, cannot send HTTP request"));
-	    	SetBlockResult(EFail);
-			}
-		else
-			{
-			INFO_PRINTF1(_L("Create HTTP GET request"));
-			// Buffer that will hold the request.
-			TBuf8<	sizeof( KHTTPGET ) +
-					sizeof( KHTTPSeparator ) +
-					KMaxFileName +
-					sizeof( KHTTPSeparator ) +
-					sizeof( KHTTPSuffix ) +
-					sizeof( KLineFeed ) +
-					sizeof( KHosts ) +
-					KMaxHostNameLength +
-					sizeof( KEmptyLine ) > request;
-			// Construct the final request.
-			request.Copy( KHTTPGET );
-			request.Append( KHTTPSeparator );
-			request.Append( aFilename );
-			request.Append( KHTTPSeparator );
-			request.Append( KHTTPSuffix );
-			request.Append( KLineFeed );
-			request.Append( KHosts );
-			request.Append( aHost );
-			request.Append( KEmptyLine );
-			
-			INFO_PRINTF1(_L("Write to socket"));
-		    // Send the request through socket
-			iSocket->Write(request, iActiveCallback->iStatus);
-			iActiveCallback->Activate(aAsyncErrorIndex);
-			IncOutstanding();
-			}
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdDownloadSendHTTPGet"));
-	}
-
-/**
- * Command to receive an HTTP Response for Upload and Download of files.
- * @param aSection				Section to read from the ini file
- * @return
- */
-void CT_RSocketData::DoCmdRecvOneOrMore(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdRecvOneOrMore"));
-	TBool dataOk = ETrue;
-	
-	// Read from the ini file
-	TPtrC aFilename;
-	if(!GetStringFromConfig( aSection, KSave,aFilename ))
-    	{
-    	ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSave);
-    	SetBlockResult(EFail);
-    	dataOk = EFalse;
-    	}
-	
-	if (dataOk)
-		{
-		RFile file;
-		TInt error = KErrNone;	
-		
-		//if KNullFile then Upload
-		TBool discardData = ( aFilename == KNullFile);
-		INFO_PRINTF2(_L("File and path to Download: %S"),&aFilename);
-		if( !discardData )
-			{
-			INFO_PRINTF1( _L("Data is not discarded, creating file") );
-			error = file.Replace( iFs, aFilename, EFileShareAny|EFileWrite );	
-			}
-		else
-			{
-			INFO_PRINTF1( _L("Discarding downloaded data") );
-			}
-		
-		if( error == KErrNone )
-			{
-			TSockXfrLength received;
-			TInt totalReceived = 0;
-			TInt contentReceived = 0;
-			TInt timedReceived = 0;
-			TInt contentLength = 0;
-		    TRequestStatus status;
-		    TPtr8 downloadBufferPtr( iDownloadBuffer->Des() );
-			
-		    downloadBufferPtr.SetMax();
-		    INFO_PRINTF2( _L("Using buffer size [%d]"), downloadBufferPtr.MaxSize() );
-
-			INFO_PRINTF1(_L("Set time stamps for download"));
-			TTime endTime;
-			TTime startTime;
-
-		    INFO_PRINTF1( _L("Receiving data"));
-		    
-		    // Let's assume that we receive a HTTP header first
-		    TBool header( ETrue );	
-			TBool timerStarted( EFalse );
-			TBool failure = EFalse; // a flag to delete multiple returns
-			
-			iHttpResponseHeader.Zero();	
-			// receive until RecvOneOrMore fails or all content is received
-			do
-				{
-				if( !timerStarted && !header)
-					{
-					startTime.HomeTime();
-					endTime.HomeTime();
-					timerStarted = ETrue;
-					}
-				
-				iSocket->RecvOneOrMore( downloadBufferPtr, 0, status, received );
-				User::WaitForRequest( status );
-				if( !header )
-					{
-					timedReceived += received();
-					}
-				
-				if( KErrNone == status.Int() )
-					{
-					// Check if we are still receiving the HTTP header
-					if( header )
-						{
-						//Increase httpResponseheader size if needed
-						if(iHttpResponseHeader.Length() + downloadBufferPtr.Length() > iHttpResponseHeader.MaxLength())
-							{
-							error = iHttpResponseHeader.ReAlloc(iHttpResponseHeader.MaxLength() + KHttpHeaderBufferIncrement);
-							if(error != KErrNone)
-								{	
-								ERR_PRINTF2( _L("iHttpResponseHeader.ReAlloc(...) Failed with error %d"), error);
-								SetError( error );
-								failure = ETrue;
-								break;
-								}
-							}
-						
-						//Append the donwloaded content to headerbuffer
-						iHttpResponseHeader.Append(downloadBufferPtr);								
-						TInt headerEndIndex = iHttpResponseHeader.Find( KHeaderEndMark );
-						if( headerEndIndex != KErrNotFound )
-							{
-							INFO_PRINTF1( _L("Header end mark found"));
-							//Parse Content-Length field and extract content length					
-							TInt contentLengthStart = iHttpResponseHeader.Find( KContentLengthField );
-							//If Content-Length field is found
-							if( contentLengthStart != KErrNotFound )
-								{
-							    INFO_PRINTF1(_L("Content-Length field found from HTTP response"));
-								contentLengthStart += KContentLengthField().Length();					
-								TPtrC8 contentLengthDes;
-								contentLengthDes.Set(iHttpResponseHeader.Mid( contentLengthStart ));											
-								TInt contentLengthEnd = contentLengthDes.Find( KFieldEnd );
-								contentLengthDes.Set(contentLengthDes.Mid(0, contentLengthEnd));					
-								TLex8 lex;
-								lex.Assign( contentLengthDes );
-								lex.Val(contentLength);						
-								INFO_PRINTF2( _L("Content-Length: [%d]"), contentLength );						
-								}
-							else
-								{
-								INFO_PRINTF1( _L("No Content-Length field found from HTTP response"));
-								INFO_PRINTF1( _L("Assuming Content-Length: 0"));
-								contentLength = 0;
-								file.Close();
-								error = iFs.Delete(aFilename);
-								if(error != KErrNone)
-									{
-									INFO_PRINTF3(_L("Error [%d] for delete the file %S"), &aFilename,error);
-									SetError(error);
-									failure = ETrue;
-									break;
-									}
-								ERR_PRINTF2(_L("File %S was not found"), &aFilename);
-								SetBlockResult(EFail);
-								failure = ETrue;
-								break;
-								}															
-							// Header was found
-							headerEndIndex += KHeaderEndMark().Length();
-							//Convert the headerEndIndex in httpResponseheader to index in downloadBuffer
-							headerEndIndex -= totalReceived;					
-							//Delete remaining parts of the HTTP header from the download buffer
-							downloadBufferPtr.Delete( 0, headerEndIndex );					
-							header = EFalse;
-							}
-						}
-
-					// Increase the total received amount as we receive more data.
-					// Note: received data count also counts headers, this is taken
-					// into account in timing (startTime)
-					totalReceived += received();			
-					if(!header)
-						{
-						contentReceived += downloadBufferPtr.Length();
-						}
-					
-					if( !discardData )
-						{
-						error = file.Write( *iDownloadBuffer );
-						if( KErrNone != error )
-							{
-							ERR_PRINTF2( _L("Failed to write local file [%d]"), error );
-							file.Close();
-							SetError(error);
-							failure = ETrue;
-							break;
-							}
-						}
-					}
-				else
-					{
-					INFO_PRINTF1(_L("Set end time"));
-					endTime.HomeTime();			
-					INFO_PRINTF2( _L("Receiving err [%d]"), status.Int());
-					break;
-					}
-				}
-			while( KErrNone == status.Int() && contentReceived < contentLength );
-			
-			if (!failure)
-				{
-				endTime.HomeTime();	
-				INFO_PRINTF2( _L("Received total of [%d] bytes (inc headers)"), totalReceived );
-				INFO_PRINTF2( _L("Content received [%d] bytes"), contentReceived );
-
-				//Set this printing optional
-				//Print only if any amount of datatransfer was timed (skipped in the case of very short data transfers)
-				if( timerStarted )
-					{
-					INFO_PRINTF1(_L("Calculate duration of the transfer"));
-					TTimeIntervalMicroSeconds duration = endTime.MicroSecondsFrom( startTime );
-					INFO_PRINTF2( _L("Duration for the timed data transfer was [%Ld] microseconds"), duration.Int64() );		
-					INFO_PRINTF2( _L("Received [%d] bytes during timed data transfer"), timedReceived);		
-					iDownloadThroughput = ThroughputInMegaBits( duration, timedReceived );
-					}
-				else
-					{
-					INFO_PRINTF1( _L("Data transfer too short for throughput calculation"));
-					}
-				
-				// We allow any response to our reply at the moment.
-				if( !discardData )
-					{
-					file.Close();
-					}
-				}
-			}
-		else
-			{
-			ERR_PRINTF2( _L("Failed to open local file [%d]"), error );
-			SetError(error);
-			}
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdRecvOneOrMore"));	
-	}
-
-/**
- * Create an HTTP Post for uploading files.
- * @param aSection  Section to read from the ini file
- * @return 
- */
-void CT_RSocketData::DoCmdUploadSendHTTPPost(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdUploadSendHTTPPost"));
-	TBool dataOk = ETrue;
-	
-	INFO_PRINTF1( _L("Write to socket"));
-
-	TPtrC aFilename;
-	if(!GetStringFromConfig(aSection,KFile,aFilename))
-		{
-		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KFile);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-
-	TPtrC fileServer;
-	if(!GetStringFromConfig(aSection,KFileServer,fileServer))
-		{
-		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KFileServer);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-
-	TPtrC clientID;
-	if(!GetStringFromConfig(aSection,KClientID,clientID))
-		{
-		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KClientID);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-
-	TPtrC serverScript;
-	if(!GetStringFromConfig(aSection,KServerScript,serverScript))
-		{
-		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KServerScript);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-	
-	if (dataOk)
-		{
-		const TInt KMaxTag = 256;
-		// KHeaderWithoutData will change if you alter the header in any way that changes the 
-		// amount of characters in it! SO REMEMBER to calclulate header size again.
-		const TInt KHeaderWithoutData = 200;
-		TBuf8<KMaxTag + KHeaderWithoutData> request;
-		TRequestStatus status;
-		
-		CreateHTTPHeaderStart(request, ReadFileSizeL(aFilename),fileServer, clientID, serverScript);
-			
-		iSocket->Write( request,status);
-		User::WaitForRequest( status );
-		if(status.Int() == KErrNone)
-			{
-			INFO_PRINTF1( _L("HTTP POST request send, sending payload next"));
-			// Send file to iSocket
-			SendFileToSocketL(aFilename);
-			request.SetLength( 0 );
-			CreateHTTPHeaderEnd(request);
-
-			// Send the rest of the header
-			INFO_PRINTF1(_L("Sending boundary end"));
-			iSocket->Write( request, status );
-			User::WaitForRequest( status );
-			if(status.Int() != KErrNone)
-				{
-				 ERR_PRINTF2(_L("CT_RSocketData::DoCmdUploadSendHTTPPost: iSocket->Write( request,status) Failed with error %d"), status.Int());
-				 SetError(status.Int());
-				}
-			}
-		else
-			{
-			 ERR_PRINTF2(_L("CT_RSocketData::DoCmdUploadSendHTTPPost: iSocket->Write( request,status) Failed with error %d"), status.Int());
-			 SetError(status.Int());
-			}
-		}
-
-	INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdUploadSendHTTPPost"));
-	}
-
-/**
- *  Create or build the header for POST.
- * @param aRequest				Descriptor with a lenght of 456 that contain the parameters for the POST
- * @param aDataSize             Size of the file
- * @return
- */
-void CT_RSocketData::CreateHTTPHeaderStart(TDes8& aRequest, TInt aDataSize,TDesC& aFileServer, TDesC& clientID,TDesC& serverScript)
-	{
-	// Manually created HTTP Post request is difficult to maintain.
-	// Request and server responce is logged into file during test run.
-	
-	// KHeaderWithoutData will change if you alter the header in any way
-	// that changes the amount of characters in it! SO REMEMBER to calclulate
-	// header size again.
-	const TInt KHeaderWithoutData = 200;	
-	INFO_PRINTF1( _L("Set socket remote name"));
-	TSockAddr address;
-	iSocket->RemoteName( address );
-
-	// Construct request
-	aRequest.Append(KHTTPPOST);
-	aRequest.Append(KHTTPSeparator);
-	aRequest.Append(serverScript);
-	aRequest.Append(KHTTPSeparator);
-	aRequest.Append(KHTTPSuffix);
-	aRequest.Append(KLineBreak);
-
-	aRequest.Append(KHosts);
-	aRequest.Append(KHTTPSeparator);
-	aRequest.Append(address);
-	aRequest.Append(KLineBreak);
-
-	aRequest.Append(KFrom);
-	aRequest.Append(KHTTPSeparator);
-	aRequest.Append(clientID);
-	aRequest.Append(KLineBreak);
-
-	aRequest.Append(KContentType);
-	aRequest.Append(KHTTPSeparator);
-	aRequest.Append(KMultipartType);
-	aRequest.Append(KHTTPSeparator);
-	aRequest.Append(KBoundary);
-	aRequest.Append(KLineBreak);
-
-	aRequest.Append(KContentLength);
-	aRequest.Append(KHTTPSeparator);
-	// aRequest size + size of the data to be sent. Server must know how much
-	// data is coming.
-	aRequest.AppendNum(KHeaderWithoutData+aDataSize);
-	aRequest.Append(KLineBreak);
-
-	// extra line break
-	aRequest.Append(KLineBreak);
-
-	aRequest.Append(KBoundaryStart);
-	aRequest.Append(KLineBreak);
-
-	aRequest.Append(KContentDisposition);
-	aRequest.Append(KHTTPSeparator);
-	aRequest.Append(KDisposition);
-	aRequest.Append(KBackS);
-	aRequest.Append(aFileServer);
-	aRequest.Append(KBackS);
-	aRequest.Append(KLineBreak);
-
-	aRequest.Append(KContentType);
-	aRequest.Append(KHTTPSeparator);
-	aRequest.Append(KOctetType);
-	aRequest.Append(KLineBreak);
-	
-	aRequest.Append(KLineBreak);
-	}
-
-/**
- * Send aFilename parameter to the Socket with RSocket::Write
- * @param aFilename			name of the file send to the Socket
- * @return
- */
-void CT_RSocketData::SendFileToSocketL(const TDesC& aFilename)
-	{
-	TInt err(KErrNone);
-	TPtr8 buffer( iUploadBuffer->Des() );
-	buffer.SetMax();
-    INFO_PRINTF2( _L("Using buffer size [%d]"), buffer.MaxSize() );
-    TInt bytesSent = 0;
-
-	INFO_PRINTF1( _L("Open file"));
-    RFile file;
-    
-    err = file.Open(iFs, aFilename, EFileShareAny|EFileRead);
-    
-    if(err == KErrNone)
-    	{
-        CleanupClosePushL( file );
-        INFO_PRINTF1(_L("Read file size"));
-        TInt fileSize = ReadFileSizeL(aFilename);
-
-        INFO_PRINTF1( _L("Set time stamps for upload"));
-    	TTime endTime;
-    	endTime.HomeTime();
-    	TTime startTime;
-    	startTime.HomeTime();
-
-    	INFO_PRINTF1( _L("Send file"));
-        // Loop while enough bytes are sent to socket
-        while( bytesSent < fileSize )
-            {
-            TInt err = file.Read( buffer );
-
-            if( err == KErrEof )
-    			{
-    			INFO_PRINTF1(_L("File sending finished"));
-    			INFO_PRINTF2( _L("Upload buffer length is [%d]"), buffer.Length());
-    			break;
-    			}
-    		else if( err != KErrNone )
-    			{
-    			ERR_PRINTF2( _L("Failed to read file [%d]"), err );
-    			SetError( err );
-    			break;
-    			}
-
-    	    TRequestStatus status(KRequestPending);
-    		iSocket->Write( buffer, status );
-    		User::WaitForRequest( status );		
-    		err = status.Int();
-    		if(err != KErrNone)
-    			{
-    			ERR_PRINTF2(_L("CT_RSocketData::SendFileToSocketL:iSocket->Write(...) Fail [%d] "),err);
-    			SetError(err);
-    			break;
-    			}
-    		
-            bytesSent += ( buffer.Length() );
-            }
-
-        if (err == KErrNone || err == KErrEof)
-        	{
-        	INFO_PRINTF1( _L("Set end time"));
-        	endTime.HomeTime();
-        	INFO_PRINTF2( _L("Sent [%d] bytes to server"), bytesSent);
-
-        	INFO_PRINTF1( _L("Calculate duration of the transfer"));
-        	TTimeIntervalMicroSeconds duration = endTime.MicroSecondsFrom( startTime );
-        	INFO_PRINTF2( _L("Duration for the data transfer was [%Ld] microseconds"), duration.Int64() );
-        	iUploadThroughput = ThroughputInMegaBits( duration, bytesSent );
-            CleanupStack::PopAndDestroy( &file );
-        	}
-    	}
-    else
-    	{
-    	ERR_PRINTF2(_L("CT_RSocket::SendFileToSocketL::file.Open(...) Failed with error %d"), err);
-    	SetError(err);
-    	}
-	}
-
-/**
- * Calculated the throughput based on duration of a data transfer and total transferred bytes.
- * @param aDuration				Duration of the transfer
- * @param aBytes				Total transferred in bytes
- * @return 						Throughput in MBps
- */
-TReal CT_RSocketData::ThroughputInMegaBits(TTimeIntervalMicroSeconds aDuration, TInt aBytes )
-	{
-	const TReal KBitsInByte(8.0);
-	TReal throughput = ( KBitsInByte * (TReal) aBytes ) / (TReal) aDuration.Int64();
-	return throughput;
-	}
-
-/**
- * Read the lenght of the file (aFileName)
- * @param aFileName  file to read the lenght
- * @return
- */
-TInt CT_RSocketData::ReadFileSizeL(const TDesC& aFilename)
-	{
-	RFile file;
-    TInt error = file.Open(iFs, aFilename, EFileShareAny|EFileRead);    
-    if ( error != KErrNone)
-    	{
-    	ERR_PRINTF2( _L("Failed to open local file [%d]"), error);
-    	SetError(error);
-    	return error;
-    	}
-
-    TInt fileSize = 0;
-    error = file.Size(fileSize);
-    
-    if (error!= KErrNone)
-    	{
-    	ERR_PRINTF2(_L("Failed to read file size [%d]"), error);
-    	file.Close();
-    	SetError(error);
-    	return error;
-    	}
-
-    file.Close();
-    return fileSize;
-	}
-
-/**
- * Build the final header to POST for uploading files
- * @param aRequest				Descriptor with 456 of lenght that contain the final POST request
- * @return
- */
-void CT_RSocketData::CreateHTTPHeaderEnd(TDes8& aRequest)
-	{	
-	//TRequestStatus status;
-	aRequest.SetLength( 0 );
-	//Create the rest of the header data
-	aRequest.Append( KLineBreak );
-	aRequest.Append( KBoundaryEnd );
-	aRequest.Append( KLineBreak );
-	}
-
-
-/**
- * Make a HTTP request to the socket
- * @param
- * @return
- */
-void CT_RSocketData::DoCmdHttpGet()
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdHttpGet"));
-	
-	 TInt err(KErrNone);
-	//Constant for creating a HTTP request.
-	const TInt KHTTPSize = 128;
-	// Buffer that will hold the request.
-	TBuf8 <KHTTPSize> request;
-	// Construct the final request.
-	request.Append( KGETHTTP );
-	
-	INFO_PRINTF1( _L("Write to socket") );
-    TRequestStatus status( KRequestPending );	
-	iSocket->Write( request, status);
-    User::WaitForRequest( status );    
-	INFO_PRINTF2( _L("CT_RSocketData::DoCmdHttpGet: Write done: [%d]"), status.Int() );
-    err = status.Int();
-    
-    if(err == KErrNone)
-    	{
-    	INFO_PRINTF1( _L("CT_RSocketData::DoCmdHttpGet: Receive from socket") );
-    	// receive until RecvOneOrMore fails
-    	do
-    		{
-    		RecvOneOrMore(status);
-    		}
-    	while( status.Int() == KErrNone );
-
-    	INFO_PRINTF2( _L("CT_RSocketData::DoCmdHttpGet: Receiving finished. Received [%d] bytes in total"), itotalReceived );
-
-    	// Currently all error codes returned by the server are accepted.
-    	// Should only KErrEof be accepted?
-    	INFO_PRINTF2( _L("Ignoring error code from RSocket::RecvOneOrMore [%d]"), status.Int());
-    	}
-    else
-    	{
-    	 ERR_PRINTF2(_L("CT_RSocketData::DoCmdHttpGet: iSocket.Write(...) Failed with error %d"), err);
-    	 SetError(err);
-    	}
-    	
-	INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdHttpGet"));
-	}
-
-/**
- * Receive data from a remote host.
- * @param status				Indicates the complexion status of the request
- * @return 
- */
-void CT_RSocketData::RecvOneOrMore(TRequestStatus &status)
-	{
-	TInt err(KErrNone);
-	// Create variables for receive buffer and received data counting variables.	
-	const TInt KBufferSize(1024);
-	TBuf8<KBufferSize> buffer;
-	TSockXfrLength received;
-	iSocket->RecvOneOrMore( buffer, 0, status, received);
-	User::WaitForRequest( status );			
-	err = status.Int();
-	if( err == KErrNone )
-		{
-		INFO_PRINTF2( _L("CWlanTestWrapper: Received [%d] bytes"), received() );
-		itotalReceived += received();
-		}			
-	else if( err == KErrEof )
-		{
-		INFO_PRINTF1(_L("End of File reached"));
-		}
-	else
-		{
-		ERR_PRINTF2(_L("RecvOneOrMore async call failed with error %d"), err);
-		SetError(err);
-		}	
-	}
-
-
-
-/**
- * Check the supported rates for the IAP.
- * @param aSection				Section to read from the ini file
- * @return
- */
-void CT_RSocketData::DoCmdCheckSupportedRates(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdCheckSupportedRates"));
-	TBool dataOk = ETrue;
-	
-    // Read from the ini file
-    TInt aRate;
-	if(!GetIntFromConfig(aSection,KARates,aRate))
-		{
-		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KARates);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-	
-	// Check if a scan has been made
-	TPtrC iScanInfoName;
-	if(!GetStringFromConfig(aSection,KScanInfo,iScanInfoName ))
-		{
-		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KScanInfo);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-	
-	if (dataOk)
-		{
-		CWlanScanInfo* iScanInfo = static_cast<CWlanScanInfo*>(GetDataObjectL(iScanInfoName));
-		
-		// Check if a scan has been made
-		if( iScanInfo != NULL )
-			{
-			const TUint8 KTemp80211SupRatesId = 1;
-			const TUint8 KTemp80211SupRatesMaxLen = 18;
-			// Scan info gives data as "information elements"
-			TUint8 ieLen(0);
-			const TUint8* ieData(0);
-			
-			TInt err = iScanInfo->InformationElement( KTemp80211SupRatesId, ieLen, &ieData );
-			
-			// Check supported rate if the information element was available
-			if(err == KErrNone)
-				{
-				TBuf8<KTemp80211SupRatesMaxLen> supRates8;
-				supRates8.Copy( ieData, ieLen );
-				TBool supported = CheckSupportedRates( supRates8, aRate );
-				if(!supported)
-					{
-					ERR_PRINTF2( _L("%d rate not supportedRates"), aRate );
-					SetError(KErrNotSupported);
-					}
-				}
-			else
-				{
-				ERR_PRINTF2( _L("err: [%d]"), err );		
-			    SetError(err);
-				}
-			}
-		else
-			{
-			ERR_PRINTF1(_L("Failed to get CWlanScanInfo object"));
-			SetBlockResult(EFail);
-			}
-		}
-
-	INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdCheckSupportedRates"));
-	}
-
-/**
- * Review if the rate its supported.
- * @param aSupportedRates				Rate to calculate and if match with the desired rate
- * @param aRate							rate to verify if is supporrted, The rate to be checked in 0.5Mb/s units.
- *                                      Ie. 2 = 2 * 0.5Mb/s = 1Mb/s.
- * @return								Etrue if the rate is supported
- */
-TBool CT_RSocketData::CheckSupportedRates(const TDesC8& aSupportedRates, const TUint8 aRate)
-	{
-	// Supported rates information element format is the following:
-	// | element id (1 octet) | length (1 octet) | supported rates (1-8 octets) |
-	// where each octet of supported rates contains one supported rate in
-	// units of 500 kb/s. The first bit of supported rates field is always 1
-	// if the rate belongs to the BSSBasicRateSet, if the rate does not belong
-	// to the BSSBasicRateSet the first bit is 0.
-
-	// For example Supported rates information element with value
-	// 0x01,0x02,0x82,0x84
-	// would mean that BSSBasicRateSet rates 1Mb/s and 2Mb/s are supported
-
-	TBool supported( EFalse );
-	
-	for ( TInt i( 0 ); i < aSupportedRates.Length(); i++ )
-	    {
-	    TUint8 rate = aSupportedRates[i] & KBasicRateMask;
-	    if( rate == aRate ) supported = ETrue;	    
-		//INFO_PRINTF2( _L("speed rate [%d]"), rate);
-    	switch( rate )
-    		{
-    		case K80211Rate1Mbit:
-				INFO_PRINTF1( _L("AP can support Speed Rate 1Mbit") );
-	    	    break;
-    		case K80211Rate2Mbit:
-    		    INFO_PRINTF1( _L("AP can support Speed Rate 2Mbit") );
-	     	    break;
-    		case K80211Rate5Mbit:
-         		INFO_PRINTF1( _L("AP can support Speed Rate 5Mbit") );
-	    	    break;
-    		case K80211Rate11Mbit:
-				INFO_PRINTF1( _L("AP can support Speed Rate 11Mbit") );
-	    	    break;
-			case K80211Rate12Mbit:
-                INFO_PRINTF1( _L("AP can support Speed Rate 12Mbit") );
-            	break;          	
-            case K80211Rate18Mbit:
-            	INFO_PRINTF1( _L("AP can support Speed Rate 18Mbit") );
-            	break;            
-            case K80211Rate22Mbit:
-            	INFO_PRINTF1( _L("AP can support Speed Rate 22Mbit") );
-            	break;            	
-            case K80211Rate24Mbit:
-            	INFO_PRINTF1( _L("AP can support Speed Rate 24Mbit") );
-            	break;            
-            case K80211Rate36Mbit:
-            	INFO_PRINTF1( _L("AP can support Speed Rate 36Mbit") );
-            	break;            
-            case K80211Rate48Mbit:
-            	INFO_PRINTF1( _L("AP can support Speed Rate 48Mbit") );
-            	break;
-    		case K80211Rate54Mbit:
-				INFO_PRINTF1( _L("AP can support Speed Rate 54Mbit") );
-	    	    break;
-
-    		default:
-	    	    break;
-    		}
-	    }
-
-	return supported;
-	}
-
-/**
- * Shutdown the socket (RSocket::Shutdown).
- * @param aAsyncErrorIndex		Command index for async calls to returns errors to
- * @return 
- */
-void CT_RSocketData::DoCmdShutdown( const TInt aAsyncErrorIndex)
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdShutdown"));
-	INFO_PRINTF1(_L("Starting to shutdown Socket"));
-	iSocket->Shutdown( RSocket::ENormal, iActCallShutDownSocket->iStatus);				
-	iActCallShutDownSocket->Activate(aAsyncErrorIndex);
-	IncOutstanding();
-	INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdShutdown"));
-	}
-/**
- * Helper function calling from the destroyer.
- * @param 			
- * @return
- */
-void CT_RSocketData::Shutdown()
-	{
-	TInt err(KErrNone);
-	TRequestStatus status;
-	iSocket->Shutdown(RSocket::ENormal, status);
-	User::WaitForRequest( status );			
-	err = status.Int();
-	if( err != KErrNone )
-		{
-		ERR_PRINTF2( _L("CT_RSocketData::Shutdown(): error[%d]"), err);
-		SetError(err);
-		}
-	}
-
-/**
- * Close de socket.
- * @param
- * @return
- */
-void CT_RSocketData::DoCmdClose()
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdClose"));
-	Close();
-	INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdClose"));
-	}
-/**
- * Helper function to close the socket.
- * @param
- * @return
- */
-void CT_RSocketData::Close()
-	{
-	iSocket->Close();		
-    iSocketOpened = EFalse;	
-	}
--- a/wlanapitest/wlanhaitest/wlan/src/T_RSocketServData.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,431 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#include "t_rsocketservdata.h"
-#include <commdb.h>				
-#include <wdbifwlansettings.h>			
-#include <apselect.h>     
-#include <aplistitem.h>
-#include <apdatahandler.h>
-#include <apaccesspointitem.h>
-/*@{*/
-//LIT's params fron the ini file
-_LIT(KWlanIap,							"WLANIAP");
-_LIT(KWlanSsid,							"DEFAULT_SSID");
-_LIT(KCommsDbTableView,     			"commsdbtableview");
-_LIT(KCommsDatabase,     			    "commsdatabase");
-/*@}*/
-
-/*@{*/
-//LIT's commands
-_LIT(KCmdSetOutgoingIap,				"SetOutgoingIap");
-_LIT(KCmdConnect,						"Connect");
-_LIT(KCmdClose,							"Close");
-/*@}*/
-
-
-/**
- * Two phase constructor
- *
- * @leave	system wide error
- */
-CT_RSocketServData* CT_RSocketServData::NewL()
-	{
-	CT_RSocketServData * ret = new (ELeave) CT_RSocketServData();
-	CleanupStack::PushL(ret);
-	ret->ConstructL();
-	CleanupStack::Pop(ret);
-	return ret;
-	}
-
-/*
- * public destructor
- */
-CT_RSocketServData::~CT_RSocketServData()
-	{
-	if(iSocketServConnected)
-		{
-		Close();
-		}
-	if(iSocketServ)
-		{
-		 delete iSocketServ;
-		 iSocketServ = NULL;
-		}
-	}
-
-/**
- * Private constructor. First phase construction
- */
-CT_RSocketServData::CT_RSocketServData()
-:	iSocketServ(NULL),
-	iSocketServConnected(EFalse),
-	iIapID(0)
-	{
-	}
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return	N/A
- *
- * @pre		None
- * @post	None
- *
- * @leave	system wide error
- */
-void CT_RSocketServData::ConstructL()
-	{
-	iSocketServ = new (ELeave)RSocketServ();
-	}
-
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return	pointer to the object that the data wraps
- */
-TAny* CT_RSocketServData::GetObject()
-	{
-	return iSocketServ;
-	}
-
-void CT_RSocketServData::SetIapID(TUint32 aIapID)
-	{
-	iIapID = aIapID;
-	}
-
-/**
- * Process a command read from the Ini file
- * @param aCommand 			The command to process
- * @param aSection			The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex	Command index dor async calls to returns errors to
- * @return TBool			ETrue if the command is process
- * @leave					system wide error
- */
-TBool CT_RSocketServData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
-	{
-	TBool ret = ETrue;
-	
-	if(aCommand == KCmdSetOutgoingIap)
-		{
-		DoCmdSetOutgoingIap(aSection);
-		}
-	else if(aCommand == KCmdConnect)
-		{
-		DoCmdConnect();
-		}
-	else if(aCommand == KCmdClose)
-		{
-		DoCmdClose();
-		}
-	else
-		{
-		ERR_PRINTF1(_L("Unknown command."));
-		ret = EFalse;
-		}
-	return ret;
-	}
-
-
-/**
- * Get IAP, matching the name given (KWlanIap parameter read from the ini file). Set SSID of the
- * IAP to the given value (KWlanSsid parameter read from the ini file).
- * Store the ID of the IAP locally to allow using the IAP for connecting.
- * If there are errors, are management for SetBlockResult() and SetError()
- * @param aSection				Section to review in the ini file for this command
- * @return void
- */
-void CT_RSocketServData::DoCmdSetOutgoingIap(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketServData::DoCmdSetOutgoingIap"));
-	TBool dataOk = ETrue;
-	
-    TPtrC aIapName;
-	if(!GetStringFromConfig(aSection, KWlanIap, aIapName))
-		{
-        ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KWlanIap);        
-        SetBlockResult(EFail);
-        dataOk = EFalse;
-		}
-	
-    TPtrC aSsid;    
-	if(!GetStringFromConfig(aSection, KWlanSsid, aSsid))
-		{
-        ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KWlanSsid);
-        SetBlockResult(EFail);
-        dataOk = EFalse;
-		}	
-	
-    TPtrC commsdbtableName;
-	if(!GetStringFromConfig(aSection, KCommsDbTableView, commsdbtableName))
-		{
-        ERR_PRINTF2(_L("Error in getting parameter %S from INI file"),&KCommsDbTableView);
-        SetBlockResult(EFail);
-        dataOk = EFalse;
-		}
-	
-    TPtrC commsdbName;
-	if(!GetStringFromConfig(aSection, KCommsDatabase, commsdbName))
-		{
-        ERR_PRINTF2(_L("Error in getting parameter %S from INI file"),&KCommsDatabase);
-        SetBlockResult(EFail);
-        dataOk = EFalse;
-		}
-	
-    if (dataOk)
-		{
-		// reset IAP id
-		SetIapID(0);	
-		
-        TBool apFound = EFalse;
-		// Open view to IAP table, select all outgoing IAPs.	
-		CCommsDbTableView* searchView = static_cast<CCommsDbTableView*>(GetDataObjectL(commsdbtableName));
-        CCommsDatabase* commsDatabase =  static_cast<CCommsDatabase*>(GetDataObjectL(commsdbName));
-		
-		// Make sure the view was available.
-		if( searchView != NULL && commsDatabase != NULL )
-			{
-			CleanupStack::PushL(searchView);
-			INFO_PRINTF1(_L("Start browsing through the IAPs."));
-			TInt error = searchView->GotoFirstRecord();
-			
-			if( error == KErrNone )
-				{
-				// Buffer for reading IAP names from CommsDat. Buffer size is set to
-				// maximum readable value from CommsDat.
-				TBuf<KCommsDbSvrMaxColumnNameLength> iapName;
-				TUint32 iapID = 0;
-				INFO_PRINTF1(_L("CT_RSocketServData: CommsDat ready for searching, going through all outgoing IAPs"));
-				TUint32 iapservice = 0;
-				
-				TBool failed = EFalse;
-				
-				// Go through all IAPs.
-				while( error == KErrNone )
-					{
-					iapName.FillZ();
-					
-					// Read IAP ID and name from IAP table in CommsDat.
-					TRAPD(err, searchView->ReadTextL( TPtrC( COMMDB_NAME ), iapName ));
-					
-				    if(err == KErrNone)
-				    	{
-						TRAP(err, searchView->ReadUintL( TPtrC( COMMDB_ID ), iapID ));
-						
-					    if(err == KErrNone)
-					    	{
-							INFO_PRINTF3(_L("CT_RSocketServData: IAP (ID = [%d]): %S"), iapID, &iapName );
-							
-							// Try to match the name with user input in the ini file.
-							if( iapName.Match( aIapName ) == KErrNone )
-								{
-								INFO_PRINTF2(_L("CT_RSocketServData: Matching IAP name found with IAP ID = [%d]"), iapID );
-								
-                                apFound = ETrue;
-                                
-								// Return the found IAP ID			
-								SetIapID(iapID);
-								
-								// Read IAP service from IAP table in CommsDat.
-								TRAPD(err, searchView->ReadUintL( TPtrC( IAP_SERVICE ), iapservice ));
-								
-							    if(err == KErrNone)
-							    	{
-									INFO_PRINTF2(_L("Service of the AP: %d"),iapservice);
-									
-									// Write the ssid given as a parameter in WLANServiceTable in CommsDat
-									INFO_PRINTF1(_L("CT_RSocketServData: Get WlanSettings from WLANServiceTable"));
-									CWLanSettings* wlanset = new (ELeave) CWLanSettings();
-									CleanupStack::PushL( wlanset );
-									
-									// Connect to CommsDat
-									err = wlanset->Connect();
-									
-									if( err == KErrNone )
-										{
-										// Get wlan settings corresponding IAP service info from IAP table
-										SWLANSettings wlanSettings;
-										err = wlanset->GetWlanSettings( iapservice, wlanSettings );
-										
-										if( err == KErrNone )
-											{
-											INFO_PRINTF2(_L("CT_RSocketServData: CommsDat: wlanSettings.Name = %S"), &wlanSettings.Name );
-											INFO_PRINTF2(_L("CT_RSocketServData: CommsDat: wlanSettings.SSID = %S"), &wlanSettings.SSID );								
-											
-											// Set the new ssid from the ini file
-											wlanSettings.SSID = aSsid;
-											INFO_PRINTF2(_L("CT_RSocketServData: New value for wlanSettings.SSID = %S"), &wlanSettings.SSID );
-											
-											// Write the new settings in CommsDat
-											err = wlanset->WriteWlanSettings(wlanSettings );
-											
-											if( err == KErrNone )
-												{
-												INFO_PRINTF1(_L("CT_RSocketServData: WlanSettings saved in CommsDat"));
-												wlanset->Disconnect();
-												CleanupStack::PopAndDestroy( wlanset );
-												}
-											else
-												{
-												ERR_PRINTF2(_L("CT_RSocketServData: WriteWlanSettings error: [%d]"), err );
-												SetError(err);
-												failed = ETrue;
-												break;
-												}
-											}
-										else
-											{
-											ERR_PRINTF2(_L("CT_RSocketServData: Get WlanSettings error: [%d]"), err );			
-											SetError(err);
-											failed = ETrue;
-											break;
-											}
-										}
-									else
-										{
-										ERR_PRINTF2(_L("CT_RSocketServData: WLanSettings connect failed! [%d]"), err );				
-										SetError(err);
-										failed = ETrue;
-										break;
-										}
-							    	}
-							    else
-									{
-									ERR_PRINTF2(_L("searchView->ReadUintL left with error %d"), err);
-									SetError(err);
-									failed = ETrue;
-									break;
-									}	
-								}
-							
-							error = searchView->GotoNextRecord();
-							if(error == KErrNotFound)
-								{
-								INFO_PRINTF2(_L("searchView->GotoNextRecord() not found [%d]"), error);
-								INFO_PRINTF1(_L("No more records to look for"));
-								}
-							else if(error != KErrNone)
-								{
-								ERR_PRINTF2(_L("searchView->GotoNextRecord() Failed with error = %d"),error);
-								SetError(err);
-								failed = ETrue;
-								break;
-								}
-					    	}
-					    else
-							{
-							ERR_PRINTF2(_L("searchView->ReadUintL left with error %d"), err);
-							SetError(err);
-							failed = ETrue;
-							break;
-							}	
-				    	}
-				    else
-						{
-						ERR_PRINTF2(_L("searchView->ReadTextL left with error %d"), err);
-						SetError(err);
-						failed = ETrue;
-						break;
-						}
-					}	
-				
-				CleanupStack::Pop( searchView );
-				
-				//if( !failed && GetIapID() == 0 )
-				//	{
-				//	ERR_PRINTF1(_L("No valid IAP found"));
-				//	SetBlockResult(EFail);
-				//	}
-				}
-			else
-				{
-				INFO_PRINTF2(_L("CT_RSocketServData: No IAPs found [%d]"), error );		
-				}
-                
-            if(apFound == EFalse)
-                {
-                CApAccessPointItem *wlan = CApAccessPointItem::NewLC();
-                wlan->SetNamesL(aIapName);
-                wlan->SetBearerTypeL(EApBearerTypeWLAN);
-                wlan->WriteTextL(EApWlanNetworkName, aSsid);
-                CApDataHandler *handler = CApDataHandler::NewLC(*commsDatabase);
-                TUint32 apId = handler->CreateFromDataL(*wlan);
-                INFO_PRINTF4(_L("Add new IAP ID: %d, name:%S, SSID: %S"), apId,&aIapName,&aSsid);
-                SetIapID(apId);
-                CleanupStack::PopAndDestroy(2);
-                }
-			}
-		else
-			{
-			ERR_PRINTF1(_L("CT_RSocketServData: No IAPs found"));
-			ERR_PRINTF1(_L("CommsDat, no view and database were available."));
-			SetBlockResult(EFail);
-			}	
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_RSocketServData::DoCmdSetOutgoingIap"));
-	}
-
-/**
- * Command to calls RSocketServ::Connect. The error is management for SetError() helper
- * @param
- * @return
- */
-void CT_RSocketServData::DoCmdConnect()
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketServData::DoCmdConnect"));
-	
-	TInt err = iSocketServ->Connect();	
-	if(err != KErrNone)
- 		{
- 		ERR_PRINTF1(_L("iSocketServ->Connect() Fail"));
-		SetError(err);
- 		}
-	else
-		{
-		iSocketServConnected = ETrue;
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_RSocketServData::DoCmdConnect"));
-	}
-/**
- * Command to close RSocketServ instance
- * @param
- * @return
- */
-void CT_RSocketServData::DoCmdClose()
-	{
-	INFO_PRINTF1(_L("*START* CT_RSocketServData::DoCmdClose"));
-	Close();
-	INFO_PRINTF1(_L("*END* CT_RSocketServData::DoCmdClose"));
-	}
-
-/**
- * Helper for the command DoCmdCloseSocketServ: RSocketServ::Close
- * @param
- * @return
- */
-void CT_RSocketServData::Close()
-	{
-	iSocketServ->Close();
- 	iSocketServConnected = EFalse; 		
-	}
--- a/wlanapitest/wlanhaitest/wlan/src/T_WlanDriverServer.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-#include "t_wlandriverserver.h"
-#include "t_wlanmgmtclientdata.h"
-#include "t_wlanscaninfodata.h"
-#include "t_rsocketservdata.h"
-#include "t_ccommsdatabasedata.h"
-#include "t_ccommsdbtableviewdata.h"
-#include "t_rconnectiondata.h"
-#include "t_rfiledata.h"
-#include "t_rsocketdata.h"
-
-
-/*@{*/
-_LIT(KT_WlanMgmtClient, 		"WlanMgmtClient");
-_LIT(KT_WlanScanInfo,			"WlanScanInfo");
-_LIT(KT_WlanSocketServ,			"RSocketServ");
-_LIT(KT_CCommsDB,				"CCommsDatabase");
-_LIT(KT_CCommsDBTable,			"CCommsDbTableView");
-_LIT(KT_RConnection,			"RConnection");
-_LIT(KT_RSocket,				"RSocket");
-_LIT(KT_RFile,				    "RFile");
-/*@}*/
-
-
-/**
- * 
- * Same code for Secure and non-secure variants
- * Called inside the MainL() function to create and start the
- * CTestServer derived server.
- * @return - Instance of the test server
- */
-CT_WlanDriverServer* CT_WlanDriverServer::NewL()
-	{
-    CT_WlanDriverServer* server = new (ELeave) CT_WlanDriverServer();
-    CleanupStack::PushL(server);
-    server->ConstructL();
-    CleanupStack::Pop(server);
-    return server;
-    }
-
-/**
- * Secure variant
- * Much simpler, uses the new Rendezvous() call to sync with the client
- */
-LOCAL_C void MainL()
-	{
-#if (defined __DATA_CAGING__)
-    RProcess().DataCaging(RProcess::EDataCagingOn);
-    RProcess().SecureApi(RProcess::ESecureApiOn);
-#endif
-    CActiveScheduler* sched = NULL;
-    sched = new(ELeave) CActiveScheduler;
-    CActiveScheduler::Install(sched);
-    CT_WlanDriverServer* server = NULL;
-
-    // Create the CTestServer derived server
-    TRAPD(err, server = CT_WlanDriverServer::NewL());
-    if(!err)
-	    {
-        // Sync with the client and enter the active scheduler
-        RProcess::Rendezvous(KErrNone);
-        sched->Start();
-        }
-
-    delete server;
-    delete sched;
-    }
-
-/**
- * 
- * Secure variant only
- * Process entry point. Called by client using RProcess API
- * @return - Standard Epoc error code on process exit
- */
-GLDEF_C TInt E32Main()
-	{
-    __UHEAP_MARK;
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-    if(cleanup == NULL)
-	    {
-        return KErrNoMemory;
-        }
-
-#if (defined TRAP_IGNORE)
-	TRAP_IGNORE(MainL());
-#else
-    TRAPD(err,MainL());
-#endif
-
-    delete cleanup;
-    __UHEAP_MARKEND;
-    return KErrNone;
-    }
-/*
- * Creates an instance of CDataWrapper that wraps a CT_WlanDriverData object 
- * @return wrapper	- a CDataWrapper instance that wraps the CT_WlanDriverData object
- */
-CDataWrapper* CT_WlanDriverServer::CT_WlanDriverBlock::CreateDataL(const TDesC& aData)
-	{
-	CDataWrapper* wrapper = NULL;
-
-	if( KT_WlanMgmtClient() == aData )
-		{
-		wrapper = CT_WlanMgmtClientData::NewL();
-		}
-	else if(KT_WlanScanInfo() == aData)
-		{
-		wrapper = CT_WlanScanInfoData::NewL();
-		}
-	else if(KT_WlanSocketServ() == aData)
-		{
-		wrapper = CT_RSocketServData::NewL();
-		}
-	else if(KT_CCommsDB() == aData)
-		{
-		wrapper = CT_CCommsDatabaseData::NewL();
-		}
-	else if(KT_CCommsDBTable() == aData)
-		{
-		wrapper = CT_CCommsDbTableViewData::NewL();
-		}
-	else if(KT_RConnection() == aData)
-		{
-		wrapper = CT_RConnectionData::NewL();
-		}
-	else if(KT_RSocket() == aData)
-		{
-		wrapper = CT_RSocketData::NewL();
-		}
-	else if(KT_RFile() == aData)
-		{
-		wrapper = CT_RFileData::NewL();
-		}
-	return wrapper;
-	}
--- a/wlanapitest/wlanhaitest/wlan/src/T_WlanMgmtClientData.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-
-
-#include "t_wlanmgmtclientdata.h"
-#include <wlanmgmtclient.h>
-#include <wdbifwlansettings.h>			
-
-/*@{*/
-//LIT's for Constant
-_LIT(KScanInfo,						"scaninfo");
-/*@}*/
-
-/*@{*/
-//LIT's for WlanMgmtClientData
-_LIT(KCmdInstantiateMgmtClient,		"NewL");
-_LIT(KCmdGetScanResults,			"GetScanResults");
-_LIT(KCmdDestructor,				"~");
-/*@}*/
-
-
-/**
- * Two phase constructor
- *
- * @leave	system wide error
- */
-CT_WlanMgmtClientData* CT_WlanMgmtClientData::NewL()
-	{
-	CT_WlanMgmtClientData* ret = new (ELeave) CT_WlanMgmtClientData();
-	CleanupStack::PushL(ret);
-	ret->ConstructL();
-	CleanupStack::Pop(ret);
-	return ret;
-	}
-
-/**
- * Public destructor
- */
-CT_WlanMgmtClientData::~CT_WlanMgmtClientData()
-	{
-	DestroyData();
-	}
-
-/**
- * Private constructor. First phase construction
- */
-CT_WlanMgmtClientData::CT_WlanMgmtClientData()
-:	iData(NULL)	
-	{	
-	}
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return	N/A
- *
- * @pre		None
- * @post	None
- *
- * @leave	system wide error
- */
-void CT_WlanMgmtClientData::ConstructL()
-	{	
-	}
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return	pointer to the object that the data wraps
- */
-TAny* CT_WlanMgmtClientData::GetObject()
-	{
-	return iData;
-	}
-
-
-/**
-* Process a command read from the Ini file
-* @param aCommand 			The command to process
-* @param aSection			The section get from the *.ini file of the project T_Wlan
-* @param aAsyncErrorIndex	Command index dor async calls to returns errors to
-* @return TBool			    ETrue if the command is process
-* @leave					system wide error
-*/
-TBool CT_WlanMgmtClientData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
-	{
-	TBool ret = ETrue;	
-	if(aCommand == KCmdInstantiateMgmtClient)
-		{
-		DoCmdNewL();		
-		}	
-	else if(aCommand == KCmdGetScanResults)
-		{
-		DoCmdGetScanResults(aSection);		
-		}		
-	else if(aCommand == KCmdDestructor)
-		{
-		DoCmdDestructor();		
-		}
-	else
-		{
-		ERR_PRINTF1(_L("Unknown command."));
-		ret = EFalse;
-		}
-	return ret;
-	}
-
-
-/**
- * Creates an Instance of CWlanMgmtClient
- * @param
- * @return
- */
-void CT_WlanMgmtClientData::DoCmdNewL()
-	{
-	INFO_PRINTF1(_L("*START* CT_WlanMgmtClientData::DoCmdNewL"));
-	
-	DestroyData();
-	
-	TRAPD(err,iData = CWlanMgmtClient::NewL());
-	if(err != KErrNone)
-		{
-		ERR_PRINTF2(_L("CWlanMgmtClient was not constructed, err=%d" ),err);
-		SetError(err);
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_WlanMgmtClientData::DoCmdNewL"));
-	}
-
-
-/**
- * Test getting Wlan scan info from Wlan management interface. Call
- * DoCmdNewL for instantiate the CWlanMgmtClient and DoCmdNewL of CWlanScanInfo first.
- * @param aSection				Section to read from the ini file
- * @return
- */
-void CT_WlanMgmtClientData::DoCmdGetScanResults(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_WlanMgmtClientData::DoCmdGetScanResults"));
-	TBool dataOk = ETrue;
-	
-	TPtrC scanInfoName;
-	if(!GetStringFromConfig(aSection, KScanInfo, scanInfoName))
-		{        
-        ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KScanInfo);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-		}
-
-	if (dataOk)
-		{
-		CWlanScanInfo* iScanInfo = static_cast<CWlanScanInfo*>(GetDataObjectL(scanInfoName));	
-		if ( iScanInfo != NULL )
-			{
-			TInt err = iData->GetScanResults( *iScanInfo ) ;
-			if(err == KErrNone)
-				{
-				INFO_PRINTF2(_L("iScanInfo size [%d]"),iScanInfo->Size());
-				}
-			else
-				{
-				ERR_PRINTF2(_L("iData->GetScanResults( *iScanInfo ) Failed with error %d"), err);
-				SetError(err);
-				}
-			}
-		else
-		    {
-		    ERR_PRINTF1(_L("iScanInfo is NULL"));
-		    SetBlockResult(EFail);
-		    } 
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_WlanMgmtClientData::DoCmdGetScanResults"));
-	}	
-
-/**
- * Destructor for CWlanMgmtClient
- * @param
- * @return
- */
-void CT_WlanMgmtClientData::DoCmdDestructor()
-	{
-	INFO_PRINTF1(_L("*START* CT_WlanMgmtClientData::DoCmdDestructor"));
-	DestroyData();
-	INFO_PRINTF1(_L("*END* CT_WlanMgmtClientData::DoCmdDestructor"));
-	}
-
-/**
- * Destroy the object of CWlanMgmtClient, call made from DoCmdDestructor()
- * @param
- * @return
- */
-void CT_WlanMgmtClientData::DestroyData()
-	{
-	if(iData)
-		{
-		delete iData;
-		iData = NULL;
-		}
-	}
--- a/wlanapitest/wlanhaitest/wlan/src/T_WlanScanInfoData.cpp	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*
-* Copyright (c) 2005-2009 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"
-* 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: 
-*
-*/
-
-
-#include "t_wlanscaninfodata.h"
-//class CWlanScanInfo
-#include <wlanmgmtclient.h> 
-#include <e32cmn.h>
-
-/*@{*/
-//LITs from the ini
-_LIT(KSsidParam,					"DEFAULT_SSID_Ssid");
-_LIT(KUid,							"WlanScanUid");
-/*@}*/
-
-/*@{*/
-//LIT's for the commands
-_LIT(KCmdNewL,						"NewL");
-_LIT(KCmdDestructor,				"~");
-_LIT(KCmdInformationElement,		"InformationElement");
-/*@}*/
-
-/**
- * Two phase constructor
- *
- * @leave	system wide error
- */
-CT_WlanScanInfoData* CT_WlanScanInfoData::NewL()
-	{
-	CT_WlanScanInfoData* ret = new(ELeave) CT_WlanScanInfoData();
-	CleanupStack::PushL(ret);
-	ret->ConstructL();
-	CleanupStack::Pop(ret);
-	return ret;
-	}
-
-/**
- * Public destructor
- */
-CT_WlanScanInfoData::~CT_WlanScanInfoData()
-	{
-	DestroyData();
-	}
-
-/**
- * Private constructor. First phase construction
- */
-CT_WlanScanInfoData::CT_WlanScanInfoData()
-:	iData(NULL),
-	iScanInfoInstanceIdentifier(KNullUid)
-	{
-	}
-
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return	N/A
- *
- * @pre		None
- * @post	None
- *
- * @leave	system wide error
- */
-void CT_WlanScanInfoData::ConstructL()
-	{
-	}
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return	pointer to the object that the data wraps
- */
-TAny* CT_WlanScanInfoData::GetObject()
-	{
-	return iData;
-	}
-
-
-/**
- * Process a command read from the Ini file
- * @param aCommand 			The command to process
- * @param aSection			The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex	Command index dor async calls to returns errors to
- * @return TBool			ETrue if the command is process
- * @leave					system wide error
- */
-TBool CT_WlanScanInfoData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
-	{
-	TBool ret = ETrue;
-	
-	if(aCommand == KCmdNewL)
-		{
-		DoCmdNewL(aSection);
-		}
-	else if(aCommand == KCmdDestructor)
-		{
-		DoCmdDestructor();
-		}
-	else if(aCommand == KCmdInformationElement)
-		{
-		DoCmdInformationElement(aSection);		
-		}
-	else
-		{
-		ret = EFalse;
-		ERR_PRINTF1(_L("Unknown command"));
-		}
-	
-	return ret;
-	}
-
-
-/**
- * Create an instance of CWlanScanInfo
- * @param
- * @return
- */
-void CT_WlanScanInfoData::DoCmdNewL(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_WlanScanInfoData::DoCmdNewL"));
-    DestroyData();
-    
-	TBool dataOk = ETrue;
-	
-    TInt wsUid;
-    if(!GetHexFromConfig(aSection, KUid, wsUid ))
-    	{
-    	ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KUid);
-		SetBlockResult(EFail);
-		dataOk = EFalse;
-    	}
-    
-    if (dataOk)
-    	{
-        const TUid WsUid = {wsUid};       
-        TAny* interface = NULL;
-        
-        TRAPD(err, interface = REComSession::CreateImplementationL( WsUid, iScanInfoInstanceIdentifier ));
-        if(err == KErrNone)
-        	{
-        	iData = reinterpret_cast<CWlanScanInfo*>( interface );
-
-            if(iData == NULL)
-            	{
-            	ERR_PRINTF1(_L("CT_WlanScanInfoData::DoCmdNewL() Fail"));
-            	SetBlockResult(EFail);
-            	}
-        	}
-        else
-    		{
-    		ERR_PRINTF2(_L("Create Implementation left with error %d"), err);
-    		SetError(err);
-    		}	
-    	}
-
-    INFO_PRINTF1(_L("*END* CT_WlanScanInfoData::DoCmdNewL"));
-	}
-
-/**
- * Destructor for CWlanScanInfo
- * @param
- * @return
- */
-void CT_WlanScanInfoData::DoCmdDestructor()
-	{
-	INFO_PRINTF1(_L("*START* CT_WlanScanInfoData::DoCmdDestructor"));
-	DestroyData();
-	INFO_PRINTF1(_L("*END* CT_WlanScanInfoData::DoCmdDestructor"));
-	}
-
-/**
- * called from DoCmdDestructor for destroy the object CWlanScanInfo
- * @param
- * @return
- */
-void CT_WlanScanInfoData::DestroyData()
-	{	
-	// Cannot use "delete" directly because we use a member variable as an
-	// ECom instance identifier	
-	REComSession::DestroyedImplementation( iScanInfoInstanceIdentifier );
-	iData = NULL;
-	}
-/**
- * Review if the IAP given in the ini file match with some Wireless Local Area Network (SelectScanInfo).
- * @param aSection				Section in the ini file for this command
- * @return
- */
-void CT_WlanScanInfoData::DoCmdInformationElement(const TTEFSectionName& aSection)
-	{
-	INFO_PRINTF1(_L("*START* CT_WlanScanInfoData::DoCmdInformationElement"));
-	TBool dataOk = ETrue;
-	
-	TPtrC aSsid;
-	if(!GetStringFromConfig(aSection,KSsidParam, aSsid))
-		{
-		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSsidParam);        
-        SetBlockResult(EFail);
-        dataOk = EFalse;
-		}
-	
-	if(dataOk)
-		{
-		TInt err(KErrNone);	
-		// Scan info gives data as "information elements"
-		TUint8 ieLen(0);
-		const TUint8* ieData;
-		TWlanSsid ssid8;
-		TBuf<KWlanMaxSsidLength> ssid;
-		TBool match = EFalse;
-		
-	    INFO_PRINTF2(_L("SSID to be checked: %S"),&aSsid);
-		for( iData->First(); !iData->IsDone(); iData->Next() )
-	    	{
-	        INFO_PRINTF1(_L("found scan info"));
-			err = KErrNotReady;
-			// Information Element ID for SSID as specified in 802.11.
-			const TUint8 KWlan802Dot11SsidIE(0);
-	    	err = iData->InformationElement( KWlan802Dot11SsidIE, ieLen, &ieData );
-	        if(err != KErrNone)
-	        	{
-	        	ERR_PRINTF2(_L("CScanInfo::InformationElement err: [%d]"),err);
-				SetError(err);
-				break;
-	        	}
-	    	if(ieLen)
-				{
-				ssid8.Copy( ieData, ieLen );
-				ssid.Copy( ssid8 );				
-	            INFO_PRINTF2(_L("Current information element SSID: %S"),&ssid);
-				// check if this is an expected SSID
-				if( aSsid.Compare( ssid ) == 0 ) 
-					{
-					INFO_PRINTF1(_L("SSID match!"));					
-					match = ETrue;
-					break;
-					}
-				}
-	    	}
-		
-		if (err == KErrNone && !match)
-			{
-			ERR_PRINTF2(_L("Given SSID %S NOT FOUND!"),&aSsid);
-			SetBlockResult(EFail);
-			}
-		}
-	
-	INFO_PRINTF1(_L("*END* CT_WlanScanInfoData::DoCmdInformationElement"));
-	}
-
--- a/wlanapitest/wlanhaitest/wlan/testdata/devlon52/t_wlan.ini	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-[UID]
-Uid = 0x101f8f01;
-
-[driveC]
-mmc=c:
-
-[driveE]
-mmc=e:
--- a/wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-connection.ini	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-[wmgmtcnt]
-name = wmgmtcnt
-
-[wlansinf]
-name = wlansinf
-
-[comsdb]
-name = comsdb
-
-[comsdbtblview]
-name = comsdbtblview
-
-[scktserv]
-name = scktserv
-
-[rcntion]
-name = rcntion
-
-[rsckt]
-name = rsckt
-
-[rfile]
-name = rfile
-
-[include]
-file1 = \nt\wlan\t_wlan.ini
-file2 = \nt\wlan\t_wlan_environment.ini
-
-
-[NETWORKING-Wlan-Connection-0001-0001-NewL_command02]
-WlanScanUid = {UID, Uid}
-
-[NETWORKING-Wlan-Connection-0001-0001-GetScanResults_command03]
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0001-0001-InformationElement_command04]
-DEFAULT_SSID_Ssid = {IAP,Iap}
-
-
-
-[NETWORKING-Wlan-Connection-0002-0001-NewL_command02]
-commsdb     = comsdb
-
-[NETWORKING-Wlan-Connection-0002-0001-SetOutgoingIap_command03]
-WLANIAP  = {IAP,Iap}
-DEFAULT_SSID   = {IAP,Ssid}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Connection-0002-0001-Open_command07]
-socketserv  = scktserv
-
-[NETWORKING-Wlan-Connection-0002-0001-Start_command08]
-socketserv  = scktserv
-
-[NETWORKING-Wlan-Connection-0002-0001-Open_command09]
-socketserv  = scktserv
-connection  = rcntion
-
-[NETWORKING-Wlan-Connection-0002-0001-Connect_command10]
-Ip = {DownloadServer,Ip}
-Port = {DownloadServer,Port}
-
-
-
-[NETWORKING-Wlan-Connection-0003-0001-NewL_command02]
-WlanScanUid = {UID, Uid}
-
-[NETWORKING-Wlan-Connection-0003-0001-NewL_command04]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Connection-0003-0001-GetScanResults_command05]
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-InformationElement_command06]
-DEFAULT_SSID_Ssid = {IAP80211b,Iap}
-
-[NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command07]
-rate  = 2
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command08]
-rate  = 4
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command09]
-rate  = 11
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command10]
-rate  = 22
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command11]
-rate  = 108
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-SetOutgoingIap_command12]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP80211b,Iap}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Connection-0003-0001-Open_command16]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Connection-0003-0001-Start_command17]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Connection-0003-0001-Open_command18]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Connection-0003-0001-Connect_command19]
-Ip = {DownloadServer,Ip}
-Port = {DownloadServer,Port}
-
-
-
-[NETWORKING-Wlan-Connection-0004-0001-NewL_command02]
-WlanScanUid = {UID, Uid}
-
-[NETWORKING-Wlan-Connection-0004-0001-NewL_command04]
-commsdb     = comsdb
-
-[NETWORKING-Wlan-Connection-0004-0001-GetScanResults_command05]
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-InformationElement_command06]
-DEFAULT_SSID_Ssid = {IAP80211g,Iap}
-
-[NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command07]
-rate  = 2
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command08]
-rate  = 4
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command09]
-rate  = 11
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command10]
-rate = 22
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command11]
-rate  = 108
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-SetOutgoingIap_command12]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP80211g,Iap}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Connection-0004-0001-Open_command16]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Connection-0004-0001-Start_command17]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Connection-0004-0001-Open_command18]
-socketserv = scktserv
-connection  = rcntion
-
-[NETWORKING-Wlan-Connection-0004-0001-Connect_command19]
-Ip = {DownloadServer,Ip}
-Port ={DownloadServer,Port}
-
--- a/wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-instantiate.ini	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-[wmgmtcnt]
-name = wmgmtcnt
-
-[wlansinf]
-name = wlansinf
-
-[comsdb]
-name = comsdb
-
-[comsdbtblview]
-name = comsdbtblview
-
-[scktserv]
-name = scktserv
-
-[rcntion]
-name = rcntion
-
-[rsckt]
-name = rsckt
-
-[rfile]
-name = rfile
-
-[include]
-file1 = \nt\wlan\t_wlan.ini
-file2 = \nt\wlan\t_wlan_environment.ini
-
-
-[NETWORKING-Wlan-Instantiate-0001-0001-NewL_command01]
-WlanScanUid = {UID, Uid}
-
-
-
--- a/wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-transfer.ini	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-[wmgmtcnt]
-name = wmgmtcnt
-
-[wlansinf]
-name = wlansinf
-
-[comsdb]
-name = comsdb
-
-[comsdbtblview]
-name = comsdbtblview
-
-[scktserv]
-name = scktserv
-
-[rcntion]
-name = rcntion
-
-[rsckt]
-name = rsckt
-
-[rfile]
-name = rfile
-
-[include]
-file1 = \nt\wlan\t_wlan.ini
-file2 = \nt\wlan\t_wlan_environment.ini
-
-
-[NETWORKING-Wlan-Transfer-0001-0001-NewL_command02]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Transfer-0001-0001-SetOutgoingIap_command03]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP,Ssid}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Transfer-0001-0001-Open_command07]
-socketserv  = scktserv
-
-[NETWORKING-Wlan-Transfer-0001-0001-Start_command08]
-socketserv  = scktserv
-
-[NETWORKING-Wlan-Transfer-0001-0001-Open_command09]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Transfer-0001-0001-Connect_command10]
-Ip = {DownloadServer,Ip}
-Port = {DownloadServer,Port}
-
-[NETWORKING-Wlan-Transfer-0001-0001-DownloadSendHTTPGet_command11]
-Host =  {DownloadServer,Ip}
-File = /nokia/0100k.bin
-
-[NETWORKING-Wlan-Transfer-0001-0001-RecvOneOrMore_command12]
-Save = {driveC,mmc}\0100k.bin
-
-
-
-[NETWORKING-Wlan-Transfer-0002-0001-NewL_command02]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Transfer-0002-0001-SetOutgoingIap_command03]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP,Ssid}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Transfer-0002-0001-Open_command07]
-socketserv  = scktserv
-
-[NETWORKING-Wlan-Transfer-0002-0001-Start_command08]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0002-0001-Open_command09]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Transfer-0002-0001-Connect_command10]
-Ip =  {DownloadServer,Ip}
-Port ={DownloadServer,Port}
-
-[NETWORKING-Wlan-Transfer-0002-0001-DownloadSendHTTPGet_command11]
-Host =  {DownloadServer,Ip}
-File = /nokia/0010k.bin
-
-[NETWORKING-Wlan-Transfer-0002-0001-RecvOneOrMore_command12]
-Save = {driveE,mmc}\0010k.bin
-
-
-
-[NETWORKING-Wlan-Transfer-0003-0001-NewL_command02]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Transfer-0003-0001-SetOutgoingIap_command03]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP,Ssid}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Transfer-0003-0001-Open_command07]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0003-0001-Start_command08]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0003-0001-Open_command09]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Transfer-0003-0001-Connect_command10]
-Ip = {DownloadServer,Ip}
-Port = {DownloadServer,Port}
-
-[NETWORKING-Wlan-Transfer-0003-0001-DownloadSendHTTPGet_command11]
-Host = {DownloadServer,Ip}
-File = /nokia/10MB.bin
-
-[NETWORKING-Wlan-Transfer-0003-0001-RecvOneOrMore_command12]
-Save = {driveC,mmc}\10MB.bin
-
-
-
-[NETWORKING-Wlan-Transfer-0004-0001-NewL_command02]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Transfer-0004-0001-GenerateFile_command03]
-File = {driveC,mmc}\10mb2.bin
-Size   = 10485760
-
-[NETWORKING-Wlan-Transfer-0004-0001-SetOutgoingIap_command04]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP,Ssid}
-commsdbtableview  = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Transfer-0004-0001-Open_command08]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0004-0001-Start_command09]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0004-0001-Open_command10]
-socketserv = scktserv
-connection   = rcntion
-
-[NETWORKING-Wlan-Transfer-0004-0001-Connect_command11]
-Ip = {UploadServer,Ip}
-Port = {UploadServer,Port}
-
-[NETWORKING-Wlan-Transfer-0004-0001-UploadSendHTTPPost_command12]
-File  = {driveC,mmc}\10mb2.bin
-FileServer = 10mb2.bin
-clientID = SALT
-serverScript = /dy/upload/upfile.php
-
-[NETWORKING-Wlan-Transfer-0004-0001-RecvOneOrMore_command13]
-Save = KNullDesC
-
--- a/wlanapitest/wlanhaitest/wlan/testdata/t_wlan_environment.ini	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-[DownloadServer]
-Ip   = 200.78.210.108
-Port = 80
-Host = 200.78.210.108
-
-[UploadServer]
-Ip  	= 217.30.188.169
-Port 	= 80
-
-[IAP]
-Iap = nokia
-Ssid = nokia
-
-[IAP80211g]
-Iap = nokia
-
-[IAP80211b]
-Iap = nokia
--- a/wlanapitest/wlanhaitest/wlan/testdata/tube/t_wlan.ini	Fri Jun 18 16:16:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-[UID]
-Uid = 0x101f8f01;
-
-[driveC]
-mmc=c:
-
-[driveE]
-mmc=e: