--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_unload_drivers.h Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_unload_drivers.h Tue May 25 14:40:09 2010 +0300
@@ -21,7 +21,7 @@
#include "core_operation_base.h"
-const u32_t DELAY_FOR_AGENT = 100000; // 0,1 seconds
+const u32_t DELAY_FOR_AGENT = 500000; // 0,5 seconds
class core_server_c;
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_delete_ts.cpp Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_delete_ts.cpp Tue May 25 14:40:09 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 8 %
+* %version: 9 %
*/
#include "core_operation_delete_ts.h"
@@ -121,6 +121,7 @@
* Delete the virtual traffic stream.
*/
virtual_ts_iter.remove();
+ virtual_stream = NULL;
/**
* Locate the actual traffic stream based on the TID.
@@ -279,6 +280,7 @@
* Delete the actual traffic stream.
*/
ts_iter.remove();
+ stream = NULL;
if( direction == core_traffic_stream_direction_uplink ||
direction == core_traffic_stream_direction_bidirectional )
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_delete_ts.cpp Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_delete_ts.cpp Tue May 25 14:40:09 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 9 %
+* %version: 10 %
*/
#include "core_operation_handle_delete_ts.h"
@@ -125,6 +125,7 @@
server_m->get_wpx_adaptation_instance().handle_ts_delete(
tid_m, user_priority );
ts_iter.remove();
+ stream = NULL;
if( direction == core_traffic_stream_direction_uplink ||
direction == core_traffic_stream_direction_bidirectional )
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_roam_update_ts.cpp Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_roam_update_ts.cpp Tue May 25 14:40:09 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 12 %
+* %version: 13 %
*/
#include "core_sub_operation_roam_update_ts.h"
@@ -154,14 +154,25 @@
core_virtual_traffic_stream_c* virtual_iter = virtual_ts_iter.first();
while( virtual_iter )
{
- if( is_ac_required[virtual_iter->access_class()] &&
- virtual_iter->status() != core_traffic_stream_status_active )
+ if( virtual_iter->status() != core_traffic_stream_status_active )
{
- DEBUG1( "core_sub_operation_roam_update_ts_c::next_state() - virtual traffic stream with ID %u needs to created",
- virtual_iter->id() );
+ if( is_ac_required[virtual_iter->access_class()] )
+ {
+ DEBUG1( "core_sub_operation_roam_update_ts_c::next_state() - virtual traffic stream with ID %u needs to created",
+ virtual_iter->id() );
- virtual_stream_list_m.add_traffic_stream(
- *virtual_iter );
+ virtual_stream_list_m.add_traffic_stream(
+ *virtual_iter );
+ }
+ else
+ {
+ /**
+ * Send a status update to all affected virtual traffic streams.
+ */
+ set_virtual_traffic_stream_inactive_by_id(
+ virtual_iter->id(),
+ core_traffic_stream_status_inactive_not_required );
+ }
}
virtual_iter = virtual_ts_iter.next();
@@ -188,7 +199,7 @@
*/
set_virtual_traffic_stream_inactive_by_tid(
iter->tid(),
- core_traffic_stream_status_inactive_not_required );
+ core_traffic_stream_status_inactive_not_required );
/**
* Delete the actual traffic stream.
@@ -196,6 +207,7 @@
server_m->get_wpx_adaptation_instance().handle_ts_delete(
iter->tid(), iter->user_priority() );
ts_iter.remove();
+ iter = NULL;
}
else if( iter->status() == core_traffic_stream_status_undefined )
{
@@ -222,6 +234,7 @@
server_m->get_wpx_adaptation_instance().handle_ts_delete(
iter->tid(), iter->user_priority() );
ts_iter.remove();
+ iter = NULL;
}
iter = ts_iter.next();
@@ -301,6 +314,7 @@
* Move to the next entry.
*/
stream_iter_m.remove();
+ iter = NULL;
(void)stream_iter_m.first();
return goto_state( core_state_recreate_next );
@@ -439,7 +453,9 @@
* Move to the next entry.
*/
stream_iter_m.remove();
+ iter = NULL;
virtual_stream_iter_m.remove();
+ virtual_iter = NULL;
(void)virtual_stream_iter_m.first();
return goto_state( core_state_recreate_virtual_next );
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_traffic_stream_list_iter.cpp Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_traffic_stream_list_iter.cpp Tue May 25 14:40:09 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: %
+* %version: 4 %
*/
#include "core_traffic_stream_list_iter.h"
@@ -85,5 +85,15 @@
//
core_error_e core_traffic_stream_list_iter_c::remove()
{
- return iter_m.remove();
+ core_traffic_stream_list_c::entry_s* entry = iter_m.current();
+ core_error_e ret = iter_m.remove();
+ if( ret == core_error_ok &&
+ entry )
+ {
+ delete entry->traffic_stream;
+ delete entry;
+ entry = NULL;
+ }
+
+ return ret;
}
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_virtual_traffic_stream_list_iter.cpp Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_virtual_traffic_stream_list_iter.cpp Tue May 25 14:40:09 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 1 %
+* %version: 2 %
*/
#include "core_virtual_traffic_stream_list_iter.h"
@@ -84,5 +84,15 @@
//
core_error_e core_virtual_traffic_stream_list_iter_c::remove()
{
- return iter_m.remove();
+ core_virtual_traffic_stream_list_c::entry_s* entry = iter_m.current();
+ core_error_e ret = iter_m.remove();
+ if( ret == core_error_ok &&
+ entry )
+ {
+ delete entry->traffic_stream;
+ delete entry;
+ entry = NULL;
+ }
+
+ return ret;
}
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.h Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.h Tue May 25 14:40:09 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 105 %
+* %version: 106 %
*/
#ifndef WLANCONTEXTIMPL_H
@@ -945,7 +945,7 @@
* @since S60 3.2
* @return length of the frame body
*/
- inline const TUint16 ScanResponseFrameBodyLength() const;
+ inline TUint16 ScanResponseFrameBodyLength() const;
/**
* Stores the IE(s) to be included into the (re-)association request.
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.inl Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacContextImpl.inl Tue May 25 14:40:09 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 77 %
+* %version: 78 %
*/
#include "umacconnectcontext.h"
@@ -420,7 +420,7 @@
//
// ---------------------------------------------------------------------------
//
-inline const TUint16 WlanContextImpl::ScanResponseFrameBodyLength() const
+inline TUint16 WlanContextImpl::ScanResponseFrameBodyLength() const
{
return iConnectContext.iScanResponseFrameBodyLength;
}
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11Associated.h Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11Associated.h Tue May 25 14:40:09 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 46 %
+* %version: 47 %
*/
#ifndef WLANDOT11ASSOCIATED_H
@@ -511,37 +511,6 @@
TBool aMulticastData );
/**
- * Adds a multicast MAC address and starts to filter (Rx) multicast
- * traffic sent to any other MAC addresses than those that have been
- * specified using this method
- * @param aCtxImpl statemachine context
- * @param aMacAddr The address to be added
- * @return ETrue if a state change occurred in the state machine
- * EFalse otherwise
- */
- virtual TBool AddMulticastAddr(
- WlanContextImpl& aCtxImpl,
- const TMacAddress& aMacAddr );
-
- /**
- * Removes a multicast MAC address from multicast (Rx) filtering
- * configuration. So any packet that we receive and which has been sent
- * to the multicast address in question is not accepted any more (i.e.
- * it is filtered).
- * However, if there are no addresses left in the multicast (Rx) filtering
- * configuration after this remove, the multicast filtering is disabled
- * and all (otherwise acceptable) multicast packets are accepted again.
- * @param aCtxImpl statemachine context
- * @param aMacAddr The address to be removed
- * @return ETrue if a state change occurred in the state machine
- * EFalse otherwise
- */
- virtual TBool RemoveMulticastAddr(
- WlanContextImpl& aCtxImpl,
- TBool aRemoveAll,
- const TMacAddress& aMacAddr );
-
- /**
* From MWlanUserEvent
* Add/set (or replace) a broadcast WEP key
*
@@ -582,16 +551,6 @@
TUint32 aMaxTxMSDULifetime );
/**
- * Sets the WHA::KMibDot11GroupAddressesTable MIB
- *
- * @param aCtxImpl statemachine context
- * @return ETrue if a state change occurred in the state machine
- * EFalse otherwise
- */
- TBool SetGroupAddressesTableMib(
- WlanContextImpl& aCtxImpl );
-
- /**
* If the power mgmt mode needs to be changed - based on
* aPowerMgmtModeChange - proceeds with the necessary actions
*
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11State.h Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11State.h Tue May 25 14:40:09 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 57 %
+* %version: 58 %
*/
#ifndef WLANDOT11STATE_H
@@ -859,6 +859,37 @@
const TMacAddress& aMacAddr );
/**
+ * Adds a multicast MAC address and starts to filter (Rx) multicast
+ * traffic sent to any other MAC addresses than those that have been
+ * specified using this method
+ * @param aCtxImpl statemachine context
+ * @param aMacAddr The address to be added
+ * @return ETrue if a state change occurred in the state machine
+ * EFalse otherwise
+ */
+ virtual TBool AddMulticastAddr(
+ WlanContextImpl& aCtxImpl,
+ const TMacAddress& aMacAddr );
+
+ /**
+ * Removes a multicast MAC address from multicast (Rx) filtering
+ * configuration. So any packet that we receive and which has been sent
+ * to the multicast address in question is not accepted any more (i.e.
+ * it is filtered).
+ * However, if there are no addresses left in the multicast (Rx) filtering
+ * configuration after this remove, the multicast filtering is disabled
+ * and all (otherwise acceptable) multicast packets are accepted again.
+ * @param aCtxImpl statemachine context
+ * @param aMacAddr The address to be removed
+ * @return ETrue if a state change occurred in the state machine
+ * EFalse otherwise
+ */
+ virtual TBool RemoveMulticastAddr(
+ WlanContextImpl& aCtxImpl,
+ TBool aRemoveAll,
+ const TMacAddress& aMacAddr );
+
+ /**
* Set transmission power level.
* This has to be legal at the current region.
* @param aCtxImpl statemachine context
@@ -1122,6 +1153,16 @@
const TSnapHeader& aSnapHeader );
/**
+ * Sets the WHA::KMibDot11GroupAddressesTable MIB
+ *
+ * @param aCtxImpl statemachine context
+ * @return ETrue if a state change occurred in the state machine
+ * EFalse otherwise
+ */
+ TBool SetGroupAddressesTableMib(
+ WlanContextImpl& aCtxImpl );
+
+ /**
* Sets the beacon lost count value
*
* @since S60 v3.1
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11Associated.cpp Tue May 25 14:40:09 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 96 %
+* %version: 96.1.1 %
*/
#include "config.h"
@@ -2157,177 +2157,6 @@
//
// ---------------------------------------------------------------------------
//
-TBool WlanDot11Associated::AddMulticastAddr(
- WlanContextImpl& aCtxImpl,
- const TMacAddress& aMacAddr )
- {
- TBool stateTransitionOccurred( EFalse );
-
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::AddMulticastAddr(): addr to be added:"),
- aMacAddr);
-
- if ( aCtxImpl.MulticastFilteringDisAllowed() )
- {
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::AddMulticastAddr(): Multicast filtering disallowed"));
-
- OnOidComplete( aCtxImpl, KErrGeneral );
- }
- else
- {
- if ( aCtxImpl.WHASettings().iNumOfGroupTableEntrys >
- aCtxImpl.MulticastAddressCount() )
- {
- // wha layer is able to take in an address
-
- // 1st try to add the address to our own internal bookkeeping
- WlanContextImpl::TGroupAddStatus addStatus =
- aCtxImpl.AddMulticastAddress( aMacAddr );
-
- switch ( addStatus )
- {
- case WlanContextImpl::EOk:
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::AddMulticastAddr(): Address will be added to the MIB"));
- // the address needed to be added and adding went ok.
- // Now update the group addresses MIB
- stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );
- break;
- case WlanContextImpl::EAlreadyExists:
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::AddMulticastAddr(): Address already exists"));
- // the specified address already exists so there's no need
- // to update the group addresses MIB
- // just complete the request with OK status
- OnOidComplete( aCtxImpl );
- stateTransitionOccurred = EFalse;
- break;
- case WlanContextImpl::EFull:
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::AddMulticastAddr(): Internal address table full; disallow multicast filtering"));
- // we are not able to take in any more addresses.
- // We will totally disable the multicast filtering
- // and we won't allow it to be enabled any more during
- // the current nw connection
- //
- aCtxImpl.ResetMulticastAddresses();
- aCtxImpl.MulticastFilteringDisAllowed( ETrue );
- stateTransitionOccurred =
- SetGroupAddressesTableMib( aCtxImpl );
- break;
- default:
- // programming error
- OsTracePrint( KErrorLevel, (TUint8*)
- ("UMAC: addStatus: %d"), addStatus );
- OsAssert( (TUint8*)("UMAC: panic"),
- (TUint8*)(WLAN_FILE), __LINE__ );
- }
- }
- else
- {
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::AddMulticastAddr(): WHA not able to accept address; disallow multicast filtering"));
- // wha layer is not able to take in an address. Either this is one
- // address too many, or it doesn't support even a single address.
- // In either case we will totally disable the multicast filtering
- // and we won't allow it to be enabled any more during the current
- // nw connection
- aCtxImpl.ResetMulticastAddresses();
- aCtxImpl.MulticastFilteringDisAllowed( ETrue );
- stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );
- }
- }
-
- // signal caller whether a state transition occurred or not
- return stateTransitionOccurred;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool WlanDot11Associated::RemoveMulticastAddr(
- WlanContextImpl& aCtxImpl,
- TBool aRemoveAll,
- const TMacAddress& aMacAddr )
- {
- TBool stateTransitionOccurred( EFalse );
-
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): addr to be removed:"),
- aMacAddr);
-
- if ( aCtxImpl.MulticastFilteringDisAllowed() )
- {
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): Multicast filtering disallowed"));
- // filtering is not allowed currently so there can't be any addresses
- // to remove. Just complete the request with OK status
- OnOidComplete( aCtxImpl );
- }
- else
- {
- if ( aRemoveAll )
- {
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): remove all"));
- // remove all addresses; naturally will also disable filtering
- aCtxImpl.ResetMulticastAddresses();
- stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );
- }
- else
- {
- // 1st remove the specified address from our own internal
- // bookkeeping, if it exists
- if ( aCtxImpl.RemoveMulticastAddress( aMacAddr ) )
- {
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): removing the specified address"));
- // it existed, so update the group addresses MIB, too
- stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );
- }
- else
- {
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::RemoveMulticastAddr(): specified address doesn't exist, nothing to do"));
- // it did't exist, so there's nothing to remove
- // Just complete the request with OK status
- OnOidComplete( aCtxImpl );
- }
- }
- }
-
- // signal caller whether a state transition occurred or not
- return stateTransitionOccurred;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
TBool WlanDot11Associated::AddBroadcastWepKey(
WlanContextImpl& aCtxImpl,
TUint32 aKeyIndex,
@@ -2395,89 +2224,6 @@
//
// ---------------------------------------------------------------------------
//
-TBool WlanDot11Associated::SetGroupAddressesTableMib(
- WlanContextImpl& aCtxImpl )
- {
- const TMacAddress* multicastAddresses( NULL );
- const TUint32 nbrOfAddrs(
- aCtxImpl.GetMulticastAddresses( multicastAddresses ) );
-
- TUint32 mibLength(
- // mib header length
- WHA::Sdot11GroupAddressesTable::KHeaderSize
- // + mib data length
- + ( sizeof( TMacAddress ) * nbrOfAddrs ) );
-
- // align length of MIB to 4-byte boundary
- mibLength = Align4( mibLength );
-
- OsTracePrint(
- KWlmCmdDetails,
- (TUint8*)
- ("UMAC: WlanDot11Associated::SetGroupAddressesTableMib(): mibLength: %d"),
- mibLength );
-
- // allocate memory for the mib to write
- WHA::Sdot11GroupAddressesTable* mib
- = static_cast<WHA::Sdot11GroupAddressesTable*>
- (os_alloc( mibLength ));
-
- if ( !mib )
- {
- // allocation failed
- // simulate macnotresponding error
- OsTracePrint( KWarningLevel, (TUint8*)
- ("UMAC: WlanDot11Associated::SetGroupAddressesTableMib(): memory allocating failed") );
- return DoErrorIndication( aCtxImpl, WHA::KErrorMacNotResponding );
- }
-
- if ( nbrOfAddrs )
- {
- // at least one address exists, so enable multicast address filtering
- mib->iEnable = ETrue;
- }
- else
- {
- // no addresses, so disable filtering
- mib->iEnable = EFalse;
- OsTracePrint( KWlmCmdDetails, (TUint8*)
- ("UMAC: WlanDot11Associated::SetGroupAddressesTableMib(): no addresses; disable filtering") );
- }
-
- mib->iNumOfAddrs = nbrOfAddrs;
-
- // copy the multicast addresses after the mib header
- os_memcpy( mib->iAddrData,
- reinterpret_cast<TUint8*>(const_cast<TMacAddress*>(
- multicastAddresses)),
- ( sizeof( TMacAddress ) * nbrOfAddrs ) );
-
- WlanWsaWriteMib& wha_cmd = aCtxImpl.WsaWriteMib();
-
- wha_cmd.Set(
- aCtxImpl,
- WHA::KMibDot11GroupAddressesTable,
- mibLength,
- mib );
-
- // change global state: entry procedure triggers action
- ChangeState( aCtxImpl,
- *this, // prev state
- wha_cmd, // next state
- // the ACT
- KCompleteManagementRequest
- );
-
- os_free( mib ); // release the allocated memory
-
- // signal caller that a state transition occurred
- return ETrue;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
TBool WlanDot11Associated::PowerMgmtModeChange(
WlanContextImpl& aCtxImpl,
TPowerMgmtModeChange aPowerMgmtModeChange )
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacDot11State.cpp Tue May 25 14:40:09 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 86 %
+* %version: 86.1.1 %
*/
#include "config.h"
@@ -3058,6 +3058,185 @@
return ret;
}
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+TBool WlanDot11State::AddMulticastAddr(
+ WlanContextImpl& aCtxImpl,
+ const TMacAddress& aMacAddr )
+ {
+ TBool stateTransitionOccurred( EFalse );
+
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::AddMulticastAddr(): addr to be added:"),
+ aMacAddr);
+
+ if ( aCtxImpl.MulticastFilteringDisAllowed() )
+ {
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::AddMulticastAddr(): Multicast filtering "
+ "disallowed"));
+
+ OnOidComplete( aCtxImpl, KErrGeneral );
+ }
+ else
+ {
+ if ( aCtxImpl.WHASettings().iNumOfGroupTableEntrys >
+ aCtxImpl.MulticastAddressCount() )
+ {
+ // wha layer is able to take in an address
+
+ // 1st try to add the address to our own internal bookkeeping
+ WlanContextImpl::TGroupAddStatus addStatus =
+ aCtxImpl.AddMulticastAddress( aMacAddr );
+
+ switch ( addStatus )
+ {
+ case WlanContextImpl::EOk:
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::AddMulticastAddr(): Address "
+ "will be added to the MIB"));
+ // the address needed to be added and adding went ok.
+ // Now update the group addresses MIB
+ stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );
+ break;
+ case WlanContextImpl::EAlreadyExists:
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::AddMulticastAddr(): Address "
+ "already exists"));
+ // the specified address already exists so there's no need
+ // to update the group addresses MIB
+ // just complete the request with OK status
+ OnOidComplete( aCtxImpl );
+ stateTransitionOccurred = EFalse;
+ break;
+ case WlanContextImpl::EFull:
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::AddMulticastAddr(): Internal "
+ "address table full; disallow multicast filtering"));
+ // we are not able to take in any more addresses.
+ // We will totally disable the multicast filtering
+ // and we won't allow it to be enabled any more during
+ // the current nw connection
+ //
+ aCtxImpl.ResetMulticastAddresses();
+ aCtxImpl.MulticastFilteringDisAllowed( ETrue );
+ stateTransitionOccurred =
+ SetGroupAddressesTableMib( aCtxImpl );
+ break;
+ default:
+ // programming error
+ OsTracePrint( KErrorLevel, (TUint8*)
+ ("UMAC: addStatus: %d"), addStatus );
+ OsAssert( (TUint8*)("UMAC: panic"),
+ (TUint8*)(WLAN_FILE), __LINE__ );
+ }
+ }
+ else
+ {
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::AddMulticastAddr(): WHA not able to "
+ "accept address; disallow multicast filtering"));
+ // wha layer is not able to take in an address. Either this is one
+ // address too many, or it doesn't support even a single address.
+ // In either case we will totally disable the multicast filtering
+ // and we won't allow it to be enabled any more during the current
+ // nw connection
+ aCtxImpl.ResetMulticastAddresses();
+ aCtxImpl.MulticastFilteringDisAllowed( ETrue );
+ stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );
+ }
+ }
+
+ // signal caller whether a state transition occurred or not
+ return stateTransitionOccurred;
+ }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+TBool WlanDot11State::RemoveMulticastAddr(
+ WlanContextImpl& aCtxImpl,
+ TBool aRemoveAll,
+ const TMacAddress& aMacAddr )
+ {
+ TBool stateTransitionOccurred( EFalse );
+
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::RemoveMulticastAddr(): addr to be removed:"),
+ aMacAddr);
+
+ if ( aCtxImpl.MulticastFilteringDisAllowed() )
+ {
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::RemoveMulticastAddr(): Multicast filtering "
+ "disallowed"));
+ // filtering is not allowed currently so there can't be any addresses
+ // to remove. Just complete the request with OK status
+ OnOidComplete( aCtxImpl );
+ }
+ else
+ {
+ if ( aRemoveAll )
+ {
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::RemoveMulticastAddr(): remove all"));
+ // remove all addresses; naturally will also disable filtering
+ aCtxImpl.ResetMulticastAddresses();
+ stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );
+ }
+ else
+ {
+ // 1st remove the specified address from our own internal
+ // bookkeeping, if it exists
+ if ( aCtxImpl.RemoveMulticastAddress( aMacAddr ) )
+ {
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::RemoveMulticastAddr(): removing "
+ "the specified address"));
+ // it existed, so update the group addresses MIB, too
+ stateTransitionOccurred = SetGroupAddressesTableMib( aCtxImpl );
+ }
+ else
+ {
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::RemoveMulticastAddr(): specified "
+ "address doesn't exist, nothing to do"));
+ // it did't exist, so there's nothing to remove
+ // Just complete the request with OK status
+ OnOidComplete( aCtxImpl );
+ }
+ }
+ }
+
+ // signal caller whether a state transition occurred or not
+ return stateTransitionOccurred;
+ }
+
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
@@ -4091,6 +4270,91 @@
return EFalse;
}
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+TBool WlanDot11State::SetGroupAddressesTableMib(
+ WlanContextImpl& aCtxImpl )
+ {
+ const TMacAddress* multicastAddresses( NULL );
+ const TUint32 nbrOfAddrs(
+ aCtxImpl.GetMulticastAddresses( multicastAddresses ) );
+
+ TUint32 mibLength(
+ // mib header length
+ WHA::Sdot11GroupAddressesTable::KHeaderSize
+ // + mib data length
+ + ( sizeof( TMacAddress ) * nbrOfAddrs ) );
+
+ // align length of MIB to 4-byte boundary
+ mibLength = Align4( mibLength );
+
+ OsTracePrint(
+ KWlmCmdDetails,
+ (TUint8*)
+ ("UMAC: WlanDot11State::SetGroupAddressesTableMib(): mibLength: %d"),
+ mibLength );
+
+ // allocate memory for the mib to write
+ WHA::Sdot11GroupAddressesTable* mib
+ = static_cast<WHA::Sdot11GroupAddressesTable*>
+ (os_alloc( mibLength ));
+
+ if ( !mib )
+ {
+ // allocation failed
+ // simulate macnotresponding error
+ OsTracePrint( KWarningLevel, (TUint8*)
+ ("UMAC: WlanDot11State::SetGroupAddressesTableMib(): memory "
+ "allocation failed") );
+ return DoErrorIndication( aCtxImpl, WHA::KErrorMacNotResponding );
+ }
+
+ if ( nbrOfAddrs )
+ {
+ // at least one address exists, so enable multicast address filtering
+ mib->iEnable = ETrue;
+ }
+ else
+ {
+ // no addresses, so disable filtering
+ mib->iEnable = EFalse;
+ OsTracePrint( KWlmCmdDetails, (TUint8*)
+ ("UMAC: WlanDot11State::SetGroupAddressesTableMib(): no addresses; "
+ "disable filtering") );
+ }
+
+ mib->iNumOfAddrs = nbrOfAddrs;
+
+ // copy the multicast addresses after the mib header
+ os_memcpy( mib->iAddrData,
+ reinterpret_cast<TUint8*>(const_cast<TMacAddress*>(
+ multicastAddresses)),
+ ( sizeof( TMacAddress ) * nbrOfAddrs ) );
+
+ WlanWsaWriteMib& wha_cmd = aCtxImpl.WsaWriteMib();
+
+ wha_cmd.Set(
+ aCtxImpl,
+ WHA::KMibDot11GroupAddressesTable,
+ mibLength,
+ mib );
+
+ // change global state: entry procedure triggers action
+ ChangeState( aCtxImpl,
+ *this, // prev state
+ wha_cmd, // next state
+ // the ACT
+ KCompleteManagementRequest
+ );
+
+ os_free( mib ); // release the allocated memory
+
+ // signal caller that a state transition occurred
+ return ETrue;
+ }
+
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacMacState.cpp Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacMacState.cpp Tue May 25 14:40:09 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 76 %
+* %version: 77 %
*/
#include "config.h"
@@ -97,13 +97,15 @@
// -----------------------------------------------------------------------------
//
TBool WlanMacState::SetRcpiTriggerLevel(
- WlanContextImpl& /*aCtxImpl*/,
+ WlanContextImpl& aCtxImpl,
TUint32 /*aRcpiTrigger*/ )
{
// not supported in default handler
+#ifndef NDEBUG
OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
-
- return EFalse;
+#endif
+ OnOidComplete( aCtxImpl, KErrNotSupported );
+ return EFalse; // no state change
}
// -----------------------------------------------------------------------------
@@ -111,7 +113,7 @@
// -----------------------------------------------------------------------------
//
TBool WlanMacState::AddBroadcastWepKey(
- WlanContextImpl& /*aCtxImpl*/,
+ WlanContextImpl& aCtxImpl,
TUint32 /*aKeyIndex*/,
TBool /*aUseAsDefaulKey*/,
TUint32 /*aKeyLength*/,
@@ -119,8 +121,11 @@
const TMacAddress& /*aMac*/ )
{
// not supported in default handler
+#ifndef NDEBUG
OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- return EFalse;
+#endif
+ OnOidComplete( aCtxImpl, KErrNotSupported );
+ return EFalse; // no state change
}
// -----------------------------------------------------------------------------
@@ -197,7 +202,7 @@
// ---------------------------------------------------------------------------
//
TBool WlanMacState::Connect(
- WlanContextImpl& /*aCtxImpl*/,
+ WlanContextImpl& aCtxImpl,
const TSSID& /*aSSID*/,
const TMacAddress& /*aBSSID*/,
TUint16 /*aAuthAlgorithmNbr*/,
@@ -209,19 +214,25 @@
TUint16 /*aIeDataLength*/ )
{
// not supported in default handler
+#ifndef NDEBUG
OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- return EFalse;
+#endif
+ OnOidComplete( aCtxImpl, KErrNotSupported );
+ return EFalse; // no state change
}
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
//
-TBool WlanMacState::Disconnect( WlanContextImpl& /*aCtxImpl*/ )
+TBool WlanMacState::Disconnect( WlanContextImpl& aCtxImpl )
{
// not supported in default handler
+#ifndef NDEBUG
OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- return EFalse;
+#endif
+ OnOidComplete( aCtxImpl, KErrNotSupported );
+ return EFalse; // no state change
}
// -----------------------------------------------------------------------------
@@ -321,7 +332,7 @@
// -----------------------------------------------------------------------------
//
TBool WlanMacState::StartIBSS(
- WlanContextImpl& /*aCtxImpl*/,
+ WlanContextImpl& aCtxImpl,
const TSSID& /*aSSID*/,
TUint32 /*aBeaconInterval*/,
TUint32 /*aAtim*/,
@@ -329,8 +340,11 @@
TEncryptionStatus /*aEncryptionStatus*/ )
{
// not supported in default handler
+#ifndef NDEBUG
OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- return EFalse;
+#endif
+ OnOidComplete( aCtxImpl, KErrNotSupported );
+ return EFalse; // no state change
}
// -----------------------------------------------------------------------------
@@ -366,8 +380,7 @@
TUint32 /*aMaxChannelTime*/,
TBool /*aSplitScan*/ )
{
- OnOidComplete( aCtxImpl, KErrGeneral );
-
+ OnOidComplete( aCtxImpl, KErrNotSupported );
return EFalse; // no state change
}
@@ -400,7 +413,7 @@
// -----------------------------------------------------------------------------
//
TBool WlanMacState::Configure(
- WlanContextImpl& /*aCtxImpl*/,
+ WlanContextImpl& aCtxImpl,
TUint32 /*aRTSThreshold*/,
TUint32 /*aMaxTxMSDULifetime*/,
TUint32 /*aVoiceCallEntryTimeout*/,
@@ -413,8 +426,11 @@
TUint32 /*aSpMinIndicationInterval*/ )
{
// not supported in default handler
+#ifndef NDEBUG
OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- return EFalse;
+#endif
+ OnOidComplete( aCtxImpl, KErrNotSupported );
+ return EFalse; // no state change
}
// -----------------------------------------------------------------------------
@@ -580,14 +596,17 @@
// -----------------------------------------------------------------------------
//
TBool WlanMacState::ConfigureTxQueueIfNecessary(
- WlanContextImpl& /*aCtxImpl*/,
- TQueueId /*aQueueId*/,
- TUint16 /*aMediumTime*/,
- TUint32 /*aMaxTxMSDULifetime*/ )
+ WlanContextImpl& aCtxImpl,
+ TQueueId /*aQueueId*/,
+ TUint16 /*aMediumTime*/,
+ TUint32 /*aMaxTxMSDULifetime*/ )
{
// not supported in default handler
+#ifndef NDEBUG
OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- return EFalse;
+#endif
+ OnOidComplete( aCtxImpl, KErrNotSupported );
+ return EFalse; // no state change
}
// -----------------------------------------------------------------------------
--- a/wlan_bearer/wlannwif/eabi/wlanprotou.def Tue May 11 17:54:03 2010 +0300
+++ b/wlan_bearer/wlannwif/eabi/wlanprotou.def Tue May 25 14:40:09 2010 +0300
@@ -53,7 +53,7 @@
_ZThn12_N27CWlanMetaConnectionProviderD1Ev @ 52 NONAME ; #<thunk>#
_ZThn20_N14CLANLinkCommon9ReceivedLERKN8Messages13TRuntimeCtxIdERKNS0_7TNodeIdERNS0_14TSignatureBaseE @ 53 NONAME ; #<thunk>#
_ZThn20_N27CWlanMetaConnectionProvider9ReceivedLERKN8Messages13TRuntimeCtxIdERKNS0_7TNodeIdERNS0_14TSignatureBaseE @ 54 NONAME ; #<thunk>#
- _ZThn96_N14CLANLinkCommon11GetControlLERK6TDesC8 @ 55 NONAME ; #<thunk>#
- _ZThn96_N14CLANLinkCommon5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 56 NONAME ; #<thunk>#
- _ZThn96_N14CLANLinkCommon6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 57 NONAME ; #<thunk>#
+ _ZThn100_N14CLANLinkCommon11GetControlLERK6TDesC8 @ 55 NONAME ; #<thunk>#
+ _ZThn100_N14CLANLinkCommon5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 56 NONAME ; #<thunk>#
+ _ZThn100_N14CLANLinkCommon6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 57 NONAME ; #<thunk>#