wlan_plat/wlan_hal_api/inc/wlanwha.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2005-2009 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 "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:  Part of WLAN HAL API
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 6 %
       
    20 */
       
    21 
       
    22 #ifndef WHA_H
       
    23 #define WHA_H
       
    24 
       
    25 #include <wlanwhanamespace.h>
       
    26 #include <wlanwha_mib.h>
       
    27 
       
    28 class MWlanOsa;
       
    29 class WlanHpa;
       
    30 class WlanSpia;
       
    31 
       
    32 struct SHwBusAccessLayer;
       
    33 
       
    34 NAMESPACE_BEGIN_WHA
       
    35 
       
    36 struct SConfigureData;
       
    37 
       
    38 /**
       
    39  *  Defines the WHA callback interface
       
    40  *
       
    41  *  @since S60 3.1
       
    42  */
       
    43 class MWhaCb
       
    44     {
       
    45     
       
    46 public:  // Methods
       
    47     
       
    48     virtual ~MWhaCb() {};
       
    49     
       
    50     /**
       
    51      * The WLAN PDD uses this method to give a command response event to the 
       
    52      * WLAN LDD.
       
    53      *
       
    54      * @since S60 3.1
       
    55      * @param aCommandId Event identifier.
       
    56      * @param aStatus Status code.
       
    57      * @param aCommandResponseParams Event specific data structure.
       
    58      */
       
    59     virtual void CommandResponse( 
       
    60         TCommandId aCommandId, 
       
    61         TStatus aStatus,
       
    62         const UCommandResponseParams& aCommandResponseParams ) = 0;
       
    63 
       
    64     /**
       
    65      * The WLAN PDD uses this method to give a command completion event to the
       
    66      * WLAN LDD.
       
    67      *
       
    68      * @since S60 3.1
       
    69      * @param aCompleteCommandId Event identifier.
       
    70      * @param aStatus Status code.
       
    71      * @param aCommandCompletionParams Event specific data structure.
       
    72      */
       
    73     virtual void CommandComplete( 
       
    74         TCompleteCommandId aCompleteCommandId, 
       
    75         TStatus aStatus,
       
    76         const UCommandCompletionParams& aCommandCompletionParams ) = 0;
       
    77 
       
    78     /**
       
    79      * The WLAN PDD uses this method to indicate a spontaneous event to the
       
    80      * WLAN LDD.
       
    81      *
       
    82      * @since S60 3.1
       
    83      * @param aIndicationId Event identifier.
       
    84      * @param aIndicationParams Event specific data structure.
       
    85      */
       
    86     virtual void Indication( 
       
    87         TIndicationId aIndicationId,
       
    88         const UIndicationParams& aIndicationParams ) = 0;
       
    89 
       
    90     /**
       
    91      * The WLAN PDD calls this method when it has transferred a packet to the
       
    92      * WLAN device.
       
    93      *
       
    94      * @since S60 3.1
       
    95      * @param aPacketId The ID that the WLAN LDD gave for the packet in the
       
    96      *        SendPacket call.
       
    97      */
       
    98     virtual void SendPacketTransfer(
       
    99         TPacketId aPacketId ) = 0;
       
   100 
       
   101     /**
       
   102      * The WLAN PDD calls method when the WLAN device has processed a packet
       
   103      * from its send queue.
       
   104      *
       
   105      * @since S60 3.1
       
   106      * @param aStatus The result of the packet sending:
       
   107      *        KSuccess: The packet sending was successful.
       
   108      *        KErrorRetryExceeded: Packet sending failed because of exceeding
       
   109      *        dot11ShortRetryLimit or dot11LongRetryLimit.
       
   110      *        KErrorLifetimeExceeded: Packet sending failed because of exceeding
       
   111      *        dot11MaxTransmitMsduLifeTime.
       
   112      *        KErrorNoLink: Packet sending failed because of the loss of the 
       
   113      *        network link. The WLAN flushed the packet from the queue before
       
   114      *        making a single transmit attempt for it.
       
   115      * @param aPacketId The ID that the WLAN LDD gave for the packet in the
       
   116      *        SendPacket call.
       
   117      * @param aRate The data rate or MCS at which the packet sending succeeded.
       
   118      *        (this parameter is only valid if aStatus is KSuccess.)
       
   119      *        If the transmission was a non-HT transmission, then this parameter
       
   120      *        contains the data rate in bit map format.
       
   121      *        If the transmission was an HT transmission, then this parameter
       
   122      *        contains the numeric value of the MCS.
       
   123      * @param aPacketQueueDelay The time the packet spent in the WLAN device 
       
   124      *        transmit queue before the WLAN device started transmission.
       
   125      *        The time is calculated from the point the WLAN device gets the
       
   126      *        packet from the host to the point the packet is ready for
       
   127      *        transmission.
       
   128      *        This parameter is only valid if aStatus is KSuccess.
       
   129      *        This value is zero if the WLAN device does not support the
       
   130      *        calculation.
       
   131      *        Unit: microseconds.
       
   132      * @param aMediaDelay The total time the packet spent in the WLAN device
       
   133      *        before transmission was completed.
       
   134      *        The time is calculated from the point the WLAN device gets the
       
   135      *        packet from the host to the point it gets an acknowledgement for
       
   136      *        the packet from the peer.
       
   137      *        This parameter is only valid if aStatus is KSuccess.
       
   138      *        This value is zero if the WLAN device does not support the
       
   139      *        calculation.
       
   140      *        Unit: microseconds.
       
   141      * @param aAckFailures The number of times the WLAN device transmitted the
       
   142      *        packet without receiving an acknowledgement.
       
   143      * @param The sequence number the WLAN device used when it transmitted the
       
   144      *        frame.
       
   145      */
       
   146     virtual void SendPacketComplete(
       
   147         TStatus aStatus,
       
   148         TPacketId aPacketId,
       
   149         TRate aRate,
       
   150         TUint32 aPacketQueueDelay,
       
   151         TUint32 aMediaDelay,
       
   152         TUint8 aAckFailures,
       
   153         TUint16 aSequenceNumber = 0 ) = 0;
       
   154 
       
   155     /**
       
   156      * The WLAN PDD calls this method to request a memory buffer for packet
       
   157      * reception.
       
   158      *
       
   159      * @since S60 3.1
       
   160      * @param aLength The length of the requested buffer in bytes.
       
   161      *        The upper limit for the length is the maximum length of
       
   162      *        an 802.11n A-MSDU.
       
   163      * @return The method allocates a buffer whose length is aLength + Rx
       
   164      *        offset bytes and returns a pointer to the beginning of the buffer.
       
   165      *        If the allocation fails, the method returns a NULL pointer and the
       
   166      *        WLAN PDD should discard the received packet.
       
   167      */
       
   168     virtual TAny* RequestForBuffer ( TUint16 aLength ) = 0;
       
   169     
       
   170     /**
       
   171      * The WLAN PDD uses this method to deliver a received packet.
       
   172      *
       
   173      * @since S60 3.1
       
   174      * @param aStatus The result of the of the packet reception:
       
   175      *        KSuccess: The packet reception was successful.
       
   176      *        KDecryptFailure: The packet reception failed because of a
       
   177      *        decryption error.
       
   178      *        KMicFailure: The packet reception failed because of a MIC failure.
       
   179      *        KFailed: The packet reception failed because of some other reason.
       
   180      * @param aFrame A pointer to the beginning of the packet content (the first
       
   181      *        byte of the MSDU or A-MSDU)
       
   182      *        If aStatus indicates a failure (KDecryptFailure, KMicFailure,
       
   183      *        KFailed ), the packet should contain only the MAC header (i.e.,
       
   184      *        the frame body is omitted).
       
   185      * @param aLength The length of the packet. Measured from the first byte of
       
   186      *        the MAC header to the last byte of the frame body.
       
   187      * @param aRate The data rate or MCS at which the frame was received
       
   188      *        If the packet was received as a non-HT transmission, then this 
       
   189      *        parameter contains the data rate in bit map format.
       
   190      *        If the packet was received as an HT transmission, then this 
       
   191      *        parameter contains the numeric value of the MCS.
       
   192      * @param aRCPI RCPI value of the received packet.
       
   193      * @param aChannel The channel on which the packet was received.
       
   194      * @param aBuffer A pointer to the beginning of the allocated memory buffer
       
   195      *        (i.e., the pointer that the WLAN PDD got with RequestForBuffer).
       
   196      *        This parameter is only used when operating in "multi buffer mode".
       
   197      *        In single buffer mode, the WLAN PDD should set it to NULL.
       
   198      * @param aFlags Bit field providing status information of the received
       
   199      *        frame.
       
   200      */
       
   201     virtual void ReceivePacket( 
       
   202         TStatus aStatus,
       
   203         const void* aFrame,
       
   204         TUint16 aLength,
       
   205         TRate aRate,
       
   206         TRcpi aRCPI,
       
   207         TChannelNumber aChannel,
       
   208         void* aBuffer,
       
   209         TUint32 aFlags ) = 0;
       
   210     };
       
   211 
       
   212 
       
   213 /**
       
   214  *  Defines the WHA interface
       
   215  *
       
   216  *  @since S60 3.1
       
   217  */
       
   218 class Wha
       
   219     {
       
   220 
       
   221 public: // constants
       
   222     
       
   223     enum { KNumOfEdcaQueues = 4 };
       
   224 
       
   225 public: // Methods
       
   226     
       
   227     virtual ~Wha() {};
       
   228     
       
   229     /**
       
   230      * WHA callback attachment method
       
   231      *
       
   232      * @since S60 3.1
       
   233      * @param aWhaCb 
       
   234      */
       
   235     inline void Attach( MWhaCb& aWhaCb );
       
   236 
       
   237     static Wha* Create( MWlanOsa& aOsa, 
       
   238                         WlanHpa& aHpa, 
       
   239                         const SHwBusAccessLayer& aTransPortLayer );
       
   240 
       
   241     static void Destroy( Wha* aWha );
       
   242 
       
   243     /**
       
   244      * This method downloads the firmware to the WLAN device and performs the
       
   245      * low level initialization of the device.
       
   246      *
       
   247      * @since S60 3.1
       
   248      * @param aData Firmware data. The content is vendor-specific.
       
   249      *        The memory behind the pointer is valid to the point when the WLAN
       
   250      *        PDD sends the corresponding command response event.
       
   251      * @param aLength The length of the data in bytes placed in the parameter 
       
   252      *        aData.
       
   253      */
       
   254     virtual void Initialize( 
       
   255         const void* aData, 
       
   256         TUint32 aLength ) = 0;
       
   257 
       
   258     /**
       
   259      * The WLAN LDD calls this method to configure the WLAN device.
       
   260      *
       
   261      * @since S60 3.1
       
   262      * @param aData Configuration data. The content is vendor-specific. 
       
   263      *        The memory behind the reference is valid to the point when the
       
   264      *        WLAN PDD sends the corresponding command response event.
       
   265      * @param aSettings Output data that holds the capabilities of the
       
   266      *        WLAN device.
       
   267      */
       
   268     virtual void Configure( 
       
   269         const SConfigureData& aData, 
       
   270         SSettings& aSettings ) = 0;
       
   271 
       
   272     /**
       
   273      * WLAN LDD calls this method to prepare the WLAN PDD for unloading.
       
   274      *
       
   275      * @since S60 3.1
       
   276      * @param aSynchronous Should the command be executed synchronously (ETrue)
       
   277      *        or not (EFalse).
       
   278      * @return KSuccess: The command was executed synchronously and no command 
       
   279      *         response event is sent.
       
   280      *         KPending: The command is executed asynchronously and the 
       
   281      *         corresponding command response event is sent upon command 
       
   282      *         completion.
       
   283      */
       
   284     virtual TStatus Release( TBool aSynchronous ) = 0;
       
   285 
       
   286     /**
       
   287      * The WLAN LDD uses this method to command the WLAN device to start
       
   288      * scanning the available networks.
       
   289      *
       
   290      * @since S60 3.1
       
   291      * @param aMaxTransmitRate The transmission rate of the probe requests
       
   292      *        Note: Just a single rate is selected as rate fallback is
       
   293      *        not to be used during the scan process.
       
   294      * @param aBand The used frequency band. 
       
   295      *        Only one band is scanned at a time and one bit is used to select
       
   296      *        the band to be scanned.
       
   297      * @param aNumOfChannels The number of channels provided in the array
       
   298      *       (aChannels).
       
   299      * @param aChannels A structure that specifies the scanned channels.
       
   300      * @param aScanType The scan type:
       
   301      *        EFgScan: foreground scan.
       
   302      *        EBgScan: background scan.
       
   303      *        EForcedBgScan: forced background scan.
       
   304      * @param aNumOfProbeRequests The number of probe requests (per SSID) to be
       
   305      *        sent to each channel.
       
   306      *        Value 0 means the device does not send any probe requests and the
       
   307      *        scan is a passive scan.
       
   308      * @param aSplitScan ETrue - use split scan.
       
   309      *        EFalse - do not use split scan.
       
   310      * @param aNumOfSSID The number of SSIDs in the SSID array (aSSID).
       
   311      *        Value 0 means that the array is empty and this is a broadcast
       
   312      *        scan. In a broadcast scan, the WLAN device puts an empty SSID in
       
   313      *        the probe requests.
       
   314      *        Value greater than 0 means that this is a directed scan. The WLAN
       
   315      *        device puts the SSIDs in the array to the probe requests.
       
   316      * @param aSsid An array of the SSID to be scanned in a directed scan.
       
   317      */
       
   318     virtual void Scan( 
       
   319         TRate aMaxTransmitRate, 
       
   320         TBand aBand,
       
   321         TUint8 aNumOfChannels,
       
   322         const SChannels* aChannels, 
       
   323         TScanType aScanType,
       
   324         TUint8 aNumOfProbeRequests,
       
   325         TBool aSplitScan,
       
   326         TUint8 aNumOfSSID,
       
   327         const SSSID* aSsid ) = 0;
       
   328         
       
   329     /**
       
   330      * The WLAN LDD uses this method to stop an ongoing scan process.
       
   331      *
       
   332      * @since S60 3.1
       
   333      */
       
   334     virtual void StopScan() = 0;
       
   335 
       
   336     /**
       
   337      * The WLAN LDD uses this method to command the WLAN device to join a BSS
       
   338      * or IBSS or to start an IBSS.
       
   339      *
       
   340      * @since S60 3.1
       
   341      * @param aMode The operation mode of the network:
       
   342      *        EIBSS: IBSS mode
       
   343      *        EBSS:  BSS mode
       
   344      * @param aBSSID The BSSID of network.
       
   345      * @param aSSID The SSID of the network.
       
   346      * @param aBand The used frequency band. Only one bit is used to
       
   347      *        select the band.
       
   348      * @param aChannel The channel number of the network.
       
   349      * @param aBeaconInterval The time between TBTTs in TUs.
       
   350      * @param aBasicRateSet The BSS basic rate set.
       
   351      * @param aAtimWindow The ATIM window of the IBSS.
       
   352      *        Note: When the ATIM window is zero, the initiated IBSS does not
       
   353      *        support power save.
       
   354      * @param aPreambleType The preamble type.
       
   355      *        Note: 1 and 2 Mbit/s transmissions always use a long preamble
       
   356      *        regardless of this setting.
       
   357      * @param aProbeForJoin Specifies if the device should send a Probe request
       
   358      *        with the specified SSID when joining the network.
       
   359      *        [Optional]
       
   360      */
       
   361     virtual void Join(
       
   362         TOperationMode aMode,
       
   363         const TMacAddress& aBSSID,
       
   364         const SSSID& aSSID, 
       
   365         TBand aBand,
       
   366         TChannelNumber aChannel,
       
   367         TUint32 aBeaconInterval,
       
   368         TRate aBasicRateSet,
       
   369         TUint16 aAtimWindow,
       
   370         TPreamble aPreambleType,
       
   371         TBool aProbeForJoin ) = 0;
       
   372 
       
   373 
       
   374     /**
       
   375      * The WLAN LDD uses this command to reset the WLAN device and the WLAN PDD
       
   376      * to their initial states (the state after the Initialize and Configure
       
   377      * commands).
       
   378      *
       
   379      * @since S60 3.1
       
   380      */
       
   381     virtual void Reset() = 0;
       
   382 
       
   383     /**
       
   384      * The WLAN LDD uses this method to change the WLAN device’s 802.11 power
       
   385      * management mode.
       
   386      *
       
   387      * @since S60 3.1
       
   388      * @param aPsMode The 802.11 power management mode the WLAN device should
       
   389      *        enter.
       
   390      */
       
   391     virtual void SetPsMode( TPsMode aPsMode ) = 0;
       
   392 
       
   393     /**
       
   394      * The WLAN LDD uses this method to fix connection parameters after the
       
   395      * initial connection setup (after the association response in the
       
   396      * infrastructure mode).
       
   397      *
       
   398      * @since S60 3.1
       
   399      * @param aDTIM Specifies the DTIM interval in multiples of beacons.
       
   400      * @param aAID Specifies the AID received during the association process.
       
   401      */
       
   402     virtual void SetBssParameters( 
       
   403         TUint8 aDTIM, 
       
   404         TUint16 aAID ) = 0;
       
   405 
       
   406     /** deprecated */
       
   407     virtual void Measure( 
       
   408         TPowerLevel /*aTxPowerLevel*/,
       
   409         TBand /*aBand*/,
       
   410         TChannelNumber /*aChannel*/,
       
   411         TUint8 /*aActivationDelay*/,
       
   412         TUint8 /*aMeasurementOffset*/,
       
   413         TUint8 /*aNumberOfMeasurementTypes*/,
       
   414         const SParameterSet* /*aParameterSet*/ ) {};
       
   415 
       
   416     /** deprecated */
       
   417     virtual void StopMeasure() {};
       
   418     
       
   419     /**
       
   420      * The WLAN LDD uses this method to read configuration information and
       
   421      * statistics from the WLAN device.
       
   422      *
       
   423      * @since S60 3.1
       
   424      * @param aMib The ID of the MIB to be accessed.
       
   425      */
       
   426     virtual void ReadMib( TMib aMib ) = 0;
       
   427     
       
   428     /**
       
   429      * The WLAN LDD uses this method to write configuration information to the
       
   430      * WLAN device.
       
   431      *
       
   432      * @since S60 3.1
       
   433      * @param aMib The ID of the MIB to be written.
       
   434      * @param aLength The length of the MIB.
       
   435      * @param aData A pointer to the structure specifying the MIB data according
       
   436      *        to the MIB ID.
       
   437      * @param aMore This flag is set to ETrue if the WLAN host driver is about
       
   438      *        to write more MIBs after this call.
       
   439      * @return KSuccess: The command was executed synchronously and no command
       
   440      *         response event is sent.
       
   441      *         KPending: The command is executed asynchronously and the
       
   442      *         corresponding command response event is sent upon command
       
   443      *         completion.
       
   444      */
       
   445     virtual TStatus WriteMib( 
       
   446         TMib aMib,
       
   447         TUint16 aLength,
       
   448         const void* aData,
       
   449         TBool aMore ) = 0;
       
   450     
       
   451     /**
       
   452      * This method adds a new (or replaces an old) encryption key to the WLAN
       
   453      * device.
       
   454      *
       
   455      * @since S60 3.1
       
   456      * @param aType The type of the key to be added:
       
   457      *        EWepGroupKey      – WEP group key
       
   458      *        EWepPairWiseKey   – WEP pairwise key
       
   459      *        ETkipGroupKey     – TKIP group key
       
   460      *        ETkipPairWiseKey  – TKIP pairwise key
       
   461      *        EAesGroupKey      – AES group key
       
   462      *        EAesPairWiseKey   – AES pairwise ket
       
   463      *        EWapiGroupKey     – WAPI group key
       
   464      *        EWapiPairWiseKey  – WAPI pairwise key
       
   465      * @param aKey A pointer to the structure containing the key material.
       
   466      * @param aEntryIndex The key entry index of the key to be added.
       
   467      */
       
   468     virtual void AddKey( 
       
   469         TKeyType aType, 
       
   470         const void* aKey,
       
   471         TUint8 aEntryIndex ) = 0;
       
   472     
       
   473     /**
       
   474      * This method removes encryption keys from the active key set.
       
   475      *
       
   476      * @since S60 3.1
       
   477      * @param aEntryIndex The index of the key to remove from the set.
       
   478      */
       
   479     virtual void RemoveKey( TUint8 aEntryIndex ) = 0;
       
   480     
       
   481     /**
       
   482      * The WLAN LDD uses this method to configure QoS parameters of
       
   483      * transmission queues.
       
   484      *
       
   485      * @since S60 3.1
       
   486      * @param aQueueId The ID for the queue.
       
   487      * @param aMaxLifeTime The time (in TUs) how long the MSDU can stay in the
       
   488      * transmit queue. If the timer expires before the MSDU is successfully
       
   489      * transmitted, the WLAN device shall discard the packet. [Optional]
       
   490      * @param aPsScheme The PS mode of the queue:
       
   491      *        ERegularPs - Regular PS mode. The queue is not trigger enabled.
       
   492      *        EUapsd     - U-APSD mode. The queue is trigger enabled.
       
   493      * @param aAckPolicy The ACK frame policy of the specified queue:
       
   494      *        ENormal - Normal ack.
       
   495      *        ENoaAck - No ack.
       
   496      * @param aMediumTime The amount of time the queue is allowed to access the
       
   497      *        WLAN air interface during one second interval.
       
   498      *        The unit of the parameter is 32 microseconds. Value 0
       
   499      *        means that the medium time is unlimited.
       
   500      */
       
   501     virtual void ConfigureQueue( 
       
   502         TQueueId aQueueId,
       
   503         TUint32 aMaxLifeTime,
       
   504         TPsScheme aPsScheme,
       
   505         const SSAPSDConfig& aSAPSDConfig, /** deprecated */
       
   506         TAckPolicy aAckPolicy,
       
   507         TUint16 aMediumTime ) = 0;
       
   508 
       
   509     /**
       
   510      * The WLAN LDD uses this method to configure EDCA access category
       
   511      * parameters.
       
   512      * 
       
   513      * @since S60 3.1
       
   514      * @param aCwMin CWmin (in slots) for the access class.
       
   515      * @param aCwMax CWmax (in slots) for the access class.
       
   516      * @param aAIFS AIFS value (in slots) for the access class.
       
   517      * @param aTxOplimit Tx Op Limit (in microseconds) for the access class.
       
   518      * @param aMaxReceiveLifeTime The maximum receive lifetime for the access 
       
   519      *        class. [Optional]
       
   520      */
       
   521     virtual void ConfigureAC( 
       
   522         TUint16 aCwMin[KNumOfEdcaQueues],
       
   523         TUint16 aCwMax[KNumOfEdcaQueues],
       
   524         TUint8 aAIFS[KNumOfEdcaQueues],
       
   525         TUint16 aTxOplimit[KNumOfEdcaQueues],
       
   526         TUint16 aMaxReceiveLifeTime[KNumOfEdcaQueues] ) = 0;
       
   527     
       
   528     /**
       
   529      * The WLAN LDD uses this method to send packets.
       
   530      * 
       
   531      * @since S60 3.1
       
   532      * @param aFrame A pointer to the beginning of the packet content (the first
       
   533      *        byte of the MSDU or A-MSDU).
       
   534      * @param aLength The length of the packet.
       
   535      *        Measured from the first byte of the MAC header to the last
       
   536      *        byte of the frame body.
       
   537      * @param aQueueId The transmit queue.
       
   538      * @param aTxRateClassId The index of the rate policy for this transmission.
       
   539      *        If the WLAN device supports autonomous rate adaptation, the index
       
   540      *        refers to the txAutoRatePolicy MIB.
       
   541      *        If the WLAN device does not support autonomous rate adaptation,
       
   542      *        the index refers to the txRatePolicy MIB.
       
   543      *        In both cases, the value 1 refers to the first policy.
       
   544      * @param aMaxTransmitRate The highest transmission rate to be used for this
       
   545      *        packet.
       
   546      *        This parameter is valid only when non-autonomous rate adaptation
       
   547      *        (txRatePolicy) is used.
       
   548      * @param aMore Informs the WLAN PDD if an another packet is pending for
       
   549      *        transmission in the WLAN LDD:
       
   550      *        EFalse: No, this is it for the time being.
       
   551      *        ETrue: Yes, another packet is pending for transmission.
       
   552      * @param aPacketId The packet identifier.
       
   553      * @param aPowerLevel The transmission power level. Unit: dBm. [Optional]
       
   554      * @param aExpiryTime The time (in TUs) how long the MSDU can stay in the
       
   555      *        transmit queue. [Optional]
       
   556      * @param aReserved Reserved field.
       
   557      * @return KSuccess: The WLAN PDD has buffered the packet for transfer to
       
   558      *         the WLAN device.
       
   559      *         The WLAN LDD can call SendPacket again to send a new packet.
       
   560      *         KSuccessXfer: The WLAN PDD has transferred the packet and all
       
   561      *         the previously buffered packets to the WLAN device.
       
   562      *         KPending: The WLAN PDD has buffered the packet for transfer to
       
   563      *         the WLAN device.
       
   564      *         The WLAN LDD can not call SendPacket until the WLAN PDD calls
       
   565      *         SendPacketTransfer.
       
   566      *         KQueueFull: The WLAN PDD has discarded the packet because the
       
   567      *         corresponding queue in the WLAN device is full.
       
   568      *         KSuccessQueueFull: The WLAN PDD has buffered the packet for
       
   569      *         transfer to the WLAN device. However, the corresponding queue
       
   570      *         in the WLAN device is now full.
       
   571      */
       
   572     virtual TStatus SendPacket(
       
   573         const void* aFrame,
       
   574         TUint16 aLength,
       
   575         TQueueId aQueueId,
       
   576         TUint8 aTxRateClassId,
       
   577         TRate aMaxTransmitRate,
       
   578         TBool aMore,
       
   579         TPacketId aPacketId,
       
   580         TPowerLevel aPowerLevel,
       
   581         TUint32 aExpiryTime,
       
   582         void* aReserved ) = 0;
       
   583 
       
   584     /**
       
   585      * The WLAN LDD calls this method to perform production line testing of the
       
   586      * WLAN device.
       
   587      *
       
   588      * @since S60 5.0
       
   589      * @param aType A parameter indicating which test to perform.
       
   590      * @param aParams Test specific parameters.
       
   591      *        An in/out parameter.
       
   592      */
       
   593     virtual void Plt( TPltType aType, void* aParams ) = 0;
       
   594 
       
   595 protected:  // methods
       
   596 
       
   597     Wha( MWlanOsa& aOsa, WlanHpa& aHpa, WlanSpia& aSpia ) 
       
   598         : iWhaCb( NULL ), iOsa( aOsa ), iHpa( aHpa ), iSpia( aSpia ) {};
       
   599 
       
   600     inline MWhaCb& WhaCb();
       
   601     inline WlanHpa& Hpa();
       
   602     inline MWlanOsa& OsaCb();
       
   603     inline WlanSpia& Spia();
       
   604 
       
   605 protected:  // data
       
   606     
       
   607     MWhaCb*     iWhaCb;
       
   608 
       
   609     MWlanOsa&   iOsa;
       
   610     WlanHpa&    iHpa;
       
   611     WlanSpia&   iSpia;
       
   612     };
       
   613 
       
   614 #include <wlanwha.inl>
       
   615 
       
   616 NAMESPACE_END_WHA
       
   617 
       
   618 #endif  // WHA_H