wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/abs_core_driverif.h
changeset 0 c40eb8fe8501
child 3 6524e815f76f
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Interface implemented by lower adaptation. Core server uses
       
    15 *                these services.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef ABS_CORE_DRIVERIF_H
       
    21 #define ABS_CORE_DRIVERIF_H
       
    22 
       
    23 #include "core_types.h"
       
    24 
       
    25 class abs_core_driverif_callback_c;
       
    26 
       
    27 /**
       
    28  * Abstract adaptation layer interface class for low-level management functionality.
       
    29  *
       
    30  * This interface is implemented by the adaptation layer and a reference
       
    31  * to the class implementing it is passed as a parameter to the core server
       
    32  * constructor.
       
    33  * 
       
    34  * @since S60 v3.1
       
    35  */
       
    36 class abs_core_driverif_c
       
    37     {
       
    38 
       
    39 public:
       
    40 
       
    41     /**
       
    42      * Destructor.
       
    43      */
       
    44     virtual ~abs_core_driverif_c() {};
       
    45 
       
    46     /**
       
    47      * Initialisation between core server - driverIf
       
    48      *
       
    49      * @since S60 v3.1
       
    50      * @param core_callback delivers callback interface to driverIf
       
    51      */
       
    52     virtual void init(
       
    53         abs_core_driverif_callback_c* core_callback ) = 0;
       
    54 
       
    55     /**
       
    56      * Start an IBSS network.
       
    57      *
       
    58      * @since S60 v3.1
       
    59      * @param request_id An unique identification for the request.
       
    60      * @param ssid Name of the network.
       
    61      * @param beacon_interval Beacon interval in TUs.
       
    62      * @param channel Used channel (1 - 11).
       
    63      * @param encrypt_level Used encryption level.
       
    64      */    
       
    65     virtual void start_ibss(
       
    66         u32_t request_id,
       
    67         const core_ssid_s& ssid,
       
    68         u32_t beacon_interval,
       
    69         u32_t channel,
       
    70         core_encryption_mode_e encrypt_level ) = 0;
       
    71 
       
    72     /**
       
    73      * Request available networks with the given SSID.
       
    74      * 
       
    75      * @since S60 v3.1
       
    76      * @param request_id An unique identification for the request.
       
    77      * @param scan_mode Defines whether active or passive scan is performed.
       
    78      * @param scan_ssid Name of the network to scan for.
       
    79      * @param scan_rate Scan rate in units of 500kbit/second.
       
    80      * @param scan_channels Channels to scan.
       
    81      * @param scan_min_ch_time Minimum time to listen for beacons/probe responses on a channel.
       
    82      * @param scan_max_ch_time Maximum time to listen for beacons/probe responses on a channel.
       
    83      * @param is_split_scan Whether the scan should be performed as a split-scan.
       
    84      * @note If the length of the SSID is zero, a broadcast scan is performed.
       
    85      */
       
    86     virtual void scan(
       
    87         u32_t request_id,
       
    88         core_scan_mode_e scan_mode,
       
    89         const core_ssid_s& scan_ssid,
       
    90         int_t scan_rate,
       
    91         const core_scan_channels_s& scan_channels,
       
    92         u32_t scan_min_ch_time,
       
    93         u32_t scan_max_ch_time,        
       
    94         bool_t is_split_scan ) = 0;
       
    95 
       
    96     /**
       
    97      * Request an ongoing scan to be stopped.
       
    98      * 
       
    99      * @since S60 v3.1
       
   100      * @param request_id An unique identification for the request.
       
   101      */
       
   102     virtual void stop_scan(
       
   103         u32_t request_id ) = 0;
       
   104 
       
   105     /**
       
   106      * Connect (authenticate and associate) to a BSS.
       
   107      * 
       
   108      * @since S60 v3.1
       
   109      * @param request_id An unique identification for the request.
       
   110      * @param status The status code from the connection attempt is stored here.
       
   111      * @param ssid Name of the network.
       
   112      * @param bssid BSSID of the access point.
       
   113      * @param auth_algorithm Authentication algorithm number.
       
   114      * @param encryption_level Used encryption level.
       
   115      * @param pairwise_key_type Pairwise cipher key type to be used.
       
   116      * @param is_infra Whether the network is an IBSS or an infra network.
       
   117      * @param ie_data_length Length of IE data.
       
   118      * @param ie_data IE data.
       
   119      * @param scan_frame_length Length of beacon/probe response frame from the BSS.
       
   120      * @param scan_frame Pointer to beacon/probe response frame from the BSS.
       
   121      * @param is_pairwise_key_invalidated Whether the pairwise key should be invalidated.
       
   122      * @param is_group_key_invalidated Whether the group key should be invalidated
       
   123      * @param is_radio_measurement_supported Whether the radio measurement is supported
       
   124      */
       
   125     virtual void connect(
       
   126         u32_t request_id,
       
   127         core_management_status_e& status,
       
   128         const core_ssid_s& ssid,
       
   129         const core_mac_address_s& bssid,
       
   130         u16_t auth_algorithm,
       
   131         core_encryption_mode_e encryption_level,
       
   132         core_cipher_key_type_e pairwise_key_type,
       
   133         bool_t is_infra,
       
   134         u32_t ie_data_length,
       
   135         const u8_t* ie_data,
       
   136         u32_t scan_frame_length,
       
   137         const u8_t* scan_frame,
       
   138         bool_t is_pairwise_key_invalidated,
       
   139         bool_t is_group_key_invalidated,
       
   140         bool_t is_radio_measurement_supported ) = 0;
       
   141 
       
   142     /**
       
   143      * Disconnect from the current network.
       
   144      *
       
   145      * @since S60 v3.1
       
   146      * @param request_id An unique identification for the request.
       
   147      */
       
   148     virtual void disconnect(
       
   149         u32_t request_id ) = 0;
       
   150 
       
   151     /**
       
   152      * Set WLAN power mode.
       
   153      *
       
   154      * @since S60 v3.1
       
   155      * @param request_id An unique identification for the request.
       
   156      * @param mode Power mode to use.
       
   157      */
       
   158     virtual void set_power_mode(
       
   159         u32_t request_id,
       
   160         const core_power_mode_s& mode ) = 0;
       
   161 
       
   162     /**
       
   163      * Set transmission power level.
       
   164      *
       
   165      * @since S60 v3.1
       
   166      * @param request_id An unique identification for the request.
       
   167      * @param tx_level Transmission power level in dBm.     
       
   168      */
       
   169     virtual void set_tx_power_level(
       
   170         u32_t request_id,
       
   171         u32_t tx_level ) = 0;
       
   172 
       
   173     /**
       
   174      * Add a cipher key.
       
   175      *
       
   176      * @since S60 v3.1
       
   177      * @param cipher_suite The cipher suite of the key.
       
   178      * @param key_index Index of the key.
       
   179      * @param key_length Length of the cipher key.
       
   180      * @param key_data Cipher key data.
       
   181      * @param mac Defines the MAC address the key is used for.
       
   182      * @param use_as_default in case of wep, whether the key is used as default cipher key     
       
   183      */
       
   184     virtual void add_cipher_key(
       
   185         core_cipher_key_type_e cipher_suite,
       
   186         u8_t key_index,
       
   187         u16_t key_length,
       
   188         const u8_t* key_data,
       
   189         const core_mac_address_s& mac,
       
   190         bool_t use_as_default ) = 0;
       
   191 
       
   192     /**
       
   193      * Get the current RCPI value.
       
   194      *
       
   195      * @since S60 v3.1
       
   196      * @param request_id An unique identification for the request.
       
   197      * @param rcpi The current RCPI value.     
       
   198      */
       
   199     virtual void get_current_rcpi(
       
   200         u32_t request_id,
       
   201         u32_t& rcpi ) = 0;
       
   202 
       
   203     /**
       
   204      * Delivers multicast MAC address to drivers.
       
   205      *
       
   206      * @since S60 v3.1
       
   207      * @param request_id An unique identification for the request.
       
   208      * @param join_group is set true_t if adding a multicast address
       
   209      *        otherwise the address will be removed.
       
   210      * @param multicast_addr contains the MAC address to add/remove
       
   211      */
       
   212     virtual void configure_multicast_group(
       
   213         u32_t request_id,
       
   214         bool_t join_group,
       
   215         const core_mac_address_s& multicast_addr ) = 0;
       
   216 
       
   217     /**
       
   218      * Set the parameters related to BSS lost indication.
       
   219      * 
       
   220      * @since S60 v3.1
       
   221      * @param request_id Identification of the corresponding request.
       
   222      * @param parameters Parameters to set.
       
   223      */
       
   224     virtual void set_bss_lost_parameters(
       
   225         u32_t request_id,
       
   226         const core_bss_lost_parameters_s& parameters ) = 0;
       
   227 
       
   228     /**
       
   229      * Set the parameters related to TX rate adaptation algorithm.
       
   230      * 
       
   231      * @since S60 v3.1
       
   232      * @param request_id Identification of the corresponding request.
       
   233      * @param parameters Parameters to set.
       
   234      */
       
   235     virtual void set_tx_rate_adaptation_parameters(
       
   236         u32_t request_id,
       
   237         const core_tx_rate_adaptation_parameters_s& parameters ) = 0;
       
   238 
       
   239     /**
       
   240      * Set the parameters related to power mode management.
       
   241      * 
       
   242      * @since S60 v3.1
       
   243      * @param request_id Identification of the corresponding request.
       
   244      * @param parameters Parameters to set.
       
   245      */
       
   246     virtual void set_power_mode_mgmt_parameters(
       
   247         u32_t request_id,
       
   248         const core_power_mode_mgmt_parameters_s& parameters ) = 0;
       
   249 
       
   250     /**
       
   251      * Set the parameters related to TX rate policies.
       
   252      *
       
   253      * @since S60 v3.2
       
   254      * @param request_id Identification of the corresponding request.
       
   255      * @param policies TX rate policies to set.
       
   256      * @param mappings Mappings between Access Classes and TX rate policies.
       
   257      */
       
   258     virtual void set_tx_rate_policies(
       
   259         u32_t request_id,
       
   260         const core_tx_rate_policies_s& policies,
       
   261         const core_tx_rate_policy_mappings_s& mappings ) = 0;        
       
   262 
       
   263     /**
       
   264      * Get packet statistics for the currently active connection.
       
   265      *
       
   266      * @since S60 v3.2
       
   267      * @param request_id Identification of the corresponding request.
       
   268      * @param statistics Packet statistics for the currently active connection.
       
   269      */
       
   270     virtual void get_packet_statistics(
       
   271         u32_t request_id,
       
   272         core_packet_statistics_by_access_category_s& statistics ) = 0;
       
   273 
       
   274     /**
       
   275      * Set the RCPI trigger level.
       
   276      *
       
   277      * @since S60 v3.2
       
   278      * @param request_id Identification of the corresponding request.
       
   279      * @param rcpi_trigger The RCPI trigger level.
       
   280      */
       
   281     virtual void set_rcpi_trigger_level(        
       
   282         u32_t request_id,
       
   283         u8_t rcpi_trigger ) = 0;
       
   284 
       
   285     /**
       
   286      * Set the U-APSD settings.
       
   287      *
       
   288      * @since S60 v3.2
       
   289      * @param request_id Identification of the corresponding request.
       
   290      * @param settings Current U-APSD settings to be set.
       
   291      */
       
   292     virtual void set_uapsd_settings(
       
   293         u32_t request_id,
       
   294         const core_uapsd_settings_s& settings ) = 0;
       
   295 
       
   296     /**
       
   297      * Set the power save settings.
       
   298      *
       
   299      * @since S60 v3.2
       
   300      * @param request_id Identification of the corresponding request.
       
   301      * @param settings Current power save settings to be set.
       
   302      */
       
   303     virtual void set_power_save_settings(
       
   304         u32_t request_id,
       
   305         const core_power_save_settings_s& settings ) = 0;
       
   306 
       
   307     /**
       
   308      * Set the parameters of a tx queue.
       
   309      *
       
   310      * @since S60 v3.2
       
   311      * @param request_id Identification of the corresponding request.
       
   312      * @param queue_id Queue to be configured.
       
   313      * @param medium_time Medium time to be used.
       
   314      * @param max_tx_msdu_lifetime Maximum Transmit MSDU Lifetime to be used.
       
   315      */
       
   316     virtual void set_tx_queue_parameters(
       
   317         u32_t request_id,
       
   318         core_access_class_e queue_id,
       
   319         u16_t medium_time,
       
   320         u32_t max_tx_msdu_lifetime ) = 0;
       
   321 
       
   322     /**
       
   323      * Allow sending of user data.
       
   324      *
       
   325      * @since S60 v3.1
       
   326      * @param request_id An unique identification for the request.
       
   327      */
       
   328     virtual void enable_user_data(
       
   329         u32_t request_id ) = 0;
       
   330 
       
   331     /**
       
   332      * Prevent sending of user data.
       
   333      *
       
   334      * @since S60 v3.1
       
   335      * @param request_id An unique identification for the request.
       
   336      */
       
   337     virtual void disable_user_data(
       
   338         u32_t request_id ) = 0;    
       
   339 
       
   340     /**
       
   341      * Unload the drivers and power down the WLAN hardware.  
       
   342      *
       
   343      * @since S60 v3.1
       
   344      * @param request_id An unique identification for the request.
       
   345      */
       
   346     virtual void unload_drivers(
       
   347         u32_t request_id ) = 0;
       
   348 
       
   349     /**
       
   350      * Load the drivers and power up the WLAN hardware.
       
   351      *
       
   352      * @since S60 v3.1
       
   353      * @param request_id An unique identification for the request.
       
   354      * @param rts_threshold Determines the maximum packet size that can be sent without RTS/CTS protocol.
       
   355      * @param max_tx_msdu_lifetime Maximum time to (re-)send the whole MSDU packet in TUs.
       
   356      * @param qos_null_frame_entry_timeout Defines the time period in microseconds which is used
       
   357      *                                     to evaluate whether QoS NULL data frame sending should be started.
       
   358      * @param qos_null_frame_entry_tx_count Defines how many Voice AC packets must be sent during the time
       
   359      *                                      period defined in qos_null_frame_entry_timeout before QoS NULL
       
   360      *                                      data frame sending is started.
       
   361      * @param qos_null_frame_interval Defines how often a QoS NULL data frame is sent.
       
   362      * @param qos_null_frame_exit_timeout Defines how soon after the last Voice AC packet QoS NULL data
       
   363      *                                    frame sending is stopped.
       
   364      * @param keep_alive_interval Defines how often NULL data frames are sent if there are no other frames
       
   365      *                            to send.
       
   366      * @param sp_rcpi_target Defines the signal predictor algorithm "target" RCPI value for roam indication.
       
   367      * @param sp_time_target Defines the signal predictor algorithm "target" time for roam indication
       
   368      *                       (in microseconds).
       
   369      * @param sp_min_indication_interval Defines the minimum time interval for consecutive roam
       
   370      *                                   indications from the signal predictor algorithm (in microseconds).
       
   371      */
       
   372     virtual void load_drivers(
       
   373         u32_t request_id,
       
   374         uint_t rts_threshold,
       
   375         u32_t max_tx_msdu_lifetime,
       
   376         u32_t qos_null_frame_entry_timeout,
       
   377         u32_t qos_null_frame_entry_tx_count,
       
   378         u32_t qos_null_frame_interval,
       
   379         u32_t qos_null_frame_exit_timeout,
       
   380         u32_t keep_alive_interval,
       
   381         u32_t sp_rcpi_target,
       
   382         u32_t sp_time_target,
       
   383         u32_t sp_min_indication_interval ) = 0;
       
   384 
       
   385     /**
       
   386      * Send a frame.
       
   387      *
       
   388      * @since S60 v3.1
       
   389      * @param frame_type The type of the frame to send.
       
   390      * @param frame_length The length of the frame.
       
   391      * @param frame_data Pointer to the frame data.
       
   392      * @param frame_priority User priority to use for sending the frame.
       
   393      * @param destination Destination MAC address.
       
   394      * @param send_unencrypted Whether the frame must be sent unencrypted.
       
   395      */
       
   396     virtual void send_frame(        
       
   397         core_frame_type_e frame_type,
       
   398         const u16_t frame_length,
       
   399         const u8_t* const frame_data,
       
   400         u8_t frame_priority,
       
   401         const core_mac_address_s& destination,
       
   402         bool_t send_unencrypted ) = 0;
       
   403 
       
   404     /**
       
   405      * Cancel a pending asynchronous request.
       
   406      * 
       
   407      * @since S60 v3.1
       
   408      * @param request_id Identification of the corresponding request.
       
   409      */
       
   410     virtual void cancel_request(
       
   411         u32_t request_id ) = 0;
       
   412 
       
   413     /**
       
   414      * Set the ARP filter.
       
   415      *
       
   416      * @since S60 v5.0
       
   417      * @param request_id Identification of the corresponding request.
       
   418      * @param filter Current ARP filter to be set.
       
   419      */
       
   420     virtual void set_arp_filter(
       
   421         u32_t request_id,
       
   422         const core_arp_filter_s& filter ) = 0;
       
   423 
       
   424     /**
       
   425      * Set block ACK usage per traffic stream.
       
   426      * 
       
   427      * @since S60 v5.1
       
   428      * @param request_id Identification of the corresponding request. 
       
   429      * @param usage Block ACK usage information. 
       
   430      */    
       
   431     virtual void set_block_ack_usage(
       
   432         u32_t request_id,
       
   433         const core_block_ack_usage_s& usage ) = 0;
       
   434 
       
   435     /**
       
   436      * Set the SNAP header of frames to receive.  
       
   437      */
       
   438     virtual void set_snap_header_filter(
       
   439         u32_t request_id,
       
   440         const core_snap_header_s& header ) = 0;
       
   441 
       
   442     };
       
   443 
       
   444 #endif // ABS_CORE_DRIVERIF_H