Revert incorrect RCL_3 drop: RCL_3 PDK_3.0.2 PDK_3.0.3
authorPat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:41:05 +0100
branchRCL_3
changeset 18 d3d7683d16f5
parent 17 a828660c511c
Revert incorrect RCL_3 drop: Revision: 201029 Kit: 201035
package_definition.xml
package_map.xml
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/abs_wlan_eapol_callback_interface.h
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_connection_data.h
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_eapol_handler.h
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_handle_bss_lost.h
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_release.h
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_sub_operation_wpa_connect.h
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_wlan_eapol_if_message.h
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_connection_data.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_eapol_handler.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_bss_lost.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_release.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_wpa_connect.cpp
wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_wlan_eapol_if_message.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/bwinscw/wlmplatformu.def
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/bwinscw/wlmserveru.def
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/conf/wlanengine.confml
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/conf/wlanengine_101f8e44.crml
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmplatformu.def
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmserveru.def
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/rwlmserver.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscanstates.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanconversionutil.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanmgmtimpl.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatform.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatformdata.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmsystemnotify.h
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/rwlmserver.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscanstates.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanconversionutil.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtframehandler.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtimpl.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatform.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatformdata.cpp
wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp
wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h
wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacProtocolStackSideUmacCb.h
wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp
wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp
wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp
wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacProtocolStackSideUmacCb.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/group/bld.inf
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EthernetFrameMemMngr.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/FrameXferBlock.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/MgmtFrameMemMngr.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/WlanLogicalChannel.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddlogicalchannelbase.h
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/DataFrameMemMngr.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/FrameXferBlock.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/MgmtFrameMemMngr.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WLanLogicalDevice.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WlanLogicalChannel.cpp
wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp
wlan_bearer/wlannwif/etherpkt/CardDll.cpp
wlan_bearer/wlannwif/etherpkt/receiver_hw.cpp
wlan_bearer/wlannwif/inc/carddrv.h
wlan_bearer/wlannwif/inc/receiver_hw.h
wlan_info/wlan_metadata/wlan_metadata.mrp
wlan_plat/group/bld.inf
wlan_plat/wlan_busaccess_api/group/bld.inf
wlan_plat/wlan_busaccess_api/inc/wlanhwbusaccesslayer.h
wlan_plat/wlan_busaccess_api/inc/wlansdioa.h
wlan_plat/wlan_busaccess_api/inc/wlansdioa.inl
wlan_plat/wlan_busaccess_api/inc/wlansdioaclient.h
wlan_plat/wlan_busaccess_api/inc/wlansdioanamespace.h
wlan_plat/wlan_busaccess_api/inc/wlansdioatypes.h
wlan_plat/wlan_busaccess_api/inc/wlanspia.h
wlan_plat/wlan_busaccess_api/inc/wlanspia.inl
wlan_plat/wlan_busaccess_api/inc/wlanspiaclient.h
wlan_plat/wlan_busaccess_api/inc/wlanspianamespace.h
wlan_plat/wlan_busaccess_api/inc/wlanspiatypes.h
wlan_plat/wlan_busaccess_api/wlan_busaccess_api.metaxml
wlan_plat/wlan_device_settings_api/inc/wlandevicesettingsinternalcrkeys.h
wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h
wlan_plat/wlan_management_api/inc/wlanerrorcodes.h
wlan_plat/wlan_management_api/inc/wlanmgmtcommon.h
wlan_plat/wlan_management_api/inc/wlanmgmtinterface.h
wlan_plat/wlan_spia_api/group/bld.inf
wlan_plat/wlan_spia_api/inc/wlanhwbusaccesslayer.h
wlan_plat/wlan_spia_api/inc/wlanspia.h
wlan_plat/wlan_spia_api/inc/wlanspia.inl
wlan_plat/wlan_spia_api/inc/wlanspiaclient.h
wlan_plat/wlan_spia_api/inc/wlanspianamespace.h
wlan_plat/wlan_spia_api/inc/wlanspiatypes.h
wlan_plat/wlan_spia_api/wlan_spia_api.metaxml
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	Tue Aug 31 17:02:06 2010 +0300
+++ b/package_definition.xml	Wed Sep 01 12:41:05 2010 +0100
@@ -1,94 +1,41 @@
 <?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_plat" name="WLAN Platform Interfaces" level="test">
-   <component id="wlan_dbif_api" name="WLAN DBIF API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_dbif_api/wlan_dbif_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_dbif_api/group"/>
-   </component>
-   <component id="wlan_hal_api" name="WLAN HAL API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_hal_api/wlan_hal_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_hal_api/group"/>
-   </component>
-   <component id="wlan_management_api" name="WLAN Management API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_management_api/wlan_management_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_management_api/group"/>
-   </component>
-   <component id="wlan_device_settings_api" name="WLAN Device Settings API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_device_settings_api/wlan_device_settings_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_device_settings_api/group"/>
-   </component>
-   <component id="wlan_control_api" name="WLAN Control API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_control_api/wlan_control_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_control_api/group"/>
-   </component>
-   <component id="wlan_hw_initialization_data_api" name="WLAN Hardware Initialization Data API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_hw_initialization_data_api/wlan_hw_initialization_data_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_hw_initialization_data_api/group"/>
-   </component>
-   <component id="wlan_power_save_plugin_api" name="WLAN Power Save Plugin API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_power_save_plugin_api/wlan_power_save_plugin_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_power_save_plugin_api/group"/>
-   </component>
-   <component id="wlan_info_api" name="WLAN Info API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_info_api/wlan_info_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_info_api/group"/>
-   </component>
-   <component id="wlan_agent_hotspot_plugin_api" name="WLAN Agent Hotspot Plug-in API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_agent_hotspot_plugin_api/wlan_agent_hotspot_plugin_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_agent_hotspot_plugin_api/group"/>
-   </component>
-   <component id="wlan_osa_api" name="WLAN OSA API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_osa_api/wlan_osa_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_osa_api/group"/>
-   </component>
-   <component id="wlan_busaccess_api" name="WLAN Bus Access API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_busaccess_api/wlan_busaccess_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_busaccess_api/group"/>
-   </component>
-   <component id="wlan_hpa_api" name="WLAN HPA API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_hpa_api/wlan_hpa_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_hpa_api/group"/>
-   </component>
-   <component id="wlan_eapol_plugin_api" name="WLAN EAPOL Plugin API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_eapol_plugin_api/wlan_eapol_plugin_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_eapol_plugin_api/group"/>
-   </component>
-   <component id="wlan_generic_plugin_api" name="WLAN Generic Plugin API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_generic_plugin_api/wlan_generic_plugin_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_generic_plugin_api/group"/>
-   </component>
-   <component id="wlan_aws_plugin_api" name="WLAN AWS Plugin API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_plat/wlan_aws_plugin_api/wlan_aws_plugin_api.metaxml"/>
-    <unit bldFile="wlan_plat/wlan_aws_plugin_api/group"/>
-   </component>
-  </collection>
-  <collection id="wlan_pub" name="WLAN Public Interfaces" level="test">
-   <component id="wlan_sdk_info_api" name="WLAN SDK Info API" class="api" filter="s60">
-    <meta rel="Api" href="wlan_pub/wlan_sdk_info_api/wlan_sdk_info_api.metaxml"/>
-    <unit bldFile="wlan_pub/wlan_sdk_info_api/group"/>
-   </component>
-  </collection>
-  <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>
-   <!-- should follow component directory rules for stuff in wlan_symbian/ and put in a single component or split up properly -->
-   <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>
- </package>
+  <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/package_map.xml	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<PackageMap root="sf" layer="os"/>
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/abs_wlan_eapol_callback_interface.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/abs_wlan_eapol_callback_interface.h	Wed Sep 01 12:41:05 2010 +0100
@@ -114,12 +114,6 @@
         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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_connection_data.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 34 %
+* %version: 33 %
 */
 
 #ifndef CORE_CONNECTION_DATA_H
@@ -468,23 +468,6 @@
         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
@@ -518,23 +501,6 @@
         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
@@ -785,21 +751,15 @@
     /** 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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_eapol_handler.h	Wed Sep 01 12:41:05 2010 +0100
@@ -192,12 +192,6 @@
         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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_handle_bss_lost.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 11 %
 */
 
 #ifndef CORE_OPERATION_HANDLE_BSS_LOST_H
@@ -41,7 +41,6 @@
     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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_release.h	Wed Sep 01 12:41:05 2010 +0100
@@ -37,7 +37,6 @@
     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_sub_operation_wpa_connect.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_sub_operation_wpa_connect.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 29 %
+* %version: 28 %
 */
 
 #ifndef CORE_SUB_OPERATION_WPA_CONNECT_H
@@ -65,7 +65,6 @@
         core_state_req_state_notification,
         core_state_bss_lost,
         core_state_user_cancel,
-        core_state_user_cancel_disassociated,
         core_state_MAX
         };
 
@@ -191,12 +190,6 @@
     /**
      * 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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_wlan_eapol_if_message.h	Wed Sep 01 12:41:05 2010 +0100
@@ -90,7 +90,6 @@
     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
     };
 
 
@@ -753,8 +752,6 @@
     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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_connection_data.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 38 %
+* %version: 37 %
 */
 
 #include "core_connection_data.h"
@@ -52,11 +52,9 @@
     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 ),
@@ -674,23 +672,6 @@
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //
-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;
@@ -724,23 +705,6 @@
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //
-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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_eapol_handler.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -110,17 +110,6 @@
             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,
@@ -593,20 +582,6 @@
                 }
             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 );
@@ -878,69 +853,6 @@
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //
-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 )
@@ -1062,18 +974,8 @@
         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_handle_bss_lost.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_bss_lost.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 34 %
+* %version: 33 %
 */
 
 #include "core_operation_handle_bss_lost.h"
@@ -151,6 +151,34 @@
                 }
 
             /**
+             * 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(
@@ -173,47 +201,6 @@
             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_release.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_release.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 17 %
 */
 
 #include "core_operation_release.h"
@@ -175,21 +175,10 @@
                 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_sub_operation_wpa_connect.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_wpa_connect.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 62 %
+* %version: 61.1.1 %
 */
 
 #include "core_sub_operation_wpa_connect.h"
@@ -102,8 +102,6 @@
                 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(),
@@ -644,17 +642,9 @@
             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;            
 
@@ -788,28 +778,10 @@
 // ---------------------------------------------------------------------------
 //
 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;
     }
@@ -968,18 +940,6 @@
     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;
-    }
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
@@ -1008,10 +968,9 @@
 
             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  ) &&
-               eapol_auth_type_m == wlan_eapol_if_eapol_key_authentication_type_wpx_fast_roam )
+               || function == wlan_eapol_if_message_type_function_complete_wpx_fast_roam_reassociation  )
             {
             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 );
@@ -1060,14 +1019,23 @@
         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_wlan_eapol_if_message.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_wlan_eapol_if_message.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: 13 %
 */
 
 #include "core_wlan_eapol_if_message.h"
@@ -4059,43 +4059,4 @@
     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/wlmplatformu.def	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/bwinscw/wlmplatformu.def	Wed Sep 01 12:41:05 2010 +0100
@@ -10,5 +10,3 @@
 	?SetIconState@CWlmPlatform@@QAEHW4TWlmIconStatus@@@Z @ 9 NONAME ; int CWlmPlatform::SetIconState(enum TWlmIconStatus)
 	?InitializeSystemTimeHandler@CWlmPlatform@@QAEXXZ @ 10 NONAME ; void CWlmPlatform::InitializeSystemTimeHandler(void)
 	?PublishBgScanInterval@CWlmPlatform@@QAEXAAK@Z @ 11 NONAME ; void CWlmPlatform::PublishBgScanInterval(unsigned long &)
-	?GetWlanOnOffState@CWlmPlatform@@QAE?AW4TWlanOnOffState@@XZ @ 12 NONAME ; enum TWlanOnOffState CWlmPlatform::GetWlanOnOffState(void)
-
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/bwinscw/wlmserveru.def	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/bwinscw/wlmserveru.def	Wed Sep 01 12:41:05 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@@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 &)
+	?RunProtectedSetup@RWLMServer@@QAEXAAVTRequestStatus@@KAAVTDes8@@@Z @ 3 NONAME ; void RWLMServer::RunProtectedSetup(class TRequestStatus &, unsigned long, 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
Binary file wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/conf/wlanengine_101f8e44.crml has changed
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmplatformu.def	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmplatformu.def	Wed Sep 01 12:41:05 2010 +0100
@@ -11,6 +11,4 @@
 	_ZN12CWlmPlatformD1Ev @ 10 NONAME
 	_ZN12CWlmPlatformD2Ev @ 11 NONAME
 	_ZN12CWlmPlatform27InitializeSystemTimeHandlerEv @ 12 NONAME
-	_ZN12CWlmPlatform21PublishBgScanIntervalERm @ 13 NONAME
-	_ZN12CWlmPlatform17GetWlanOnOffStateEv @ 14 NONAME
-
+	_ZN12CWlmPlatform21PublishBgScanIntervalERm @ 13 NONAME
\ No newline at end of file
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmserveru.def	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmserveru.def	Wed Sep 01 12:41:05 2010 +0100
@@ -19,7 +19,7 @@
 	_ZN10RWLMServer17ActivateNotifiesLER10MWLMNotifym @ 18 NONAME
 	_ZN10RWLMServer17GetConnectionRCPIERl @ 19 NONAME
 	_ZN10RWLMServer17RemoveIapSsidListEj @ 20 NONAME
-	_ZN10RWLMServer17RunProtectedSetupER14TRequestStatusRK5TBuf8ILi32EERKS2_ILi8EER5TDes8 @ 21 NONAME
+	_ZN10RWLMServer17RunProtectedSetupER14TRequestStatusmR5TDes8 @ 21 NONAME
 	_ZN10RWLMServer18CancelDirectedRoamEv @ 22 NONAME
 	_ZN10RWLMServer18ConfigureMulticastEjRK11TMacAddress @ 23 NONAME
 	_ZN10RWLMServer18GetAcTrafficStatusER11TFixedArrayI19TWlmAcTrafficStatusLi4EE @ 24 NONAME
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/rwlmserver.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/rwlmserver.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 28 %
+* %version: 25.1.1 %
 */
 
 #ifndef RWLMSERVER_H
@@ -369,15 +369,12 @@
         /**
          * Run Protected Setup.
          * @param aStatus  Status of the calling active object.
-         * @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 aId IAP ID of network which user has selected to be configured.
          * @param Results of a successful Protected Setup operation.
          */
         IMPORT_C void RunProtectedSetup(
             TRequestStatus& aStatus,
-            const TWlanSsid& aSsid,
-            const TWlanWpsPin& aWspPin,  
+            TUint32 aId,
             TDes8& aCredentials );
 
         /**
@@ -599,13 +596,6 @@
 
         /** 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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 10 %
 */
 
 #ifndef WLANBGSCAN_H
@@ -93,7 +93,7 @@
      * 
      * @param aState New WLAN state
      */
-    void SetBgScanState( const MWlanBgScanProvider::TWlanBgScanState &aState );
+    void WlanStateChanged( const MWlanBgScanProvider::TWlanBgScanWlanState &aState );
     
     /**
      * From MWlanBgScanProvider.
@@ -114,6 +114,20 @@
     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/wlanbgscanstates.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscanstates.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: 3 %
 */
 
 #ifndef WLANBGSCANSTATES_H
@@ -533,7 +533,7 @@
     /**
      * Current WLAN state. 
      */
-    MWlanBgScanProvider::TWlanBgScanState iWlanBgScanState;
+    MWlanBgScanProvider::TWlanBgScanWlanState iWlanState;
     
     };
 
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanconversionutil.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanconversionutil.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 35 %
+* %version: 34 %
 */
 
 #ifndef WLANCONVERSIONUTIL_H
@@ -83,16 +83,6 @@
         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/wlanmgmtimpl.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanmgmtimpl.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 23 %
+* %version: 21.1.1 %
 */
 
 #ifndef WLANMGMTIMPL_H
@@ -307,20 +307,15 @@
         /**
          * (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 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 aId Service ID of network which user has selected to be configured.
          * @param aCredentials Results of a successful Protected Setup operation.
-         * @sa \link psetup Protected Setup-specific error codes \endlink.
-         */
+        */
         virtual void RunProtectedSetup(
             TRequestStatus& aStatus,
-            const TWlanSsid& aSsid,
-            const TWlanWpsPin& aWpsPin,
+            TUint32 aId,
             CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials );
 
         /**
@@ -833,8 +828,7 @@
         CProtectedSetupRequest(
             CWlanMgmtImpl& aCallback,
             RWLMServer& aServer,
-            const TWlanSsid& aSsid,
-            const TWlanWpsPin& aWpsPin,
+            TUint32 aId,
             CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials );
 
         /**
@@ -880,11 +874,8 @@
         // Interface to RWLMServer
         RWLMServer& iServer;
 
-        // SSID of the network to configure.
-        TWlanSsid iSsid;
-
-        // PIN value to be used. 
-        TWlanWpsPin iWpsPin;
+        // Service ID of network which user has selected to be configured.
+        TUint32 iServiceId;
 
         // Results of a successful Protected Setup operation.
         CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& iCredentials;
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 8 %
 */
 
 
@@ -78,10 +78,11 @@
 
 public:
     
-    enum TWlanBgScanState
+    enum TWlanBgScanWlanState
         {
-        EWlanBgScanOff,
-        EWlanBgScanOn
+        EWlanStateConnected = 1,
+        EWlanStateDisconnected,
+        EWlanStateMax // not used
         };
     
     struct TWlanBgScanSettings
@@ -131,13 +132,13 @@
     virtual void ScanComplete() = 0;
         
     /**
-     * Called to set BG scan state (on/off).
+     * Called to indicate that WLAN state has changed.
      *
      * @since S60 v5.2
      * 
      * @param aState New WLAN state
      */
-    virtual void SetBgScanState( const TWlanBgScanState &aState ) = 0;
+    virtual void WlanStateChanged( const TWlanBgScanWlanState &aState ) = 0;
     
     /**
      * Whether background scan is enabled.
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatform.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatform.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: 12 %
 */
 
 #ifndef WLMPLATFORM_H
@@ -103,16 +103,6 @@
          */
         virtual void ClearRegionCache() = 0;
         
-        /**
-         * WLAN has been set ON.
-         */
-        virtual void WlanOn() = 0;
-        
-        /**
-         * WLAN has been set OFF.
-         */
-        virtual void WlanOff() = 0;
-        
     };
 
 /**
@@ -195,12 +185,6 @@
          * @param aInterval WLAN BG scan interval in seconds.
          */
         IMPORT_C void PublishBgScanInterval( TUint32& aInterval );
-        
-        /**
-         * Get current WLAN on/off state.
-         * @return WLAN on/off state.
-         */
-        IMPORT_C TWlanOnOffState GetWlanOnOffState();
 
     protected:  // Methods
 
@@ -237,16 +221,6 @@
         void BtConnectionDisabled();
         
         /**
-         * (From MWlmSystemNotify) WLAN has been set ON.
-         */
-        void WlanOn();
-        
-        /**
-         * (From MWlmSystemNotify) WLAN has been set OFF.
-         */
-        void WlanOff();
-        
-        /**
          * (From MWlanSystemTimeCallback) 
          * User has changed the time and therefore cached WLAN region is not valid anymore.
          */
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatformdata.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatformdata.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: 12 %
 */
 
 #ifndef WLMPLATFORMDATA_H
@@ -26,7 +26,6 @@
 #include "802dot11.h"
 #include "wlmsystemnotify.h"
 #include "wlmplatformsubscriber.h"
-#include "wlaninternalpskeys.h"
 
 /**
 * Interface class to PubSub and CenRep.
@@ -100,12 +99,6 @@
          */
         TInt PublishBgScanInterval(
             TUint32& aInterval );
-            
-        /**
-         * Method for reading WLAN on/off state.
-         * @return WLAN on/off state
-         */
-        TWlanOnOffState GetWlanOnOffState();
 
     private:   // Methods
 
@@ -119,29 +112,6 @@
         * Symbian 2nd phase constructor.
         */
         void ConstructL();
-        
-        /**
-         * Notifies WLAN on/off observer of the changes
-         */
-        void NotifyWlanOnOffObserver();
-        
-        /**
-         * Method for publishing WLAN on/off state.
-         * @param aWlanState WLAN state to be published.
-         */
-        void PublishWlanOnOff( TPSWlanOnOff aWlanState );
-
-    private:  // Definitions
-        
-        /**
-         * Last WLAN on/off state notified to the observer.
-         */
-        enum TWlanNotifiedState
-            {
-            EWlanNotifiedNone,  // Initial value, Observer not yet notified anything
-            EWlanNotifiedOff,   // Observer notified that WLAN is set OFF
-            EWlanNotifiedOn     // Observer notified that WLAN is set ON
-            };
 
     private:  // Data
         
@@ -154,12 +124,6 @@
         /** Subscriber for watching KCTSYEmergencyCallInfo via P&S. */
         CWlmPlatformSubscriber* iEmergencyCall;
 
-        /** Subscriber for watching WLAN master switch via CenRep. */
-        CWlmPlatformSubscriber* iWlanOnOff;
-        
-        /** Subscriber for watching WLAN force disable switch via CenRep. */
-        CWlmPlatformSubscriber* iWlanForceDisable;
-
         /** Handle to KPropertyWlanMacAddress property via P&S. */
         RProperty iPsMacAddress;
         
@@ -169,9 +133,6 @@
         /** Handle to KPropertyWlanBgScanInterval property via P&S. */
         RProperty iPsBgScanInterval;
 
-        /** Handle to KPropertyWlanOnOffState property via P&S. */
-        RProperty iPsOnOffState;
-
         /** Callback for notifications. */
         MWlmSystemNotify& iCallback;
 
@@ -192,9 +153,6 @@
 
         /** Whether Emergency Call is active. */
         TBool iIsEmergencyCall;
-        
-        /** Last WLAN on/off state notified to the observer. */
-        TWlanNotifiedState iNotifiedWlanState;
                 
     };
 
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 59 %
+* %version: 55.1.2 %
 */
 
 #ifndef WLMSERVER_H
@@ -79,10 +79,6 @@
     public MWlanEapolCallbackInterface,
     public MWlanScanResultProvider
     {
-    
-    // Friend class for Unit Testing
-    friend class UT_CWlmServer;
-    
     public:  // Constructors and destructor
 
         /** 
@@ -1195,40 +1191,6 @@
          */
         void PublishBgScanInterval( TUint32& aInterval );
 
-        /**
-         * Callback method for indicating WLAN Server that WLAN has been
-         * set ON.
-         *
-         * @see MWlmPlatformCallback
-         */
-         void WlanOn();
-         
-         /**
-          * Callback method for indicating WLAN Server that WLAN has been
-          * set OFF.
-          *
-          * @see MWlmPlatformCallback
-          */
-         void WlanOff();
-         
-         /**
-          * Method for cancelling external requests by type.
-          * 
-          * @param aCommand Commands that need to be cancelled
-          */
-         void CancelExternalRequestsByType(
-             const TWLMCommands aCommand );
-         
-         /**
-          * Method for sending notifications to the subscribers
-          * 
-          * @param amNotification Notification to be sent.
-          * @param aParams Notification parameters.
-          */
-         void SendNotification(
-             TWlmNotify amNotification,
-             TBuf8<KMaxNotificationLength>& aParams );
-
     private:    // Data
     
         /**
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmsystemnotify.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmsystemnotify.h	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2006 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"
@@ -20,7 +20,6 @@
 #define WLMSYSTEMNOTIFY_H
 
 #include "wlmclientserver.h"
-#include "wlanerrorcodes.h"
 
 enum TWlmIconStatus
     {
@@ -30,18 +29,6 @@
     EWlmIconStatusConnectedSecure
     };
 
-/**
- * WLAN on/off states are used as status codes for status
- * requests and therefore they are mapped directly to
- * corresponding error codes.
- */
-enum TWlanOnOffState
-    {
-    EWlanOff = KErrWlanOff,
-    EWlanForceOff = KErrWlanForceOff,
-    EWlanOn = 0
-    };
-
 /** 
 * Callback interface for system data notification services.
 *
@@ -80,16 +67,6 @@
         * BT connection has been disconnected.        
         */
         virtual void BtConnectionDisabled() = 0;
-        
-        /**
-         * WLAN has been set ON.
-         */
-        virtual void WlanOn() = 0;
-        
-        /**
-         * WLAN has been set OFF.
-         */
-        virtual void WlanOff() = 0;
     };
 
 #endif // WLMSYSTEMNOTIFY_H
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/rwlmserver.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/rwlmserver.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 31 %
+* %version: 28.1.1 %
 */
 
 #include <in_sock.h>
@@ -544,18 +544,13 @@
 //
 EXPORT_C void RWLMServer::RunProtectedSetup(
     TRequestStatus& aStatus,
-    const TWlanSsid& aSsid,
-    const TWlanWpsPin& aWspPin,  
+    TUint32 aId,
     TDes8& aCredentials )
     {
     DEBUG( "RWLMServer::RunProtectedSetup(TRequestStatus)" );
 
     aStatus = KRequestPending;
-    
-    iWlanSsidPckg = aSsid;
-    iWlanWpsPinPckg = aWspPin;
-    
-    TIpcArgs params( &iWlanSsidPckg, &iWlanWpsPinPckg, &aCredentials );
+    TIpcArgs params( aId, &aCredentials );
 
     // Send the command
     SendReceive( ERunProtectedSetup, params, aStatus );
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 16 %
 */
 
 #include <e32base.h>
@@ -156,15 +156,15 @@
 
 // ---------------------------------------------------------------------------
 // From class MWlanBgScanProvider.
-// CWlanBgScan::WlanSetBgScanState
+// CWlanBgScan::WlanStateChanged
 // ---------------------------------------------------------------------------
 //
-void CWlanBgScan::SetBgScanState( const MWlanBgScanProvider::TWlanBgScanState &aState )
+void CWlanBgScan::WlanStateChanged( const MWlanBgScanProvider::TWlanBgScanWlanState &aState )
     {
-    DEBUG2( "CWlanBgScan::SetBgScanState() - old state: %u, new state: %u", iWlanBgScanState, aState );
+    DEBUG2( "CWlanBgScan::WlanStateChanged() - old state: %u, new state: %u", iWlanState, aState );
     
     // store state
-    iWlanBgScanState = aState;
+    iWlanState = aState;
 
     RefreshUsedInterval();
 
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscanstates.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscanstates.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: 4 %
 */
 
 #include <e32base.h>
@@ -58,7 +58,7 @@
     iIntervalChangeRequestId( 0 ),
     iCompletedAwsCommand( MWlanBgScanAwsComms::EAwsCommandMax ),
     iAwsCommandCompletionCode( KErrNone ),
-    iWlanBgScanState( MWlanBgScanProvider::EWlanBgScanOff )
+    iWlanState( MWlanBgScanProvider::EWlanStateMax )
     {
     DEBUG( "CWlanBgScanStates::CWlanBgScanStates()" );
     }
@@ -837,13 +837,13 @@
     {
     TUint oldInterval = iUsedBgScanInterval;
     
-    DEBUG4( "CWlanBgScanStates::RefreshUsedInterval() - agg: %u, normal: %u, used: %u, bg scan state: %u",
-        iAggressiveBgScanInterval, iBgScanInterval, iUsedBgScanInterval, iWlanBgScanState );
+    DEBUG4( "CWlanBgScanStates::RefreshUsedInterval() - agg: %u, normal: %u, used: %u, wlan state: %u",
+        iAggressiveBgScanInterval, iBgScanInterval, iUsedBgScanInterval, iWlanState );
     
-    // If      ( WLAN BG scanning is OFF )               -> use interval: KWlanNoScanning 
+    // If      ( WLAN state is connected )               -> use interval: KWlanNoScanning 
     // Else If ( aggressive interval < normal interval ) -> use interval: aggressive interval
     // Otherwise                                         -> use interval: background scan interval
-    if( iWlanBgScanState == MWlanBgScanProvider::EWlanBgScanOff )
+    if( iWlanState == MWlanBgScanProvider::EWlanStateConnected )
         {
         iUsedBgScanInterval = KWlanNoScanning;
         }
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanconversionutil.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanconversionutil.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 89 %
+* %version: 86.1.2 %
 */
 
 #include <in_sock.h>
@@ -104,21 +104,6 @@
     }
 
 // ---------------------------------------------------------
-// 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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtframehandler.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -15,9 +15,6 @@
 *
 */
 
-/*
-* %version: 11 %
-*/
 
 // INCLUDE FILES
 #include <e32std.h>
@@ -152,8 +149,7 @@
         {
         DEBUG( "CWlanMgmtFrameHandler::RunL() iDataBlock is not NULL" );
         TDataBuffer* buffer = NULL;
-        TDataBuffer* frameToFree = NULL;
-        while( ( buffer = iServiceProvider.GetRxFrame( frameToFree ) ) != NULL )
+        while( iDataBlock->GetNextRxDataBuffer( buffer ) )
             {
             DEBUG1( "EAPOL packet received, length=%d", 
                     buffer->GetLength() );
@@ -163,8 +159,6 @@
                 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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtimpl.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 34 %
+* %version: 31.1.2 %
 */
 
 // INCLUDE FILES
@@ -530,8 +530,7 @@
 //
 void CWlanMgmtImpl::RunProtectedSetup(
     TRequestStatus& aStatus,
-    const TWlanSsid& aSsid,
-    const TWlanWpsPin& aWpsPin,
+    TUint32 aId,
     CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials )
     {
     TraceDump( INFO_LEVEL, ( _L( "CWlanMgmtImpl::RunProtectedSetup()" ) ) );
@@ -541,7 +540,7 @@
     aStatus = KRequestPending;
     iPendingProtectedSetupStatus = &aStatus;
 
-    iProtectedSetupRequest = new CProtectedSetupRequest( *this, iServer, aSsid, aWpsPin, aCredentials );
+    iProtectedSetupRequest = new CProtectedSetupRequest( *this, iServer, aId, aCredentials );
     if ( !iProtectedSetupRequest )
         {
         User::RequestComplete( iPendingProtectedSetupStatus, KErrNoMemory );
@@ -1211,14 +1210,12 @@
 CProtectedSetupRequest::CProtectedSetupRequest( 
     CWlanMgmtImpl& aCallback, 
     RWLMServer& aServer, 
-    const TWlanSsid& aSsid,
-    const TWlanWpsPin& aWpsPin, 
+    TUint32 aId,
     CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) :
     CActive( CActive::EPriorityStandard ),
     iCallback( aCallback ),
     iServer( aServer ),
-    iSsid( aSsid ),
-    iWpsPin( aWpsPin ),
+    iServiceId( aId ),
     iCredentials ( aCredentials ),
     iCredentialsBuf( iCredentialsStorage )
     {
@@ -1241,7 +1238,7 @@
 void CProtectedSetupRequest::IssueRequest()
     {
     TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::IssueRequest()" ) ) );
-    iServer.RunProtectedSetup( iStatus, iSsid, iWpsPin, iCredentialsBuf );
+    iServer.RunProtectedSetup( iStatus, iServiceId, iCredentialsBuf );
     SetActive();
     }
 
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatform.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatform.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: 12 %
 */
 
 
@@ -195,15 +195,6 @@
     {
     iPlatformData->PublishBgScanInterval( aInterval );
     }
-    
-// ---------------------------------------------------------
-// CWlmPlatform::GetWlanOnOffState
-// ---------------------------------------------------------
-//
-EXPORT_C TWlanOnOffState CWlmPlatform::GetWlanOnOffState()
-    {
-	return iPlatformData->GetWlanOnOffState();
-	}
 
 // ---------------------------------------------------------
 // CWlmPlatform::SystemModeChanged
@@ -345,26 +336,3 @@
     
     iCallback.ClearRegionCache();
     }
-    
-// ---------------------------------------------------------
-// CWlmPlatform::WlanOn
-// ---------------------------------------------------------
-//
-void CWlmPlatform::WlanOn()
-    {
-	DEBUG( "CWlmPlatform::WlanOn()" );
-	
-	iCallback.WlanOn();
-	}
-
-// ---------------------------------------------------------
-// CWlmPlatform::WlanOff
-// ---------------------------------------------------------
-//
-void CWlmPlatform::WlanOff()
-    {
-	DEBUG( "CWlmPlatform::WlanOff()" );
-	
-	iCallback.WlanOff();
-	}
-
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatformdata.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatformdata.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: 12 %
 */
 
 // INCLUDE FILES
@@ -27,7 +27,6 @@
 #include <startupdomainpskeys.h>
 #include <ctsydomainpskeys.h>
 #include "wlaninternalpskeys.h"
-#include "wlandevicesettingsinternalcrkeys.h"
 #include "wlmplatformdata.h"
 #include "am_debug.h"
 
@@ -44,8 +43,7 @@
     iCurrentIcon( EWlmIconStatusNotAvailable ),
     iIsStartupComplete( EFalse ),
     iIsInOffline( EFalse ),
-    iIsEmergencyCall( EFalse ),
-    iNotifiedWlanState( CWlmPlatformData::EWlanNotifiedNone )
+    iIsEmergencyCall( EFalse )
     {
     DEBUG( "CWlmPlatformData::CWlmPlatformData()" );
     }
@@ -78,18 +76,6 @@
         KPSUidCtsyEmergencyCallInfo, KCTSYEmergencyCallInfo );
     iEmergencyCall->IssueRequest();
 
-	// Create subscriber for WLAN master switch
-	iWlanOnOff = CWlmPlatformSubscriber::NewL(
-	    EWlmSubscribeTypeCenRep, *this,
-		KCRUidWlanDeviceSettingsRegistryId, KWlanOnOff );
-	iWlanOnOff->IssueRequest();
-	
-	// Create subscriber for WLAN force disable
-	iWlanForceDisable = CWlmPlatformSubscriber::NewL(
-	    EWlmSubscribeTypeCenRep, *this,
-		KCRUidWlanDeviceSettingsRegistryId, KWlanForceDisable );
-	iWlanForceDisable->IssueRequest();
-
     // Create PubSub property for publishing MAC address
     TInt ret( KErrNone );
     ret = RProperty::Define( KPSWlanMacAddress, KPSWlanMacAddressType,
@@ -120,19 +106,6 @@
         }
     User::LeaveIfError( iPsBgScanInterval.Attach( KPSUidWlan,
         KPSWlanBgScanInterval, EOwnerThread ) );
-    
-    // Create PubSub property for publishing WLAN on/off state
-    ret = RProperty::Define( KPSWlanOnOffState, KPSWlanOnOffStateType,
-        KWlmPSReadPolicy, KWlmPSWritePolicy );
-    if( ret != KErrAlreadyExists )
-        {
-        User::LeaveIfError( ret );
-        }
-    User::LeaveIfError( iPsOnOffState.Attach( KPSUidWlan,
-        KPSWlanOnOffState, EOwnerThread ) );
-    
-    // Publish initial value for WLAN on/off as WLAN OFF
-    PublishWlanOnOff( EPSWlanOff );
     }
 
 // ---------------------------------------------------------
@@ -162,13 +135,9 @@
     RProperty::Delete( KPSUidWlan, KPSWlanMacAddress );
     iPsBgScanInterval.Close();
     RProperty::Delete( KPSUidWlan, KPSWlanBgScanInterval );
-    iPsOnOffState.Close();
-    RProperty::Delete( KPSUidWlan, KPSWlanOnOffState );
     delete iPropertySystemState;
     delete iBtConnections;
-    delete iEmergencyCall;
-    delete iWlanOnOff;
-    delete iWlanForceDisable;    
+    delete iEmergencyCall;    
     }
 
 // ---------------------------------------------------------
@@ -336,11 +305,6 @@
                 }
             }
         }
-    else if( aCategory == KCRUidWlanDeviceSettingsRegistryId ) // WLAN on/off
-        {
-        // Notify WLAN on/off observer
-        NotifyWlanOnOffObserver();
-        }
     }
 
 // ---------------------------------------------------------
@@ -414,9 +378,6 @@
         KPropertyKeyBluetoothGetPHYCount ) );
     TRAP_IGNORE( HandlePropertyChangedL( KPSUidStartup,
         KPSGlobalSystemState ) );
-    // Call NotifyWlanOnOffObserver to inform observer WLAN on/off
-    // state and to get it also published via P&S
-    NotifyWlanOnOffObserver();
     }
 
 // ---------------------------------------------------------
@@ -447,99 +408,3 @@
     
     return iPsBgScanInterval.Set( aInterval );
     }
-
-
-// ---------------------------------------------------------
-// CWlmPlatformData::GetWlanOnOffState
-// Status : Draft
-// ---------------------------------------------------------
-//	
-TWlanOnOffState CWlmPlatformData::GetWlanOnOffState()
-    {
-	DEBUG( "CWlmPlatformData::GetWlanOnOffState()" );
-	
-	TWlanOnOffState wlanState( EWlanOff );
-	
-	// Read WLAN master switch
-	TInt wlanOn( EFalse );
-	iWlanOnOff->Get( wlanOn );
-	
-	// Read WLAN force disable switch
-	TInt wlanForceDisable( EFalse );
-	iWlanForceDisable->Get( wlanForceDisable );
-	
-	DEBUG2( "CWlmPlatformData::GetWlanOnOffState() - WlanOnOff: %d, WlanForceDisable: %d",
-	    wlanOn, wlanForceDisable );
-	
-	// Check first if WLAN is forcibly disabled as it overrides all the other settings
-	if( wlanForceDisable )
-	    {
-		wlanState = EWlanForceOff;
-		}
-	// Check if WLAN master switch is ON
-	else if( wlanOn )
-	    {
-		wlanState = EWlanOn;
-		}
-	
-	DEBUG1( "CWlmPlatformData::GetWlanOnOffState() return value: %d",
-	    wlanState );
-	
-	return wlanState;
-	}
-	
-// ---------------------------------------------------------
-// CWlmPlatformData::NotifyWlanOnOffObserver
-// Status : Draft
-// ---------------------------------------------------------
-//
-void CWlmPlatformData::NotifyWlanOnOffObserver()
-    {
-	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
-	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;
-		PublishWlanOnOff( EPSWlanOn );
-		// Note! P&S write operation return value is not checked
-		DEBUG( "CWlmPlatformData::NotifyWlanOnOffObserver() - WLAN ON notified, P&S updated" );
-		}
-    // WLAN is set OFF
-	else if( iNotifiedWlanState != CWlmPlatformData::EWlanNotifiedOff ) // WLAN OFF not notified yet
-	    {
-		// Notify observer that WLAN is set OFF
-	    iCallback.WlanOff();
-	    iNotifiedWlanState = CWlmPlatformData::EWlanNotifiedOff;
-	    PublishWlanOnOff( EPSWlanOff );
-	    // Note! P&S write operation return value is not checked
-	    DEBUG( "CWlmPlatformData::NotifyWlanOnOffObserver() - WLAN OFF notified, P&S updated" );
-		}
-    }
-
-// ---------------------------------------------------------
-// CWlmPlatformData::PublishWlanOnOff
-// Status : Draft
-// ---------------------------------------------------------
-//
-void CWlmPlatformData::PublishWlanOnOff( TPSWlanOnOff aWlanState )
-    {
-    DEBUG1( "CWlmPlatformData::PublishWlanOnOff( wlanState = %d )",
-        aWlanState );
-
-    TInt err( KErrNone );
-    err = iPsOnOffState.Set( aWlanState );
-    
-    if( err != KErrNone )
-        {
-        DEBUG1( "CWlmPlatformData::PublishWlanOnOff() - ERROR: update failed, err=%d",
-            err );
-        }
-    }
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 111 %
+* %version: 105.1.3 %
 */
 
 #include <e32def.h>
@@ -476,19 +476,6 @@
     {
     DEBUG( "CWlmServer::Connect()" );
 
-    // Check that WLAN is ON
-    TWlanOnOffState wlanState( iPlatform->GetWlanOnOffState() );
-	if( wlanState != EWlanOn )
-	    {
-		// WLAN is OFF
-		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 );
-		
-		return;
-		}
-
     // Get WlanSettings and secondarySSID list
     // (lanServiceId specifies the table row in wlansettings)
     SWLANSettings iapData;
@@ -1856,11 +1843,9 @@
                         iAggressiveScanningAfterLinkLoss = EFalse;
                         }
                     
-					// If WLAN is ON, enable background scanning
-					if( iPlatform->GetWlanOnOffState() == EWlanOn )
-					    {
-                        iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
-                        }
+                    // If background scan is on, this call will cause a background scan to occur.
+					// The icon is updated after the background scan is completed.
+                    iBgScanProvider->WlanStateChanged( MWlanBgScanProvider::EWlanStateDisconnected );
                     
                     break;
                 case EWlanStateInfrastructure:
@@ -2392,7 +2377,7 @@
                 // If background scan is currently on, background scan
                 // will be disabled and it's request will be removed
                 // from the request map.
-                iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOff );
+                iBgScanProvider->WlanStateChanged( MWlanBgScanProvider::EWlanStateConnected );
                 
                 }
             }
@@ -2446,7 +2431,7 @@
         if( IsSessionActive( completedMapEntry ) )
             {
             TPckg<TWlmProtectedSetupCredentials> outPckg( tmp );
-            completedMapEntry.iMessage.Write( 2, outPckg );
+            completedMapEntry.iMessage.Write( 1, outPckg );
             }
 
         if( status == core_error_ok && IsSessionActive( completedMapEntry ) )
@@ -3632,15 +3617,12 @@
     DEBUG1( "CWlmServer::ScanSchedulingTimerExpired() - iRequestId %u", self->iRequestMap[index].iRequestId );
     
     TUint indexNextScan( 0 );
-    // If roaming is ongoing or WLAN is OFF, scanning is not started for
-    // GetScanResults but instead empty scan list is returned. 
-    if ( ( self->iRequestMap[index].iRequestId >= KWlanExtCmdBase && 
-           self->iRequestMap[index].iFunction == EGetScanResults ) && 
-    	 ( self->IsRoaming() || self->iPlatform->GetWlanOnOffState() != EWlanOn ) )
+    // If roaming is ongoing, scanning is not started for GetScanResults. 
+    if ( self->iRequestMap[index].iRequestId >= KWlanExtCmdBase && 
+         self->iRequestMap[index].iFunction == EGetScanResults && 
+    	 self->IsRoaming() )
         {
-        DEBUG2( "CWlmServer::ScanSchedulingTimerExpired() - GetScanResults, returning empty list; roaming: %d, WLAN on/off: %d",
-            self->IsRoaming(),
-            self->iPlatform->GetWlanOnOffState() );
+        DEBUG( "CWlmServer::ScanSchedulingTimerExpired() - GetScanResults, roam in progress, returning empty scan results" );
 
         ScanList* completedScanList = reinterpret_cast<ScanList*>( self->iRequestMap[index].iParam0 );
         core_ssid_s* completedSsid =  reinterpret_cast<core_ssid_s*>( self->iRequestMap[index].iParam1 );
@@ -3657,15 +3639,7 @@
         if( self->IsSessionActive( self->iRequestMap[index] ) )
             {
             self->iRequestMap[index].iMessage.Write( 2, pckgDynamicScanList );
-
-            if( self->iPlatform->GetWlanOnOffState() != EWlanOn )
-                {
-                self->iRequestMap[index].iMessage.Complete( self->iPlatform->GetWlanOnOffState() );
-                }
-            else
-                {
-                self->iRequestMap[index].iMessage.Complete( KErrServerBusy );
-                }
+            self->iRequestMap[index].iMessage.Complete( KErrNone );
             }
 
         delete completedScanList;
@@ -3691,47 +3665,27 @@
     if ( self->iRequestMap[index].iRequestId >= KWlanExtCmdBase && 
          self->iRequestMap[index].iFunction == EGetAvailableIaps )
         {
-        DEBUG( "CWlmServer::ScanSchedulingTimerExpired() - GetAvailableIaps" );
-            
+        DEBUG( "CWlmServer::ScanSchedulingTimerExpired() - GetAvailableIaps requested" );
+
         core_type_list_c<core_iap_data_s>* iapDataList = reinterpret_cast<core_type_list_c<core_iap_data_s>*>( self->iRequestMap[index].iParam0 );
         core_type_list_c<core_iap_availability_data_s>* iapAvailabilityList =
             reinterpret_cast<core_type_list_c<core_iap_availability_data_s>*>( 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 );
         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
-        // WLAN is OFF
+        
+        // If the device is roaming OR there are not WLAN IAPs defined in the device
         // --> return empty list
-        if( self->IsRoaming() ||
-            iapDataList->count() == 0 ||
-            self->iPlatform->GetWlanOnOffState() != EWlanOn )
+        if( self->IsRoaming() || iapDataList->count() == 0 )
             {
-            DEBUG3( "CWlmServer::ScanSchedulingTimerExpired() - GetAvailableIaps, returning empty list; roaming: %d, iaps: %d, WLAN on/off: %d",
-                self->IsRoaming(),
-                iapDataList->count(),
-                self->iPlatform->GetWlanOnOffState() );    
-            
+            DEBUG( "CWlmServer::ScanSchedulingTimerExpired() - Device is roaming or no IAPs defined, returning empty list" );
             // Only the triggering request is completed and then scan scheduling timer is set again 
             if( self->IsSessionActive( self->iRequestMap[index] ) )
                 {
                 TWlmAvailableIaps tmp = { 0 };
                 TPckg<TWlmAvailableIaps> outPckg( tmp );
                 self->iRequestMap[index].iMessage.Write( 0, outPckg );
-
-                if( self->iPlatform->GetWlanOnOffState() != EWlanOn )
-                    {
-                    self->iRequestMap[index].iMessage.Complete( self->iPlatform->GetWlanOnOffState() );
-                    }
-                else if( iapDataList->count() == 0 )
-                    {
-                    self->iRequestMap[index].iMessage.Complete( KErrNone );
-                    }
-                else
-                    {
-                    self->iRequestMap[index].iMessage.Complete( KErrServerBusy );
-                    }
+                self->iRequestMap[index].iMessage.Complete( KErrNone );
                 }
 
             delete iapDataList;
@@ -4516,58 +4470,39 @@
     {
     DEBUG( "CWlmServer::RunProtectedSetup()" );
     
-    // Check that WLAN is ON
-	TWlanOnOffState wlanState( iPlatform->GetWlanOnOffState() );
-	if( wlanState != EWlanOn )
-	    {
-		// WLAN is OFF and therefore request is not served.
-		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;
-		}
-        
-    TPckgBuf<TWlanSsid> ssidPckg;
-    TInt ret( aMessage.Read( 0, ssidPckg ) );
-    if( ret != KErrNone )
+    // 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 )
         {
-        aMessage.Complete( ret );
+        DEBUG1( "CWlmServer::RunProtectedSetup() - GetIapSettingsL leaved with %d",
+            err );
+        secondarySsidList.Close();
+        aMessage.Complete( err );
         return;
         }
-    
-    TPckgBuf<TWlanWpsPin> wpsPinPckg;
-    ret = aMessage.Read( 1, wpsPinPckg );
-    if( ret != KErrNone )
-        {
-        aMessage.Complete( ret );
-        return;
-        }
-    
+    secondarySsidList.Close();
+
+    // Type conversion
     core_iap_data_s* coreIapData = new core_iap_data_s;
     if( !coreIapData )
         {
         aMessage.Complete( KErrNoMemory );
         return;
         }
-    
-    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.  
+
+    TWLMOverrideSettings override = { 0 };
+    TWlanConversionUtil::ConvertIapSettings(
+        *coreIapData, 
+        iapData, 
+        ETrue, // dhcp usage is not important here
+        override );
+
+
+    // 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 )
         {
@@ -5156,12 +5091,6 @@
      */
     UpdateWlanSettings();
 
-    // If WLAN is set ON, enable background scanning
-    if( iPlatform->GetWlanOnOffState() == EWlanOn )
-        {
-        iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
-        }
-
     iPlatform->InitializeSystemTimeHandler();
     }
 
@@ -5372,88 +5301,3 @@
     iPlatform->PublishBgScanInterval( aInterval );
     }
     
-// ---------------------------------------------------------
-// CWlmServer::WlanOn
-// ---------------------------------------------------------
-//
-void CWlmServer::WlanOn()
-    {
-	DEBUG( "CWlmServer::WlanOn()" );
-	
-	// BG scan can be set ON only after BG scan interval has been
-	// set and that does not happen until startup has been
-	// completed.
-	if( iIsStartupComplete )
-	    {
-	    // Enable background scanning
-	    iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
-	    }
-	}
-
-// ---------------------------------------------------------
-// CWlmServer::WlanOff
-// ---------------------------------------------------------
-//
-void CWlmServer::WlanOff()
-    {
-	DEBUG1( "CWlmServer::WlanOff() - ConnectionState=%d",
-	    iConnectionState );
-	
-	// Disable background scanning
-	iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOff );
-	
-	// Cancel all running operations that are forbidden in WLAN OFF
-    CancelExternalRequestsByType( ERunProtectedSetup );
-    CancelExternalRequestsByType( EJoinByProfileId );
-    
-	// If WLAN is connected...
-    if( iConnectionState != EWlanStateNotConnected )
-        {
-        //...send out disconnected indication, which brings down
-        // the connection gracefully
-        TBuf8<KMaxNotificationLength> buf;
-        buf.Append( static_cast<u8_t>( EWlanStateNotConnected ) );
-        SendNotification( EWlmNotifyConnectionStateChanged, buf );
-        }
-	}
-    
-// ---------------------------------------------------------
-// CWlmServer::CancelRequestsByType
-// ---------------------------------------------------------
-//
-void CWlmServer::CancelExternalRequestsByType(
-    const TWLMCommands aCommand )
-    {
-    DEBUG1( "CWlmServer::CancelExternalRequestsByType( aCommand=%u )", aCommand );
-
-    // Go through request map and cancel the command given as a parameter
-    for( TInt i( 0 ); i < iRequestMap.Count(); i++ )
-        {
-        if( iRequestMap[i].iFunction == aCommand )
-            {
-            DEBUG1( "CWlmServer::CancelExternalRequestsByType() - request found (id=%u), cancelling",
-                iRequestMap[i].iRequestId );
-            
-            iCoreServer->cancel_request( iRequestMap[i].iRequestId );
-            }
-        }
-    }
-
-// ---------------------------------------------------------
-// CWlmServer::SendNotification
-// ---------------------------------------------------------
-//
-void CWlmServer::SendNotification(
-    TWlmNotify amNotification,
-    TBuf8<KMaxNotificationLength>& aParams )
-    {
-    DEBUG1( "CWlmServer::SendNotification( notification=%u )",
-        amNotification );
-    
-    // Notify subscribees
-    for ( TInt i = 0; i < iNotificationArray.Count(); i++ )
-        {
-        iNotificationArray[i]->AddNotification( amNotification, aParams );
-        }
-    }
- 
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2009 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: 17 %
 */
 
 #ifndef WLANMANAGEMENTSIDEUMACB_H
@@ -112,7 +112,7 @@
     * @param aNumOfBuffers number of meta header pointers in the array
     */
     virtual void MgmtDataReceiveComplete( 
-        TDataBuffer*& aBufferStart, 
+        const TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacProtocolStackSideUmacCb.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacProtocolStackSideUmacCb.h	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2009 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: 14 %
 */
 
 #ifndef WLANPROTOCOLSTACKSIDEUMACCB_H
@@ -101,7 +101,7 @@
     *         EFalse otherwise
     */
     virtual TBool ProtocolStackDataReceiveComplete( 
-        TDataBuffer*& aBufferStart, 
+        const TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 99 %
+* %version: 96.1.2 %
 */
 
 #include "config.h"
@@ -658,8 +658,8 @@
     TUint nbrOfpacketsForMgmtClient ( 0 );
     const TUint KMaxNbrOfPacketsForUsr ( 30 );
     const TUint KMaxNbrOfPacketsForMgmtClient ( 10 );
-    TDataBuffer* packetsForUsr[KMaxNbrOfPacketsForUsr];
-    TDataBuffer* packetsForMgmtClient[KMaxNbrOfPacketsForMgmtClient];
+    const TDataBuffer* packetsForUsr[KMaxNbrOfPacketsForUsr];
+    const 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,7 +1006,8 @@
             - aBuffer );                              // buffer beginning
         
         // complete
-        aCtxImpl.iUmac.MgmtDataReceiveComplete( metaHdr, 1 );
+        const TDataBuffer* KMetaHdr ( metaHdr );
+        aCtxImpl.iUmac.MgmtDataReceiveComplete( KMetaHdr, 1 );
         }
     else
         {
@@ -1368,7 +1369,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 trailer on this sw layer. It is
+         // no space is reserved for security header on this sw layer. It is
          // done on lower layers; when necessary.
          ( aCtxImpl.WHASettings().iCapability & 
            WHA::SSettings::KNoSecHdrAndTrailer ) )
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 90 %
+* %version: 86.1.3 %
 */
 
 #include "config.h"
@@ -2684,7 +2684,8 @@
             - aBuffer );                              // buffer beginning
                     
         // complete
-        aCtxImpl.iUmac.MgmtDataReceiveComplete( metaHdr, 1 );
+        const TDataBuffer* KMetaHdr ( metaHdr );
+        aCtxImpl.iUmac.MgmtDataReceiveComplete( KMetaHdr, 1 );
         }
     else
         {
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2009 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: 20 %
+* %version: 19 %
 */
 
 #include "config.h"
@@ -121,7 +121,7 @@
 // ---------------------------------------------------------------------------
 //
 void WlanManagementSideUmacCb::MgmtDataReceiveComplete( 
-    TDataBuffer*& aBufferStart, 
+    const TDataBuffer*& aBufferStart, 
     TUint32 aNumOfBuffers )
     {
     if ( iSelf )
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacProtocolStackSideUmacCb.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacProtocolStackSideUmacCb.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2009 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: 12 %
 */
 
 #include "config.h"
@@ -87,7 +87,7 @@
 // -----------------------------------------------------------------------------
 //
 TBool WlanProtocolStackSideUmacCb::ProtocolStackDataReceiveComplete( 
-    TDataBuffer*& aBufferStart, 
+    const TDataBuffer*& aBufferStart, 
     TUint32 aNumOfBuffers )
     {
     TBool status ( EFalse );
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/group/bld.inf	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/group/bld.inf	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2009 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,13 +16,13 @@
 */
 
 /*
-* %version: 29 %
+* %version: 28 %
 */
 
 #include <platform_paths.hrh>
 
 PRJ_PLATFORMS
-BASEDEFAULT
+DEFAULT
 
 PRJ_MMPFILES
 
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: 12 %
 */
 
 #ifndef DATAFRAMEMMNGR_H
@@ -42,7 +42,6 @@
         TInt aTxFrameBufAllocationUnit ) : 
         DEthernetFrameMemMngr( aParent, aRxFrameMemoryPool ),
         iFrameXferBlockProtoStack( NULL ),
-        iUserToKernAddrOffset( 0 ),
         iTxDataChunk( NULL ),
         iTxFrameMemoryPool( NULL ),
         iTxFrameBufAllocationUnit ( aTxFrameBufAllocationUnit )
@@ -86,87 +85,52 @@
     *         EFalse otherwise
     */
     virtual TBool DoEthernetFrameRxComplete( 
-        TDataBuffer*& aBufferStart, 
+        const TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
     * From DEthernetFrameMemMngr
-    * To be called when user mode client issues a frame Rx request
+    * Gets start address of Rx buffers (their offset addresses)
+    * that are waiting for completion to user mode
     *
-    * @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
+    * @since S60 3.1
+    * @return see above
     */
-    virtual TBool OnReadRequest();
-    
+    virtual TUint32* DoGetTobeCompletedBuffersStart();
+
     /**
-     * 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
+    * Gets start address of Rx buffers (their offset addresses)
+    * that have been completed to user mode
+    *
+    * @since S60 3.1
+    * @return see above
+    */
+    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
      * Allocates a Tx packet from the shared memory.
      * 
      * @param aLength Length of the requested Tx buffer in bytes
-     * @return User space pointer to the meta header attached to the 
-     *         allocated packet, on success.
+     * @return 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
@@ -174,27 +138,7 @@
      * 
      * @param aPacket Meta header of the packet to the deallocated
      */ 
-    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;
+    virtual void FreeTxPacket( TDataBuffer*& aPacket );    
     
 private:
 
@@ -213,14 +157,20 @@
     
 private:    // Data
 
-    /** kernel address of frame xfer block */
-    RFrameXferBlockProtocolStack* iFrameXferBlockProtoStack;
-    
     /** 
-    * the offset from a User space address to the corresponding address
-    * in the Kernel space in the shared memory chunk. May also be negative 
+    * 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
     */
-    TInt32 iUserToKernAddrOffset;
+    TUint32 iTobeCompletedBuffers[KMaxToBeCompletedRxBufs];
+
+    /** 
+    * array of TDataBuffer offset addresses, denoting Rx buffers, that are
+    * currently under processing in user mode
+    */
+    TUint32 iCompletedBuffers[KMaxCompletedRxBufs];
+    
+    RFrameXferBlockProtocolStack* iFrameXferBlockProtoStack;
     
     /** 
     * pointer to protocol stack side Tx area start in the kernel address 
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.h	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2009 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: 12 %
 */
 
 #if !defined(__ETHERAPI_H__)
@@ -69,7 +69,6 @@
 	    {
 	    EControlFastAllocTxBuffer = 0x0F000000,
 	    EControlFastAddTxFrame,
-	    EControlFastGetRxFrame
 	    };
 	
 public:
@@ -120,9 +119,12 @@
     * 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();
+    inline TInt InitialiseBuffers( 
+        RFrameXferBlockProtocolStack*& aFrameXferBlock );
 
     /**
     * Unmap memory mapped by InitiliazeBuffers method from the client 
@@ -181,21 +183,6 @@
 	 */
 	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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2009 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: 9 %
 */
 
 // ---------------------------------------------------------------------------
@@ -78,9 +78,11 @@
 // 
 // ---------------------------------------------------------------------------
 //
-inline TInt RPcmNetCardIf::InitialiseBuffers()
+inline TInt RPcmNetCardIf::InitialiseBuffers( 
+    RFrameXferBlockProtocolStack*& aFrameXferBlock )
     {
     TInt status ( KErrNone );
+    
     TSharedChunkInfo info;
     
     status = DoSvControl( 
@@ -107,17 +109,25 @@
                 + sizeof( RFrameXferBlock ) 
                 + sizeof( RFrameXferBlockProtocolStack ) ) );
 
-        RFrameXferBlockProtocolStack* frameXferBlock = 
-            reinterpret_cast<RFrameXferBlockProtocolStack*>(
-                baseAddress
-                + KRxDataChunkSize
-                + sizeof( TDataBuffer )
-                + KMgmtSideTxBufferLength
-                + KProtocolStackSideTxDataChunkSize
-                + sizeof( RFrameXferBlock ) );
+        aFrameXferBlock = reinterpret_cast<RFrameXferBlockProtocolStack*>(
+            baseAddress
+            + KRxDataChunkSize
+            + sizeof( TDataBuffer )
+            + KMgmtSideTxBufferLength
+            + KProtocolStackSideTxDataChunkSize
+            + sizeof( RFrameXferBlock ) );
 
-        frameXferBlock->UserInitialize( 
-            reinterpret_cast<TUint32>(frameXferBlock) );
+        aFrameXferBlock->SetRxDataChunkField( reinterpret_cast<TLinAddr>(
+            baseAddress) );
+
+        aFrameXferBlock->SetTxDataBufferField( reinterpret_cast<TLinAddr>(
+            baseAddress
+            + KRxDataChunkSize
+            + sizeof( TDataBuffer )
+            + KMgmtSideTxBufferLength) );
+        
+        aFrameXferBlock->UserInitialize( 
+            reinterpret_cast<TUint32>(aFrameXferBlock) );
         }
     
     return status;
@@ -174,14 +184,3 @@
         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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EthernetFrameMemMngr.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19 %
+* %version: 18 %
 */
 
 #ifndef DETHERNETFRAMEMEMMNGR_H
@@ -35,6 +35,11 @@
 /**
 * 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
@@ -89,9 +94,9 @@
     *
     * @since S60 3.1
     * @return memory block that can be used for tx frame write, 
-    *         NULL upon failure
+    * NULL upon failure
     */
-    virtual TDataBuffer* OnWriteEthernetFrame() const;
+    TDataBuffer* OnWriteEthernetFrame() const;
 
     /**
     * Gets a memory block that can be used as rx frame buffer
@@ -118,14 +123,6 @@
     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
@@ -137,35 +134,19 @@
     *         EFalse otherwise
     */
     TBool OnEthernetFrameRxComplete( 
-        TDataBuffer*& aBufferStart, 
+        const TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
-    * To be called when user mode client issues a frame Rx request
+    * To be called when user mode issues a rx frame read request
     *
     * @since S60 3.1
-    * @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
+    * @return ETrue if callee should complete the request immediadly 
+    * as their exist data to be completed, EFalse otherwise
     */
-    virtual TBool OnReadRequest() = 0;
+    TBool OnReadRequest();
 
     /**
-     * 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
@@ -177,8 +158,8 @@
      * Allocates a Tx packet from the shared memory.
      * 
      * @param aLength Length of the requested Tx buffer in bytes
-     * @return User space pointer to the meta header attached to the 
-     *         allocated packet, on success.
+     * @return Pointer to the meta header attached to the allocated packet, on
+     *         success.
      *         NULL, in case of failure.
      */
     virtual TDataBuffer* AllocTxBuffer( TUint aLength );
@@ -200,7 +181,7 @@
      *         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( 
+    TBool AddTxFrame( 
         TDataBuffer* aPacketInUserSpace, 
         TDataBuffer*& aPacketInKernSpace,
         TBool aUserDataTxEnabled );
@@ -217,7 +198,7 @@
      *         NULL, if there's no frame that could be transmitted, given the
      *         current status of the WHA Tx queues
      */ 
-    virtual TDataBuffer* GetTxFrame( 
+    TDataBuffer* GetTxFrame( 
         const TWhaTxQueueState& aTxQueueState,
         TBool& aMore );
     
@@ -239,7 +220,7 @@
      * @return ETrue if Tx should be resumed
      *         EFalse otherwise
      */
-    virtual TBool ResumeClientTx( TBool aUserDataTxEnabled ) const;
+    TBool ResumeClientTx( TBool aUserDataTxEnabled ) const;
     
     /** 
      * Determines if all protocol stack side client's Tx queues are empty
@@ -247,7 +228,7 @@
      * @return ETrue if all Tx queues are empty
      *         EFalse otherwise
      */
-    virtual TBool AllTxQueuesEmpty() const;
+    TBool AllTxQueuesEmpty() const;
     
     /**
     * Static creator of the class instance
@@ -291,7 +272,10 @@
         DWlanLogicalChannel& aParent, 
         WlanChunk*& aRxFrameMemoryPool ) :
         iReadStatus( ENotPending ), 
-        iFrameXferBlockBase( NULL ),
+        iFrameXferBlock( NULL ), 
+        iCountCompleted( 0 ), 
+        iCountTobeCompleted( 0 ),
+        iTxDataBuffer( NULL ), 
         iRxDataChunk( NULL ),
         iParent( aParent ),
         iRxFrameMemoryPool( aRxFrameMemoryPool ),
@@ -350,10 +334,37 @@
     *         EFalse otherwise
     */
     virtual TBool DoEthernetFrameRxComplete( 
-        TDataBuffer*& aBufferStart, 
+        const 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
     */
@@ -388,8 +399,22 @@
     /** state  of the rx frame read request */
     TFrameReadState    iReadStatus;
 
-    /** kernel address of xfer block; as base class pointer */
-    RFrameXferBlockBase* iFrameXferBlockBase;
+    /** 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;
 
     /** pointer to Rx area start in the kernel address space */
     TUint8*             iRxDataChunk;
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/FrameXferBlock.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/FrameXferBlock.h	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2009 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: 26 %
+* %version: 25 %
 */
 
 #ifndef FRAMEXFERBLOCK_H
@@ -27,6 +27,11 @@
 #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
@@ -127,7 +132,7 @@
 
 public:
 
-    typedef TUint16 TFrameType;
+    typedef TUint32 TFrameType;
 
     /** ethernet II frame */
     static const TFrameType KEthernetFrame      = 0;
@@ -224,7 +229,7 @@
     inline TUint8 UserPriority() const;
 
     /**
-    * Gets the RCPI value of the Rx frame
+    * Gets the RCPI value of a received frame
     *
     * @since S60 3.2
     * @return RCPI value
@@ -333,15 +338,14 @@
     /** Default Ctor */
     TDataBuffer() :
         iFrameType( KEthernetFrame ), 
+        iLength( 0 ), 
         iUp( 0 ), 
         iRcpi( 0 ),
-        iLength( 0 ), 
         iDestinationAddress( KZeroMacAddr ),
         iBufLength( 0 ),
         iOffsetToFrameBeginning( 0 ),
         iBufferOffsetAddr( sizeof( TDataBuffer ) ),
-        iFlags( 0 ),
-        iNext( NULL )
+        iFlags( 0 )
         {};
 
     /**
@@ -391,19 +395,23 @@
     /** type of the frame in buffer */
     TFrameType iFrameType;
         
+    /** 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
     */
-    TUint8 iUp;
+    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
     */
-    TUint8 iRcpi;
+    TUint32 iRcpi;
 
-    /** length of the data in buffer */
-    TUint32 iLength;
-    
     /** 
     * Destination address of the frame to be transmitted. Used only when
     * the address cannot be determined from the frame content  
@@ -428,9 +436,6 @@
     /** 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. 
@@ -685,22 +690,68 @@
 
 #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
     //////////////////////////////////////////////////////////////////////////
 
-    /** 
-     * 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 );
-    
+    /**
+    * 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 );
+
 #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
@@ -712,17 +763,8 @@
     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:
     
     /**
@@ -746,20 +788,39 @@
     
 protected:    // Data
 
-    /** Address of this object instance in the kernel mode address space */
-    TUint32 iThisAddrKernelSpace;
-    
+    /** 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
+    */
+    TUint32         iNumOfCompleted;
+
+    /**
+    * index to iRxCompletedBuffers denoting the Rx buffer that is to be
+    * extracted next by the user application
+    */
+    TUint32         iCurrentRxBuffer;
+
     /** 
-    * the offset from a User space address to the corresponding address
-    * in the Kernel space in the shared memory chunk. May also be negative 
+    * 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
     */
-    TInt32 iUserToKernAddrOffset;
-
+    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
@@ -768,32 +829,41 @@
 
 #ifndef __KERNEL_MODE__ /* User mode */
 
-// -----------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
 // 
-// -----------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
 //
-inline void RFrameXferBlockBase::UserInitialize( 
-    TUint32 aThisAddrUserSpace)
+inline TBool RFrameXferBlockBase::GetNextRxDataBuffer( TDataBuffer*& aBuf )
     {
-    iUserToKernAddrOffset = iThisAddrKernelSpace - 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); 
     }
 
 #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
@@ -823,7 +893,6 @@
     * @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, 
@@ -855,40 +924,12 @@
 #ifdef __KERNEL_MODE__ /* Kernel mode */
     
     /**
-    * Initializes Kernel side memory interface to shared memory between User
-    * and Kernel Space.
+    * Initialises the buffer.
     *
     *  @param 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 );
+    inline void Initialize( TUint32 aTxBufLength );
     
-    /**
-     * 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:
@@ -903,20 +944,14 @@
     
 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;
-    
-    /** 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;    
+    TUint32         iTxBufLength;
     };
 
 #ifndef __KERNEL_MODE__ /* User mode */
@@ -933,46 +968,39 @@
     TBool aMustNotBeEncrypted,
     const TMacAddress* aDestinationAddress )
     {
-    if ( iTxDataBuffer )
+    if ( aLength <= 
+        iTxBufLength - 
+        iTxOffset[aFrameType] - 
+        iTxDataBuffer->GetLength() )
         {
-        if ( aLength <= 
-            iTxBufLength - 
-            iTxOffset[aFrameType] - 
-            iTxDataBuffer->GetLength() )
+        // provided data fits into buffer
+        
+        iTxDataBuffer->FrameType( aFrameType );
+        iTxDataBuffer->AppendBuffer( aData, aLength, iTxOffset[aFrameType] );
+        iTxDataBuffer->SetUserPriority( aUserPriority );
+
+        if ( aMustNotBeEncrypted )
             {
-            // 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;
+            iTxDataBuffer->KeSetFlags( 
+                TDataBuffer::KTxFrameMustNotBeEncrypted );
             }
         else
             {
-            return KErrOverflow;        
+            iTxDataBuffer->KeClearFlags( 
+                TDataBuffer::KTxFrameMustNotBeEncrypted );
             }
+
+        if ( aDestinationAddress )
+            {
+            iTxDataBuffer->SetDestinationAddress( *aDestinationAddress );
+            }
+        
+        return KErrNone;
         }
     else
         {
-        return KErrNoMemory;
-        }
+        return KErrOverflow;        
+        }    
     }
 
 // ---------------------------------------------------------------------------
@@ -981,10 +1009,7 @@
 //
 inline void RFrameXferBlock::ClearTxDataBuffer()
     {
-    if ( iTxDataBuffer )
-        {
-        iTxDataBuffer->SetLength( 0 );
-        }
+    iTxDataBuffer->SetLength( 0 );
     }
 
 // ---------------------------------------------------------------------------
@@ -998,32 +1023,59 @@
 
 #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 RFrameXferBlockBase
+class RFrameXferBlockProtocolStack : public RFrameXferBlock
     {
 
 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 */
     
     /**
-     * Initializes Kernel side memory interface to shared memory between User
+     * Initialises Kernel's memory interface to shared memory between User
      * and Kernel Space.
      */ 
-    void Initialize();
+    void Initialise();
     
     /**
      * Allocates a Tx buffer from the shared memory.
      * 
-     * @param aTxBuf Kernel space pointer to the pre-allocated actual Tx buffer
+     * @param aTxBuf Pointer to the pre-allocated actual Tx buffer.
      * @param aBufLength Length of the Tx buffer.
-     * @return User space pointer to the meta header attached to the 
-     *         allocated buffer, on success.
+     * @return 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 );
@@ -1093,35 +1145,7 @@
      *         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:
@@ -1179,30 +1203,18 @@
     /** Tx frame meta header objects */
     TDataBuffer iDataBuffers[KTxPoolSizeInPackets];
     
-    /** 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 user mode address space */
+    TUint32 iThisAddrUserSpace;
     
-    /** 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;
+    /** Address of this object instance in the kernel mode address space */
+    TUint32 iThisAddrKernelSpace;
     
-    /** 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;
-    
+    /** 
+    * 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;
+
     /**
     * Note! The length of this object needs to be divisible by 4 to make
     * the objects following it to be aligned correctly
@@ -1210,28 +1222,38 @@
     };
 
 
+#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 )
     {
-    if ( aPacket )
-        {
-        aPacket->SetLength( 0 );
-        aPacket->SetUserPriority( 0 );
-        // put the packet to the Free Queue
-        iFreeQueue.PutPacket( aPacket );
-        aPacket = NULL;
-        }
+    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
@@ -1242,25 +1264,6 @@
              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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/MgmtFrameMemMngr.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 16 %
+* %version: 15 %
 */
 
 #ifndef MGMTFRAMEMMNGR_H
@@ -44,9 +44,6 @@
         TBool aUseCachedMemory,
         TInt aRxFrameBufAllocationUnit ) : 
         DEthernetFrameMemMngr( aParent, aRxFrameMemoryPool ),
-        iFrameXferBlock( NULL ),
-        iChunkKernelAddr( 0 ),
-        iTxDataBuffer( NULL ),
         iUseCachedMemory( aUseCachedMemory ),
         iRxFrameBufAllocationUnit ( aRxFrameBufAllocationUnit ),
         iChunkSize( 
@@ -55,11 +52,7 @@
         {};
 
     /** Dtor */
-    virtual ~MgmtFrameMemMngr()
-        {
-        iFrameXferBlock = NULL;
-        iTxDataBuffer = NULL;
-        };
+    virtual ~MgmtFrameMemMngr() {};
 
 protected:
 
@@ -114,55 +107,51 @@
     *         EFalse otherwise
     */
     virtual TBool DoEthernetFrameRxComplete( 
-        TDataBuffer*& aBufferStart, 
+        const 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
@@ -182,20 +171,27 @@
     // 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;
 
-    /** kernel address of Tx data buffer */
-    TDataBuffer* iTxDataBuffer;
+    /** 
+    * 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];
 
     /** 
     * ETrue if cached frame transfer memory shall be used,
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19 %
+* %version: 18.1.1 %
 */
 
 #ifndef RWLAN_LOGICAL_CHANNEL_H_
@@ -29,6 +29,15 @@
 #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 
 	{
@@ -46,42 +55,23 @@
     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.
       *
@@ -163,7 +153,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 );
@@ -204,20 +194,6 @@
       */
     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 );
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 17.1.1 %
 */
 
 // -----------------------------------------------------------------------------
@@ -220,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;
@@ -262,15 +262,3 @@
     {
     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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/WlanLogicalChannel.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 33 %
+* %version: 32 %
 */
 
 #ifndef DWLANLOGICALCHANNEL_H
@@ -139,38 +139,18 @@
 	
     /**
      * 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* aParam );
+	virtual TAny* DoControlFast( TInt aFunction, TAny* param );
 	
 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
@@ -210,7 +190,7 @@
     * @param aNumOfBuffers number of meta header pointers in the array
     */
     virtual void MgmtDataReceiveComplete( 
-        TDataBuffer*& aBufferStart, 
+        const TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
@@ -276,7 +256,7 @@
     *         EFalse otherwise
     */
     virtual TBool ProtocolStackDataReceiveComplete( 
-        TDataBuffer*& aBufferStart, 
+        const TDataBuffer*& aBufferStart, 
         TUint32 aNumOfBuffers );
 
     /**
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddlogicalchannelbase.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddlogicalchannelbase.h	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* 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 the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 3 %
+* %version: 2 %
 */
 
 #ifndef D_WLANLOGICALCHANNELBASE_H
@@ -26,9 +26,8 @@
 
 /**
 * 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 or in the context of the client thread in supervisor 
-* mode
+* which user-side client requests are executed in the context of a single 
+* kernel-side thread.
 *
 *  @since S60 v5.1
 */
@@ -74,9 +73,9 @@
   
     /**
      * Process a function for this logical channel.
-     * 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.
+     * 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.
@@ -98,7 +97,7 @@
          * The smallest Fast Control Function ID that DoControlFast()
          * accepts.
          */
-        EMinControlFast = static_cast<TInt>(0x0E000000),
+        EMinControlFast = static_cast<TInt>(0x0F000000),
         
         /**
          * The largest Fast Control Function ID that DoControlFast()
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/DataFrameMemMngr.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/DataFrameMemMngr.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19 %
+* %version: 18 %
 */
 
 #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 = 
-                    reinterpret_cast<RFrameXferBlockProtocolStack*>(
-                        start_of_mem  
-                        + KRxDataChunkSize 
-                        + sizeof( TDataBuffer ) 
-                        + KMgmtSideTxBufferLength
-                        + KProtocolStackSideTxDataChunkSize
-                        + sizeof( RFrameXferBlock ) );
-
-                iFrameXferBlockBase = iFrameXferBlockProtoStack;
+                    static_cast<RFrameXferBlockProtocolStack*>(iFrameXferBlock);
                 
                 TraceDump( INIT_LEVEL, 
                     (("WLANLDD: DataFrameMemMngr::DoOpenHandle: Nif RFrameXferBlock addr: 0x%08x"),
                     reinterpret_cast<TUint32>(iFrameXferBlockProtoStack) ) );
     
                 // initiliase xfer block
-                iFrameXferBlockProtoStack->Initialize();
+                iFrameXferBlockProtoStack->Initialise();
                 
                 iRxBufAlignmentPadding = iParent.RxBufAlignmentPadding();
                 
@@ -175,103 +175,197 @@
 // 
 // ---------------------------------------------------------------------------
 //
+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( 
-    TDataBuffer*& aBufferStart, 
+    const 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 );
-    TDataBuffer** metaHdrPtrArray(&aBufferStart);
 
-    if ( iFrameXferBlockProtoStack )
+    if ( iReadStatus == EPending )
         {
-        for ( TUint i = 0; i < aNumOfBuffers; ++i )
+        // 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
             {
-            if ( metaHdrPtrArray[i] )
+            // 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 );
+
+            // 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 )
                 {
-                iFrameXferBlockProtoStack->AddRxFrame( 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]) );
                 }
+
+            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]) );        
             }
         
-        if ( iReadStatus == EPending )
-            {
-            ret = ETrue;
-            }
+        iCountTobeCompleted += aNumOfBuffers;
         }
+    
+    TraceDump( RX_FRAME, 
+        (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: end: iCountCompleted: %d"), 
+        iCountCompleted) );
+
+    TraceDump( RX_FRAME, 
+        (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: end: iCountTobeCompleted: %d"), 
+        iCountTobeCompleted) );
 
     return ret;
     }
 
 // ---------------------------------------------------------------------------
-//   
+// 
 // ---------------------------------------------------------------------------
 //
-TBool DataFrameMemMngr::OnReadRequest()
+TUint32* DataFrameMemMngr::DoGetTobeCompletedBuffersStart()
     {
-    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;
+    return iTobeCompletedBuffers;
     }
 
 // ---------------------------------------------------------------------------
-// Note! This method is executed in the context of the user mode client 
-// thread, but in supervisor mode
+// 
 // ---------------------------------------------------------------------------
 //
-TDataBuffer* DataFrameMemMngr::GetRxFrame( 
-    TDataBuffer* aFrameToFreeInUserSpace )
+TUint32* DataFrameMemMngr::DoGetCompletedBuffersStart()
     {
-    TDataBuffer* rxFrame( NULL );
-    
-    if ( IsMemInUse() && iFrameXferBlockProtoStack )
-        {
-        if ( aFrameToFreeInUserSpace )
-            {            
-            FreeRxPacket( aFrameToFreeInUserSpace );
-            }
-        
-        rxFrame = iFrameXferBlockProtoStack->GetRxFrame();
-        }
-        
-    return rxFrame;
+    return iCompletedBuffers;
     }
 
 // ---------------------------------------------------------------------------
-// Note! This method is executed in the context of the user mode client 
-// thread, but in supervisor mode
+// 
 // ---------------------------------------------------------------------------
 //
 TDataBuffer* DataFrameMemMngr::AllocTxBuffer( TUint aLength )
@@ -282,10 +376,7 @@
     
     TDataBuffer* metaHdr ( NULL );
 
-    if ( ( !IsMemInUse() ) ||
-         ( !iTxFrameMemoryPool ) ||
-         ( !iFrameXferBlockProtoStack ) ||
-         ( aLength > KMaxEthernetFrameLength ) )
+    if ( ( !IsMemInUse() ) || ( aLength > KMaxEthernetFrameLength ) )
         {
 #ifndef NDEBUG
         TraceDump( NWSA_TX_DETAILS, 
@@ -332,66 +423,17 @@
     }
 
 // ---------------------------------------------------------------------------
-// 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 ( aPacket )
+    if ( IsMemInUse() )
         {
-        if ( iTxFrameMemoryPool )
-            {
-            // free the actual Tx buffer
-            iTxFrameMemoryPool->Free( aPacket->KeGetBufferStart() );
-            }
-        
-        if ( iFrameXferBlockProtoStack )
-            {
-            // free the meta header
-            iFrameXferBlockProtoStack->FreeTxPacket( aPacket );
-            }
+        // free the actual Tx buffer
+        iTxFrameMemoryPool->Free( aPacket->KeGetBufferStart() );
+        // free the meta header
+        iFrameXferBlockProtoStack->FreeTxPacket( aPacket );
         }
     }
 
@@ -399,39 +441,6 @@
 // 
 // ---------------------------------------------------------------------------
 //
-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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 25 %
+* %version: 24 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -170,7 +170,8 @@
     {
     MarkMemFree();
     
-    iFrameXferBlockBase = NULL;
+    iFrameXferBlock = NULL;
+    iTxDataBuffer = NULL;
     iRxDataChunk = NULL;
     }
 
@@ -180,11 +181,79 @@
 //
 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;
     }
 
 // ---------------------------------------------------------------------------
@@ -196,9 +265,9 @@
     TUint32 aDot11FrameTxOffset,
     TUint32 aSnapFrameTxOffset )
     {
-    if ( IsMemInUse() && iFrameXferBlockBase )
+    if ( IsMemInUse() )
         {
-        iFrameXferBlockBase->KeSetTxOffsets(
+        iFrameXferBlock->KeSetTxOffsets(
             aEthernetFrameTxOffset,
             aDot11FrameTxOffset,
             aSnapFrameTxOffset );
@@ -221,7 +290,7 @@
     else
         {
         // we are trying to acquire an Rx buffer but our user mode client 
-        // has not asked for the memory buffer pool to be initialized. In this
+        // has not asked for the memorybuffer pool to be initialized. In this
         // case NULL is returned, as no buffers are available
          TraceDump(RX_FRAME, 
             ("WLANLDD: DEthernetFrameMemMngr::OnGetEthernetFrameRxBuffer: not initialized => failed"));       
@@ -238,7 +307,7 @@
     {
     TDataBuffer* buffer ( NULL );
 
-    if ( IsMemInUse() && iRxFrameMemoryPool )
+    if ( IsMemInUse() )
         {
         buffer = reinterpret_cast<TDataBuffer*>(
             iRxFrameMemoryPool->Alloc( sizeof( TDataBuffer ), ETrue ) );
@@ -266,13 +335,8 @@
 //
 void DEthernetFrameMemMngr::FreeRxFrameMetaHeader( TDataBuffer* aMetaHeader )
     {
-    if ( IsMemInUse() && iRxFrameMemoryPool )
+    if ( IsMemInUse() )
         {
-        TraceDump( RX_FRAME, 
-            (("WLANLDD: DEthernetFrameMemMngr::FreeRxFrameMetaHeader: "
-              "at addr: 0x%08x"),
-            reinterpret_cast<TUint32>(aMetaHeader)) );
-        
         iRxFrameMemoryPool->Free( aMetaHeader );
         }
     else
@@ -280,74 +344,16 @@
         // 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( 
-    TDataBuffer*& aBufferStart, 
+    const TDataBuffer*& aBufferStart, 
     TUint32 aNumOfBuffers )
     {
     TBool ret( EFalse );
@@ -388,22 +394,10 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-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;
     }
@@ -413,16 +407,22 @@
 // ---------------------------------------------------------------------------
 //
 TBool DEthernetFrameMemMngr::AddTxFrame( 
-    TDataBuffer* /*aPacketInUserSpace*/, 
-    TDataBuffer*& /*aPacketInKernSpace*/,
-    TBool /*aUserDataTxEnabled*/ )
+    TDataBuffer* aPacketInUserSpace, 
+    TDataBuffer*& aPacketInKernSpace,
+    TBool aUserDataTxEnabled )
     {
-    // not suported in this default implementation 
-#ifndef NDEBUG    
-    os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-#endif
-    
-    return EFalse;
+    if ( IsMemInUse() )
+        {
+        return (static_cast<RFrameXferBlockProtocolStack*>(
+            iFrameXferBlock))->AddTxFrame( 
+                aPacketInUserSpace, 
+                aPacketInKernSpace,
+                aUserDataTxEnabled );
+        }
+    else
+        {
+        return EFalse;
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -430,15 +430,18 @@
 // ---------------------------------------------------------------------------
 //
 TDataBuffer* DEthernetFrameMemMngr::GetTxFrame( 
-    const TWhaTxQueueState& /*aTxQueueState*/,
-    TBool& /*aMore*/ )
+    const TWhaTxQueueState& aTxQueueState,
+    TBool& aMore )
     {
-    // not suported in this default implementation 
-#ifndef NDEBUG    
-    os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-#endif
-    
-    return NULL;
+    if ( IsMemInUse() && iFrameXferBlock )
+        {
+        return (static_cast<RFrameXferBlockProtocolStack*>(
+            iFrameXferBlock))->GetTxFrame( aTxQueueState, aMore );
+        }
+    else
+        {
+        return NULL;
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -448,24 +451,17 @@
 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 
     {
-    // not suported in this default implementation 
-#ifndef NDEBUG    
-    os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-#endif
-    
-    return EFalse;
+    return (static_cast<RFrameXferBlockProtocolStack*>(
+        iFrameXferBlock))->ResumeClientTx( aUserDataTxEnabled );
     }
 
 // ---------------------------------------------------------------------------
@@ -474,10 +470,6 @@
 //
 TBool DEthernetFrameMemMngr::AllTxQueuesEmpty() const
     {
-    // not suported in this default implementation 
-#ifndef NDEBUG    
-    os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-#endif
-    
-    return EFalse;
+    return (static_cast<RFrameXferBlockProtocolStack*>(
+            iFrameXferBlock))->AllTxQueuesEmpty();
     }
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/FrameXferBlock.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/FrameXferBlock.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2009 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: 16 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -32,12 +32,83 @@
 //
 void RFrameXferBlockBase::KeInitialize()
     {
-    iThisAddrKernelSpace = reinterpret_cast<TUint32>(this);
+    iRxDataChunk = NULL;
+
+    for ( TUint32 i = 0; i < KMaxCompletedRxBufs; ++i )
+        {
+        iRxCompletedBuffers[i] = 0;
+        }
 
     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;
     }
 
 // ---------------------------------------------------------------------------
@@ -62,110 +133,17 @@
         }
     }
 
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-void RFrameXferBlock::Initialize( TUint32 aTxBufLength )
-    {
-    // perform base class initialization first
-    KeInitialize();
-    
-    iTxDataBuffer = NULL;
-    iTxBufLength = aTxBufLength;
-    
-    iRxQueueFront = NULL;
-    iRxQueueRear = NULL;
-    }
-
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
 //
-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()
+void RFrameXferBlockProtocolStack::Initialise()
     {
     // perform base class initialization
     KeInitialize();
     
+    iThisAddrKernelSpace = reinterpret_cast<TUint32>(this);
+    
     iVoiceTxQueue.DoInit();
     iVideoTxQueue.DoInit();
     iBestEffortTxQueue.DoInit();
@@ -183,23 +161,10 @@
         
         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( 
@@ -244,8 +209,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// Note! This method is executed in the context of the user mode client 
-// thread, but in supervisor mode
+// 
 // -----------------------------------------------------------------------------
 //
 TBool RFrameXferBlockProtocolStack::AddTxFrame( 
@@ -255,15 +219,6 @@
     {
     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) );
     
@@ -500,197 +455,6 @@
 // 
 // -----------------------------------------------------------------------------
 //
-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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/MgmtFrameMemMngr.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 21 %
+* %version: 20 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -226,8 +226,6 @@
                     + KMgmtSideTxBufferLength 
                     + KProtocolStackSideTxDataChunkSize );
 
-                iFrameXferBlockBase = iFrameXferBlock;
-                
                 TraceDump( INIT_LEVEL, 
                     (("WLANLDD: MgmtFrameMemMngr::DoOpenHandle: Engine RFrameXferBlock addr: 0x%08x"),
                     reinterpret_cast<TUint32>(iFrameXferBlock) ) );
@@ -277,6 +275,55 @@
     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 );
@@ -319,34 +366,191 @@
 // ---------------------------------------------------------------------------
 //
 TBool MgmtFrameMemMngr::DoEthernetFrameRxComplete( 
-    TDataBuffer*& aBufferStart, 
+    const 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 );
-    TDataBuffer** metaHdrPtrArray(&aBufferStart);
 
-    if ( iFrameXferBlock )
+    if ( iReadStatus == EPending )
         {
-        for ( TUint i = 0; i < aNumOfBuffers; ++i )
+        // 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
             {
-            if ( metaHdrPtrArray[i] )
+            // 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 );
+
+            // 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 )
                 {
-                iFrameXferBlock->AddRxFrame( 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]) );
                 }
+
+            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]) );        
             }
         
-        if ( iReadStatus == EPending )
+        iCountTobeCompleted += aNumOfBuffers;
+        }
+
+    TraceDump( RX_FRAME, 
+        (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: end: iCountCompleted: %d"), 
+        iCountCompleted) );
+
+    TraceDump( RX_FRAME, 
+        (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: end: iCountTobeCompleted: %d"), 
+        iCountTobeCompleted) );
+
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+TUint32* MgmtFrameMemMngr::DoGetTobeCompletedBuffersStart()
+    {
+    return iTobeCompletedBuffers;
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+TUint32* MgmtFrameMemMngr::DoGetCompletedBuffersStart()
+    {
+    return iCompletedBuffers;
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+void MgmtFrameMemMngr::DoFreeRxBuffers()
+    {
+    if ( IsMemInUse() )
+        {
+        for ( TUint i = 0; i < iCountCompleted; ++i )
             {
-            ret = ETrue;
+            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 );        
             }
         }
-
-    return ret;
+    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") );        
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -359,7 +563,7 @@
         (("WLANLDD: MgmtFrameMemMngr::DoMarkRxBufFree: free Rx buf at addr: 0x%08x"),
         reinterpret_cast<TUint32>(aBufferToFree) ) );
 
-    if ( IsMemInUse() && iRxFrameMemoryPool )
+    if ( IsMemInUse() )
         {
         iRxFrameMemoryPool->Free( 
             aBufferToFree
@@ -371,117 +575,25 @@
         // 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
     {
-    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));
+    const TInt KMemMgrHdrLen = iRxFrameMemoryPool->HeaderSize();
+    const TInt KRemainder ( KMemMgrHdrLen % iRxFrameBufAllocationUnit );
+    TInt padding = KRemainder ? 
+        ( iRxFrameBufAllocationUnit - KRemainder ) : KRemainder;
         
-        return padding;
-        }
-    else
-        {
-        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-        return 0;
-        }
+    TraceDump(INIT_LEVEL, (("WLANLDD: MgmtFrameMemMngr::RxBufAlignmentPadding: %d"), 
+        padding));
+    
+    return padding;
     }
 
 // ---------------------------------------------------------------------------
@@ -522,5 +634,5 @@
         Kern::ChunkClose( iParent.SharedMemoryChunk() );
         iParent.SharedMemoryChunk() = NULL;
         MarkMemFree();
-        }
+        }    
     }
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WLanLogicalDevice.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WLanLogicalDevice.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2009 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: 18 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -44,7 +44,7 @@
 #else        
     DWlanLogicalDevice* logicalDevice( new DWlanLogicalDevice );
 
-    if ( logicalDevice && !(logicalDevice->IsValid()) )
+    if ( !(logicalDevice->IsValid()) )
         {
         // something went wrong
         delete logicalDevice;
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WlanLogicalChannel.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WlanLogicalChannel.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 61 %
+* %version: 59.1.1 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -41,8 +41,7 @@
 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
@@ -272,9 +271,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// 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
@@ -610,11 +606,10 @@
     
 
 // ---------------------------------------------------------------------------
-// Note! This method is executed in the context of the user mode client 
-// thread, but in supervisor mode
+// 
 // ---------------------------------------------------------------------------
 //
-TAny* DWlanLogicalChannel::DoControlFast( TInt aFunction, TAny* aParam )
+TAny* DWlanLogicalChannel::DoControlFast( TInt aFunction, TAny* param )
     {
     TAny* ret( NULL );
     TBool triggerTx ( EFalse );    
@@ -626,6 +621,9 @@
         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
@@ -639,24 +637,70 @@
     TraceDump(MUTEX, 
         (("WLANLDD: DWlanLogicalChannel::DoControlFast: mutex acquired")));
     
-    if ( iUnit == KUnitWlan )
-        {
-        ret = OnMgmtSideControlFast( aFunction, aParam );
-        }
-    else if ( iUnit == KUnitEthernet )
+    switch ( aFunction )
         {
-        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__ );
+        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"));
+                }
 #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
@@ -681,7 +725,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 enqueue 
+        // released the mutex first in this code block and after that enque 
         // the DFC request.
         if ( !( iFlags & KTxTriggerArmed ) )
             {
@@ -694,162 +738,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// 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;
-    }
-
-// ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
 //
@@ -857,7 +745,7 @@
     {
     if ( iUnit == KUnitWlan )
         {
-        if ( aMask & ( 1 << RWlanLogicalChannel::EWlanRequestNotify ) )
+        if ( aMask & ( 1 << EWlanRequestNotify ) )
             {
             TraceDump(INFO_LEVEL, 
                 ("WLANLDD: DWlanLogicalChannel::DoCancel: mgmt side notify cancel"));
@@ -867,7 +755,7 @@
                 iClient, iWlanRequestNotifyStatus, KErrServerTerminated );
             iWlanRequestNotifyStatus = NULL;
             }        
-        else if ( aMask & ( 1 << RWlanLogicalChannel::EWlanRequestFrame ) )
+        else if ( aMask & ( 1 << EWlanRequestFrame ) )
             {
             TraceDump(INFO_LEVEL, 
                 ("WLANLDD: DWlanLogicalChannel::DoCancel: mgmt side frame read cancel"));
@@ -879,8 +767,7 @@
         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__ );
             }        
@@ -908,8 +795,7 @@
         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__ );
             }        
@@ -927,13 +813,11 @@
 // ---------------------------------------------------------------------------
 //
 TBool DWlanLogicalChannel::ProtocolStackDataReceiveComplete( 
-    TDataBuffer*& aBufferStart,
+    const TDataBuffer*& aBufferStart,
     TUint32 aNumOfBuffers )
     {
-    if ( iEthernetFrameMemMngr && 
-         iEthernetFrameMemMngr->OnEthernetFrameRxComplete( 
-             aBufferStart, 
-             aNumOfBuffers ) )
+    if ( iEthernetFrameMemMngr->OnEthernetFrameRxComplete( aBufferStart, 
+        aNumOfBuffers ) )
         {
         Kern::RequestComplete( iClient, iEthernetReceiveFrameStatus, KErrNone );
         iEthernetReceiveFrameStatus = NULL;
@@ -1016,17 +900,13 @@
     TraceDump(UMAC_PROTO_CALLBACK, 
         (("WLANLDD: aCompletionCode: %d"), aCompletionCode));
 
-    if ( iEthernetFrameMemMngr )
-        {
-        iEthernetFrameMemMngr->FreeTxPacket( aMetaHeader );
-        }
+    iEthernetFrameMemMngr->FreeTxPacket( aMetaHeader );
 
     TxProtocolStackData();
     
     if ( !iAddTxFrameAllowed )
         {
-        if ( iResumeTxStatus &&
-             iEthernetFrameMemMngr &&
+        if ( iResumeTxStatus && 
              iEthernetFrameMemMngr->ResumeClientTx( 
                  iUmac.UserDataTxEnabled() ) )
             {
@@ -1097,24 +977,18 @@
 //
 void DWlanLogicalChannel::TxManagementData()
     {
-    TDataBuffer* buffer( NULL );
-    
-    if ( iEthernetFrameMemMngr )
+    TDataBuffer* buffer = iEthernetFrameMemMngr->OnWriteEthernetFrame();
+
+    if ( !buffer )
         {
-        buffer = iEthernetFrameMemMngr->OnWriteEthernetFrame();
-        }
-
-    if ( buffer )
-        {
-        iUmac.WriteMgmtFrame( *buffer );
+        TraceDump(ERROR_LEVEL, 
+            ("WLANLDD: DWlanLogicalChannel::TxManagementData: "
+             "panic, no buffer"));
+        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
         }
     else
         {
-#ifndef NDEBUG
-        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-#endif
-        Kern::RequestComplete( 
-            iClient, iWlanSendFrameStatus, KErrGeneral );
+        iUmac.WriteMgmtFrame( *buffer );
         }
     }
 
@@ -1124,7 +998,7 @@
 //
 void DWlanLogicalChannel::TxProtocolStackData()
     {
-#ifndef NDEBUG
+#ifndef NDEBUG    
     TUint packetsSubmitted ( 0 );
 #endif
     
@@ -1172,13 +1046,7 @@
 //
 TBool DWlanLogicalChannel::OnReadEthernetFrameRequest()
     {
-    TBool ret( EFalse );
-    
-    if ( iEthernetFrameMemMngr )
-        {
-        ret = iEthernetFrameMemMngr->OnReadRequest();
-        }
-    
+    const TBool ret = iEthernetFrameMemMngr->OnReadRequest();
     return ret;
     }
 
@@ -1580,17 +1448,17 @@
 
     switch ( aReqNo )
         {
-        case RWlanLogicalChannel::EWlanInitSystem:
+        case EWlanInitSystem:
             // bootup the chip and the system
             iWlanGeneralRequestStatus = aStatus; 
             InitSystem( a1, sizeof(TOpenParam) );
             break;
-        case RWlanLogicalChannel::EWlanFinitSystem:
+        case EWlanFinitSystem:
             // power down the chip and the system
             iWlanGeneralRequestStatus = aStatus; 
             FinitSystem();
             break;
-        case RWlanLogicalChannel::EWlanCommand:
+        case EWlanCommand:
             // management command
             iWlanGeneralRequestStatus = aStatus; 
 
@@ -1631,13 +1499,13 @@
                 output_buffer.iData, 
                 output_buffer.iLen );
             break;
-        case RWlanLogicalChannel::EWlanRequestNotify:
+        case EWlanRequestNotify:
             // store the USER mode indication address;
             iIndicationBuffer = static_cast<TIndication*>(a1);
             iWlanRequestNotifyStatus = aStatus;
             IndicationRequest( static_cast<TIndication*>(a1) );
             break;
-        case RWlanLogicalChannel::EWlanRequestFrame:
+        case EWlanRequestFrame:
             if ( OnReadEthernetFrameRequest() )
                 {
                 // rx data to be completed exists
@@ -1654,7 +1522,7 @@
                 iWlanReceiveFrameStatus = aStatus;
                 }
             break;
-        case RWlanLogicalChannel::EWlanRequestSend:
+        case EWlanRequestSend:
             iWlanSendFrameStatus = aStatus;
 
             TxManagementData();
@@ -1857,7 +1725,7 @@
     TAny* /*a2*/ )
     {
     TInt ret( KErrNone );
-    if ( aFunction == RWlanLogicalChannel::EWlanSvControlInitBuffers )
+    if ( aFunction == EWlanSvControlInitBuffers )
         {
         // initiliaze buffers for wlan mgmt client data xfer
         if ( a1 )
@@ -1878,7 +1746,7 @@
             os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
             }
         }
-    else if ( aFunction == RWlanLogicalChannel::EWlanSvControlFreeBuffers )
+    else if ( aFunction == EWlanSvControlFreeBuffers )
         {
         // free wlan mgmt client data xfer buffers
         OnReleaseEthernetFrameBuffers();        
@@ -2020,16 +1888,13 @@
     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( 
@@ -2066,13 +1931,12 @@
 // ---------------------------------------------------------------------------
 //
 void DWlanLogicalChannel::MgmtDataReceiveComplete( 
-    TDataBuffer*& aBufferStart, 
+    const TDataBuffer*& aBufferStart, 
     TUint32 aNumOfBuffers )
     {
-    if ( iEthernetFrameMemMngr && 
-         ( iEthernetFrameMemMngr->OnEthernetFrameRxComplete( 
-               aBufferStart, 
-               aNumOfBuffers ) ) )
+    if ( iEthernetFrameMemMngr->OnEthernetFrameRxComplete( 
+        aBufferStart, 
+        aNumOfBuffers ) )
         {
         Kern::RequestComplete( iClient, iWlanReceiveFrameStatus, KErrNone );
         iWlanReceiveFrameStatus = NULL;
@@ -2307,32 +2171,23 @@
 void DWlanLogicalChannel::ReleaseIndicationListEntry(
     TIndicationListEntry* aEntry )
     {
-    if ( aEntry )
+    aEntry->next = NULL;
+
+    if ( !iFreeIndicationListHead )
         {
-        aEntry->next = NULL;
-    
-        if ( !iFreeIndicationListHead )
-            {
-            iFreeIndicationListHead = aEntry;
-            }
-        else
-            {
-            TIndicationListEntry* tmp = iFreeIndicationListHead;
-    
-            while ( tmp->next )
-                {
-                tmp = tmp->next;
-                }
-    
-            tmp->next = aEntry;
-            }
+        iFreeIndicationListHead = aEntry;
         }
-#ifndef NDEBUG
     else
         {
-        os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );        
+        TIndicationListEntry* tmp = iFreeIndicationListHead;
+
+        while ( tmp->next )
+            {
+            tmp = tmp->next;
+            }
+
+        tmp->next = aEntry;
         }
-#endif        
     }
 
 // ---------------------------------------------------------------------------
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* 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 the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 3 %
+* %version: 2 %
 */
 
 #include "WlLddWlanLddConfig.h"
@@ -41,8 +41,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// Note! This method is executed in the context of the user mode client 
-// thread, but in supervisor mode
+// 
 // ---------------------------------------------------------------------------
 //
 TInt DWlanLogicalChannelBase::Request( TInt aReqNo, TAny* a1, TAny* a2 )
--- a/wlan_bearer/wlannwif/etherpkt/CardDll.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlannwif/etherpkt/CardDll.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-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"
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: 12 %
 */
 
 #include <nifmbuf.h>
@@ -81,12 +81,8 @@
     iReceiver = CReceiver::NewL( this );
 
     User::LeaveIfError( iCard.Open() );
-    
-    CleanupClosePushL( iCard );
 
-    User::LeaveIfError( iCard.InitialiseBuffers() );
-    
-    CleanupStack::Pop( &iCard );
+    User::LeaveIfError( iCard.InitialiseBuffers( iFrameXferBlock ) );
   }
 
 
--- a/wlan_bearer/wlannwif/etherpkt/receiver_hw.cpp	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlannwif/etherpkt/receiver_hw.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: 12 %
 */
 
 #include <nifmbuf.h>
@@ -31,8 +31,7 @@
 //
 CReceiver::CReceiver( CPcCardPktDrv* aParent ) : 
     CActive(EPriorityStandard),
-    iParent(aParent),
-    iFrameToFree( NULL )
+    iParent(aParent)
     {
     }
 
@@ -68,7 +67,6 @@
     {
     DEBUG("CReceiver::~CReceiver()");
     Cancel();
-    iFrameToFree = NULL;
     }
 
 // ---------------------------------------------------------
@@ -100,11 +98,7 @@
     {
     DEBUG("CReceiver::RunL()" );
 
-    TUint rxCount( 0 );
-    const TUint KMaxRxCount( 4 );
-    
-    while( ( rxCount < KMaxRxCount ) &&
-           ( iDataBuffer = iParent->iCard.GetRxFrame( iFrameToFree ) ) != NULL )
+    while( iParent->iFrameXferBlock->GetNextRxDataBuffer( iDataBuffer ) )
         {
         TUint8* buf = iDataBuffer->GetBuffer();
         TUint32 len = iDataBuffer->GetLength();
@@ -132,27 +126,10 @@
                 iParent->iParent->Process( pFrame, bufOrig, iDataBuffer->UserPriority() );
                 }
             }
-            
-        iFrameToFree = iDataBuffer;
-        ++rxCount;
-		DEBUG1("CReceiver::RunL() - %u packet(s) processed", rxCount );
         }
 
-    if ( rxCount == KMaxRxCount )
+    if( iParent->CardOpen() )
         {
-		DEBUG("CReceiver::RunL() - yield");
-		
-        SetActive();
-        TRequestStatus* status = &iStatus;
-        User::RequestComplete( status, KErrNone );
-        }
-    else
-        {
-        iFrameToFree = NULL;
-            
-        if( iParent->CardOpen() )
-            {
-            QueueRead();
-            }
+        QueueRead();
         }
     }
--- a/wlan_bearer/wlannwif/inc/carddrv.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlannwif/inc/carddrv.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 9 %
 */
 
 #ifndef __CARDDRV_H__
@@ -139,6 +139,9 @@
     CReceiver* iReceiver;
     /** */
     RPcmNetCardIf iCard;
+
+    /** */
+    RFrameXferBlockProtocolStack* iFrameXferBlock;
     
 	};
 
--- a/wlan_bearer/wlannwif/inc/receiver_hw.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_bearer/wlannwif/inc/receiver_hw.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: 7 %
 */
 
 #ifndef _RECEIVER_HW_H_
@@ -82,9 +82,6 @@
     /** */
     TDataBuffer* iDataBuffer;
     
-	/** Rx frame to free */
-    TDataBuffer* iFrameToFree;
-
     };
 
 #endif //_RECEIVER_HW_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_info/wlan_metadata/wlan_metadata.mrp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,6 @@
+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/group/bld.inf	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_plat/group/bld.inf	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2007 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"
@@ -17,7 +17,7 @@
 */
 
 /*
-* %version: tr1cfwln#7 %
+* %version: tr1cfwln#6 %
 */
 
 #include "../wlan_dbif_api/group/bld.inf"
@@ -30,7 +30,7 @@
 #include "../wlan_info_api/group/bld.inf"
 #include "../wlan_agent_hotspot_plugin_api/group/bld.inf"
 #include "../wlan_osa_api/group/bld.inf"
-#include "../wlan_busaccess_api/group/bld.inf"
+#include "../wlan_spia_api/group/bld.inf"
 #include "../wlan_hpa_api/group/bld.inf"
 #include "../wlan_eapol_plugin_api/group/bld.inf"
 #include "../wlan_generic_plugin_api/group/bld.inf"
--- a/wlan_plat/wlan_busaccess_api/group/bld.inf	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 that exports the files belonging to 
-*                WLAN bus access API
-*
-*/
-
-/*
-* %version: 6 %
-*/
-
-#if defined(RD_WLAN_DDK)
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/wlanhwbusaccesslayer.h  OS_LAYER_PLATFORM_EXPORT_PATH(wlanhwbusaccesslayer.h)
-../inc/wlanspia.h              OS_LAYER_PLATFORM_EXPORT_PATH(wlanspia.h)
-../inc/wlanspia.inl            OS_LAYER_PLATFORM_EXPORT_PATH(wlanspia.inl)
-../inc/wlanspiaclient.h        OS_LAYER_PLATFORM_EXPORT_PATH(wlanspiaclient.h)
-../inc/wlanspianamespace.h     OS_LAYER_PLATFORM_EXPORT_PATH(wlanspianamespace.h)
-../inc/wlanspiatypes.h         OS_LAYER_PLATFORM_EXPORT_PATH(wlanspiatypes.h)
-../inc/wlansdioa.h             OS_LAYER_PLATFORM_EXPORT_PATH(wlansdioa.h)
-../inc/wlansdioa.inl           OS_LAYER_PLATFORM_EXPORT_PATH(wlansdioa.inl)
-../inc/wlansdioaclient.h       OS_LAYER_PLATFORM_EXPORT_PATH(wlansdioaclient.h)
-../inc/wlansdioanamespace.h    OS_LAYER_PLATFORM_EXPORT_PATH(wlansdioanamespace.h)
-../inc/wlansdioatypes.h        OS_LAYER_PLATFORM_EXPORT_PATH(wlansdioatypes.h)
-
-#endif
--- a/wlan_plat/wlan_busaccess_api/inc/wlanhwbusaccesslayer.h	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* 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"
-* 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:  The file contains a structure definition for accessing
-*               HW bus adaptation modules (SPIA or SDIOA) in WLAN
-*               adaptation code.
-*
-*/
-
-/*
-* %version: 5 %
-*/
-
-#ifndef WLANHWBUSACCESSLAYER_H
-#define WLANHWBUSACCESSLAYER_H
-
-#include <wlanosaplatform.h>
-
-class WlanSpia;
-class WlanSdioa;
-
-/**
- *  
- *
- *
- *  @lib wlanpdd.pdd
- *  @since S60 v3.2
- */
-struct SHwBusAccessLayer
-    {
-    WlanSpia* iSpia;
-    WlanSdioa* iSdioa;
-
-    SHwBusAccessLayer() : iSpia( NULL ), iSdioa( NULL ) {};
-    
-private:
-
-    // Prohibit copy constructor.
-    SHwBusAccessLayer( const SHwBusAccessLayer& );
-    // Prohibit assigment operator.
-    SHwBusAccessLayer& operator= ( const SHwBusAccessLayer& );
-    };
-
-#endif // WLANHWBUSACCESSLAYER_H
--- a/wlan_plat/wlan_busaccess_api/inc/wlansdioa.h	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,274 +0,0 @@
-/*
-* Copyright (c) 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"
-* 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 WLANSDIOA_H
-#define WLANSDIOA_H
-
-class MWlanSdioaClient;
-class MWlanOsaExt;
-
-#include <wlansdioatypes.h>
-
-class WlanSdioa
-    {
-
-public:
-
-    typedef TInt TRequestId;
-
-    enum { KMaxFunctions = 8 };
-
-    enum TSdioBusWidth
-        {
-        ESdioBusWidth1 = 1,
-        ESdioBusWidth4 = 4
-        };
-
-    struct TCapabilities
-        {
-        /* Capability mask (values defined in wlansdioatypes.h) */
-        TUint32 iCapability;
-        
-        /* Maximum number of buffers the SDIOA client is allowed to provide in buffer lists
-           of the TReadRequest and TWriteRequest structures.
-           The value of 1 means that only a single contiguous buffer can be used. */
-        TUint32 iMaxNumberOfBuffers;
-        
-        /* Length of the memory cache line (in bytes) */
-        TUint32 iCacheLineLength;
-        };
-
-    struct TBufferItem 
-        {
-        /* Buffer length */
-        TUint32 iLength;
-        
-        /* Data buffer */
-        TUint8 *iBuffer;
-        
-        /* Pointer to the next list item (NULL if this is the last item) */
-        struct TBufferItem *iNext;
-        };
-
-    struct TReadRequest
-        {
-        /* Command number */
-        TUint8 iCmdIndex;
-        
-        /* Function number */
-        TUint8 iFunctionNum;
-        
-        /* Register address */
-        TUint32 iRegAddr;
-        
-        /* Flags (defined in wlansdioatypes.h) */
-        TUint32 iFlags;
-        
-        /* Receive buffer (only valid for CMD52) */
-        TUint8 iRxBuffer;
-        
-        /* Receive buffer list (only valid for CMD53) */
-        TBufferItem *iRxBufferList;
-        
-        /* Transfer size (bytes) */
-        TUint32 iRxCount;
-        
-        /* Completion callback */
-        MWlanSdioaClient* iRequestClient;
-        
-        /* Request identifier (passed back to client with callback) */
-        TRequestId iRequestId;
-        };
-
-    struct TWriteRequest
-        {
-        /* Command number */
-        TUint8 iCmdIndex;
-        
-        /* Function number */
-        TUint8 iFunctionNum;
-        
-        /* register address */
-        TUint32 iRegAddr;
-        
-        /* Flags (defined in wlansdioatypes.h) */
-        TUint32 iFlags;
-        
-        /* Command argument or CMD52 byte data */
-        TUint8 iTxBuffer;
-        
-        /* Transmit buffer list (only valid for CMD53) */
-        TBufferItem *iTxBufferList;
-        
-        /* Transfer size (bytes) */
-        TUint32 iTxCount;
-        
-        /* Completion callback */
-        MWlanSdioaClient* iRequestClient;
-        
-        /* Request identifier (passed back to client with callback) */
-        TRequestId iRequestId;
-        };
-
-    /**
-     * Destructor
-     *
-     */
-    virtual ~WlanSdioa() {};
-
-    /**
-     * Create SDIOA object
-     *
-     */
-    static WlanSdioa* Create();
-
-    /**
-     * Attach the OSA extension object
-     *
-     * @param aOsaExt OSA extension object
-     */
-    void Attach( MWlanOsaExt& aOsaExt );
-
-    /**
-     * Destroy the SDIOA object
-     *
-     * @param aWlanSdioa sdioa layer object
-     */
-    static void Destroy( WlanSdioa* aWlanSdioa );
-
-    /**
-     * Extract module capabilities
-     *
-     * @param aCapabilities capabilities of the module
-     */    
-    virtual void Capability( TCapabilities& aCapabilities ) = 0;        
-
-    /**
-     * Issue an SDIOA request (separate methods for read and write)
-     *
-     * @param aRequest Request structure
-     * @return Status of the operation
-     *         ESuccess     -   The request was accepted for asynchronous
-     *                          execution and will complete later.
-     *                          Completion is notified by the SDIOA request
-     *                          completion callback.
-     *                          The SDIOA client is allowed to issue additional
-     *                          requests.
-     *
-     *         EFailure     -   The request was not accepted for execution.
-     *                          The request completion callback will not be called.
-     *
-     *         ESuccessXfer -   The request was accepted and completed
-     *                          synchronously.
-     *                          The SDIOA request completion callback will not be called.
-     *                          The SDIOA client is allowed to issue additional requests.
-     *
-     *         EPending     -   The request was accepted for asynchronous
-     *                          excecution and will complete later.
-     *                          Completion is notified by the SDIOA request
-     *                          completion callback.
-     *                          The SDIOA client is not allowed to issue additional
-     *                          requests until the completion callback has been called.
-     */
-    virtual SDIOA::TStatus ReadRequest( TReadRequest& aRequest ) = 0;
-    virtual SDIOA::TStatus WriteRequest( TWriteRequest& aRequest ) = 0;
-
-    /**
-     * Cancel a pending SDIOA request
-     *
-     * @param aRequestId Request ID
-     * @return Status of the operation
-     *         ESuccess     -   The SDIOA request was cancelled.
-     *                          The completion callback will not be called.
-     *
-     *         EFailure     -   The request could not be cancelled.
-     */
-    virtual SDIOA::TStatus Cancel( TRequestId aRequestId ) = 0;
-
-    /**
-     * Enable SDIO interrupts (multiplexed on DAT1 line)
-     *
-     * @param aEnable ETrue (enable) or EFalse (disable)
-     * @param aCallbackClient Pointer to the object containing the OnSDIOInterrupt callback method
-     *                        (can be omitted when aEnable == EFalse)
-     * @return Status of the operation
-     *         ESuccess     -   SDIO interrupts were enabled.
-     *                          The MWlanSdioaClient::OnSDIOInterrupt()
-     *                          callback will be called after an
-     *                          interrupt has occurred.
-     *
-     *         EFailure     -   SDIO interrupts could not be enabled.
-     */
-	virtual SDIOA::TStatus EnableSDIOInterrupt( TBool aEnable, MWlanSdioaClient* aCallbackClient = NULL ) = 0;
-
-    /**
-     * Initialize the SDIO device
-     * 
-     * This method will perform device initialization so that the device
-     * will be ready for receiving CMD52 and CMD53 requests.
-     * The method must be called after the WLAN device has been powered on.
-     */
-	virtual SDIOA::TStatus Initialize() = 0;
-
-    /**
-     * Set the SDIO bus width
-     * 
-     * @param aBusWidth SDIO bus width
-     *
-     * This method sets the SDIO bus width to 1 or 4 bits.
-     */
-    virtual void SetBusWidth( TSdioBusWidth aBusWidth ) = 0;
-
-    /**
-     * Set the SDIO bus clock speed
-     * 
-     * @param aMHz SDIO bus clock speed in MHz
-     *
-     * This method sets the SDIO bus clock speed to the value
-     * specified by the aMHz parameter or the nearest lower
-     * value supported by the hardware.
-     */
-    virtual void SetClockSpeed( TUint32 aMHz ) = 0;
-
-protected:
-
-    /**
-     * Constructor
-     *
-     * @param aOsaExt OSA extension object
-     */
-    explicit WlanSdioa() {};
-
-    /**
-     * Extract OSA extension
-     *
-     * @return OSA extension
-     */
-    inline MWlanOsaExt& OsaExtCb();
-
-private:
-
-    /**
-     * OSA extension
-     */
-    MWlanOsaExt*    iOsaExt;
-
-    };
-
-#include <wlansdioa.inl>
-
-#endif // WLANSDIOA_H
--- a/wlan_plat/wlan_busaccess_api/inc/wlansdioa.inl	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 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"
-* 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: 
-*
-*/
-
-inline MWlanOsaExt& WlanSdioa::OsaExtCb()
-    {
-    return *iOsaExt;
-    }
-
-inline void WlanSdioa::Attach( MWlanOsaExt& aOsaExt )
-    {
-    iOsaExt = &aOsaExt;
-    }
\ No newline at end of file
--- a/wlan_plat/wlan_busaccess_api/inc/wlansdioaclient.h	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 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"
-* 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 WLANSDIOACLIENT_H
-#define WLANSDIOACLIENT_H
-
-#include <wlansdioa.h>
-
-/**
- *  SDIOA client callback interface
- *
- *
- */
-class MWlanSdioaClient
-    {
-
-public:
-
-	/**
-	 * Destructor
-	 *
-	 */
-    virtual ~MWlanSdioaClient() {};
-
-    /**
-     * SDIOA request complete callback
-     *
-     * @param aRequestId SDIOA request ID
-     * @param aStatus Status of the operation
-     *          ESuccess    -   The request completed successfully
-     *          EFailure    -   The request failed
-     */
-    virtual void OnRequestComplete( WlanSdioa::TRequestId aRequestId,
-                                    SDIOA::TStatus aStatus ) = 0;
-                                        
-    /**
-     * SDIO interrupt callback
-     *
-     * This method will be called after a device interrupt only if SDIO 
-     * (DAT1 multiplexed) interrupts have been enabled with the 
-     * WlanSdioa::EnableSDIOInterrupt() method.
-     */
-    virtual void OnSDIOInterrupt() = 0;                                        
-    };
-
-
-#endif // WLANSDIOACLIENT_H
--- a/wlan_plat/wlan_busaccess_api/inc/wlansdioanamespace.h	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 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"
-* 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 SDIOANAMESPACE_H
-#define SDIOANAMESPACE_H
-
-#define SDIOA WlanSdioaNameSpace
-#define NAMESPACE_BEGIN_SDIOA namespace WlanSdioaNameSpace {
-#define NAMESPACE_END_SDIOA }
-
-#endif  // SDIOANAMESPACE_H
--- a/wlan_plat/wlan_busaccess_api/inc/wlansdioatypes.h	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 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"
-* 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 WLANSDIOATYPES_H
-#define WLANSDIOATYPES_H
-
-#include <wlanosaplatform.h>
-#include <wlansdioanamespace.h>
-
-NAMESPACE_BEGIN_SDIOA
-
-enum TStatus
-    {
-    ESuccess        = 0,
-    EFailure,
-    ESuccessXfer,
-    EPending
-    };
-
-
-// Capability flags
-	
-// High speed mode support
-const TUint32 KCapabilityHighSpeed = ( 1 << 0 );
-
-
-// Request parameter flags
-
-// If this flag is set to 1, the write operation will be done to an incrementing address
-const TUint32 KRequestIncrAddress = ( 1 << 0 );
-
-
-NAMESPACE_END_SDIOA
-
-#endif // WLANSDIOATYPES_H
--- a/wlan_plat/wlan_busaccess_api/inc/wlanspia.h	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,326 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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:  spia interface declaration
-*
-*/
-
-/*
-* %version: 7 %
-*/
-
-#ifndef WLANSPIA_H
-#define WLANSPIA_H
-
-class MWlanSpiaClient;
-class MWlanOsaExt;
-
-#include <wlanspiatypes.h>
-
-/**
- *  spia interface declaration
- *
- *
- *  @lib wlanpdd.pdd
- *  @since S60 v3.2
- */
-class WlanSpia 
-    {
-
-public:
-
-    typedef TInt TRequestId;
-
-    /* SPI transfer clock speed. The closest one is selected if the 
-     * exact clock frequency cannot be achieved. 
-     * The closest is always less than the requested frequency.*/
-    enum TClockSpeed
-        {
-        EClk1_5MHz = 0,
-        EClk3MHz,
-        EClk6MHz,
-        EClk12MHz,
-        EClk24MHz,
-        EClk48MHz,
-        EClk96MHz
-        };
-
-    /* SPI clock modes used for transfer. 
-       Next picture shows what different configuration values means.
-
-                               ,--> Sampling
-                               | ,> Shift out
-                               | |
-            high/rising  ______|¯|_|¯|_|¯|_ (mode 0)
-
-            high/falling ____|¯|_|¯|_|¯|_|¯ (mode 1)
-
-            low/falling  ¯¯¯¯¯¯|_|¯|_|¯|_|¯ (mode 2)
-
-            low/rising   ¯¯¯¯|_|¯|_|¯|_|¯|_ (mode 3)
-    */
-    enum TClockMode
-        {
-        /* SPI clock active high, sampling occurs on the rising edge */
-        EPolarityHighRisingEdge = 0,
-        /* SPI clock active high, sampling occurs on the falling edge */
-        EPolarityHighFallingEdge,
-        /* SPI clock active low, sampling occurs on the falling edge */
-        EPolarityLowFallingEdge,
-        /* SPI clock active low, sampling occurs on the rising edge */
-        EPolarityLowRisingEdge
-        };
-
-    /* SPI slave select signal polarity used for transfer */
-    enum TSsPolarity
-        {
-        /** SS is held \e high during the active state */
-        ESsPolarityHigh = 0,
-        /** SS is held \e low during the active state */
-        ESsPolarityLow
-        };
-
-    /* SPI read mode, used when reading is done */
-    enum TReadMode
-        {
-        /* normal read from SPI slave device 
-         * (i.e no write involved for this call) */
-        ENormalRead = 0,
-        /* write buffer is written completely 
-         * before the read operation is done */
-        EWriteB4Read,
-        /* full duplex mode 
-         * Tx and Rx are done at same time
-         * NOTE: Tx and Rx buffers must not overlap and must be of equal size  */        
-        ECombinedWriteRead
-        };
-
-    struct TConfig
-        {
-        /* SPI clock mode */
-        TClockMode iSpiaClockMode;
-        /* SPI slave select signal polarity */
-        TSsPolarity iSpiaSsPolarity;
-        /* number of bytes per frame in tx */
-        TUint8 iTxBytesPerFrame;
-        /* number of bytes per frame in rx */
-        TUint8 iRxBytsPerFrame;
-        };
-    
-    /* SPI slave select mode */    
-    enum TSsMode    
-    {
-        /* slave select is active during the whole SPI request operation */
-        EForcedActive = 0,
-        /* slave select is toggled on SPI frame basis during the whole SPI request */        
-        EFrameControlled                
-    };
-    
-    struct TCapabilities
-    {
-    /* bit 0 - memory config support: 
-     * bit clear non cached memory supported, bit set cached memory supported
-     * default value is cleared 
-     * bit 1 - ENormalRead support in TReadMode: bit set when supported          
-     * bit 2 - EWriteB4Read support in TReadMode: bit set when supported               
-     * bit 3 - ECombinedWriteRead support in TReadMode: bit set when supported          
-     * bit 4 - EForcedActive support in TSsMode: bit set when supported                       
-     * bit 5 - EFrameControlled in TSsMode: bit set when supported */        
-    TUint32 iCapability;
-    /* Length of the memory cache line in bytes (needed for buffer alignment) */
-    TUint32 iCacheLineLength;
-    /* DMA threshold for SPI operations */
-    TUint32 iDMAThreshold;
-    };
-    
-    /* SPIA request structure */
-    struct TRequest
-        {
-        /* tx buffer. Buffer length must be multiple of sizeof(TInt) */
-        const TUint8* iTxBuffer;
-        /* amount of data to transmit in the tx buffer in bytes */
-        TUint   iTxBufferSize;
-        /* rx buffer. Buffer length must be multiple of sizeof(TInt) */
-        TUint8* iRxBuffer;
-        /* amount of data to read to the rx buffer in bytes */
-        TUint   iRxBufferSize;
-        /* read operation type */
-        TReadMode   iReadMode;
-        /* complete callback method client to be called after 
-         * the request has completed */
-        MWlanSpiaClient* iRequestClient;
-        /* unique request ID passed back to client as 
-         * is in SPIA request callback */
-        TRequestId iRequestId;
-        /* SPI transfer clock speed. 
-         * The closest one is selected if exact clock frequency 
-         * can not be achieved. The closest is always less 
-         * than the requested frequency. */
-        TClockSpeed iSpiaClockSpeed;
-        /* last request or not for a while, a hint for power management 
-         * ETrue upon last request, any other not */
-        TBool iLastRequest;
-        /* SPI slave select mode used */        
-        TSsMode iSsMode;
-        };
-
-	/**
-	 * Destructor.
-	 *
-	 * @since S60 v3.2
-	 */
-    virtual ~WlanSpia() {};
-
-    /**
-     * Create spia layer object
-     *
-     * @since S60 v3.2
-     * @param aOsaExt osa extension object
-     * @return spia layer object, NULL upon failure
-     * @deprecated Create() and Attach( MWlanOsaExt& ) should be used instead
-     */
-    static WlanSpia* Create( MWlanOsaExt& aOsaExt );
-
-    /**
-     * Create spia layer object
-     *
-     * @since S60 v3.2
-     * @return spia layer object, NULL upon failure
-     */
-    static WlanSpia* Create();
-
-    /**
-     * Attach the OSA extension object
-     *
-     * @since S60 v3.2
-     * @param aOsaExt osa extension object
-     */
-    void Attach( MWlanOsaExt& aOsaExt );
-
-    /**
-     * Destroy spia layer object
-     *
-     * @since S60 v3.2
-     * @param aWlanSpia spia layer object
-     */
-    static void Destroy( WlanSpia* aWlanSpia );
-    
-    /**
-     * Extract module capabilities
-     *
-     * @since S60 v3.2
-     * @param aCapabilities capabilities of the module
-     */    
-    virtual void Capability( TCapabilities& aCapabilities ) { aCapabilities.iCapability = 0; }
-
-    /**
-     * Configures the SPI HW block
-     *
-     * @since S60 v3.2
-     * @param aConfig SPI configuration data
-     */
-    virtual void Configure( const TConfig& aConfig ) = 0;
-
-    /**
-     * Issues SPIA request
-     *
-     * NOTE: the request must remain valid until operation completes 
-     * (either synchronously or asynchronously by completion callback).
-     * It is guaranteed by the system that no SPIA request complete callback 
-     * gets called during this call
-     *
-     * @since S60 v3.2
-     * @param aRequest request to execute
-     * @return status of the operation
-     *         ESuccess -       request was accepted for asynchronous 
-     *                          excecution and will complete at a later time.
-     *                          Request completion is notified by 
-     *                          SPIA request complete callback.
-     *                          SPIA user is allowed to issue additional 
-     *                          requests
-     *
-     *         EFailure -       request was not accepted as it failed due 
-     *                          unspecified reason.
-     *                          SPIA request complete callback is not called 
-     *
-     *         ESuccessXfer -   request was accepted and completed 
-     *                          synchronously inside the SPIA. 
-     *                          SPIA request complete callback is not called. 
-     *                          SPIA user is allowed to issue additional 
-     *                          requests
-     *
-     *         EPending -       request was accepted for asynchronous 
-     *                          excecution and will complete at later time. 
-     *                          Request completion is notified by 
-     *                          SPIA request complete callback.
-     *                          SPIA user is NOT allowed to issue additional 
-     *                          requests until SPIA request complete callback is called
-     */
-    virtual SPIA::TStatus Request( const TRequest& aRequest ) = 0; 
-
-    /**
-     * Cancels a pending SPIA request. Either succeeds or has no effect
-     *
-     * NOTE: it is guaranteed by the system that no SPIA request complete callback 
-     * gets called during this call
-     *
-     * @since S60 v3.2
-     * @param aRequestId request ID that identifies the SPIA request to cancel
-     * @return status of the operation
-     *         ESuccess -       operation success. 
-     *                          SPIA request was cancelled and no SPIA request
-     *                          complete callback gets executed for the request 
-     *                          that was cancelled
-     * 
-     *
-     *         EFailure -       the request is in use and can not be cancelled. 
-     */
-    virtual SPIA::TStatus Cancel( TRequestId aRequestId ) = 0;
-        
-protected:
-
-    /**
-     * Constructor 
-     *
-     * @since S60 v3.2
-     */
-    explicit WlanSpia() : iOsaExt( NULL ) {}
-
-    /**
-     * Constructor 
-     *
-     * @since S60 v3.2
-     * @param aOsaExt osa extension object
-     */
-    explicit WlanSpia( MWlanOsaExt& aOsaExt ) : iOsaExt( &aOsaExt ) {}
-
-    /**
-     * Extract osa extension
-     *
-     * @since S60 v3.2
-     * @return osa extension
-     */
-    inline MWlanOsaExt& OsaExtCb();
-
-private:
-
-    /**
-     * osa extension
-     */
-    MWlanOsaExt*    iOsaExt;
-
-    };
-
-#include <wlanspia.inl>
-
-#endif // WLANSPIA_H
--- a/wlan_plat/wlan_busaccess_api/inc/wlanspia.inl	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2006 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:  inline implementation of WlanSpia
-*
-*/
-
-/*
-* %version: 4 %
-*/
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-inline MWlanOsaExt& WlanSpia::OsaExtCb()
-    {
-    return *iOsaExt;
-    }
-
-inline void WlanSpia::Attach( MWlanOsaExt& aOsaExt )
-    {
-    iOsaExt = &aOsaExt;
-    }
--- a/wlan_plat/wlan_busaccess_api/inc/wlanspiaclient.h	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2007 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:  spia client callback interface
-*
-*/
-
-/*
-* %version: 3 %
-*/
-
-#ifndef WLANSPIACLIENT_H
-#define WLANSPIACLIENT_H
-
-#include <wlanspia.h>
-
-/**
- *  spia client callback interface
- *
- *
- *  @lib wlanpdd.pdd
- *  @since S60 v3.2
- */
-class MWlanSpiaClient 
-    {
-
-public:
-
-	/**
-	 * Destructor.
-	 *
-	 * @since S60 v3.2
-	 */
-    virtual ~MWlanSpiaClient() {};
-
-    /**
-     * spia request complete callback, 
-     * resources associated to the request can be freed in this method 
-     *
-     * NOTE: the callback client may call back in the same context
-     *
-     * @since S60 v3.2
-     * @param aRequestId request ID
-     * @param aStatus status of the operation
-     *         ESuccess -       request completed successfully
-     *         EFailure -       request failed due unspecified reason. 
-     */
-    virtual void OnRequestComplete( WlanSpia::TRequestId aRequestId, 
-                                    SPIA::TStatus aStatus ) = 0;
-
-    };
-
-
-#endif // WLANSPIACLIENT_H
--- a/wlan_plat/wlan_busaccess_api/inc/wlanspianamespace.h	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2006 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:  defines SPIA namespace
-*
-*/
-
-/*
-* %version: 3 %
-*/
-
-#ifndef SPIANAMESPACE_H
-#define SPIANAMESPACE_H
-
-#define SPIA WlanSpiaNameSpace
-#define NAMESPACE_BEGIN_SPIA namespace WlanSpiaNameSpace {
-#define NAMESPACE_END_SPIA }
-
-#endif  // SPIANAMESPACE_H
--- a/wlan_plat/wlan_busaccess_api/inc/wlanspiatypes.h	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2006-2008 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 holds SPIA specific type definitions
-*
-*/
-
-/*
-* %version: 5 %
-*/
-
-#ifndef WLANSPIATYPES_H
-#define WLANSPIATYPES_H
-
-#include <wlanosaplatform.h>
-#include <wlanspianamespace.h>
-
-NAMESPACE_BEGIN_SPIA
-
-enum TStatus
-    {
-    ESuccess        = 0,
-    EFailure,
-    ESuccessXfer,
-    EPending
-    };
-    
-const TUint32 KCapabilityMemoryConfig       = ( 1 << 0 );
-const TUint32 KCapabilityNormalRead         = ( 1 << 1 );
-const TUint32 KCapabilityWriteB4Read        = ( 1 << 2 );
-const TUint32 KCapabilityCombinedWriteRead  = ( 1 << 3 );
-const TUint32 KCapabilityForcedActive       = ( 1 << 4 );
-const TUint32 KCapabilityFrameControlled    = ( 1 << 5 );
-
-NAMESPACE_END_SPIA
-
-#endif // WLANSPIACLIENT_H
--- a/wlan_plat/wlan_busaccess_api/wlan_busaccess_api.metaxml	Tue Aug 31 17:02:06 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0" ?>
-<api id="ae1474793294262aa68600f30a1a2e8d" dataversion="1.0">
-<name>WLAN Bus Access API</name>
-<description>WLAN Bus Access API</description>
-<type>c++</type>
-<subsystem>wlan_bearer</subsystem>
-<libs></libs>
-<release category="domain" sinceversion="5.0"/>
-<attributes>
-<htmldocprovided>no</htmldocprovided>
-<adaptation>no</adaptation>
-</attributes>
-</api>
--- a/wlan_plat/wlan_device_settings_api/inc/wlandevicesettingsinternalcrkeys.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_plat/wlan_device_settings_api/inc/wlandevicesettingsinternalcrkeys.h	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-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"
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 16 %
+* %version: 11.1.3 %
 */
 
 #ifndef WLANDEVICESETTINGSINTERNALCRKEYS_H
@@ -422,16 +422,7 @@
 /**
  * Timestamp for cached WLAN region (minutes from 0AD nominal Gregorian).
  */
-const TUint32 KWlanRegionTimestamp =                     0x00000051;
+const TInt32 KWlanRegionTimestamp =                      0x00000051;
 
-/**
- * Master switch for WLAN.
- */
-const TUint32 KWlanOnOff =                               0x00000052;
-
-/**
- * Setting for overriding WLAN on/off, forcing it to off.
- */
-const TUint32 KWlanForceDisable =                        0x00000053;
 
 #endif      // WLANDEVICESETTINGSINTERNALCRKEYS_H
--- a/wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-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"
@@ -18,7 +18,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: 6 %
 */
 
 #ifndef WLANINTERNALPSKEYS_H
@@ -67,23 +67,6 @@
 const TUint KPSWlanBgScanInterval = 0x00000003;
 const RProperty::TType KPSWlanBgScanIntervalType = RProperty::EInt;
 
-/**
- * WLAN on/off state
- */
-const TUint KPSWlanOnOffState = 0x00000004;
-const RProperty::TType KPSWlanOnOffStateType = RProperty::EInt;
-
-/**
- * Possible values for WLAN on/off state
- */
-enum TPSWlanOnOff
-    {
-    /** WLAN is OFF */
-    EPSWlanOff = 0,
-    /** WLAN is ON */
-    EPSWlanOn
-    };
-
 #endif // WLANINTERNALPSKEYS_H
            
 //  End of File
--- a/wlan_plat/wlan_management_api/inc/wlanerrorcodes.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_plat/wlan_management_api/inc/wlanerrorcodes.h	Wed Sep 01 12:41:05 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2007 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: 7 %
+* %version: 5 %
 */
 
 #ifndef WLANERRORCODES_H
@@ -277,19 +277,6 @@
  * @ingroup rconn_cfg
  */
 const TInt KErrWlanEapFastPacStoreCorrupted                           = -30234;
-/**
- * The received request cannot be serviced as WLAN is OFF. In typical case
- * WLAN is OFF because the end-user has set it OFF from WLAN UI.
- * @ingroup rconn_cfg
- */
-const TInt KErrWlanOff                                                = -30235;
-/**
- * The received request cannot be serviced as WLAN is forcibly disabled.
- * In typical case the Device Management has disabled WLAN based on operator
- * configuration.
- * @ingroup rconn_cfg
- */
-const TInt KErrWlanForceOff                                           = -30236;
 
 /**
  * @} 
--- a/wlan_plat/wlan_management_api/inc/wlanmgmtcommon.h	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_plat/wlan_management_api/inc/wlanmgmtcommon.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 10.1.1 %
 */
 
 #ifndef WLANMGMTCOMMON_H
@@ -29,9 +29,6 @@
 /** 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;
 
@@ -51,9 +48,6 @@
 /** 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	Tue Aug 31 17:02:06 2010 +0300
+++ b/wlan_plat/wlan_management_api/inc/wlanmgmtinterface.h	Wed Sep 01 12:41:05 2010 +0100
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 16.1.1 %
 */
 
 #ifndef WLANMGMTINTERFACE_H
@@ -215,16 +215,13 @@
          * @param aStatus Status of the calling active object. On successful
          *                completion contains KErrNone, otherwise one of the
          *                system-wide error codes.
-         * @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 aId Service ID of network which user has selected to be configured.
          * @param aCredentials Results of a successful Protected Setup operation.
          * @sa \link psetup Protected Setup-specific error codes \endlink.
          */
         virtual void RunProtectedSetup(
             TRequestStatus& aStatus,
-            const TWlanSsid& aSsid,
-            const TWlanWpsPin& aWpsPin,
+            TUint32 aId,
             CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) = 0;
 
         /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_plat/wlan_spia_api/group/bld.inf	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2007-2008 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 that exports the files belonging to 
+*                WLAN SPIA API
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#if defined(RD_WLAN_DDK)
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/wlanhwbusaccesslayer.h  OS_LAYER_PLATFORM_EXPORT_PATH(wlanhwbusaccesslayer.h)
+../inc/wlanspia.h              OS_LAYER_PLATFORM_EXPORT_PATH(wlanspia.h)
+../inc/wlanspia.inl            OS_LAYER_PLATFORM_EXPORT_PATH(wlanspia.inl)
+../inc/wlanspiaclient.h        OS_LAYER_PLATFORM_EXPORT_PATH(wlanspiaclient.h)
+../inc/wlanspianamespace.h     OS_LAYER_PLATFORM_EXPORT_PATH(wlanspianamespace.h)
+../inc/wlanspiatypes.h         OS_LAYER_PLATFORM_EXPORT_PATH(wlanspiatypes.h)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_plat/wlan_spia_api/inc/wlanhwbusaccesslayer.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2006-2008 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 holds SPIA specific type definitions
+*
+*/
+
+/*
+* %version: 4 %
+*/
+
+#ifndef WLANHWBUSACCESSLAYER_H
+#define WLANHWBUSACCESSLAYER_H
+
+#include <wlanosaplatform.h>
+
+class WlanSpia;
+
+/**
+ *  
+ *
+ *
+ *  @lib wlanpdd.pdd
+ *  @since S60 v3.2
+ */
+struct SHwBusAccessLayer
+    {
+    WlanSpia* iSpia;
+
+    SHwBusAccessLayer() : iSpia( NULL ) {};
+    
+private:
+
+    // Prohibit copy constructor.
+    SHwBusAccessLayer( const SHwBusAccessLayer& );
+    // Prohibit assigment operator.
+    SHwBusAccessLayer& operator= ( const SHwBusAccessLayer& );
+    };
+
+#endif // WLANHWBUSACCESSLAYER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_plat/wlan_spia_api/inc/wlanspia.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,326 @@
+/*
+* Copyright (c) 2007-2008 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:  spia interface declaration
+*
+*/
+
+/*
+* %version: 7 %
+*/
+
+#ifndef WLANSPIA_H
+#define WLANSPIA_H
+
+class MWlanSpiaClient;
+class MWlanOsaExt;
+
+#include <wlanspiatypes.h>
+
+/**
+ *  spia interface declaration
+ *
+ *
+ *  @lib wlanpdd.pdd
+ *  @since S60 v3.2
+ */
+class WlanSpia 
+    {
+
+public:
+
+    typedef TInt TRequestId;
+
+    /* SPI transfer clock speed. The closest one is selected if the 
+     * exact clock frequency cannot be achieved. 
+     * The closest is always less than the requested frequency.*/
+    enum TClockSpeed
+        {
+        EClk1_5MHz = 0,
+        EClk3MHz,
+        EClk6MHz,
+        EClk12MHz,
+        EClk24MHz,
+        EClk48MHz,
+        EClk96MHz
+        };
+
+    /* SPI clock modes used for transfer. 
+       Next picture shows what different configuration values means.
+
+                               ,--> Sampling
+                               | ,> Shift out
+                               | |
+            high/rising  ______|¯|_|¯|_|¯|_ (mode 0)
+
+            high/falling ____|¯|_|¯|_|¯|_|¯ (mode 1)
+
+            low/falling  ¯¯¯¯¯¯|_|¯|_|¯|_|¯ (mode 2)
+
+            low/rising   ¯¯¯¯|_|¯|_|¯|_|¯|_ (mode 3)
+    */
+    enum TClockMode
+        {
+        /* SPI clock active high, sampling occurs on the rising edge */
+        EPolarityHighRisingEdge = 0,
+        /* SPI clock active high, sampling occurs on the falling edge */
+        EPolarityHighFallingEdge,
+        /* SPI clock active low, sampling occurs on the falling edge */
+        EPolarityLowFallingEdge,
+        /* SPI clock active low, sampling occurs on the rising edge */
+        EPolarityLowRisingEdge
+        };
+
+    /* SPI slave select signal polarity used for transfer */
+    enum TSsPolarity
+        {
+        /** SS is held \e high during the active state */
+        ESsPolarityHigh = 0,
+        /** SS is held \e low during the active state */
+        ESsPolarityLow
+        };
+
+    /* SPI read mode, used when reading is done */
+    enum TReadMode
+        {
+        /* normal read from SPI slave device 
+         * (i.e no write involved for this call) */
+        ENormalRead = 0,
+        /* write buffer is written completely 
+         * before the read operation is done */
+        EWriteB4Read,
+        /* full duplex mode 
+         * Tx and Rx are done at same time
+         * NOTE: Tx and Rx buffers must not overlap and must be of equal size  */        
+        ECombinedWriteRead
+        };
+
+    struct TConfig
+        {
+        /* SPI clock mode */
+        TClockMode iSpiaClockMode;
+        /* SPI slave select signal polarity */
+        TSsPolarity iSpiaSsPolarity;
+        /* number of bytes per frame in tx */
+        TUint8 iTxBytesPerFrame;
+        /* number of bytes per frame in rx */
+        TUint8 iRxBytsPerFrame;
+        };
+    
+    /* SPI slave select mode */    
+    enum TSsMode    
+    {
+        /* slave select is active during the whole SPI request operation */
+        EForcedActive = 0,
+        /* slave select is toggled on SPI frame basis during the whole SPI request */        
+        EFrameControlled                
+    };
+    
+    struct TCapabilities
+    {
+    /* bit 0 - memory config support: 
+     * bit clear non cached memory supported, bit set cached memory supported
+     * default value is cleared 
+     * bit 1 - ENormalRead support in TReadMode: bit set when supported          
+     * bit 2 - EWriteB4Read support in TReadMode: bit set when supported               
+     * bit 3 - ECombinedWriteRead support in TReadMode: bit set when supported          
+     * bit 4 - EForcedActive support in TSsMode: bit set when supported                       
+     * bit 5 - EFrameControlled in TSsMode: bit set when supported */        
+    TUint32 iCapability;
+    /* Length of the memory cache line in bytes (needed for buffer alignment) */
+    TUint32 iCacheLineLength;
+    /* DMA threshold for SPI operations */
+    TUint32 iDMAThreshold;
+    };
+    
+    /* SPIA request structure */
+    struct TRequest
+        {
+        /* tx buffer. Buffer length must be multiple of sizeof(TInt) */
+        const TUint8* iTxBuffer;
+        /* amount of data to transmit in the tx buffer in bytes */
+        TUint   iTxBufferSize;
+        /* rx buffer. Buffer length must be multiple of sizeof(TInt) */
+        TUint8* iRxBuffer;
+        /* amount of data to read to the rx buffer in bytes */
+        TUint   iRxBufferSize;
+        /* read operation type */
+        TReadMode   iReadMode;
+        /* complete callback method client to be called after 
+         * the request has completed */
+        MWlanSpiaClient* iRequestClient;
+        /* unique request ID passed back to client as 
+         * is in SPIA request callback */
+        TRequestId iRequestId;
+        /* SPI transfer clock speed. 
+         * The closest one is selected if exact clock frequency 
+         * can not be achieved. The closest is always less 
+         * than the requested frequency. */
+        TClockSpeed iSpiaClockSpeed;
+        /* last request or not for a while, a hint for power management 
+         * ETrue upon last request, any other not */
+        TBool iLastRequest;
+        /* SPI slave select mode used */        
+        TSsMode iSsMode;
+        };
+
+	/**
+	 * Destructor.
+	 *
+	 * @since S60 v3.2
+	 */
+    virtual ~WlanSpia() {};
+
+    /**
+     * Create spia layer object
+     *
+     * @since S60 v3.2
+     * @param aOsaExt osa extension object
+     * @return spia layer object, NULL upon failure
+     * @deprecated Create() and Attach( MWlanOsaExt& ) should be used instead
+     */
+    static WlanSpia* Create( MWlanOsaExt& aOsaExt );
+
+    /**
+     * Create spia layer object
+     *
+     * @since S60 v3.2
+     * @return spia layer object, NULL upon failure
+     */
+    static WlanSpia* Create();
+
+    /**
+     * Attach the OSA extension object
+     *
+     * @since S60 v3.2
+     * @param aOsaExt osa extension object
+     */
+    void Attach( MWlanOsaExt& aOsaExt );
+
+    /**
+     * Destroy spia layer object
+     *
+     * @since S60 v3.2
+     * @param aWlanSpia spia layer object
+     */
+    static void Destroy( WlanSpia* aWlanSpia );
+    
+    /**
+     * Extract module capabilities
+     *
+     * @since S60 v3.2
+     * @param aCapabilities capabilities of the module
+     */    
+    virtual void Capability( TCapabilities& aCapabilities ) { aCapabilities.iCapability = 0; }
+
+    /**
+     * Configures the SPI HW block
+     *
+     * @since S60 v3.2
+     * @param aConfig SPI configuration data
+     */
+    virtual void Configure( const TConfig& aConfig ) = 0;
+
+    /**
+     * Issues SPIA request
+     *
+     * NOTE: the request must remain valid until operation completes 
+     * (either synchronously or asynchronously by completion callback).
+     * It is guaranteed by the system that no SPIA request complete callback 
+     * gets called during this call
+     *
+     * @since S60 v3.2
+     * @param aRequest request to execute
+     * @return status of the operation
+     *         ESuccess -       request was accepted for asynchronous 
+     *                          excecution and will complete at a later time.
+     *                          Request completion is notified by 
+     *                          SPIA request complete callback.
+     *                          SPIA user is allowed to issue additional 
+     *                          requests
+     *
+     *         EFailure -       request was not accepted as it failed due 
+     *                          unspecified reason.
+     *                          SPIA request complete callback is not called 
+     *
+     *         ESuccessXfer -   request was accepted and completed 
+     *                          synchronously inside the SPIA. 
+     *                          SPIA request complete callback is not called. 
+     *                          SPIA user is allowed to issue additional 
+     *                          requests
+     *
+     *         EPending -       request was accepted for asynchronous 
+     *                          excecution and will complete at later time. 
+     *                          Request completion is notified by 
+     *                          SPIA request complete callback.
+     *                          SPIA user is NOT allowed to issue additional 
+     *                          requests until SPIA request complete callback is called
+     */
+    virtual SPIA::TStatus Request( const TRequest& aRequest ) = 0; 
+
+    /**
+     * Cancels a pending SPIA request. Either succeeds or has no effect
+     *
+     * NOTE: it is guaranteed by the system that no SPIA request complete callback 
+     * gets called during this call
+     *
+     * @since S60 v3.2
+     * @param aRequestId request ID that identifies the SPIA request to cancel
+     * @return status of the operation
+     *         ESuccess -       operation success. 
+     *                          SPIA request was cancelled and no SPIA request
+     *                          complete callback gets executed for the request 
+     *                          that was cancelled
+     * 
+     *
+     *         EFailure -       the request is in use and can not be cancelled. 
+     */
+    virtual SPIA::TStatus Cancel( TRequestId aRequestId ) = 0;
+        
+protected:
+
+    /**
+     * Constructor 
+     *
+     * @since S60 v3.2
+     */
+    explicit WlanSpia() : iOsaExt( NULL ) {}
+
+    /**
+     * Constructor 
+     *
+     * @since S60 v3.2
+     * @param aOsaExt osa extension object
+     */
+    explicit WlanSpia( MWlanOsaExt& aOsaExt ) : iOsaExt( &aOsaExt ) {}
+
+    /**
+     * Extract osa extension
+     *
+     * @since S60 v3.2
+     * @return osa extension
+     */
+    inline MWlanOsaExt& OsaExtCb();
+
+private:
+
+    /**
+     * osa extension
+     */
+    MWlanOsaExt*    iOsaExt;
+
+    };
+
+#include <wlanspia.inl>
+
+#endif // WLANSPIA_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_plat/wlan_spia_api/inc/wlanspia.inl	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2006 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:  inline implementation of WlanSpia
+*
+*/
+
+/*
+* %version: 4 %
+*/
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+inline MWlanOsaExt& WlanSpia::OsaExtCb()
+    {
+    return *iOsaExt;
+    }
+
+inline void WlanSpia::Attach( MWlanOsaExt& aOsaExt )
+    {
+    iOsaExt = &aOsaExt;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_plat/wlan_spia_api/inc/wlanspiaclient.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2007 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:  spia client callback interface
+*
+*/
+
+/*
+* %version: 3 %
+*/
+
+#ifndef WLANSPIACLIENT_H
+#define WLANSPIACLIENT_H
+
+#include <wlanspia.h>
+
+/**
+ *  spia client callback interface
+ *
+ *
+ *  @lib wlanpdd.pdd
+ *  @since S60 v3.2
+ */
+class MWlanSpiaClient 
+    {
+
+public:
+
+	/**
+	 * Destructor.
+	 *
+	 * @since S60 v3.2
+	 */
+    virtual ~MWlanSpiaClient() {};
+
+    /**
+     * spia request complete callback, 
+     * resources associated to the request can be freed in this method 
+     *
+     * NOTE: the callback client may call back in the same context
+     *
+     * @since S60 v3.2
+     * @param aRequestId request ID
+     * @param aStatus status of the operation
+     *         ESuccess -       request completed successfully
+     *         EFailure -       request failed due unspecified reason. 
+     */
+    virtual void OnRequestComplete( WlanSpia::TRequestId aRequestId, 
+                                    SPIA::TStatus aStatus ) = 0;
+
+    };
+
+
+#endif // WLANSPIACLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_plat/wlan_spia_api/inc/wlanspianamespace.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2006 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:  defines SPIA namespace
+*
+*/
+
+/*
+* %version: 3 %
+*/
+
+#ifndef SPIANAMESPACE_H
+#define SPIANAMESPACE_H
+
+#define SPIA WlanSpiaNameSpace
+#define NAMESPACE_BEGIN_SPIA namespace WlanSpiaNameSpace {
+#define NAMESPACE_END_SPIA }
+
+#endif  // SPIANAMESPACE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_plat/wlan_spia_api/inc/wlanspiatypes.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2006-2008 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 holds SPIA specific type definitions
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#ifndef WLANSPIATYPES_H
+#define WLANSPIATYPES_H
+
+#include <wlanosaplatform.h>
+#include <wlanspianamespace.h>
+
+NAMESPACE_BEGIN_SPIA
+
+enum TStatus
+    {
+    ESuccess        = 0,
+    EFailure,
+    ESuccessXfer,
+    EPending
+    };
+    
+const TUint32 KCapabilityMemoryConfig       = ( 1 << 0 );
+const TUint32 KCapabilityNormalRead         = ( 1 << 1 );
+const TUint32 KCapabilityWriteB4Read        = ( 1 << 2 );
+const TUint32 KCapabilityCombinedWriteRead  = ( 1 << 3 );
+const TUint32 KCapabilityForcedActive       = ( 1 << 4 );
+const TUint32 KCapabilityFrameControlled    = ( 1 << 5 );
+
+NAMESPACE_END_SPIA
+
+#endif // WLANSPIACLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_plat/wlan_spia_api/wlan_spia_api.metaxml	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,13 @@
+<?xml version="1.0" ?>
+<api id="ae1474793294262aa68600f30a1a2e8d" dataversion="1.0">
+<name>WLAN SPIA API</name>
+<description>WLAN SPI Abstraction API</description>
+<type>c++</type>
+<subsystem>wlan_bearer</subsystem>
+<libs></libs>
+<release category="domain" sinceversion="5.0"/>
+<attributes>
+<htmldocprovided>no</htmldocprovided>
+<adaptation>no</adaptation>
+</attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/common/inc/DataWrapperBase.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,72 @@
+/*
+* 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/common/src/DataWrapperBase.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,517 @@
+/*
+* 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;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/group/bld.inf	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,18 @@
+//
+// 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"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/group/device.cfg	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,23 @@
+//
+// 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/group/release.txt	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,5 @@
+NOTESRC_RELEASER
+Nokia Corporation
+
+NOTESRC_RELEASE_REASON
+WLAN SALT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/group/testdriversetup.bat	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,17 @@
+@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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/group/testdriversetup.pl	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,47 @@
+#
+# 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");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/group/wlanhaitest.mrp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,20 @@
+#
+# 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/testsuites/group/bld.inf	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,19 @@
+//
+// 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/testsuites/wlan/wlanhai.driver	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,78 @@
+<?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>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/group/T_Wlan.mmp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,66 @@
+/*
+* 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/group/bld.inf	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,47 @@
+//
+// 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/group/t_wlan.iby	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,25 @@
+//
+// 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/group/t_wlan_binaries.iby	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,27 @@
+//
+// 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/group/t_wlan_testdata.iby	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,32 @@
+//
+// 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/group/user_input.oby	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,28 @@
+//
+// 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/inc/T_CCommsDatabaseData.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/inc/T_CCommsDbTableViewData.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/inc/T_RConnectionData.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/inc/T_RFileData.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/inc/T_RSocketData.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,128 @@
+/*
+* 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_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/inc/T_RSocketServData.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,66 @@
+/*
+* 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_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/inc/T_WlanDriverServer.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,48 @@
+/*
+* 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/inc/T_WlanDriverServer.inl	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* 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();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/inc/T_WlanMgmtClientData.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,58 @@
+/*
+* 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_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/inc/T_WlanScanInfoData.h	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,63 @@
+/*
+* 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/pkg/t_wlan.bat	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,19 @@
+@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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-connection.script	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,357 @@
+//
+// 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-instantiate.script	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,90 @@
+//
+// 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-transfer.script	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,361 @@
+//
+// 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
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/src/T_CCommsDatabaseData.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,163 @@
+/*
+* 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;
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/src/T_CCommsDbTableViewData.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,185 @@
+/*
+* 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;
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/src/T_RConnectionData.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,254 @@
+/*
+* 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();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/src/T_RFileData.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,192 @@
+/*
+* 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"));
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/src/T_RSocketData.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,1359 @@
+/*
+* 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;	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/src/T_RSocketServData.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,431 @@
+/*
+* 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; 		
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/src/T_WlanDriverServer.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,153 @@
+/*
+* 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;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/src/T_WlanMgmtClientData.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,218 @@
+/*
+* 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;
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/src/T_WlanScanInfoData.cpp	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,266 @@
+/*
+* 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"));
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/testdata/devlon52/t_wlan.ini	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,8 @@
+[UID]
+Uid = 0x101f8f01;
+
+[driveC]
+mmc=c:
+
+[driveE]
+mmc=e:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-connection.ini	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,171 @@
+[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}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-instantiate.ini	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,34 @@
+[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}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-transfer.ini	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,161 @@
+[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
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/testdata/t_wlan_environment.ini	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,18 @@
+[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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanapitest/wlanhaitest/wlan/testdata/tube/t_wlan.ini	Wed Sep 01 12:41:05 2010 +0100
@@ -0,0 +1,8 @@
+[UID]
+Uid = 0x101f8f01;
+
+[driveC]
+mmc=c:
+
+[driveE]
+mmc=e: