2010-09-08 15:46:36 -06:00
/************************************************************
2012-01-04 18:29:00 -07:00
* CMHOST . C
* This file contains the routines for handling Connection
* Management .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2010-09-08 15:46:36 -06:00
# include "headers.h"
2012-01-04 18:29:02 -07:00
enum E_CLASSIFIER_ACTION {
2010-09-08 15:46:36 -06:00
eInvalidClassifierAction ,
eAddClassifier ,
eReplaceClassifier ,
eDeleteClassifier
2012-01-04 18:29:02 -07:00
} ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:24:05 -06:00
static ULONG GetNextTargetBufferLocation ( struct bcm_mini_adapter * Adapter ,
B_UINT16 tid ) ;
2014-05-23 14:23:42 -06:00
static void restore_endianess_of_pstClassifierEntry (
struct bcm_classifier_rule * pstClassifierEntry ,
enum bcm_ipaddr_context eIpAddrContext ) ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:53 -06:00
static void apply_phs_rule_to_all_classifiers (
register struct bcm_mini_adapter * Adapter ,
register UINT uiSearchRuleIndex ,
USHORT uVCID ,
struct bcm_phs_rule * sPhsRule ,
struct bcm_phs_rules * cPhsRule ,
struct bcm_add_indication_alt * pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
/************************************************************
2012-01-04 18:29:00 -07:00
* Function - SearchSfid
*
* Description - This routinue would search QOS queues having
* specified SFID as input parameter .
*
* Parameters - Adapter : Pointer to the Adapter structure
* uiSfid : Given SFID for matching
*
* Returns - Queue index for this SFID ( If matched )
* Else Invalid Queue Index ( If Not matched )
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2012-05-26 10:05:12 -06:00
int SearchSfid ( struct bcm_mini_adapter * Adapter , UINT uiSfid )
2010-09-08 15:46:36 -06:00
{
2012-01-04 18:29:05 -07:00
int i ;
2012-01-04 18:29:00 -07:00
2012-01-04 18:29:05 -07:00
for ( i = ( NO_OF_QUEUES - 1 ) ; i > = 0 ; i - - )
if ( Adapter - > PackInfo [ i ] . ulSFID = = uiSfid )
return i ;
2012-01-04 18:29:00 -07:00
2010-09-08 15:46:36 -06:00
return NO_OF_QUEUES + 1 ;
}
/***************************************************************
2012-01-04 18:29:00 -07:00
* Function - SearchFreeSfid
*
* Description - This routinue would search Free available SFID .
*
* Parameter - Adapter : Pointer to the Adapter structure
*
* Returns - Queue index for the free SFID
* Else returns Invalid Index .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2012-05-26 10:05:12 -06:00
static int SearchFreeSfid ( struct bcm_mini_adapter * Adapter )
2010-09-08 15:46:36 -06:00
{
2012-01-04 18:29:05 -07:00
int i ;
2010-10-31 21:52:36 -06:00
2012-01-04 18:29:05 -07:00
for ( i = 0 ; i < ( NO_OF_QUEUES - 1 ) ; i + + )
if ( Adapter - > PackInfo [ i ] . ulSFID = = 0 )
return i ;
2012-01-04 18:29:00 -07:00
2010-09-08 15:46:36 -06:00
return NO_OF_QUEUES + 1 ;
}
/*
2012-01-04 18:29:00 -07:00
* Function : SearchClsid
* Description : This routinue would search Classifier having specified ClassifierID as input parameter
2012-05-26 10:05:12 -06:00
* Input parameters : struct bcm_mini_adapter * Adapter - Adapter Context
2012-01-04 18:29:00 -07:00
* unsigned int uiSfid - The SF in which the classifier is to searched
* B_UINT16 uiClassifierID - The classifier ID to be searched
* Return : int : Classifier table index of matching entry
*/
2014-05-23 14:24:04 -06:00
static int SearchClsid ( struct bcm_mini_adapter * Adapter ,
ULONG ulSFID ,
B_UINT16 uiClassifierID )
2010-09-08 15:46:36 -06:00
{
2012-01-04 18:29:05 -07:00
int i ;
2012-01-04 18:29:00 -07:00
2012-01-04 18:29:05 -07:00
for ( i = 0 ; i < MAX_CLASSIFIERS ; i + + ) {
if ( ( Adapter - > astClassifierTable [ i ] . bUsed ) & &
2014-05-23 14:24:04 -06:00
( Adapter - > astClassifierTable [ i ] . uiClassifierRuleIndex
= = uiClassifierID ) & &
2012-01-04 18:29:05 -07:00
( Adapter - > astClassifierTable [ i ] . ulSFID = = ulSFID ) )
return i ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
2010-09-08 15:46:36 -06:00
return MAX_CLASSIFIERS + 1 ;
}
2012-01-04 18:29:00 -07:00
/*
* @ ingroup ctrl_pkt_functions
* This routinue would search Free available Classifier entry in classifier table .
* @ return free Classifier Entry index in classifier table for specified SF
*/
2012-05-26 10:05:12 -06:00
static int SearchFreeClsid ( struct bcm_mini_adapter * Adapter /**Adapter Context*/ )
2010-09-08 15:46:36 -06:00
{
2012-01-04 18:29:05 -07:00
int i ;
2012-01-04 18:29:00 -07:00
2012-01-04 18:29:05 -07:00
for ( i = 0 ; i < MAX_CLASSIFIERS ; i + + ) {
if ( ! Adapter - > astClassifierTable [ i ] . bUsed )
return i ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
2010-09-08 15:46:36 -06:00
return MAX_CLASSIFIERS + 1 ;
}
2014-05-23 14:24:03 -06:00
static VOID deleteSFBySfid ( struct bcm_mini_adapter * Adapter ,
UINT uiSearchRuleIndex )
2010-09-08 15:46:36 -06:00
{
2012-01-04 18:29:00 -07:00
/* deleting all the packet held in the SF */
flush_queue ( Adapter , uiSearchRuleIndex ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* Deleting the all classifiers for this SF */
DeleteAllClassifiersForSF ( Adapter , uiSearchRuleIndex ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* Resetting only MIBS related entries in the SF */
2014-05-23 14:24:03 -06:00
memset ( ( PVOID ) & Adapter - > PackInfo [ uiSearchRuleIndex ] , 0 ,
sizeof ( struct bcm_mibs_table ) ) ;
2010-09-08 15:46:36 -06:00
}
static inline VOID
2012-05-26 10:05:03 -06:00
CopyIpAddrToClassifier ( struct bcm_classifier_rule * pstClassifierEntry ,
2012-01-04 18:29:00 -07:00
B_UINT8 u8IpAddressLen , B_UINT8 * pu8IpAddressMaskSrc ,
2013-10-28 02:35:59 -06:00
bool bIpVersion6 , enum bcm_ipaddr_context eIpAddrContext )
2010-09-08 15:46:36 -06:00
{
2012-01-04 18:29:05 -07:00
int i = 0 ;
2012-01-04 18:29:00 -07:00
UINT nSizeOfIPAddressInBytes = IP_LENGTH_OF_ADDRESS ;
UCHAR * ptrClassifierIpAddress = NULL ;
UCHAR * ptrClassifierIpMask = NULL ;
2012-05-26 10:05:12 -06:00
struct bcm_mini_adapter * Adapter = GET_BCM_ADAPTER ( gblpnetdev ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( bIpVersion6 )
2010-09-08 15:46:36 -06:00
nSizeOfIPAddressInBytes = IPV6_ADDRESS_SIZEINBYTES ;
2012-01-04 18:29:00 -07:00
/* Destination Ip Address */
2014-05-23 14:24:02 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Ip Address Range Length:0x%X " , u8IpAddressLen ) ;
2012-01-04 18:29:00 -07:00
if ( ( bIpVersion6 ? ( IPV6_ADDRESS_SIZEINBYTES * MAX_IP_RANGE_LENGTH * 2 ) :
( TOTAL_MASKED_ADDRESS_IN_BYTES ) ) > = u8IpAddressLen ) {
2014-05-23 14:24:01 -06:00
union u_ip_address * st_dest_ip =
& pstClassifierEntry - > stDestIpAddress ;
union u_ip_address * st_src_ip =
& pstClassifierEntry - > stSrcIpAddress ;
2010-09-08 15:46:36 -06:00
/*
2012-01-04 18:29:00 -07:00
* checking both the mask and address togethor in Classification .
* So length will be : TotalLengthInBytes / nSizeOfIPAddressInBytes * 2
* ( nSizeOfIPAddressInBytes for address and nSizeOfIPAddressInBytes for mask )
*/
if ( eIpAddrContext = = eDestIpAddress ) {
2014-05-23 14:24:02 -06:00
pstClassifierEntry - > ucIPDestinationAddressLength =
u8IpAddressLen / ( nSizeOfIPAddressInBytes * 2 ) ;
2012-01-04 18:29:00 -07:00
if ( bIpVersion6 ) {
2014-05-23 14:24:02 -06:00
ptrClassifierIpAddress =
st_dest_ip - > ucIpv6Address ;
ptrClassifierIpMask =
st_dest_ip - > ucIpv6Mask ;
2012-01-04 18:29:00 -07:00
} else {
2014-05-23 14:24:02 -06:00
ptrClassifierIpAddress =
st_dest_ip - > ucIpv4Address ;
ptrClassifierIpMask =
st_dest_ip - > ucIpv4Mask ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
} else if ( eIpAddrContext = = eSrcIpAddress ) {
2014-05-23 14:24:02 -06:00
pstClassifierEntry - > ucIPSourceAddressLength =
u8IpAddressLen / ( nSizeOfIPAddressInBytes * 2 ) ;
2012-01-04 18:29:00 -07:00
if ( bIpVersion6 ) {
2014-05-23 14:24:02 -06:00
ptrClassifierIpAddress =
st_src_ip - > ucIpv6Address ;
2014-05-23 14:24:01 -06:00
ptrClassifierIpMask = st_src_ip - > ucIpv6Mask ;
2012-01-04 18:29:00 -07:00
} else {
2014-05-23 14:24:02 -06:00
ptrClassifierIpAddress =
st_src_ip - > ucIpv4Address ;
2014-05-23 14:24:01 -06:00
ptrClassifierIpMask = st_src_ip - > ucIpv4Mask ;
2010-09-08 15:46:36 -06:00
}
}
2014-05-23 14:24:02 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Address Length:0x%X \n " ,
pstClassifierEntry - > ucIPDestinationAddressLength ) ;
while ( ( u8IpAddressLen > = nSizeOfIPAddressInBytes )
& & ( i < MAX_IP_RANGE_LENGTH ) ) {
2010-09-08 15:46:36 -06:00
memcpy ( ptrClassifierIpAddress +
2012-01-04 18:29:05 -07:00
( i * nSizeOfIPAddressInBytes ) ,
2014-05-23 14:24:02 -06:00
( pu8IpAddressMaskSrc
+ ( i * nSizeOfIPAddressInBytes * 2 ) ) ,
2010-09-08 15:46:36 -06:00
nSizeOfIPAddressInBytes ) ;
2012-01-04 18:29:00 -07:00
if ( ! bIpVersion6 ) {
if ( eIpAddrContext = = eSrcIpAddress ) {
2014-05-23 14:24:02 -06:00
st_src_ip - > ulIpv4Addr [ i ] =
ntohl ( st_src_ip - > ulIpv4Addr [ i ] ) ;
BCM_DEBUG_PRINT ( Adapter ,
DBG_TYPE_OTHERS ,
CONN_MSG ,
DBG_LVL_ALL ,
" Src Ip Address:0x%luX " ,
2014-05-23 14:24:01 -06:00
st_src_ip - > ulIpv4Addr [ i ] ) ;
2012-01-04 18:29:00 -07:00
} else if ( eIpAddrContext = = eDestIpAddress ) {
2014-05-23 14:24:02 -06:00
st_dest_ip - > ulIpv4Addr [ i ] =
ntohl ( st_dest_ip - > ulIpv4Addr [ i ] ) ;
BCM_DEBUG_PRINT ( Adapter ,
DBG_TYPE_OTHERS ,
CONN_MSG ,
DBG_LVL_ALL ,
" Dest Ip Address:0x%luX " ,
2014-05-23 14:24:01 -06:00
st_dest_ip - > ulIpv4Addr [ i ] ) ;
2010-09-08 15:46:36 -06:00
}
}
2012-01-04 18:29:00 -07:00
u8IpAddressLen - = nSizeOfIPAddressInBytes ;
if ( u8IpAddressLen > = nSizeOfIPAddressInBytes ) {
2010-09-08 15:46:36 -06:00
memcpy ( ptrClassifierIpMask +
2012-01-04 18:29:05 -07:00
( i * nSizeOfIPAddressInBytes ) ,
2014-05-23 14:24:02 -06:00
( pu8IpAddressMaskSrc
+ nSizeOfIPAddressInBytes
+ ( i * nSizeOfIPAddressInBytes * 2 ) ) ,
2010-09-08 15:46:36 -06:00
nSizeOfIPAddressInBytes ) ;
2012-01-04 18:29:00 -07:00
if ( ! bIpVersion6 ) {
if ( eIpAddrContext = = eSrcIpAddress ) {
2014-05-23 14:24:01 -06:00
st_src_ip - > ulIpv4Mask [ i ] =
ntohl ( st_src_ip - > ulIpv4Mask [ i ] ) ;
2014-05-23 14:24:02 -06:00
BCM_DEBUG_PRINT ( Adapter ,
DBG_TYPE_OTHERS ,
CONN_MSG ,
DBG_LVL_ALL ,
" Src Ip Mask Address:0x%luX " ,
2014-05-23 14:24:01 -06:00
st_src_ip - > ulIpv4Mask [ i ] ) ;
2012-01-04 18:29:00 -07:00
} else if ( eIpAddrContext = = eDestIpAddress ) {
2014-05-23 14:24:01 -06:00
st_dest_ip - > ulIpv4Mask [ i ] =
ntohl ( st_dest_ip - > ulIpv4Mask [ i ] ) ;
2014-05-23 14:24:02 -06:00
BCM_DEBUG_PRINT ( Adapter ,
DBG_TYPE_OTHERS ,
CONN_MSG ,
DBG_LVL_ALL ,
" Dest Ip Mask Address:0x%luX " ,
2014-05-23 14:24:01 -06:00
st_dest_ip - > ulIpv4Mask [ i ] ) ;
2010-09-08 15:46:36 -06:00
}
}
2012-01-04 18:29:00 -07:00
u8IpAddressLen - = nSizeOfIPAddressInBytes ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:03 -07:00
if ( u8IpAddressLen = = 0 )
2012-01-04 18:29:00 -07:00
pstClassifierEntry - > bDestIpValid = TRUE ;
2012-01-04 18:29:05 -07:00
i + + ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
if ( bIpVersion6 ) {
/* Restore EndianNess of Struct */
2014-05-23 14:23:42 -06:00
restore_endianess_of_pstClassifierEntry (
pstClassifierEntry ,
eIpAddrContext
) ;
2010-09-08 15:46:36 -06:00
}
}
}
2013-10-28 02:35:59 -06:00
void ClearTargetDSXBuffer ( struct bcm_mini_adapter * Adapter , B_UINT16 TID , bool bFreeAll )
2010-09-08 15:46:36 -06:00
{
2012-01-04 18:29:05 -07:00
int i ;
2014-05-23 14:24:00 -06:00
struct bcm_targetdsx_buffer * curr_buf ;
2012-01-04 18:29:00 -07:00
2012-01-04 18:29:05 -07:00
for ( i = 0 ; i < Adapter - > ulTotalTargetBuffersAvailable ; i + + ) {
2014-05-23 14:24:00 -06:00
curr_buf = & Adapter - > astTargetDsxBuffer [ i ] ;
if ( curr_buf - > valid )
2010-09-08 15:46:36 -06:00
continue ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:24:00 -06:00
if ( ( bFreeAll ) | | ( curr_buf - > tid = = TID ) ) {
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 ,
" ClearTargetDSXBuffer: found tid %d buffer cleared %lx \n " ,
TID , curr_buf - > ulTargetDsxBuffer ) ;
curr_buf - > valid = 1 ;
curr_buf - > tid = 0 ;
2010-09-08 15:46:36 -06:00
Adapter - > ulFreeTargetBufferCnt + + ;
2012-01-04 18:29:00 -07:00
}
2010-09-08 15:46:36 -06:00
}
}
2012-01-04 18:29:00 -07:00
/*
* @ ingroup ctrl_pkt_functions
* copy classifier rule into the specified SF index
*/
2014-05-23 14:23:59 -06:00
static inline VOID CopyClassifierRuleToSF ( struct bcm_mini_adapter * Adapter ,
struct bcm_convergence_types * psfCSType ,
UINT uiSearchRuleIndex ,
UINT nClassifierIndex )
2010-09-08 15:46:36 -06:00
{
2012-05-26 10:05:03 -06:00
struct bcm_classifier_rule * pstClassifierEntry = NULL ;
2012-01-04 18:29:00 -07:00
/* VOID *pvPhsContext = NULL; */
2012-01-04 18:29:05 -07:00
int i ;
2012-01-04 18:29:00 -07:00
/* UCHAR ucProtocolLength=0; */
/* ULONG ulPhsStatus; */
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:58 -06:00
struct bcm_packet_class_rules * pack_class_rule =
& psfCSType - > cCPacketClassificationRule ;
2012-01-04 18:29:00 -07:00
if ( Adapter - > PackInfo [ uiSearchRuleIndex ] . usVCID_Value = = 0 | |
2010-09-08 15:46:36 -06:00
nClassifierIndex > ( MAX_CLASSIFIERS - 1 ) )
return ;
2014-05-23 14:23:59 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Storing Classifier Rule Index : %X " ,
2014-05-23 14:23:58 -06:00
ntohs ( pack_class_rule - > u16PacketClassificationRuleIndex ) ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( nClassifierIndex > MAX_CLASSIFIERS - 1 )
2010-09-08 15:46:36 -06:00
return ;
pstClassifierEntry = & Adapter - > astClassifierTable [ nClassifierIndex ] ;
2012-01-04 18:29:00 -07:00
if ( pstClassifierEntry ) {
/* Store if Ipv6 */
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > bIpv6Protocol =
( Adapter - > PackInfo [ uiSearchRuleIndex ] . ucIpVersion = = IPV6 ) ? TRUE : false ;
2012-01-04 18:29:00 -07:00
/* Destinaiton Port */
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > ucDestPortRangeLength =
pack_class_rule - > u8ProtocolDestPortRangeLength / 4 ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Destination Port Range Length:0x%X " ,
pstClassifierEntry - > ucDestPortRangeLength ) ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:58 -06:00
if ( pack_class_rule - > u8ProtocolDestPortRangeLength < = MAX_PORT_RANGE ) {
2012-01-04 18:29:05 -07:00
for ( i = 0 ; i < ( pstClassifierEntry - > ucDestPortRangeLength ) ; i + + ) {
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > usDestPortRangeLo [ i ] =
* ( ( PUSHORT ) ( pack_class_rule - > u8ProtocolDestPortRange + i ) ) ;
2012-01-04 18:29:05 -07:00
pstClassifierEntry - > usDestPortRangeHi [ i ] =
2014-05-23 14:23:58 -06:00
* ( ( PUSHORT ) ( pack_class_rule - > u8ProtocolDestPortRange + 2 + i ) ) ;
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > usDestPortRangeLo [ i ] =
ntohs ( pstClassifierEntry - > usDestPortRangeLo [ i ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS ,
CONN_MSG , DBG_LVL_ALL ,
" Destination Port Range Lo:0x%X " ,
2012-01-04 18:29:05 -07:00
pstClassifierEntry - > usDestPortRangeLo [ i ] ) ;
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > usDestPortRangeHi [ i ] =
ntohs ( pstClassifierEntry - > usDestPortRangeHi [ i ] ) ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
} else {
pstClassifierEntry - > ucDestPortRangeLength = 0 ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
/* Source Port */
2014-05-23 14:23:59 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Source Port Range Length:0x%X " ,
2014-05-23 14:23:58 -06:00
pack_class_rule - > u8ProtocolSourcePortRangeLength ) ;
if ( pack_class_rule - > u8ProtocolSourcePortRangeLength < = MAX_PORT_RANGE ) {
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > ucSrcPortRangeLength =
pack_class_rule - > u8ProtocolSourcePortRangeLength / 4 ;
2012-01-04 18:29:05 -07:00
for ( i = 0 ; i < ( pstClassifierEntry - > ucSrcPortRangeLength ) ; i + + ) {
pstClassifierEntry - > usSrcPortRangeLo [ i ] =
2014-05-23 14:23:58 -06:00
* ( ( PUSHORT ) ( pack_class_rule - >
2012-01-04 18:29:05 -07:00
u8ProtocolSourcePortRange + i ) ) ;
pstClassifierEntry - > usSrcPortRangeHi [ i ] =
2014-05-23 14:23:58 -06:00
* ( ( PUSHORT ) ( pack_class_rule - >
2012-01-04 18:29:05 -07:00
u8ProtocolSourcePortRange + 2 + i ) ) ;
pstClassifierEntry - > usSrcPortRangeLo [ i ] =
ntohs ( pstClassifierEntry - > usSrcPortRangeLo [ i ] ) ;
2014-05-23 14:23:59 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS ,
CONN_MSG , DBG_LVL_ALL ,
" Source Port Range Lo:0x%X " ,
2012-01-04 18:29:05 -07:00
pstClassifierEntry - > usSrcPortRangeLo [ i ] ) ;
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > usSrcPortRangeHi [ i ] =
ntohs ( pstClassifierEntry - > usSrcPortRangeHi [ i ] ) ;
2010-09-08 15:46:36 -06:00
}
}
2012-01-04 18:29:00 -07:00
/* Destination Ip Address and Mask */
2014-05-23 14:23:59 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Ip Destination Parameters : " ) ;
2010-09-08 15:46:36 -06:00
CopyIpAddrToClassifier ( pstClassifierEntry ,
2014-05-23 14:23:58 -06:00
pack_class_rule - > u8IPDestinationAddressLength ,
pack_class_rule - > u8IPDestinationAddress ,
2012-01-04 18:29:00 -07:00
( Adapter - > PackInfo [ uiSearchRuleIndex ] . ucIpVersion = = IPV6 ) ?
2013-10-28 02:36:19 -06:00
TRUE : false , eDestIpAddress ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* Source Ip Address and Mask */
2014-05-23 14:23:59 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Ip Source Parameters : " ) ;
2010-09-08 15:46:36 -06:00
CopyIpAddrToClassifier ( pstClassifierEntry ,
2014-05-23 14:23:58 -06:00
pack_class_rule - > u8IPMaskedSourceAddressLength ,
pack_class_rule - > u8IPMaskedSourceAddress ,
2013-10-28 02:36:19 -06:00
( Adapter - > PackInfo [ uiSearchRuleIndex ] . ucIpVersion = = IPV6 ) ? TRUE : false ,
2012-01-04 18:29:00 -07:00
eSrcIpAddress ) ;
/* TOS */
2014-05-23 14:23:59 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" TOS Length:0x%X " ,
pack_class_rule - > u8IPTypeOfServiceLength ) ;
2014-05-23 14:23:58 -06:00
if ( pack_class_rule - > u8IPTypeOfServiceLength = = 3 ) {
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > ucIPTypeOfServiceLength =
pack_class_rule - > u8IPTypeOfServiceLength ;
pstClassifierEntry - > ucTosLow =
pack_class_rule - > u8IPTypeOfService [ 0 ] ;
pstClassifierEntry - > ucTosHigh =
pack_class_rule - > u8IPTypeOfService [ 1 ] ;
pstClassifierEntry - > ucTosMask =
pack_class_rule - > u8IPTypeOfService [ 2 ] ;
2010-09-08 15:46:36 -06:00
pstClassifierEntry - > bTOSValid = TRUE ;
}
2014-05-23 14:23:58 -06:00
if ( pack_class_rule - > u8Protocol = = 0 ) {
2012-01-04 18:29:00 -07:00
/* we didn't get protocol field filled in by the BS */
pstClassifierEntry - > ucProtocolLength = 0 ;
} else {
pstClassifierEntry - > ucProtocolLength = 1 ; /* 1 valid protocol */
2010-09-08 15:46:36 -06:00
}
2014-05-23 14:23:58 -06:00
pstClassifierEntry - > ucProtocol [ 0 ] = pack_class_rule - > u8Protocol ;
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > u8ClassifierRulePriority =
pack_class_rule - > u8ClassifierRulePriority ;
2012-01-04 18:29:00 -07:00
/* store the classifier rule ID and set this classifier entry as valid */
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > ucDirection =
Adapter - > PackInfo [ uiSearchRuleIndex ] . ucDirection ;
pstClassifierEntry - > uiClassifierRuleIndex =
ntohs ( pack_class_rule - > u16PacketClassificationRuleIndex ) ;
pstClassifierEntry - > usVCID_Value =
Adapter - > PackInfo [ uiSearchRuleIndex ] . usVCID_Value ;
pstClassifierEntry - > ulSFID =
Adapter - > PackInfo [ uiSearchRuleIndex ] . ulSFID ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Search Index %d Dir: %d, Index: %d, Vcid: %d \n " ,
uiSearchRuleIndex ,
pstClassifierEntry - > ucDirection ,
2012-01-04 18:29:00 -07:00
pstClassifierEntry - > uiClassifierRuleIndex ,
pstClassifierEntry - > usVCID_Value ) ;
2014-05-23 14:23:58 -06:00
if ( pack_class_rule - > u8AssociatedPHSI )
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > u8AssociatedPHSI =
pack_class_rule - > u8AssociatedPHSI ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* Copy ETH CS Parameters */
2014-05-23 14:23:59 -06:00
pstClassifierEntry - > ucEthCSSrcMACLen =
( pack_class_rule - > u8EthernetSourceMACAddressLength ) ;
memcpy ( pstClassifierEntry - > au8EThCSSrcMAC ,
pack_class_rule - > u8EthernetSourceMACAddress ,
MAC_ADDRESS_SIZE ) ;
memcpy ( pstClassifierEntry - > au8EThCSSrcMACMask ,
pack_class_rule - > u8EthernetSourceMACAddress
+ MAC_ADDRESS_SIZE , MAC_ADDRESS_SIZE ) ;
pstClassifierEntry - > ucEthCSDestMACLen =
( pack_class_rule - > u8EthernetDestMacAddressLength ) ;
memcpy ( pstClassifierEntry - > au8EThCSDestMAC ,
pack_class_rule - > u8EthernetDestMacAddress ,
MAC_ADDRESS_SIZE ) ;
memcpy ( pstClassifierEntry - > au8EThCSDestMACMask ,
pack_class_rule - > u8EthernetDestMacAddress
+ MAC_ADDRESS_SIZE , MAC_ADDRESS_SIZE ) ;
pstClassifierEntry - > ucEtherTypeLen =
( pack_class_rule - > u8EthertypeLength ) ;
memcpy ( pstClassifierEntry - > au8EthCSEtherType ,
pack_class_rule - > u8Ethertype ,
NUM_ETHERTYPE_BYTES ) ;
memcpy ( pstClassifierEntry - > usUserPriority ,
& pack_class_rule - > u16UserPriority , 2 ) ;
pstClassifierEntry - > usVLANID =
ntohs ( pack_class_rule - > u16VLANID ) ;
pstClassifierEntry - > usValidityBitMap =
ntohs ( pack_class_rule - > u16ValidityBitMap ) ;
2010-09-08 15:46:36 -06:00
pstClassifierEntry - > bUsed = TRUE ;
}
}
2012-01-04 18:29:00 -07:00
/*
* @ ingroup ctrl_pkt_functions
*/
2014-05-23 14:23:57 -06:00
static inline VOID DeleteClassifierRuleFromSF ( struct bcm_mini_adapter * Adapter ,
UINT uiSearchRuleIndex , UINT nClassifierIndex )
2010-09-08 15:46:36 -06:00
{
2012-05-26 10:05:03 -06:00
struct bcm_classifier_rule * pstClassifierEntry = NULL ;
2012-01-04 18:29:00 -07:00
B_UINT16 u16PacketClassificationRuleIndex ;
USHORT usVCID ;
/* VOID *pvPhsContext = NULL; */
/*ULONG ulPhsStatus; */
2010-09-08 15:46:36 -06:00
usVCID = Adapter - > PackInfo [ uiSearchRuleIndex ] . usVCID_Value ;
2012-01-04 18:29:00 -07:00
if ( nClassifierIndex > MAX_CLASSIFIERS - 1 )
2010-09-08 15:46:36 -06:00
return ;
2012-01-04 18:29:00 -07:00
if ( usVCID = = 0 )
2010-09-08 15:46:36 -06:00
return ;
2014-05-23 14:23:57 -06:00
u16PacketClassificationRuleIndex =
Adapter - > astClassifierTable [ nClassifierIndex ] . uiClassifierRuleIndex ;
2010-09-08 15:46:36 -06:00
pstClassifierEntry = & Adapter - > astClassifierTable [ nClassifierIndex ] ;
2012-01-04 18:29:00 -07:00
if ( pstClassifierEntry ) {
2013-10-28 02:36:19 -06:00
pstClassifierEntry - > bUsed = false ;
2010-09-08 15:46:36 -06:00
pstClassifierEntry - > uiClassifierRuleIndex = 0 ;
2014-05-23 14:23:57 -06:00
memset ( pstClassifierEntry , 0 ,
sizeof ( struct bcm_classifier_rule ) ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* Delete the PHS Rule for this classifier */
2014-05-23 14:23:57 -06:00
PhsDeleteClassifierRule ( & Adapter - > stBCMPhsContext , usVCID ,
u16PacketClassificationRuleIndex ) ;
2010-09-08 15:46:36 -06:00
}
}
2012-01-04 18:29:00 -07:00
/*
* @ ingroup ctrl_pkt_functions
*/
2014-05-23 14:23:56 -06:00
VOID DeleteAllClassifiersForSF ( struct bcm_mini_adapter * Adapter ,
UINT uiSearchRuleIndex )
2010-09-08 15:46:36 -06:00
{
2012-05-26 10:05:03 -06:00
struct bcm_classifier_rule * pstClassifierEntry = NULL ;
2012-01-04 18:29:05 -07:00
int i ;
2012-01-04 18:29:00 -07:00
/* B_UINT16 u16PacketClassificationRuleIndex; */
USHORT ulVCID ;
/* VOID *pvPhsContext = NULL; */
/* ULONG ulPhsStatus; */
2010-09-08 15:46:36 -06:00
ulVCID = Adapter - > PackInfo [ uiSearchRuleIndex ] . usVCID_Value ;
2012-01-04 18:29:00 -07:00
if ( ulVCID = = 0 )
2010-09-08 15:46:36 -06:00
return ;
2012-01-04 18:29:05 -07:00
for ( i = 0 ; i < MAX_CLASSIFIERS ; i + + ) {
if ( Adapter - > astClassifierTable [ i ] . usVCID_Value = = ulVCID ) {
pstClassifierEntry = & Adapter - > astClassifierTable [ i ] ;
2012-01-04 18:29:00 -07:00
if ( pstClassifierEntry - > bUsed )
2014-05-23 14:23:56 -06:00
DeleteClassifierRuleFromSF ( Adapter ,
uiSearchRuleIndex , i ) ;
2010-09-08 15:46:36 -06:00
}
}
2012-01-04 18:29:00 -07:00
/* Delete All Phs Rules Associated with this SF */
PhsDeleteSFRules ( & Adapter - > stBCMPhsContext , ulVCID ) ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
/*
* This routinue copies the Connection Management
* related data into the Adapter structure .
* @ ingroup ctrl_pkt_functions
*/
2012-05-26 10:05:12 -06:00
static VOID CopyToAdapter ( register struct bcm_mini_adapter * Adapter , /* <Pointer to the Adapter structure */
2012-09-23 21:07:14 -06:00
register struct bcm_connect_mgr_params * psfLocalSet , /* Pointer to the connection manager parameters structure */
2012-01-04 18:29:00 -07:00
register UINT uiSearchRuleIndex , /* <Index of Queue, to which this data belongs */
register UCHAR ucDsxType ,
2012-10-30 19:50:43 -06:00
struct bcm_add_indication_alt * pstAddIndication ) {
2012-01-04 18:29:00 -07:00
/* UCHAR ucProtocolLength = 0; */
ULONG ulSFID ;
UINT nClassifierIndex = 0 ;
2012-01-04 18:29:02 -07:00
enum E_CLASSIFIER_ACTION eClassifierAction = eInvalidClassifierAction ;
2012-01-04 18:29:00 -07:00
B_UINT16 u16PacketClassificationRuleIndex = 0 ;
2012-01-04 18:29:05 -07:00
int i ;
2012-09-23 21:07:15 -06:00
struct bcm_convergence_types * psfCSType = NULL ;
2012-12-19 22:31:34 -07:00
struct bcm_phs_rule sPhsRule ;
2014-05-23 14:23:54 -06:00
struct bcm_packet_info * curr_packinfo =
& Adapter - > PackInfo [ uiSearchRuleIndex ] ;
USHORT uVCID = curr_packinfo - > usVCID_Value ;
2010-09-08 15:46:36 -06:00
UINT UGIValue = 0 ;
2014-05-23 14:23:54 -06:00
curr_packinfo - > bValid = TRUE ;
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Search Rule Index = %d \n " , uiSearchRuleIndex ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" %s: SFID= %x " , __func__ , ntohl ( psfLocalSet - > u32SFID ) ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Updating Queue %d " , uiSearchRuleIndex ) ;
2010-09-08 15:46:36 -06:00
ulSFID = ntohl ( psfLocalSet - > u32SFID ) ;
2012-01-04 18:29:00 -07:00
/* Store IP Version used */
/* Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF */
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:54 -06:00
curr_packinfo - > bIPCSSupport = 0 ;
curr_packinfo - > bEthCSSupport = 0 ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* Enable IP/ETh CS Support As Required */
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" CopyToAdapter : u8CSSpecification : %X \n " ,
psfLocalSet - > u8CSSpecification ) ;
2012-01-04 18:29:00 -07:00
switch ( psfLocalSet - > u8CSSpecification ) {
case eCSPacketIPV4 :
2014-05-23 14:23:54 -06:00
curr_packinfo - > bIPCSSupport = IPV4_CS ;
2012-01-04 18:29:00 -07:00
break ;
case eCSPacketIPV6 :
2014-05-23 14:23:54 -06:00
curr_packinfo - > bIPCSSupport = IPV6_CS ;
2012-01-04 18:29:00 -07:00
break ;
case eCS802_3PacketEthernet :
case eCS802_1QPacketVLAN :
2014-05-23 14:23:54 -06:00
curr_packinfo - > bEthCSSupport = ETH_CS_802_3 ;
2012-01-04 18:29:00 -07:00
break ;
case eCSPacketIPV4Over802_1QVLAN :
case eCSPacketIPV4Over802_3Ethernet :
2014-05-23 14:23:54 -06:00
curr_packinfo - > bIPCSSupport = IPV4_CS ;
curr_packinfo - > bEthCSSupport = ETH_CS_802_3 ;
2012-01-04 18:29:00 -07:00
break ;
case eCSPacketIPV6Over802_1QVLAN :
case eCSPacketIPV6Over802_3Ethernet :
2014-05-23 14:23:54 -06:00
curr_packinfo - > bIPCSSupport = IPV6_CS ;
curr_packinfo - > bEthCSSupport = ETH_CS_802_3 ;
2012-01-04 18:29:00 -07:00
break ;
default :
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Error in value of CS Classification.. setting default to IP CS \n " ) ;
2014-05-23 14:23:54 -06:00
curr_packinfo - > bIPCSSupport = IPV4_CS ;
2012-01-04 18:29:00 -07:00
break ;
}
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" CopyToAdapter : Queue No : %X ETH CS Support : %X , IP CS Support : %X \n " ,
2012-01-04 18:29:00 -07:00
uiSearchRuleIndex ,
2014-05-23 14:23:54 -06:00
curr_packinfo - > bEthCSSupport ,
curr_packinfo - > bIPCSSupport ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* Store IP Version used */
/* Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF */
2014-05-23 14:23:54 -06:00
if ( curr_packinfo - > bIPCSSupport = = IPV6_CS )
curr_packinfo - > ucIpVersion = IPV6 ;
2010-09-08 15:46:36 -06:00
else
2014-05-23 14:23:54 -06:00
curr_packinfo - > ucIpVersion = IPV4 ;
2010-09-08 15:46:36 -06:00
/* To ensure that the ETH CS code doesn't gets executed if the BS doesn't supports ETH CS */
2012-01-04 18:29:00 -07:00
if ( ! Adapter - > bETHCSEnabled )
2014-05-23 14:23:54 -06:00
curr_packinfo - > bEthCSSupport = 0 ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( psfLocalSet - > u8ServiceClassNameLength > 0 & & psfLocalSet - > u8ServiceClassNameLength < 32 )
2014-05-23 14:23:55 -06:00
memcpy ( curr_packinfo - > ucServiceClassName ,
psfLocalSet - > u8ServiceClassName ,
psfLocalSet - > u8ServiceClassNameLength ) ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:54 -06:00
curr_packinfo - > u8QueueType = psfLocalSet - > u8ServiceFlowSchedulingType ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:54 -06:00
if ( curr_packinfo - > u8QueueType = = BE & & curr_packinfo - > ucDirection )
2012-01-04 18:29:00 -07:00
Adapter - > usBestEffortQueueIndex = uiSearchRuleIndex ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:54 -06:00
curr_packinfo - > ulSFID = ntohl ( psfLocalSet - > u32SFID ) ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:54 -06:00
curr_packinfo - > u8TrafficPriority = psfLocalSet - > u8TrafficPriority ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* copy all the classifier in the Service Flow param structure */
2012-01-04 18:29:05 -07:00
for ( i = 0 ; i < psfLocalSet - > u8TotalClassifiers ; i + + ) {
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Classifier index =%d " , i ) ;
2012-01-04 18:29:05 -07:00
psfCSType = & psfLocalSet - > cConvergenceSLTypes [ i ] ;
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Classifier index =%d " , i ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( psfCSType - > cCPacketClassificationRule . u8ClassifierRulePriority )
2014-05-23 14:23:54 -06:00
curr_packinfo - > bClassifierPriority = TRUE ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( psfCSType - > cCPacketClassificationRule . u8ClassifierRulePriority )
2014-05-23 14:23:54 -06:00
curr_packinfo - > bClassifierPriority = TRUE ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( ucDsxType = = DSA_ACK ) {
2010-09-08 15:46:36 -06:00
eClassifierAction = eAddClassifier ;
2012-01-04 18:29:00 -07:00
} else if ( ucDsxType = = DSC_ACK ) {
switch ( psfCSType - > u8ClassfierDSCAction ) {
case 0 : /* DSC Add Classifier */
2010-09-08 15:46:36 -06:00
eClassifierAction = eAddClassifier ;
2014-03-20 21:28:43 -06:00
break ;
2012-01-04 18:29:00 -07:00
case 1 : /* DSC Replace Classifier */
2010-09-08 15:46:36 -06:00
eClassifierAction = eReplaceClassifier ;
2014-03-20 21:28:43 -06:00
break ;
2012-01-04 18:29:00 -07:00
case 2 : /* DSC Delete Classifier */
2010-09-08 15:46:36 -06:00
eClassifierAction = eDeleteClassifier ;
2014-03-20 21:28:43 -06:00
break ;
2010-09-08 15:46:36 -06:00
default :
eClassifierAction = eInvalidClassifierAction ;
}
}
u16PacketClassificationRuleIndex = ntohs ( psfCSType - > cCPacketClassificationRule . u16PacketClassificationRuleIndex ) ;
2012-01-04 18:29:00 -07:00
switch ( eClassifierAction ) {
2010-09-08 15:46:36 -06:00
case eAddClassifier :
2012-01-04 18:29:00 -07:00
/* Get a Free Classifier Index From Classifier table for this SF to add the Classifier */
/* Contained in this message */
2014-05-23 14:23:55 -06:00
nClassifierIndex = SearchClsid ( Adapter ,
ulSFID ,
u16PacketClassificationRuleIndex ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( nClassifierIndex > MAX_CLASSIFIERS ) {
2010-09-08 15:46:36 -06:00
nClassifierIndex = SearchFreeClsid ( Adapter ) ;
2012-01-04 18:29:00 -07:00
if ( nClassifierIndex > MAX_CLASSIFIERS ) {
/* Failed To get a free Entry */
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter ,
DBG_TYPE_OTHERS ,
CONN_MSG ,
DBG_LVL_ALL ,
" Error Failed To get a free Classifier Entry " ) ;
2010-09-08 15:46:36 -06:00
break ;
}
2012-01-04 18:29:00 -07:00
/* Copy the Classifier Rule for this service flow into our Classifier table maintained per SF. */
2014-05-23 14:23:55 -06:00
CopyClassifierRuleToSF ( Adapter , psfCSType ,
uiSearchRuleIndex ,
nClassifierIndex ) ;
2012-01-04 18:29:00 -07:00
} else {
/* This Classifier Already Exists and it is invalid to Add Classifier with existing PCRI */
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS ,
CONN_MSG ,
DBG_LVL_ALL ,
2012-01-04 18:29:00 -07:00
" CopyToAdapter: Error The Specified Classifier Already Exists and attempted To Add Classifier with Same PCRI : 0x%x \n " ,
u16PacketClassificationRuleIndex ) ;
2010-09-08 15:46:36 -06:00
}
2014-03-20 21:28:43 -06:00
break ;
2010-09-08 15:46:36 -06:00
case eReplaceClassifier :
2012-01-04 18:29:00 -07:00
/* Get the Classifier Index From Classifier table for this SF and replace existing Classifier */
/* with the new classifier Contained in this message */
2014-05-23 14:23:55 -06:00
nClassifierIndex = SearchClsid ( Adapter , ulSFID ,
u16PacketClassificationRuleIndex ) ;
2012-01-04 18:29:00 -07:00
if ( nClassifierIndex > MAX_CLASSIFIERS ) {
/* Failed To search the classifier */
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS ,
CONN_MSG , DBG_LVL_ALL ,
" Error Search for Classifier To be replaced failed " ) ;
2010-09-08 15:46:36 -06:00
break ;
}
2012-01-04 18:29:00 -07:00
/* Copy the Classifier Rule for this service flow into our Classifier table maintained per SF. */
2014-05-23 14:23:55 -06:00
CopyClassifierRuleToSF ( Adapter , psfCSType ,
uiSearchRuleIndex , nClassifierIndex ) ;
2014-03-20 21:28:43 -06:00
break ;
2010-09-08 15:46:36 -06:00
case eDeleteClassifier :
2012-01-04 18:29:00 -07:00
/* Get the Classifier Index From Classifier table for this SF and replace existing Classifier */
/* with the new classifier Contained in this message */
2014-05-23 14:23:55 -06:00
nClassifierIndex = SearchClsid ( Adapter , ulSFID ,
u16PacketClassificationRuleIndex ) ;
2012-01-04 18:29:00 -07:00
if ( nClassifierIndex > MAX_CLASSIFIERS ) {
/* Failed To search the classifier */
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS ,
CONN_MSG , DBG_LVL_ALL ,
" Error Search for Classifier To be deleted failed " ) ;
2010-09-08 15:46:36 -06:00
break ;
}
2012-01-04 18:29:00 -07:00
/* Delete This classifier */
2014-05-23 14:23:55 -06:00
DeleteClassifierRuleFromSF ( Adapter , uiSearchRuleIndex ,
nClassifierIndex ) ;
2014-03-20 21:28:43 -06:00
break ;
2010-09-08 15:46:36 -06:00
default :
2012-01-04 18:29:00 -07:00
/* Invalid Action for classifier */
2010-09-08 15:46:36 -06:00
break ;
}
}
2012-01-04 18:29:00 -07:00
/* Repeat parsing Classification Entries to process PHS Rules */
2012-01-04 18:29:05 -07:00
for ( i = 0 ; i < psfLocalSet - > u8TotalClassifiers ; i + + ) {
psfCSType = & psfLocalSet - > cConvergenceSLTypes [ i ] ;
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" psfCSType->u8PhsDSCAction : 0x%x \n " ,
psfCSType - > u8PhsDSCAction ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
switch ( psfCSType - > u8PhsDSCAction ) {
2010-09-08 15:46:36 -06:00
case eDeleteAllPHSRules :
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG ,
DBG_LVL_ALL ,
" Deleting All PHS Rules For VCID: 0x%X \n " ,
uVCID ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* Delete All the PHS rules for this Service flow */
PhsDeleteSFRules ( & Adapter - > stBCMPhsContext , uVCID ) ;
2010-09-08 15:46:36 -06:00
break ;
case eDeletePHSRule :
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG ,
DBG_LVL_ALL ,
" PHS DSC Action = Delete PHS Rule \n " ) ;
2012-01-04 18:29:00 -07:00
if ( psfCSType - > cPhsRule . u8PHSI )
2014-05-23 14:23:55 -06:00
PhsDeletePHSRule ( & Adapter - > stBCMPhsContext ,
uVCID ,
psfCSType - > cCPacketClassificationRule . u8AssociatedPHSI ) ;
2010-09-08 15:46:36 -06:00
break ;
2012-01-04 18:29:00 -07:00
default :
if ( ucDsxType = = DSC_ACK ) {
/* BCM_DEBUG_PRINT(CONN_MSG,("Invalid PHS DSC Action For DSC\n",psfCSType->cPhsRule.u8PHSI)); */
break ; /* FOr DSC ACK Case PHS DSC Action must be in valid set */
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
/* Proceed To Add PHS rule for DSA_ACK case even if PHS DSC action is unspecified */
/* No Break Here . Intentionally! */
2010-09-08 15:46:36 -06:00
case eAddPHSRule :
case eSetPHSRule :
2012-01-04 18:29:00 -07:00
if ( psfCSType - > cPhsRule . u8PHSI ) {
/* Apply This PHS Rule to all classifiers whose Associated PHSI Match */
2014-05-23 14:23:53 -06:00
apply_phs_rule_to_all_classifiers ( Adapter ,
uiSearchRuleIndex ,
2012-01-04 18:29:00 -07:00
uVCID ,
& sPhsRule ,
2014-05-23 14:23:53 -06:00
& psfCSType - > cPhsRule ,
pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
}
2014-03-20 21:28:43 -06:00
break ;
2010-09-08 15:46:36 -06:00
}
}
2012-01-04 18:29:00 -07:00
if ( psfLocalSet - > u32MaxSustainedTrafficRate = = 0 ) {
/* No Rate Limit . Set Max Sustained Traffic Rate to Maximum */
2014-05-23 14:23:54 -06:00
curr_packinfo - > uiMaxAllowedRate = WIMAX_MAX_ALLOWED_RATE ;
2012-01-04 18:29:00 -07:00
} else if ( ntohl ( psfLocalSet - > u32MaxSustainedTrafficRate ) > WIMAX_MAX_ALLOWED_RATE ) {
/* Too large Allowed Rate specified. Limiting to Wi Max Allowed rate */
2014-05-23 14:23:54 -06:00
curr_packinfo - > uiMaxAllowedRate = WIMAX_MAX_ALLOWED_RATE ;
2012-01-04 18:29:00 -07:00
} else {
2014-05-23 14:23:55 -06:00
curr_packinfo - > uiMaxAllowedRate =
ntohl ( psfLocalSet - > u32MaxSustainedTrafficRate ) ;
2010-09-08 15:46:36 -06:00
}
2014-05-23 14:23:54 -06:00
curr_packinfo - > uiMaxLatency = ntohl ( psfLocalSet - > u32MaximumLatency ) ;
if ( curr_packinfo - > uiMaxLatency = = 0 ) /* 0 should be treated as infinite */
curr_packinfo - > uiMaxLatency = MAX_LATENCY_ALLOWED ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:54 -06:00
if ( ( curr_packinfo - > u8QueueType = = ERTPS | |
curr_packinfo - > u8QueueType = = UGS ) )
2012-01-04 18:29:00 -07:00
UGIValue = ntohs ( psfLocalSet - > u16UnsolicitedGrantInterval ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( UGIValue = = 0 )
2010-09-08 15:46:36 -06:00
UGIValue = DEFAULT_UG_INTERVAL ;
/*
2012-01-04 18:29:00 -07:00
* For UGI based connections . . .
* DEFAULT_UGI_FACTOR * UGIInterval worth of data is the max token count at host . . .
* The extra amount of token is to ensure that a large amount of jitter won ' t have loss in throughput . . .
* In case of non - UGI based connection , 200 frames worth of data is the max token count at host . . .
*/
2014-05-23 14:23:54 -06:00
curr_packinfo - > uiMaxBucketSize =
( DEFAULT_UGI_FACTOR * curr_packinfo - > uiMaxAllowedRate * UGIValue ) / 1000 ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:54 -06:00
if ( curr_packinfo - > uiMaxBucketSize < WIMAX_MAX_MTU * 8 ) {
2010-09-08 15:46:36 -06:00
UINT UGIFactor = 0 ;
/* Special Handling to ensure the biggest size of packet can go out from host to FW as follows:
2012-01-04 18:29:00 -07:00
* 1. Any packet from Host to FW can go out in different packet size .
* 2. So in case the Bucket count is smaller than MTU , the packets of size ( Size > TokenCount ) , will get dropped .
* 3. We can allow packets of MaxSize from Host - > FW that can go out from FW in multiple SDUs by fragmentation at Wimax Layer
*/
2014-05-23 14:23:54 -06:00
UGIFactor = ( curr_packinfo - > uiMaxLatency / UGIValue + 1 ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( UGIFactor > DEFAULT_UGI_FACTOR )
2014-05-23 14:23:54 -06:00
curr_packinfo - > uiMaxBucketSize =
( UGIFactor * curr_packinfo - > uiMaxAllowedRate * UGIValue ) / 1000 ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:54 -06:00
if ( curr_packinfo - > uiMaxBucketSize > WIMAX_MAX_MTU * 8 )
curr_packinfo - > uiMaxBucketSize = WIMAX_MAX_MTU * 8 ;
2010-09-08 15:46:36 -06:00
}
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" LAT: %d, UGI: %d \n " , curr_packinfo - > uiMaxLatency ,
UGIValue ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" uiMaxAllowedRate: 0x%x, u32MaxSustainedTrafficRate: 0x%x ,uiMaxBucketSize: 0x%x " ,
2014-05-23 14:23:54 -06:00
curr_packinfo - > uiMaxAllowedRate ,
2012-01-04 18:29:00 -07:00
ntohl ( psfLocalSet - > u32MaxSustainedTrafficRate ) ,
2014-05-23 14:23:54 -06:00
curr_packinfo - > uiMaxBucketSize ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* copy the extended SF Parameters to Support MIBS */
CopyMIBSExtendedSFParameters ( Adapter , psfLocalSet , uiSearchRuleIndex ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* store header suppression enabled flag per SF */
2014-05-23 14:23:54 -06:00
curr_packinfo - > bHeaderSuppressionEnabled =
2012-01-04 18:29:00 -07:00
! ( psfLocalSet - > u8RequesttransmissionPolicy &
MASK_DISABLE_HEADER_SUPPRESSION ) ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:54 -06:00
kfree ( curr_packinfo - > pstSFIndication ) ;
curr_packinfo - > pstSFIndication = pstAddIndication ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
/* Re Sort the SF list in PackInfo according to Traffic Priority */
2010-09-08 15:46:36 -06:00
SortPackInfo ( Adapter ) ;
/* Re Sort the Classifier Rules table and re - arrange
2012-01-04 18:29:00 -07:00
* according to Classifier Rule Priority
*/
2010-09-08 15:46:36 -06:00
SortClassifiers ( Adapter ) ;
DumpPhsRules ( & Adapter - > stBCMPhsContext ) ;
2014-05-23 14:23:55 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" %s <===== " , __func__ ) ;
2010-09-08 15:46:36 -06:00
}
/***********************************************************************
2012-01-04 18:29:00 -07:00
* Function - DumpCmControlPacket
*
* Description - This routinue Dumps the Contents of the AddIndication
* Structure in the Connection Management Control Packet
*
* Parameter - pvBuffer : Pointer to the buffer containing the
* AddIndication data .
*
* Returns - None
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2010-09-30 02:24:12 -06:00
static VOID DumpCmControlPacket ( PVOID pvBuffer )
2010-09-08 15:46:36 -06:00
{
2012-01-04 18:29:05 -07:00
int uiLoopIndex ;
int nIndex ;
2012-10-30 19:50:43 -06:00
struct bcm_add_indication_alt * pstAddIndication ;
2012-01-04 18:29:00 -07:00
UINT nCurClassifierCnt ;
2012-05-26 10:05:12 -06:00
struct bcm_mini_adapter * Adapter = GET_BCM_ADAPTER ( gblpnetdev ) ;
2010-09-08 15:46:36 -06:00
2013-10-29 15:19:50 -06:00
pstAddIndication = pvBuffer ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " ======> " ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8Type: 0x%X " , pstAddIndication - > u8Type ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8Direction: 0x%X " , pstAddIndication - > u8Direction ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16TID: 0x%X " , ntohs ( pstAddIndication - > u16TID ) ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16CID: 0x%X " , ntohs ( pstAddIndication - > u16CID ) ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16VCID: 0x%X " , ntohs ( pstAddIndication - > u16VCID ) ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " AuthorizedSet---> " ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32SFID: 0x%X " , htonl ( pstAddIndication - > sfAuthorizedSet . u32SFID ) ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16CID: 0x%X " , htons ( pstAddIndication - > sfAuthorizedSet . u16CID ) ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ServiceClassNameLength: 0x%X " ,
pstAddIndication - > sfAuthorizedSet . u8ServiceClassNameLength ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ServiceClassName: 0x%X ,0x%X , 0x%X, 0x%X, 0x%X, 0x%X " ,
2010-09-08 15:46:36 -06:00
pstAddIndication - > sfAuthorizedSet . u8ServiceClassName [ 0 ] ,
pstAddIndication - > sfAuthorizedSet . u8ServiceClassName [ 1 ] ,
pstAddIndication - > sfAuthorizedSet . u8ServiceClassName [ 2 ] ,
pstAddIndication - > sfAuthorizedSet . u8ServiceClassName [ 3 ] ,
pstAddIndication - > sfAuthorizedSet . u8ServiceClassName [ 4 ] ,
pstAddIndication - > sfAuthorizedSet . u8ServiceClassName [ 5 ] ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8MBSService: 0x%X " , pstAddIndication - > sfAuthorizedSet . u8MBSService ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8QosParamSet: 0x%X " , pstAddIndication - > sfAuthorizedSet . u8QosParamSet ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8TrafficPriority: 0x%X, %p " ,
pstAddIndication - > sfAuthorizedSet . u8TrafficPriority , & pstAddIndication - > sfAuthorizedSet . u8TrafficPriority ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32MaxSustainedTrafficRate: 0x%X 0x%p " ,
pstAddIndication - > sfAuthorizedSet . u32MaxSustainedTrafficRate ,
2010-09-08 15:46:36 -06:00
& pstAddIndication - > sfAuthorizedSet . u32MaxSustainedTrafficRate ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32MaxTrafficBurst: 0x%X " , pstAddIndication - > sfAuthorizedSet . u32MaxTrafficBurst ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32MinReservedTrafficRate : 0x%X " ,
pstAddIndication - > sfAuthorizedSet . u32MinReservedTrafficRate ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8VendorSpecificQoSParamLength: 0x%X " ,
pstAddIndication - > sfAuthorizedSet . u8VendorSpecificQoSParamLength ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8VendorSpecificQoSParam: 0x%X " ,
pstAddIndication - > sfAuthorizedSet . u8VendorSpecificQoSParam [ 0 ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ServiceFlowSchedulingType: 0x%X " ,
pstAddIndication - > sfAuthorizedSet . u8ServiceFlowSchedulingType ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32ToleratedJitter: 0x%X " , pstAddIndication - > sfAuthorizedSet . u32ToleratedJitter ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32MaximumLatency: 0x%X " , pstAddIndication - > sfAuthorizedSet . u32MaximumLatency ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8FixedLengthVSVariableLengthSDUIndicator: 0x%X " ,
pstAddIndication - > sfAuthorizedSet . u8FixedLengthVSVariableLengthSDUIndicator ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8SDUSize: 0x%X " , pstAddIndication - > sfAuthorizedSet . u8SDUSize ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16TargetSAID: 0x%X " , pstAddIndication - > sfAuthorizedSet . u16TargetSAID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ARQEnable: 0x%X " , pstAddIndication - > sfAuthorizedSet . u8ARQEnable ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQWindowSize: 0x%X " , pstAddIndication - > sfAuthorizedSet . u16ARQWindowSize ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQRetryTxTimeOut: 0x%X " , pstAddIndication - > sfAuthorizedSet . u16ARQRetryTxTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQRetryRxTimeOut: 0x%X " , pstAddIndication - > sfAuthorizedSet . u16ARQRetryRxTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQBlockLifeTime: 0x%X " , pstAddIndication - > sfAuthorizedSet . u16ARQBlockLifeTime ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQSyncLossTimeOut: 0x%X " , pstAddIndication - > sfAuthorizedSet . u16ARQSyncLossTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ARQDeliverInOrder: 0x%X " , pstAddIndication - > sfAuthorizedSet . u8ARQDeliverInOrder ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQRxPurgeTimeOut: 0x%X " , pstAddIndication - > sfAuthorizedSet . u16ARQRxPurgeTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQBlockSize: 0x%X " , pstAddIndication - > sfAuthorizedSet . u16ARQBlockSize ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8CSSpecification: 0x%X " , pstAddIndication - > sfAuthorizedSet . u8CSSpecification ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8TypeOfDataDeliveryService: 0x%X " ,
pstAddIndication - > sfAuthorizedSet . u8TypeOfDataDeliveryService ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16SDUInterArrivalTime: 0x%X " , pstAddIndication - > sfAuthorizedSet . u16SDUInterArrivalTime ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16TimeBase: 0x%X " , pstAddIndication - > sfAuthorizedSet . u16TimeBase ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8PagingPreference: 0x%X " , pstAddIndication - > sfAuthorizedSet . u8PagingPreference ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16UnsolicitedPollingInterval: 0x%X " ,
pstAddIndication - > sfAuthorizedSet . u16UnsolicitedPollingInterval ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " sfAuthorizedSet.u8HARQChannelMapping %x %x %x " ,
* ( unsigned int * ) pstAddIndication - > sfAuthorizedSet . u8HARQChannelMapping ,
* ( unsigned int * ) & pstAddIndication - > sfAuthorizedSet . u8HARQChannelMapping [ 4 ] ,
* ( USHORT * ) & pstAddIndication - > sfAuthorizedSet . u8HARQChannelMapping [ 8 ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8TrafficIndicationPreference: 0x%X " ,
pstAddIndication - > sfAuthorizedSet . u8TrafficIndicationPreference ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " Total Classifiers Received: 0x%X " , pstAddIndication - > sfAuthorizedSet . u8TotalClassifiers ) ;
2010-09-08 15:46:36 -06:00
nCurClassifierCnt = pstAddIndication - > sfAuthorizedSet . u8TotalClassifiers ;
2012-01-04 18:29:00 -07:00
if ( nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF )
2010-09-08 15:46:36 -06:00
nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " pstAddIndication->sfAuthorizedSet.bValid %d " , pstAddIndication - > sfAuthorizedSet . bValid ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " pstAddIndication->sfAuthorizedSet.u16MacOverhead %x " , pstAddIndication - > sfAuthorizedSet . u16MacOverhead ) ;
if ( ! pstAddIndication - > sfAuthorizedSet . bValid )
pstAddIndication - > sfAuthorizedSet . bValid = 1 ;
for ( nIndex = 0 ; nIndex < nCurClassifierCnt ; nIndex + + ) {
2012-09-23 21:07:15 -06:00
struct bcm_convergence_types * psfCSType = NULL ;
2014-07-09 09:59:29 -06:00
2010-09-08 15:46:36 -06:00
psfCSType = & pstAddIndication - > sfAuthorizedSet . cConvergenceSLTypes [ nIndex ] ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " psfCSType = %p " , psfCSType ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " CCPacketClassificationRuleSI====> " ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ClassifierRulePriority: 0x%X " ,
psfCSType - > cCPacketClassificationRule . u8ClassifierRulePriority ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPTypeOfServiceLength: 0x%X " ,
psfCSType - > cCPacketClassificationRule . u8IPTypeOfServiceLength ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPTypeOfService[3]: 0x%X ,0x%X ,0x%X " ,
psfCSType - > cCPacketClassificationRule . u8IPTypeOfService [ 0 ] ,
psfCSType - > cCPacketClassificationRule . u8IPTypeOfService [ 1 ] ,
psfCSType - > cCPacketClassificationRule . u8IPTypeOfService [ 2 ] ) ;
for ( uiLoopIndex = 0 ; uiLoopIndex < 1 ; uiLoopIndex + + )
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8Protocol: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8Protocol ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPMaskedSourceAddressLength: 0x%X " ,
psfCSType - > cCPacketClassificationRule . u8IPMaskedSourceAddressLength ) ;
for ( uiLoopIndex = 0 ; uiLoopIndex < 32 ; uiLoopIndex + + )
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPMaskedSourceAddress[32]: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8IPMaskedSourceAddress [ uiLoopIndex ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPDestinationAddressLength: 0x%X " ,
psfCSType - > cCPacketClassificationRule . u8IPDestinationAddressLength ) ;
for ( uiLoopIndex = 0 ; uiLoopIndex < 32 ; uiLoopIndex + + )
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPDestinationAddress[32]: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8IPDestinationAddress [ uiLoopIndex ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ProtocolSourcePortRangeLength:0x%X " ,
psfCSType - > cCPacketClassificationRule . u8ProtocolSourcePortRangeLength ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ProtocolSourcePortRange[4]: 0x%02X ,0x%02X ,0x%02X ,0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8ProtocolSourcePortRange [ 0 ] ,
psfCSType - > cCPacketClassificationRule . u8ProtocolSourcePortRange [ 1 ] ,
psfCSType - > cCPacketClassificationRule . u8ProtocolSourcePortRange [ 2 ] ,
psfCSType - > cCPacketClassificationRule . u8ProtocolSourcePortRange [ 3 ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ProtocolDestPortRangeLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8ProtocolDestPortRangeLength ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ProtocolDestPortRange[4]: 0x%02X ,0x%02X ,0x%02X ,0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8ProtocolDestPortRange [ 0 ] ,
psfCSType - > cCPacketClassificationRule . u8ProtocolDestPortRange [ 1 ] ,
psfCSType - > cCPacketClassificationRule . u8ProtocolDestPortRange [ 2 ] ,
psfCSType - > cCPacketClassificationRule . u8ProtocolDestPortRange [ 3 ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8EthernetDestMacAddressLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8EthernetDestMacAddressLength ) ;
2012-07-06 09:28:13 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8EthernetDestMacAddress[6]: %pM " ,
psfCSType - > cCPacketClassificationRule .
u8EthernetDestMacAddress ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8EthernetSourceMACAddressLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8EthernetDestMacAddressLength ) ;
2012-07-06 09:28:13 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
2014-03-13 00:14:58 -06:00
DBG_LVL_ALL , " u8EthernetSourceMACAddress[6]: %pM " ,
psfCSType - > cCPacketClassificationRule .
2012-07-06 09:28:13 -06:00
u8EthernetSourceMACAddress ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8EthertypeLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8EthertypeLength ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8Ethertype[3]: 0x%02X ,0x%02X ,0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8Ethertype [ 0 ] ,
psfCSType - > cCPacketClassificationRule . u8Ethertype [ 1 ] ,
psfCSType - > cCPacketClassificationRule . u8Ethertype [ 2 ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16UserPriority: 0x%X " , psfCSType - > cCPacketClassificationRule . u16UserPriority ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16VLANID: 0x%X " , psfCSType - > cCPacketClassificationRule . u16VLANID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8AssociatedPHSI: 0x%02X " , psfCSType - > cCPacketClassificationRule . u8AssociatedPHSI ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16PacketClassificationRuleIndex: 0x%X " ,
psfCSType - > cCPacketClassificationRule . u16PacketClassificationRuleIndex ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8VendorSpecificClassifierParamLength: 0x%X " ,
psfCSType - > cCPacketClassificationRule . u8VendorSpecificClassifierParamLength ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8VendorSpecificClassifierParam[1]: 0x%X " ,
psfCSType - > cCPacketClassificationRule . u8VendorSpecificClassifierParam [ 0 ] ) ;
2010-09-08 15:46:36 -06:00
# ifdef VERSION_D5
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPv6FlowLableLength: 0x%X " ,
psfCSType - > cCPacketClassificationRule . u8IPv6FlowLableLength ) ;
2012-08-02 10:05:44 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8IPv6FlowLable[6]: 0x%*ph " ,
6 , psfCSType - > cCPacketClassificationRule .
u8IPv6FlowLable ) ;
2010-09-08 15:46:36 -06:00
# endif
}
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " bValid: 0x%02X " , pstAddIndication - > sfAuthorizedSet . bValid ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " AdmittedSet---> " ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32SFID: 0x%X " , pstAddIndication - > sfAdmittedSet . u32SFID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16CID: 0x%X " , pstAddIndication - > sfAdmittedSet . u16CID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ServiceClassNameLength: 0x%X " ,
pstAddIndication - > sfAdmittedSet . u8ServiceClassNameLength ) ;
2012-08-02 10:05:44 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL ,
" u8ServiceClassName: 0x%*ph " ,
6 , pstAddIndication - > sfAdmittedSet . u8ServiceClassName ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8MBSService: 0x%02X " , pstAddIndication - > sfAdmittedSet . u8MBSService ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8QosParamSet: 0x%02X " , pstAddIndication - > sfAdmittedSet . u8QosParamSet ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8TrafficPriority: 0x%02X " , pstAddIndication - > sfAdmittedSet . u8TrafficPriority ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32MaxTrafficBurst: 0x%X " , pstAddIndication - > sfAdmittedSet . u32MaxTrafficBurst ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32MinReservedTrafficRate: 0x%X " ,
pstAddIndication - > sfAdmittedSet . u32MinReservedTrafficRate ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8VendorSpecificQoSParamLength: 0x%02X " ,
pstAddIndication - > sfAdmittedSet . u8VendorSpecificQoSParamLength ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8VendorSpecificQoSParam: 0x%02X " ,
pstAddIndication - > sfAdmittedSet . u8VendorSpecificQoSParam [ 0 ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ServiceFlowSchedulingType: 0x%02X " ,
pstAddIndication - > sfAdmittedSet . u8ServiceFlowSchedulingType ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32ToleratedJitter: 0x%X " , pstAddIndication - > sfAdmittedSet . u32ToleratedJitter ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32MaximumLatency: 0x%X " , pstAddIndication - > sfAdmittedSet . u32MaximumLatency ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8FixedLengthVSVariableLengthSDUIndicator: 0x%02X " ,
pstAddIndication - > sfAdmittedSet . u8FixedLengthVSVariableLengthSDUIndicator ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8SDUSize: 0x%02X " , pstAddIndication - > sfAdmittedSet . u8SDUSize ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16TargetSAID: 0x%02X " , pstAddIndication - > sfAdmittedSet . u16TargetSAID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ARQEnable: 0x%02X " , pstAddIndication - > sfAdmittedSet . u8ARQEnable ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQWindowSize: 0x%X " , pstAddIndication - > sfAdmittedSet . u16ARQWindowSize ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQRetryTxTimeOut: 0x%X " , pstAddIndication - > sfAdmittedSet . u16ARQRetryTxTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQRetryRxTimeOut: 0x%X " , pstAddIndication - > sfAdmittedSet . u16ARQRetryRxTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQBlockLifeTime: 0x%X " , pstAddIndication - > sfAdmittedSet . u16ARQBlockLifeTime ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQSyncLossTimeOut: 0x%X " , pstAddIndication - > sfAdmittedSet . u16ARQSyncLossTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ARQDeliverInOrder: 0x%02X " , pstAddIndication - > sfAdmittedSet . u8ARQDeliverInOrder ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQRxPurgeTimeOut: 0x%X " , pstAddIndication - > sfAdmittedSet . u16ARQRxPurgeTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQBlockSize: 0x%X " , pstAddIndication - > sfAdmittedSet . u16ARQBlockSize ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8CSSpecification: 0x%02X " , pstAddIndication - > sfAdmittedSet . u8CSSpecification ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8TypeOfDataDeliveryService: 0x%02X " ,
pstAddIndication - > sfAdmittedSet . u8TypeOfDataDeliveryService ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16SDUInterArrivalTime: 0x%X " , pstAddIndication - > sfAdmittedSet . u16SDUInterArrivalTime ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16TimeBase: 0x%X " , pstAddIndication - > sfAdmittedSet . u16TimeBase ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8PagingPreference: 0x%X " , pstAddIndication - > sfAdmittedSet . u8PagingPreference ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8TrafficIndicationPreference: 0x%02X " ,
pstAddIndication - > sfAdmittedSet . u8TrafficIndicationPreference ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " Total Classifiers Received: 0x%X " , pstAddIndication - > sfAdmittedSet . u8TotalClassifiers ) ;
2010-09-08 15:46:36 -06:00
nCurClassifierCnt = pstAddIndication - > sfAdmittedSet . u8TotalClassifiers ;
2012-01-04 18:29:00 -07:00
if ( nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF )
2010-09-08 15:46:36 -06:00
nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF ;
2012-01-04 18:29:00 -07:00
for ( nIndex = 0 ; nIndex < nCurClassifierCnt ; nIndex + + ) {
2012-09-23 21:07:15 -06:00
struct bcm_convergence_types * psfCSType = NULL ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
psfCSType = & pstAddIndication - > sfAdmittedSet . cConvergenceSLTypes [ nIndex ] ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " CCPacketClassificationRuleSI====> " ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ClassifierRulePriority: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8ClassifierRulePriority ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPTypeOfServiceLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8IPTypeOfServiceLength ) ;
2012-08-02 10:05:44 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8IPTypeOfService[3]: 0x%*ph " ,
3 , psfCSType - > cCPacketClassificationRule .
u8IPTypeOfService ) ;
2012-01-04 18:29:00 -07:00
for ( uiLoopIndex = 0 ; uiLoopIndex < 1 ; uiLoopIndex + + )
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8Protocol: 0x%02X " , psfCSType - > cCPacketClassificationRule . u8Protocol ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPMaskedSourceAddressLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8IPMaskedSourceAddressLength ) ;
for ( uiLoopIndex = 0 ; uiLoopIndex < 32 ; uiLoopIndex + + )
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPMaskedSourceAddress[32]: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8IPMaskedSourceAddress [ uiLoopIndex ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPDestinationAddressLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8IPDestinationAddressLength ) ;
for ( uiLoopIndex = 0 ; uiLoopIndex < 32 ; uiLoopIndex + + )
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPDestinationAddress[32]: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8IPDestinationAddress [ uiLoopIndex ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ProtocolSourcePortRangeLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8ProtocolSourcePortRangeLength ) ;
2012-08-02 10:05:44 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
2014-03-13 00:14:58 -06:00
DBG_LVL_ALL , " u8ProtocolSourcePortRange[4]: 0x%*ph " ,
4 , psfCSType - > cCPacketClassificationRule .
2012-08-02 10:05:44 -06:00
u8ProtocolSourcePortRange ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ProtocolDestPortRangeLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8ProtocolDestPortRangeLength ) ;
2012-08-02 10:05:44 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
2014-03-13 00:14:58 -06:00
DBG_LVL_ALL , " u8ProtocolDestPortRange[4]: 0x%*ph " ,
4 , psfCSType - > cCPacketClassificationRule .
2012-08-02 10:05:44 -06:00
u8ProtocolDestPortRange ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8EthernetDestMacAddressLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8EthernetDestMacAddressLength ) ;
2012-07-06 09:28:13 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8EthernetDestMacAddress[6]: %pM " ,
psfCSType - > cCPacketClassificationRule .
u8EthernetDestMacAddress ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8EthernetSourceMACAddressLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8EthernetDestMacAddressLength ) ;
2012-07-06 09:28:13 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
2014-03-13 00:14:58 -06:00
DBG_LVL_ALL , " u8EthernetSourceMACAddress[6]: %pM " ,
psfCSType - > cCPacketClassificationRule .
2012-07-06 09:28:13 -06:00
u8EthernetSourceMACAddress ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8EthertypeLength: 0x%02X " , psfCSType - > cCPacketClassificationRule . u8EthertypeLength ) ;
2012-08-02 10:05:44 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8Ethertype[3]: 0x%*ph " ,
3 , psfCSType - > cCPacketClassificationRule .
u8Ethertype ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16UserPriority: 0x%X " , psfCSType - > cCPacketClassificationRule . u16UserPriority ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16VLANID: 0x%X " , psfCSType - > cCPacketClassificationRule . u16VLANID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8AssociatedPHSI: 0x%02X " , psfCSType - > cCPacketClassificationRule . u8AssociatedPHSI ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16PacketClassificationRuleIndex: 0x%X " ,
psfCSType - > cCPacketClassificationRule . u16PacketClassificationRuleIndex ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8VendorSpecificClassifierParamLength: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8VendorSpecificClassifierParamLength ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8VendorSpecificClassifierParam[1]: 0x%02X " ,
psfCSType - > cCPacketClassificationRule . u8VendorSpecificClassifierParam [ 0 ] ) ;
2010-09-08 15:46:36 -06:00
# ifdef VERSION_D5
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8IPv6FlowLableLength: 0x%X " ,
psfCSType - > cCPacketClassificationRule . u8IPv6FlowLableLength ) ;
2012-08-02 10:05:44 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8IPv6FlowLable[6]: 0x%*ph " ,
6 , psfCSType - > cCPacketClassificationRule .
u8IPv6FlowLable ) ;
2010-09-08 15:46:36 -06:00
# endif
}
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " bValid: 0x%X " , pstAddIndication - > sfAdmittedSet . bValid ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " ActiveSet---> " ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32SFID: 0x%X " , pstAddIndication - > sfActiveSet . u32SFID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16CID: 0x%X " , pstAddIndication - > sfActiveSet . u16CID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ServiceClassNameLength: 0x%X " , pstAddIndication - > sfActiveSet . u8ServiceClassNameLength ) ;
2012-08-02 10:05:44 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL ,
" u8ServiceClassName: 0x%*ph " ,
6 , pstAddIndication - > sfActiveSet . u8ServiceClassName ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8MBSService: 0x%02X " , pstAddIndication - > sfActiveSet . u8MBSService ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8QosParamSet: 0x%02X " , pstAddIndication - > sfActiveSet . u8QosParamSet ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8TrafficPriority: 0x%02X " , pstAddIndication - > sfActiveSet . u8TrafficPriority ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32MaxTrafficBurst: 0x%X " , pstAddIndication - > sfActiveSet . u32MaxTrafficBurst ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32MinReservedTrafficRate: 0x%X " ,
pstAddIndication - > sfActiveSet . u32MinReservedTrafficRate ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8VendorSpecificQoSParamLength: 0x%02X " ,
pstAddIndication - > sfActiveSet . u8VendorSpecificQoSParamLength ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8VendorSpecificQoSParam: 0x%02X " ,
pstAddIndication - > sfActiveSet . u8VendorSpecificQoSParam [ 0 ] ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ServiceFlowSchedulingType: 0x%02X " ,
pstAddIndication - > sfActiveSet . u8ServiceFlowSchedulingType ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32ToleratedJitter: 0x%X " , pstAddIndication - > sfActiveSet . u32ToleratedJitter ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u32MaximumLatency: 0x%X " , pstAddIndication - > sfActiveSet . u32MaximumLatency ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8FixedLengthVSVariableLengthSDUIndicator: 0x%02X " ,
pstAddIndication - > sfActiveSet . u8FixedLengthVSVariableLengthSDUIndicator ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8SDUSize: 0x%X " , pstAddIndication - > sfActiveSet . u8SDUSize ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16TargetSAID: 0x%X " , pstAddIndication - > sfActiveSet . u16TargetSAID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ARQEnable: 0x%X " , pstAddIndication - > sfActiveSet . u8ARQEnable ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQWindowSize: 0x%X " , pstAddIndication - > sfActiveSet . u16ARQWindowSize ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQRetryTxTimeOut: 0x%X " , pstAddIndication - > sfActiveSet . u16ARQRetryTxTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQRetryRxTimeOut: 0x%X " , pstAddIndication - > sfActiveSet . u16ARQRetryRxTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQBlockLifeTime: 0x%X " , pstAddIndication - > sfActiveSet . u16ARQBlockLifeTime ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQSyncLossTimeOut: 0x%X " , pstAddIndication - > sfActiveSet . u16ARQSyncLossTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8ARQDeliverInOrder: 0x%X " , pstAddIndication - > sfActiveSet . u8ARQDeliverInOrder ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQRxPurgeTimeOut: 0x%X " , pstAddIndication - > sfActiveSet . u16ARQRxPurgeTimeOut ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16ARQBlockSize: 0x%X " , pstAddIndication - > sfActiveSet . u16ARQBlockSize ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8CSSpecification: 0x%X " , pstAddIndication - > sfActiveSet . u8CSSpecification ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8TypeOfDataDeliveryService: 0x%X " ,
pstAddIndication - > sfActiveSet . u8TypeOfDataDeliveryService ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16SDUInterArrivalTime: 0x%X " , pstAddIndication - > sfActiveSet . u16SDUInterArrivalTime ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u16TimeBase: 0x%X " , pstAddIndication - > sfActiveSet . u16TimeBase ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8PagingPreference: 0x%X " , pstAddIndication - > sfActiveSet . u8PagingPreference ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " u8TrafficIndicationPreference: 0x%X " ,
pstAddIndication - > sfActiveSet . u8TrafficIndicationPreference ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL , " Total Classifiers Received: 0x%X " , pstAddIndication - > sfActiveSet . u8TotalClassifiers ) ;
2010-09-08 15:46:36 -06:00
nCurClassifierCnt = pstAddIndication - > sfActiveSet . u8TotalClassifiers ;
2012-01-04 18:29:00 -07:00
if ( nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF )
2010-09-08 15:46:36 -06:00
nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF ;
2012-01-04 18:29:00 -07:00
for ( nIndex = 0 ; nIndex < nCurClassifierCnt ; nIndex + + ) {
2012-09-23 21:07:15 -06:00
struct bcm_convergence_types * psfCSType = NULL ;
2014-05-23 14:23:51 -06:00
struct bcm_packet_class_rules * clsRule = NULL ;
psfCSType = & pstAddIndication - > sfActiveSet . cConvergenceSLTypes [ nIndex ] ;
clsRule = & psfCSType - > cCPacketClassificationRule ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " CCPacketClassificationRuleSI====> " ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8ClassifierRulePriority: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8ClassifierRulePriority ) ;
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8IPTypeOfServiceLength: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8IPTypeOfServiceLength ) ;
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8IPTypeOfService[3]: 0x%X ,0x%X ,0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8IPTypeOfService [ 0 ] ,
clsRule - > u8IPTypeOfService [ 1 ] ,
clsRule - > u8IPTypeOfService [ 2 ] ) ;
2012-01-04 18:29:00 -07:00
for ( uiLoopIndex = 0 ; uiLoopIndex < 1 ; uiLoopIndex + + )
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8Protocol: 0x%X " ,
clsRule - > u8Protocol ) ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8IPMaskedSourceAddressLength: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8IPMaskedSourceAddressLength ) ;
2012-01-04 18:29:00 -07:00
for ( uiLoopIndex = 0 ; uiLoopIndex < 32 ; uiLoopIndex + + )
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8IPMaskedSourceAddress[32]: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8IPMaskedSourceAddress [ uiLoopIndex ] ) ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8IPDestinationAddressLength: 0x%02X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8IPDestinationAddressLength ) ;
2012-01-04 18:29:00 -07:00
for ( uiLoopIndex = 0 ; uiLoopIndex < 32 ; uiLoopIndex + + )
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8IPDestinationAddress[32]:0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8IPDestinationAddress [ uiLoopIndex ] ) ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8ProtocolSourcePortRangeLength: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8ProtocolSourcePortRangeLength ) ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8ProtocolSourcePortRange[4]: 0x%X ,0x%X ,0x%X ,0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8ProtocolSourcePortRange [ 0 ] ,
clsRule - > u8ProtocolSourcePortRange [ 1 ] ,
clsRule - > u8ProtocolSourcePortRange [ 2 ] ,
clsRule - > u8ProtocolSourcePortRange [ 3 ] ) ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8ProtocolDestPortRangeLength: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8ProtocolDestPortRangeLength ) ;
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8ProtocolDestPortRange[4]: 0x%X ,0x%X ,0x%X ,0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8ProtocolDestPortRange [ 0 ] ,
clsRule - > u8ProtocolDestPortRange [ 1 ] ,
clsRule - > u8ProtocolDestPortRange [ 2 ] ,
clsRule - > u8ProtocolDestPortRange [ 3 ] ) ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8EthernetDestMacAddressLength: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8EthernetDestMacAddressLength ) ;
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8EthernetDestMacAddress[6]: 0x%X ,0x%X ,0x%X ,0x%X ,0x%X ,0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8EthernetDestMacAddress [ 0 ] ,
clsRule - > u8EthernetDestMacAddress [ 1 ] ,
clsRule - > u8EthernetDestMacAddress [ 2 ] ,
clsRule - > u8EthernetDestMacAddress [ 3 ] ,
clsRule - > u8EthernetDestMacAddress [ 4 ] ,
clsRule - > u8EthernetDestMacAddress [ 5 ] ) ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8EthernetSourceMACAddressLength: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8EthernetDestMacAddressLength ) ;
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8EthernetSourceMACAddress[6]: 0x%X ,0x%X ,0x%X ,0x%X ,0x%X ,0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8EthernetSourceMACAddress [ 0 ] ,
clsRule - > u8EthernetSourceMACAddress [ 1 ] ,
clsRule - > u8EthernetSourceMACAddress [ 2 ] ,
clsRule - > u8EthernetSourceMACAddress [ 3 ] ,
clsRule - > u8EthernetSourceMACAddress [ 4 ] ,
clsRule - > u8EthernetSourceMACAddress [ 5 ] ) ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8EthertypeLength: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8EthertypeLength ) ;
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8Ethertype[3]: 0x%X ,0x%X ,0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8Ethertype [ 0 ] ,
clsRule - > u8Ethertype [ 1 ] ,
clsRule - > u8Ethertype [ 2 ] ) ;
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u16UserPriority: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u16UserPriority ) ;
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u16VLANID: 0x%X " ,
clsRule - > u16VLANID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8AssociatedPHSI: 0x%X " ,
clsRule - > u8AssociatedPHSI ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u16PacketClassificationRuleIndex:0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u16PacketClassificationRuleIndex ) ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8VendorSpecificClassifierParamLength:0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8VendorSpecificClassifierParamLength ) ;
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8VendorSpecificClassifierParam[1]:0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8VendorSpecificClassifierParam [ 0 ] ) ;
2010-09-08 15:46:36 -06:00
# ifdef VERSION_D5
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL , " u8IPv6FlowLableLength: 0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8IPv6FlowLableLength ) ;
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL ,
DBG_LVL_ALL ,
" u8IPv6FlowLable[6]: 0x%X ,0x%X ,0x%X ,0x%X ,0x%X ,0x%X " ,
2014-05-23 14:23:51 -06:00
clsRule - > u8IPv6FlowLable [ 0 ] ,
clsRule - > u8IPv6FlowLable [ 1 ] ,
clsRule - > u8IPv6FlowLable [ 2 ] ,
clsRule - > u8IPv6FlowLable [ 3 ] ,
clsRule - > u8IPv6FlowLable [ 4 ] ,
clsRule - > u8IPv6FlowLable [ 5 ] ) ;
2010-09-08 15:46:36 -06:00
# endif
}
2014-05-23 14:23:52 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , DUMP_CONTROL , DBG_LVL_ALL ,
" bValid: 0x%X " , pstAddIndication - > sfActiveSet . bValid ) ;
2010-09-08 15:46:36 -06:00
}
2014-05-23 14:23:50 -06:00
static inline ULONG RestoreSFParam ( struct bcm_mini_adapter * Adapter ,
ULONG ulAddrSFParamSet , PUCHAR pucDestBuffer )
2010-09-08 15:46:36 -06:00
{
2012-09-23 21:07:14 -06:00
UINT nBytesToRead = sizeof ( struct bcm_connect_mgr_params ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( ulAddrSFParamSet = = 0 | | NULL = = pucDestBuffer ) {
2014-05-23 14:23:50 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Got Param address as 0!! " ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
}
ulAddrSFParamSet = ntohl ( ulAddrSFParamSet ) ;
2012-01-04 18:29:00 -07:00
/* Read out the SF Param Set At the indicated Location */
2014-06-06 11:55:20 -06:00
if ( rdm ( Adapter , ulAddrSFParamSet , ( PUCHAR ) pucDestBuffer , nBytesToRead ) < 0 )
2010-09-08 15:46:36 -06:00
return STATUS_FAILURE ;
return 1 ;
}
2014-05-23 14:23:49 -06:00
static ULONG StoreSFParam ( struct bcm_mini_adapter * Adapter , PUCHAR pucSrcBuffer ,
ULONG ulAddrSFParamSet )
2010-09-08 15:46:36 -06:00
{
2012-09-23 21:07:14 -06:00
UINT nBytesToWrite = sizeof ( struct bcm_connect_mgr_params ) ;
2010-11-12 21:37:49 -07:00
int ret = 0 ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( ulAddrSFParamSet = = 0 | | NULL = = pucSrcBuffer )
2010-09-08 15:46:36 -06:00
return 0 ;
2010-11-12 21:37:49 -07:00
ret = wrm ( Adapter , ulAddrSFParamSet , ( u8 * ) pucSrcBuffer , nBytesToWrite ) ;
if ( ret < 0 ) {
2014-05-23 14:23:49 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" %s:%d WRM failed " , __func__ , __LINE__ ) ;
2010-11-12 21:37:49 -07:00
return ret ;
2010-09-08 15:46:36 -06:00
}
return 1 ;
}
2014-05-23 14:23:48 -06:00
ULONG StoreCmControlResponseMessage ( struct bcm_mini_adapter * Adapter ,
PVOID pvBuffer , UINT * puBufferLength )
2010-09-08 15:46:36 -06:00
{
2012-10-30 19:50:43 -06:00
struct bcm_add_indication_alt * pstAddIndicationAlt = NULL ;
2012-09-23 21:07:12 -06:00
struct bcm_add_indication * pstAddIndication = NULL ;
2012-09-23 21:07:11 -06:00
struct bcm_del_request * pstDeletionRequest ;
2010-09-08 15:46:36 -06:00
UINT uiSearchRuleIndex ;
ULONG ulSFID ;
2013-10-29 15:19:50 -06:00
pstAddIndicationAlt = pvBuffer ;
2010-09-08 15:46:36 -06:00
/*
2012-01-04 18:29:00 -07:00
* In case of DSD Req By MS , we should immediately delete this SF so that
* we can stop the further classifying the pkt for this SF .
*/
if ( pstAddIndicationAlt - > u8Type = = DSD_REQ ) {
2013-10-29 15:19:50 -06:00
pstDeletionRequest = pvBuffer ;
2010-09-08 15:46:36 -06:00
ulSFID = ntohl ( pstDeletionRequest - > u32SFID ) ;
2012-01-04 18:29:00 -07:00
uiSearchRuleIndex = SearchSfid ( Adapter , ulSFID ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( uiSearchRuleIndex < NO_OF_QUEUES ) {
deleteSFBySfid ( Adapter , uiSearchRuleIndex ) ;
2010-09-08 15:46:36 -06:00
Adapter - > u32TotalDSD + + ;
}
return 1 ;
}
2012-01-04 18:29:00 -07:00
if ( ( pstAddIndicationAlt - > u8Type = = DSD_RSP ) | |
( pstAddIndicationAlt - > u8Type = = DSD_ACK ) ) {
/* No Special handling send the message as it is */
2010-09-08 15:46:36 -06:00
return 1 ;
}
2012-01-04 18:29:00 -07:00
/* For DSA_REQ, only up to "psfAuthorizedSet" parameter should be accessed by driver! */
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:48 -06:00
pstAddIndication = kmalloc ( sizeof ( struct bcm_add_indication ) ,
GFP_KERNEL ) ;
2012-01-04 18:29:03 -07:00
if ( pstAddIndication = = NULL )
2010-09-08 15:46:36 -06:00
return 0 ;
/* AUTHORIZED SET */
2012-09-23 21:07:14 -06:00
pstAddIndication - > psfAuthorizedSet = ( struct bcm_connect_mgr_params * )
2014-05-23 14:23:48 -06:00
GetNextTargetBufferLocation ( Adapter ,
pstAddIndicationAlt - > u16TID ) ;
2012-03-01 22:17:04 -07:00
if ( ! pstAddIndication - > psfAuthorizedSet ) {
kfree ( pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
2012-03-01 22:17:04 -07:00
}
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( StoreSFParam ( Adapter , ( PUCHAR ) & pstAddIndicationAlt - > sfAuthorizedSet ,
2012-03-01 22:17:04 -07:00
( ULONG ) pstAddIndication - > psfAuthorizedSet ) ! = 1 ) {
kfree ( pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
2012-03-01 22:17:04 -07:00
}
2010-09-08 15:46:36 -06:00
2010-09-30 02:24:11 -06:00
/* this can't possibly be right */
2014-05-23 14:23:48 -06:00
pstAddIndication - > psfAuthorizedSet =
( struct bcm_connect_mgr_params * ) ntohl (
( ULONG ) pstAddIndication - > psfAuthorizedSet ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( pstAddIndicationAlt - > u8Type = = DSA_REQ ) {
2012-09-23 21:07:13 -06:00
struct bcm_add_request AddRequest ;
2010-09-08 15:46:36 -06:00
AddRequest . u8Type = pstAddIndicationAlt - > u8Type ;
AddRequest . eConnectionDir = pstAddIndicationAlt - > u8Direction ;
AddRequest . u16TID = pstAddIndicationAlt - > u16TID ;
AddRequest . u16CID = pstAddIndicationAlt - > u16CID ;
AddRequest . u16VCID = pstAddIndicationAlt - > u16VCID ;
2012-01-04 18:29:00 -07:00
AddRequest . psfParameterSet = pstAddIndication - > psfAuthorizedSet ;
2012-09-23 21:07:13 -06:00
( * puBufferLength ) = sizeof ( struct bcm_add_request ) ;
memcpy ( pvBuffer , & AddRequest , sizeof ( struct bcm_add_request ) ) ;
2012-03-01 22:17:04 -07:00
kfree ( pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
return 1 ;
}
2012-01-04 18:29:00 -07:00
/* Since it's not DSA_REQ, we can access all field in pstAddIndicationAlt */
/* We need to extract the structure from the buffer and pack it differently */
2010-09-08 15:46:36 -06:00
pstAddIndication - > u8Type = pstAddIndicationAlt - > u8Type ;
2012-01-04 18:29:00 -07:00
pstAddIndication - > eConnectionDir = pstAddIndicationAlt - > u8Direction ;
2010-09-08 15:46:36 -06:00
pstAddIndication - > u16TID = pstAddIndicationAlt - > u16TID ;
pstAddIndication - > u16CID = pstAddIndicationAlt - > u16CID ;
pstAddIndication - > u16VCID = pstAddIndicationAlt - > u16VCID ;
pstAddIndication - > u8CC = pstAddIndicationAlt - > u8CC ;
/* ADMITTED SET */
2012-09-23 21:07:14 -06:00
pstAddIndication - > psfAdmittedSet = ( struct bcm_connect_mgr_params * )
2014-05-23 14:23:48 -06:00
GetNextTargetBufferLocation ( Adapter ,
pstAddIndicationAlt - > u16TID ) ;
2012-03-01 22:17:04 -07:00
if ( ! pstAddIndication - > psfAdmittedSet ) {
kfree ( pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
2012-03-01 22:17:04 -07:00
}
2014-05-23 14:23:48 -06:00
if ( StoreSFParam ( Adapter , ( PUCHAR ) & pstAddIndicationAlt - > sfAdmittedSet ,
( ULONG ) pstAddIndication - > psfAdmittedSet ) ! = 1 ) {
2012-03-01 22:17:04 -07:00
kfree ( pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
2012-03-01 22:17:04 -07:00
}
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:48 -06:00
pstAddIndication - > psfAdmittedSet =
( struct bcm_connect_mgr_params * ) ntohl (
( ULONG ) pstAddIndication - > psfAdmittedSet ) ;
2010-09-08 15:46:36 -06:00
/* ACTIVE SET */
2012-09-23 21:07:14 -06:00
pstAddIndication - > psfActiveSet = ( struct bcm_connect_mgr_params * )
2014-05-23 14:23:48 -06:00
GetNextTargetBufferLocation ( Adapter ,
pstAddIndicationAlt - > u16TID ) ;
2012-03-01 22:17:04 -07:00
if ( ! pstAddIndication - > psfActiveSet ) {
kfree ( pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
2012-03-01 22:17:04 -07:00
}
2014-05-23 14:23:48 -06:00
if ( StoreSFParam ( Adapter , ( PUCHAR ) & pstAddIndicationAlt - > sfActiveSet ,
( ULONG ) pstAddIndication - > psfActiveSet ) ! = 1 ) {
2012-03-01 22:17:04 -07:00
kfree ( pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
2012-03-01 22:17:04 -07:00
}
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:48 -06:00
pstAddIndication - > psfActiveSet =
( struct bcm_connect_mgr_params * ) ntohl (
( ULONG ) pstAddIndication - > psfActiveSet ) ;
2010-09-08 15:46:36 -06:00
2012-09-23 21:07:12 -06:00
( * puBufferLength ) = sizeof ( struct bcm_add_indication ) ;
* ( struct bcm_add_indication * ) pvBuffer = * pstAddIndication ;
2010-11-01 07:35:21 -06:00
kfree ( pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
return 1 ;
}
2012-10-30 19:50:43 -06:00
static inline struct bcm_add_indication_alt
2014-05-23 14:23:47 -06:00
* RestoreCmControlResponseMessage ( register struct bcm_mini_adapter * Adapter ,
register PVOID pvBuffer )
2010-09-08 15:46:36 -06:00
{
2012-01-04 18:29:00 -07:00
ULONG ulStatus = 0 ;
2012-09-23 21:07:12 -06:00
struct bcm_add_indication * pstAddIndication = NULL ;
2012-10-30 19:50:43 -06:00
struct bcm_add_indication_alt * pstAddIndicationDest = NULL ;
2010-09-08 15:46:36 -06:00
2013-10-29 15:19:50 -06:00
pstAddIndication = pvBuffer ;
2014-05-23 14:23:47 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" =====> " ) ;
2010-09-08 15:46:36 -06:00
if ( ( pstAddIndication - > u8Type = = DSD_REQ ) | |
( pstAddIndication - > u8Type = = DSD_RSP ) | |
( pstAddIndication - > u8Type = = DSD_ACK ) )
2013-10-29 15:19:50 -06:00
return pvBuffer ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:47 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Inside RestoreCmControlResponseMessage " ) ;
2010-09-08 15:46:36 -06:00
/*
2012-01-04 18:29:00 -07:00
* Need to Allocate memory to contain the SUPER Large structures
* Our driver can ' t create these structures on Stack : (
*/
2014-05-23 14:23:47 -06:00
pstAddIndicationDest = kmalloc ( sizeof ( struct bcm_add_indication_alt ) ,
GFP_KERNEL ) ;
2012-01-04 18:29:00 -07:00
if ( pstAddIndicationDest ) {
2014-05-23 14:23:47 -06:00
memset ( pstAddIndicationDest , 0 ,
sizeof ( struct bcm_add_indication_alt ) ) ;
2012-01-04 18:29:00 -07:00
} else {
2014-05-23 14:23:47 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG ,
DBG_LVL_ALL ,
" Failed to allocate memory for SF Add Indication Structure " ) ;
2010-09-08 15:46:36 -06:00
return NULL ;
}
2014-05-23 14:23:47 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" AddIndication-u8Type : 0x%X " ,
pstAddIndication - > u8Type ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" AddIndication-u8Direction : 0x%X " ,
pstAddIndication - > eConnectionDir ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" AddIndication-u8TID : 0x%X " ,
ntohs ( pstAddIndication - > u16TID ) ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" AddIndication-u8CID : 0x%X " ,
ntohs ( pstAddIndication - > u16CID ) ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" AddIndication-u16VCID : 0x%X " ,
ntohs ( pstAddIndication - > u16VCID ) ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" AddIndication-autorized set loc : %p " ,
pstAddIndication - > psfAuthorizedSet ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" AddIndication-admitted set loc : %p " ,
pstAddIndication - > psfAdmittedSet ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" AddIndication-Active set loc : %p " ,
pstAddIndication - > psfActiveSet ) ;
2010-09-08 15:46:36 -06:00
pstAddIndicationDest - > u8Type = pstAddIndication - > u8Type ;
pstAddIndicationDest - > u8Direction = pstAddIndication - > eConnectionDir ;
pstAddIndicationDest - > u16TID = pstAddIndication - > u16TID ;
pstAddIndicationDest - > u16CID = pstAddIndication - > u16CID ;
pstAddIndicationDest - > u16VCID = pstAddIndication - > u16VCID ;
pstAddIndicationDest - > u8CC = pstAddIndication - > u8CC ;
2014-05-23 14:23:47 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Restoring Active Set " ) ;
ulStatus = RestoreSFParam ( Adapter ,
( ULONG ) pstAddIndication - > psfActiveSet ,
( PUCHAR ) & pstAddIndicationDest - > sfActiveSet ) ;
2012-01-04 18:29:00 -07:00
if ( ulStatus ! = 1 )
2010-09-08 15:46:36 -06:00
goto failed_restore_sf_param ;
2012-01-04 18:29:00 -07:00
if ( pstAddIndicationDest - > sfActiveSet . u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF )
2014-05-23 14:23:47 -06:00
pstAddIndicationDest - > sfActiveSet . u8TotalClassifiers =
MAX_CLASSIFIERS_IN_SF ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:47 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Restoring Admitted Set " ) ;
ulStatus = RestoreSFParam ( Adapter ,
( ULONG ) pstAddIndication - > psfAdmittedSet ,
( PUCHAR ) & pstAddIndicationDest - > sfAdmittedSet ) ;
2012-01-04 18:29:00 -07:00
if ( ulStatus ! = 1 )
2010-09-08 15:46:36 -06:00
goto failed_restore_sf_param ;
2012-01-04 18:29:00 -07:00
if ( pstAddIndicationDest - > sfAdmittedSet . u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF )
2014-05-23 14:23:47 -06:00
pstAddIndicationDest - > sfAdmittedSet . u8TotalClassifiers =
MAX_CLASSIFIERS_IN_SF ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:47 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Restoring Authorized Set " ) ;
ulStatus = RestoreSFParam ( Adapter ,
( ULONG ) pstAddIndication - > psfAuthorizedSet ,
( PUCHAR ) & pstAddIndicationDest - > sfAuthorizedSet ) ;
2012-01-04 18:29:00 -07:00
if ( ulStatus ! = 1 )
2010-09-08 15:46:36 -06:00
goto failed_restore_sf_param ;
2012-01-04 18:29:00 -07:00
if ( pstAddIndicationDest - > sfAuthorizedSet . u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF )
2014-05-23 14:23:47 -06:00
pstAddIndicationDest - > sfAuthorizedSet . u8TotalClassifiers =
MAX_CLASSIFIERS_IN_SF ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:47 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Dumping the whole raw packet " ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" ============================================================ " ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" pstAddIndicationDest->sfActiveSet size %zx %p " ,
sizeof ( * pstAddIndicationDest ) , pstAddIndicationDest ) ;
/* BCM_DEBUG_PRINT_BUFFER(Adapter,DBG_TYPE_OTHERS, CONN_MSG,
* DBG_LVL_ALL , ( unsigned char * ) pstAddIndicationDest ,
* sizeof ( * pstAddIndicationDest ) ) ;
*/
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" ============================================================ " ) ;
2010-09-08 15:46:36 -06:00
return pstAddIndicationDest ;
failed_restore_sf_param :
2010-11-01 07:35:21 -06:00
kfree ( pstAddIndicationDest ) ;
2014-05-23 14:23:47 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" <===== " ) ;
2010-09-08 15:46:36 -06:00
return NULL ;
}
2012-05-26 10:05:12 -06:00
ULONG SetUpTargetDsxBuffers ( struct bcm_mini_adapter * Adapter )
2010-09-08 15:46:36 -06:00
{
ULONG ulTargetDsxBuffersBase = 0 ;
ULONG ulCntTargetBuffers ;
2012-01-04 18:29:05 -07:00
ULONG i ;
2010-09-08 15:46:36 -06:00
int Status ;
2010-10-08 06:56:35 -06:00
if ( ! Adapter ) {
2014-05-23 14:23:46 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Adapter was NULL!!! " ) ;
2010-10-08 06:56:35 -06:00
return 0 ;
}
2012-01-04 18:29:00 -07:00
if ( Adapter - > astTargetDsxBuffer [ 0 ] . ulTargetDsxBuffer )
2010-09-08 15:46:36 -06:00
return 1 ;
2014-05-23 14:23:46 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Size of Each DSX Buffer(Also size of connection manager parameters): %zx " ,
sizeof ( struct bcm_connect_mgr_params ) ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Reading DSX buffer From Target location %x " ,
DSX_MESSAGE_EXCHANGE_BUFFER ) ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:46 -06:00
Status = rdmalt ( Adapter , DSX_MESSAGE_EXCHANGE_BUFFER ,
( PUINT ) & ulTargetDsxBuffersBase , sizeof ( UINT ) ) ;
2012-01-04 18:29:00 -07:00
if ( Status < 0 ) {
2014-05-23 14:23:46 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" RDM failed!! " ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
}
2014-05-23 14:23:46 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Base Address Of DSX Target Buffer : 0x%lx " ,
ulTargetDsxBuffersBase ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Tgt Buffer is Now %lx : " , ulTargetDsxBuffersBase ) ;
ulCntTargetBuffers = DSX_MESSAGE_EXCHANGE_BUFFER_SIZE /
sizeof ( struct bcm_connect_mgr_params ) ;
2010-09-08 15:46:36 -06:00
Adapter - > ulTotalTargetBuffersAvailable =
ulCntTargetBuffers > MAX_TARGET_DSX_BUFFERS ?
MAX_TARGET_DSX_BUFFERS : ulCntTargetBuffers ;
2014-05-23 14:23:46 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Total Target DSX Buffer setup %lx " ,
Adapter - > ulTotalTargetBuffersAvailable ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:05 -07:00
for ( i = 0 ; i < Adapter - > ulTotalTargetBuffersAvailable ; i + + ) {
Adapter - > astTargetDsxBuffer [ i ] . ulTargetDsxBuffer = ulTargetDsxBuffersBase ;
Adapter - > astTargetDsxBuffer [ i ] . valid = 1 ;
Adapter - > astTargetDsxBuffer [ i ] . tid = 0 ;
2012-09-23 21:07:14 -06:00
ulTargetDsxBuffersBase + = sizeof ( struct bcm_connect_mgr_params ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " Target DSX Buffer %lx setup at 0x%lx " ,
2012-01-04 18:29:05 -07:00
i , Adapter - > astTargetDsxBuffer [ i ] . ulTargetDsxBuffer ) ;
2010-09-08 15:46:36 -06:00
}
Adapter - > ulCurrentTargetBuffer = 0 ;
Adapter - > ulFreeTargetBufferCnt = Adapter - > ulTotalTargetBuffersAvailable ;
return 1 ;
}
2014-05-23 14:23:45 -06:00
static ULONG GetNextTargetBufferLocation ( struct bcm_mini_adapter * Adapter ,
B_UINT16 tid )
2010-09-08 15:46:36 -06:00
{
2012-10-05 19:33:04 -06:00
ULONG dsx_buf ;
ULONG idx , max_try ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:45 -06:00
if ( ( Adapter - > ulTotalTargetBuffersAvailable = = 0 )
| | ( Adapter - > ulFreeTargetBufferCnt = = 0 ) ) {
2013-10-28 02:36:19 -06:00
ClearTargetDSXBuffer ( Adapter , tid , false ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
}
2012-10-05 19:33:04 -06:00
idx = Adapter - > ulCurrentTargetBuffer ;
max_try = Adapter - > ulTotalTargetBuffersAvailable ;
while ( ( max_try ) & & ( Adapter - > astTargetDsxBuffer [ idx ] . valid ! = 1 ) ) {
idx = ( idx + 1 ) % Adapter - > ulTotalTargetBuffersAvailable ;
max_try - - ;
2010-09-08 15:46:36 -06:00
}
2012-10-05 19:33:04 -06:00
if ( max_try = = 0 ) {
2014-05-23 14:23:45 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 ,
" \n GetNextTargetBufferLocation : Error No Free Target DSX Buffers FreeCnt : %lx " ,
Adapter - > ulFreeTargetBufferCnt ) ;
2013-10-28 02:36:19 -06:00
ClearTargetDSXBuffer ( Adapter , tid , false ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
}
2012-10-05 19:33:04 -06:00
dsx_buf = Adapter - > astTargetDsxBuffer [ idx ] . ulTargetDsxBuffer ;
Adapter - > astTargetDsxBuffer [ idx ] . valid = 0 ;
Adapter - > astTargetDsxBuffer [ idx ] . tid = tid ;
2010-09-08 15:46:36 -06:00
Adapter - > ulFreeTargetBufferCnt - - ;
2012-10-05 19:33:04 -06:00
idx = ( idx + 1 ) % Adapter - > ulTotalTargetBuffersAvailable ;
Adapter - > ulCurrentTargetBuffer = idx ;
2014-05-23 14:23:45 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 ,
" GetNextTargetBufferLocation :Returning address %lx tid %d \n " ,
dsx_buf , tid ) ;
2012-01-04 18:29:00 -07:00
2012-10-05 19:33:04 -06:00
return dsx_buf ;
2010-09-08 15:46:36 -06:00
}
2012-05-26 10:05:12 -06:00
int AllocAdapterDsxBuffer ( struct bcm_mini_adapter * Adapter )
2010-09-08 15:46:36 -06:00
{
/*
2012-01-04 18:29:00 -07:00
* Need to Allocate memory to contain the SUPER Large structures
* Our driver can ' t create these structures on Stack
*/
2014-05-23 14:23:44 -06:00
Adapter - > caDsxReqResp = kmalloc ( sizeof ( struct bcm_add_indication_alt )
+ LEADER_SIZE , GFP_KERNEL ) ;
2012-01-04 18:29:00 -07:00
if ( ! Adapter - > caDsxReqResp )
2010-09-08 15:46:36 -06:00
return - ENOMEM ;
2012-01-04 18:29:00 -07:00
2010-09-08 15:46:36 -06:00
return 0 ;
}
2012-05-26 10:05:12 -06:00
int FreeAdapterDsxBuffer ( struct bcm_mini_adapter * Adapter )
2010-09-08 15:46:36 -06:00
{
2011-03-12 22:28:55 -07:00
kfree ( Adapter - > caDsxReqResp ) ;
2010-09-08 15:46:36 -06:00
return 0 ;
}
2012-01-04 18:29:00 -07:00
/*
* @ ingroup ctrl_pkt_functions
* This routinue would process the Control responses
* for the Connection Management .
* @ return - Queue index for the free SFID else returns Invalid Index .
*/
2013-10-28 02:35:59 -06:00
bool CmControlResponseMessage ( struct bcm_mini_adapter * Adapter , /* <Pointer to the Adapter structure */
2012-01-04 18:29:00 -07:00
PVOID pvBuffer /* Starting Address of the Buffer, that contains the AddIndication Data */ )
2010-09-08 15:46:36 -06:00
{
2012-09-23 21:07:14 -06:00
struct bcm_connect_mgr_params * psfLocalSet = NULL ;
2012-10-30 19:50:43 -06:00
struct bcm_add_indication_alt * pstAddIndication = NULL ;
2012-10-29 21:08:54 -06:00
struct bcm_change_indication * pstChangeIndication = NULL ;
2012-05-26 10:05:11 -06:00
struct bcm_leader * pLeader = NULL ;
2014-03-18 14:17:28 -06:00
INT uiSearchRuleIndex = 0 ;
ULONG ulSFID ;
2012-01-04 18:29:00 -07:00
2010-09-08 15:46:36 -06:00
/*
2012-01-04 18:29:00 -07:00
* Otherwise the message contains a target address from where we need to
* read out the rest of the service flow param structure
*/
2012-01-04 18:29:03 -07:00
pstAddIndication = RestoreCmControlResponseMessage ( Adapter , pvBuffer ) ;
if ( pstAddIndication = = NULL ) {
2013-10-28 02:36:19 -06:00
ClearTargetDSXBuffer ( Adapter , ( ( struct bcm_add_indication * ) pvBuffer ) - > u16TID , false ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 , " Error in restoring Service Flow param structure from DSx message " ) ;
2013-10-28 02:36:19 -06:00
return false ;
2010-09-08 15:46:36 -06:00
}
DumpCmControlPacket ( pstAddIndication ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " ====> " ) ;
2012-05-26 10:05:11 -06:00
pLeader = ( struct bcm_leader * ) Adapter - > caDsxReqResp ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
pLeader - > Status = CM_CONTROL_NEWDSX_MULTICLASSIFIER_REQ ;
2010-09-08 15:46:36 -06:00
pLeader - > Vcid = 0 ;
2013-10-28 02:36:19 -06:00
ClearTargetDSXBuffer ( Adapter , pstAddIndication - > u16TID , false ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 , " ### TID RECEIVED %d \n " , pstAddIndication - > u16TID ) ;
switch ( pstAddIndication - > u8Type ) {
case DSA_REQ :
2012-10-30 19:50:43 -06:00
pLeader - > PLength = sizeof ( struct bcm_add_indication_alt ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " Sending DSA Response.... \n " ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " SENDING DSA RESPONSE TO MAC %d " , pLeader - > PLength ) ;
2012-10-30 19:50:43 -06:00
* ( ( struct bcm_add_indication_alt * ) & ( Adapter - > caDsxReqResp [ LEADER_SIZE ] ) )
2012-01-04 18:29:00 -07:00
= * pstAddIndication ;
2012-10-30 19:50:43 -06:00
( ( struct bcm_add_indication_alt * ) & ( Adapter - > caDsxReqResp [ LEADER_SIZE ] ) ) - > u8Type = DSA_RSP ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " VCID = %x " , ntohs ( pstAddIndication - > u16VCID ) ) ;
CopyBufferToControlPacket ( Adapter , ( PVOID ) Adapter - > caDsxReqResp ) ;
kfree ( pstAddIndication ) ;
2014-03-18 14:17:28 -06:00
break ;
2012-01-04 18:29:00 -07:00
case DSA_RSP :
2012-10-30 19:50:43 -06:00
pLeader - > PLength = sizeof ( struct bcm_add_indication_alt ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " SENDING DSA ACK TO MAC %d " ,
2010-09-08 15:46:36 -06:00
pLeader - > PLength ) ;
2012-10-30 19:50:43 -06:00
* ( ( struct bcm_add_indication_alt * ) & ( Adapter - > caDsxReqResp [ LEADER_SIZE ] ) )
2012-01-04 18:29:00 -07:00
= * pstAddIndication ;
2012-10-30 19:50:43 -06:00
( ( struct bcm_add_indication_alt * ) & ( Adapter - > caDsxReqResp [ LEADER_SIZE ] ) ) - > u8Type = DSA_ACK ;
2014-03-18 14:17:28 -06:00
/* FALLTHROUGH */
2012-01-04 18:29:00 -07:00
case DSA_ACK :
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " VCID:0x%X " ,
2010-09-08 15:46:36 -06:00
ntohs ( pstAddIndication - > u16VCID ) ) ;
2012-01-04 18:29:00 -07:00
uiSearchRuleIndex = SearchFreeSfid ( Adapter ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " uiSearchRuleIndex:0x%X " ,
2010-09-08 15:46:36 -06:00
uiSearchRuleIndex ) ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " Direction:0x%X " ,
2010-09-08 15:46:36 -06:00
pstAddIndication - > u8Direction ) ;
2014-03-13 00:14:58 -06:00
if ( uiSearchRuleIndex < NO_OF_QUEUES ) {
2012-01-04 18:29:00 -07:00
Adapter - > PackInfo [ uiSearchRuleIndex ] . ucDirection =
pstAddIndication - > u8Direction ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " bValid:0x%X " ,
2010-09-08 15:46:36 -06:00
pstAddIndication - > sfActiveSet . bValid ) ;
2012-01-04 18:29:00 -07:00
if ( pstAddIndication - > sfActiveSet . bValid = = TRUE )
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActiveSet = TRUE ;
if ( pstAddIndication - > sfAuthorizedSet . bValid = = TRUE )
Adapter - > PackInfo [ uiSearchRuleIndex ] . bAuthorizedSet = TRUE ;
if ( pstAddIndication - > sfAdmittedSet . bValid = = TRUE )
Adapter - > PackInfo [ uiSearchRuleIndex ] . bAdmittedSet = TRUE ;
2013-10-28 02:36:19 -06:00
if ( pstAddIndication - > sfActiveSet . bValid = = false ) {
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActive = false ;
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActivateRequestSent = false ;
2012-01-04 18:29:00 -07:00
if ( pstAddIndication - > sfAdmittedSet . bValid )
psfLocalSet = & pstAddIndication - > sfAdmittedSet ;
else if ( pstAddIndication - > sfAuthorizedSet . bValid )
psfLocalSet = & pstAddIndication - > sfAuthorizedSet ;
} else {
psfLocalSet = & pstAddIndication - > sfActiveSet ;
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActive = TRUE ;
}
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( ! psfLocalSet ) {
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 , " No set is valid \n " ) ;
2013-10-28 02:36:19 -06:00
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActive = false ;
Adapter - > PackInfo [ uiSearchRuleIndex ] . bValid = false ;
2012-01-04 18:29:00 -07:00
Adapter - > PackInfo [ uiSearchRuleIndex ] . usVCID_Value = 0 ;
kfree ( pstAddIndication ) ;
} else if ( psfLocalSet - > bValid & & ( pstAddIndication - > u8CC = = 0 ) ) {
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " DSA ACK " ) ;
Adapter - > PackInfo [ uiSearchRuleIndex ] . usVCID_Value = ntohs ( pstAddIndication - > u16VCID ) ;
Adapter - > PackInfo [ uiSearchRuleIndex ] . usCID = ntohs ( pstAddIndication - > u16CID ) ;
if ( UPLINK_DIR = = pstAddIndication - > u8Direction )
atomic_set ( & Adapter - > PackInfo [ uiSearchRuleIndex ] . uiPerSFTxResourceCount , DEFAULT_PERSFCOUNT ) ;
CopyToAdapter ( Adapter , psfLocalSet , uiSearchRuleIndex , DSA_ACK , pstAddIndication ) ;
/* don't free pstAddIndication */
/* Inside CopyToAdapter, Sorting of all the SFs take place.
* Hence any access to the newly added SF through uiSearchRuleIndex is invalid .
* SHOULD BE STRICTLY AVOIDED .
*/
/* *(PULONG)(((PUCHAR)pvBuffer)+1)=psfLocalSet->u32SFID; */
memcpy ( ( ( ( PUCHAR ) pvBuffer ) + 1 ) , & psfLocalSet - > u32SFID , 4 ) ;
if ( pstAddIndication - > sfActiveSet . bValid = = TRUE ) {
if ( UPLINK_DIR = = pstAddIndication - > u8Direction ) {
if ( ! Adapter - > LinkUpStatus ) {
netif_carrier_on ( Adapter - > dev ) ;
netif_start_queue ( Adapter - > dev ) ;
Adapter - > LinkUpStatus = 1 ;
if ( netif_msg_link ( Adapter ) )
pr_info ( PFX " %s: link up \n " , Adapter - > dev - > name ) ;
atomic_set ( & Adapter - > TxPktAvail , 1 ) ;
wake_up ( & Adapter - > tx_packet_wait_queue ) ;
Adapter - > liTimeSinceLastNetEntry = get_seconds ( ) ;
2010-09-08 15:46:36 -06:00
}
}
}
2012-01-04 18:29:00 -07:00
} else {
2013-10-28 02:36:19 -06:00
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActive = false ;
Adapter - > PackInfo [ uiSearchRuleIndex ] . bValid = false ;
2012-01-04 18:29:00 -07:00
Adapter - > PackInfo [ uiSearchRuleIndex ] . usVCID_Value = 0 ;
2010-11-01 07:35:21 -06:00
kfree ( pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
} else {
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 , " DSA ACK did not get valid SFID " ) ;
2010-11-01 07:35:21 -06:00
kfree ( pstAddIndication ) ;
2013-10-28 02:36:19 -06:00
return false ;
2010-09-08 15:46:36 -06:00
}
2014-03-18 14:17:28 -06:00
break ;
2012-01-04 18:29:00 -07:00
case DSC_REQ :
2012-10-29 21:08:54 -06:00
pLeader - > PLength = sizeof ( struct bcm_change_indication ) ;
pstChangeIndication = ( struct bcm_change_indication * ) pstAddIndication ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " SENDING DSC RESPONSE TO MAC %d " , pLeader - > PLength ) ;
2010-09-08 15:46:36 -06:00
2012-10-29 21:08:54 -06:00
* ( ( struct bcm_change_indication * ) & ( Adapter - > caDsxReqResp [ LEADER_SIZE ] ) ) = * pstChangeIndication ;
( ( struct bcm_change_indication * ) & ( Adapter - > caDsxReqResp [ LEADER_SIZE ] ) ) - > u8Type = DSC_RSP ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
CopyBufferToControlPacket ( Adapter , ( PVOID ) Adapter - > caDsxReqResp ) ;
kfree ( pstAddIndication ) ;
2014-03-18 14:17:28 -06:00
break ;
2012-01-04 18:29:00 -07:00
case DSC_RSP :
2012-10-29 21:08:54 -06:00
pLeader - > PLength = sizeof ( struct bcm_change_indication ) ;
pstChangeIndication = ( struct bcm_change_indication * ) pstAddIndication ;
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " SENDING DSC ACK TO MAC %d " , pLeader - > PLength ) ;
2012-10-29 21:08:54 -06:00
* ( ( struct bcm_change_indication * ) & ( Adapter - > caDsxReqResp [ LEADER_SIZE ] ) ) = * pstChangeIndication ;
( ( struct bcm_change_indication * ) & ( Adapter - > caDsxReqResp [ LEADER_SIZE ] ) ) - > u8Type = DSC_ACK ;
2014-03-18 14:17:28 -06:00
/* FALLTHROUGH */
2012-01-04 18:29:00 -07:00
case DSC_ACK :
2012-10-29 21:08:54 -06:00
pstChangeIndication = ( struct bcm_change_indication * ) pstAddIndication ;
2012-01-04 18:29:00 -07:00
uiSearchRuleIndex = SearchSfid ( Adapter , ntohl ( pstChangeIndication - > sfActiveSet . u32SFID ) ) ;
if ( uiSearchRuleIndex > NO_OF_QUEUES - 1 )
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 , " SF doesn't exist for which DSC_ACK is received " ) ;
2014-03-13 00:14:58 -06:00
if ( uiSearchRuleIndex < NO_OF_QUEUES ) {
2012-01-04 18:29:00 -07:00
Adapter - > PackInfo [ uiSearchRuleIndex ] . ucDirection = pstChangeIndication - > u8Direction ;
if ( pstChangeIndication - > sfActiveSet . bValid = = TRUE )
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActiveSet = TRUE ;
if ( pstChangeIndication - > sfAuthorizedSet . bValid = = TRUE )
Adapter - > PackInfo [ uiSearchRuleIndex ] . bAuthorizedSet = TRUE ;
if ( pstChangeIndication - > sfAdmittedSet . bValid = = TRUE )
Adapter - > PackInfo [ uiSearchRuleIndex ] . bAdmittedSet = TRUE ;
2013-10-28 02:36:19 -06:00
if ( pstChangeIndication - > sfActiveSet . bValid = = false ) {
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActive = false ;
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActivateRequestSent = false ;
2012-01-04 18:29:00 -07:00
if ( pstChangeIndication - > sfAdmittedSet . bValid )
psfLocalSet = & pstChangeIndication - > sfAdmittedSet ;
else if ( pstChangeIndication - > sfAuthorizedSet . bValid )
psfLocalSet = & pstChangeIndication - > sfAuthorizedSet ;
} else {
psfLocalSet = & pstChangeIndication - > sfActiveSet ;
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActive = TRUE ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
2012-02-23 21:41:05 -07:00
if ( ! psfLocalSet ) {
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 , " No set is valid \n " ) ;
2013-10-28 02:36:19 -06:00
Adapter - > PackInfo [ uiSearchRuleIndex ] . bActive = false ;
Adapter - > PackInfo [ uiSearchRuleIndex ] . bValid = false ;
2012-02-23 21:41:05 -07:00
Adapter - > PackInfo [ uiSearchRuleIndex ] . usVCID_Value = 0 ;
2012-03-01 22:17:04 -07:00
kfree ( pstAddIndication ) ;
2012-02-23 21:41:05 -07:00
} else if ( psfLocalSet - > bValid & & ( pstChangeIndication - > u8CC = = 0 ) ) {
2012-01-04 18:29:00 -07:00
Adapter - > PackInfo [ uiSearchRuleIndex ] . usVCID_Value = ntohs ( pstChangeIndication - > u16VCID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 , " CC field is %d bvalid = %d \n " ,
pstChangeIndication - > u8CC , psfLocalSet - > bValid ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 , " VCID= %d \n " , ntohs ( pstChangeIndication - > u16VCID ) ) ;
Adapter - > PackInfo [ uiSearchRuleIndex ] . usCID = ntohs ( pstChangeIndication - > u16CID ) ;
CopyToAdapter ( Adapter , psfLocalSet , uiSearchRuleIndex , DSC_ACK , pstAddIndication ) ;
* ( PULONG ) ( ( ( PUCHAR ) pvBuffer ) + 1 ) = psfLocalSet - > u32SFID ;
} else if ( pstChangeIndication - > u8CC = = 6 ) {
deleteSFBySfid ( Adapter , uiSearchRuleIndex ) ;
2010-11-01 07:35:21 -06:00
kfree ( pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
} else {
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 , " DSC ACK did not get valid SFID " ) ;
kfree ( pstAddIndication ) ;
2013-10-28 02:36:19 -06:00
return false ;
2010-09-08 15:46:36 -06:00
}
2014-03-18 14:17:28 -06:00
break ;
2012-01-04 18:29:00 -07:00
case DSD_REQ :
2012-09-23 21:07:10 -06:00
pLeader - > PLength = sizeof ( struct bcm_del_indication ) ;
* ( ( struct bcm_del_indication * ) & ( Adapter - > caDsxReqResp [ LEADER_SIZE ] ) ) = * ( ( struct bcm_del_indication * ) pstAddIndication ) ;
2010-09-08 15:46:36 -06:00
2012-09-23 21:07:10 -06:00
ulSFID = ntohl ( ( ( struct bcm_del_indication * ) pstAddIndication ) - > u32SFID ) ;
2012-01-04 18:29:00 -07:00
uiSearchRuleIndex = SearchSfid ( Adapter , ulSFID ) ;
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " DSD - Removing connection %x " , uiSearchRuleIndex ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( uiSearchRuleIndex < NO_OF_QUEUES ) {
/* Delete All Classifiers Associated with this SFID */
deleteSFBySfid ( Adapter , uiSearchRuleIndex ) ;
Adapter - > u32TotalDSD + + ;
2010-09-08 15:46:36 -06:00
}
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " SENDING DSD RESPONSE TO MAC " ) ;
2012-09-23 21:07:10 -06:00
( ( struct bcm_del_indication * ) & ( Adapter - > caDsxReqResp [ LEADER_SIZE ] ) ) - > u8Type = DSD_RSP ;
2012-01-04 18:29:00 -07:00
CopyBufferToControlPacket ( Adapter , ( PVOID ) Adapter - > caDsxReqResp ) ;
2014-03-18 14:17:28 -06:00
/* FALLTHROUGH */
2012-01-04 18:29:00 -07:00
case DSD_RSP :
/* Do nothing as SF has already got Deleted */
2014-03-18 14:17:28 -06:00
break ;
2010-09-08 15:46:36 -06:00
case DSD_ACK :
2012-01-04 18:29:00 -07:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL , " DSD ACK Rcd, let App handle it \n " ) ;
break ;
2010-09-08 15:46:36 -06:00
default :
2010-11-01 07:35:21 -06:00
kfree ( pstAddIndication ) ;
2013-10-28 02:36:19 -06:00
return false ;
2010-09-08 15:46:36 -06:00
}
return TRUE ;
}
2014-05-23 14:23:41 -06:00
int get_dsx_sf_data_to_application ( struct bcm_mini_adapter * Adapter ,
UINT uiSFId , void __user * user_buffer )
2010-09-08 15:46:36 -06:00
{
int status = 0 ;
2012-05-26 10:05:01 -06:00
struct bcm_packet_info * psSfInfo = NULL ;
2012-01-04 18:29:00 -07:00
2014-05-23 14:23:41 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" status =%d " , status ) ;
2010-09-08 15:46:36 -06:00
status = SearchSfid ( Adapter , uiSFId ) ;
2010-10-08 07:49:04 -06:00
if ( status > = NO_OF_QUEUES ) {
2014-05-23 14:23:41 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" SFID %d not present in queue !!! " , uiSFId ) ;
2010-09-08 15:46:36 -06:00
return - EINVAL ;
}
2014-05-23 14:23:41 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" status =%d " , status ) ;
2012-01-04 18:29:00 -07:00
psSfInfo = & Adapter - > PackInfo [ status ] ;
2014-05-23 14:23:41 -06:00
if ( psSfInfo - > pstSFIndication
& & copy_to_user ( user_buffer , psSfInfo - > pstSFIndication ,
sizeof ( struct bcm_add_indication_alt ) ) ) {
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_PRINTK , 0 , 0 ,
" copy to user failed SFID %d, present in queue !!! " ,
uiSFId ) ;
2010-09-08 15:46:36 -06:00
status = - EFAULT ;
return status ;
}
return STATUS_SUCCESS ;
}
2014-05-23 14:23:40 -06:00
VOID OverrideServiceFlowParams ( struct bcm_mini_adapter * Adapter ,
PUINT puiBuffer )
2010-09-08 15:46:36 -06:00
{
2012-01-04 18:29:00 -07:00
B_UINT32 u32NumofSFsinMsg = ntohl ( * ( puiBuffer + 1 ) ) ;
2012-09-20 20:43:44 -06:00
struct bcm_stim_sfhostnotify * pHostInfo = NULL ;
2012-01-04 18:29:00 -07:00
UINT uiSearchRuleIndex = 0 ;
ULONG ulSFID = 0 ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
puiBuffer + = 2 ;
2014-05-23 14:23:40 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" u32NumofSFsinMsg: 0x%x \n " , u32NumofSFsinMsg ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
while ( u32NumofSFsinMsg ! = 0 & & u32NumofSFsinMsg < NO_OF_QUEUES ) {
2010-09-08 15:46:36 -06:00
u32NumofSFsinMsg - - ;
2012-09-20 20:43:44 -06:00
pHostInfo = ( struct bcm_stim_sfhostnotify * ) puiBuffer ;
2010-09-08 15:46:36 -06:00
puiBuffer = ( PUINT ) ( pHostInfo + 1 ) ;
ulSFID = ntohl ( pHostInfo - > SFID ) ;
2012-01-04 18:29:00 -07:00
uiSearchRuleIndex = SearchSfid ( Adapter , ulSFID ) ;
2014-05-23 14:23:40 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" SFID: 0x%lx \n " , ulSFID ) ;
if ( uiSearchRuleIndex > = NO_OF_QUEUES
| | uiSearchRuleIndex = = HiPriority ) {
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG ,
DBG_LVL_ALL ,
" The SFID <%lx> doesn't exist in host entry or is Invalid \n " ,
ulSFID ) ;
2010-09-08 15:46:36 -06:00
continue ;
}
2013-10-28 02:36:19 -06:00
if ( pHostInfo - > RetainSF = = false ) {
2014-05-23 14:23:40 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG ,
DBG_LVL_ALL , " Going to Delete SF " ) ;
2012-01-04 18:29:00 -07:00
deleteSFBySfid ( Adapter , uiSearchRuleIndex ) ;
} else {
2014-05-23 14:23:39 -06:00
struct bcm_packet_info * packinfo =
& Adapter - > PackInfo [ uiSearchRuleIndex ] ;
packinfo - > usVCID_Value = ntohs ( pHostInfo - > VCID ) ;
packinfo - > usCID = ntohs ( pHostInfo - > newCID ) ;
packinfo - > bActive = false ;
2010-09-08 15:46:36 -06:00
2014-05-23 14:23:40 -06:00
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG ,
DBG_LVL_ALL ,
" pHostInfo->QoSParamSet: 0x%x \n " ,
pHostInfo - > QoSParamSet ) ;
2010-09-08 15:46:36 -06:00
2012-01-04 18:29:00 -07:00
if ( pHostInfo - > QoSParamSet & 0x1 )
2014-05-23 14:23:39 -06:00
packinfo - > bAuthorizedSet = TRUE ;
2012-01-04 18:29:00 -07:00
if ( pHostInfo - > QoSParamSet & 0x2 )
2014-05-23 14:23:39 -06:00
packinfo - > bAdmittedSet = TRUE ;
2012-01-04 18:29:00 -07:00
if ( pHostInfo - > QoSParamSet & 0x4 ) {
2014-05-23 14:23:39 -06:00
packinfo - > bActiveSet = TRUE ;
packinfo - > bActive = TRUE ;
2010-09-08 15:46:36 -06:00
}
}
}
}
2014-05-23 14:23:42 -06:00
static void restore_endianess_of_pstClassifierEntry (
struct bcm_classifier_rule * pstClassifierEntry ,
enum bcm_ipaddr_context eIpAddrContext )
{
int i ;
2014-05-23 14:23:43 -06:00
union u_ip_address * stSrc = & pstClassifierEntry - > stSrcIpAddress ;
union u_ip_address * stDest = & pstClassifierEntry - > stDestIpAddress ;
2014-05-23 14:23:42 -06:00
for ( i = 0 ; i < MAX_IP_RANGE_LENGTH * 4 ; i + + ) {
if ( eIpAddrContext = = eSrcIpAddress ) {
2014-05-23 14:23:43 -06:00
stSrc - > ulIpv6Addr [ i ] = ntohl ( stSrc - > ulIpv6Addr [ i ] ) ;
stSrc - > ulIpv6Mask [ i ] = ntohl ( stSrc - > ulIpv6Mask [ i ] ) ;
2014-05-23 14:23:42 -06:00
} else if ( eIpAddrContext = = eDestIpAddress ) {
2014-05-23 14:23:43 -06:00
stDest - > ulIpv6Addr [ i ] = ntohl ( stDest - > ulIpv6Addr [ i ] ) ;
stDest - > ulIpv6Mask [ i ] = ntohl ( stDest - > ulIpv6Mask [ i ] ) ;
2014-05-23 14:23:42 -06:00
}
}
}
2014-05-23 14:23:53 -06:00
static void apply_phs_rule_to_all_classifiers (
register struct bcm_mini_adapter * Adapter , /* <Pointer to the Adapter structure */
register UINT uiSearchRuleIndex , /* <Index of Queue, to which this data belongs */
USHORT uVCID ,
struct bcm_phs_rule * sPhsRule ,
struct bcm_phs_rules * cPhsRule ,
struct bcm_add_indication_alt * pstAddIndication )
{
unsigned int uiClassifierIndex = 0 ;
struct bcm_classifier_rule * curr_classifier = NULL ;
if ( pstAddIndication - > u8Direction = = UPLINK_DIR ) {
for ( uiClassifierIndex = 0 ; uiClassifierIndex < MAX_CLASSIFIERS ; uiClassifierIndex + + ) {
curr_classifier =
& Adapter - > astClassifierTable [ uiClassifierIndex ] ;
if ( ( curr_classifier - > bUsed ) & &
( curr_classifier - > ulSFID = = Adapter - > PackInfo [ uiSearchRuleIndex ] . ulSFID ) & &
( curr_classifier - > u8AssociatedPHSI = = cPhsRule - > u8PHSI ) ) {
BCM_DEBUG_PRINT ( Adapter , DBG_TYPE_OTHERS , CONN_MSG , DBG_LVL_ALL ,
" Adding PHS Rule For Classifier: 0x%x cPhsRule.u8PHSI: 0x%x \n " ,
curr_classifier - > uiClassifierRuleIndex ,
cPhsRule - > u8PHSI ) ;
/* Update The PHS Rule for this classifier as Associated PHSI id defined */
/* Copy the PHS Rule */
sPhsRule - > u8PHSI = cPhsRule - > u8PHSI ;
sPhsRule - > u8PHSFLength = cPhsRule - > u8PHSFLength ;
sPhsRule - > u8PHSMLength = cPhsRule - > u8PHSMLength ;
sPhsRule - > u8PHSS = cPhsRule - > u8PHSS ;
sPhsRule - > u8PHSV = cPhsRule - > u8PHSV ;
memcpy ( sPhsRule - > u8PHSF , cPhsRule - > u8PHSF , MAX_PHS_LENGTHS ) ;
memcpy ( sPhsRule - > u8PHSM , cPhsRule - > u8PHSM , MAX_PHS_LENGTHS ) ;
sPhsRule - > u8RefCnt = 0 ;
sPhsRule - > bUnclassifiedPHSRule = false ;
sPhsRule - > PHSModifiedBytes = 0 ;
sPhsRule - > PHSModifiedNumPackets = 0 ;
sPhsRule - > PHSErrorNumPackets = 0 ;
/* bPHSRuleAssociated = TRUE; */
/* Store The PHS Rule for this classifier */
PhsUpdateClassifierRule (
& Adapter - > stBCMPhsContext ,
uVCID ,
curr_classifier - > uiClassifierRuleIndex ,
sPhsRule ,
curr_classifier - > u8AssociatedPHSI ) ;
/* Update PHS Rule For the Classifier */
if ( sPhsRule - > u8PHSI ) {
curr_classifier - > u32PHSRuleID = sPhsRule - > u8PHSI ;
memcpy ( & curr_classifier - > sPhsRule , sPhsRule , sizeof ( struct bcm_phs_rule ) ) ;
}
}
}
} else {
/* Error PHS Rule specified in signaling could not be applied to any classifier */
/* Copy the PHS Rule */
sPhsRule - > u8PHSI = cPhsRule - > u8PHSI ;
sPhsRule - > u8PHSFLength = cPhsRule - > u8PHSFLength ;
sPhsRule - > u8PHSMLength = cPhsRule - > u8PHSMLength ;
sPhsRule - > u8PHSS = cPhsRule - > u8PHSS ;
sPhsRule - > u8PHSV = cPhsRule - > u8PHSV ;
memcpy ( sPhsRule - > u8PHSF , cPhsRule - > u8PHSF , MAX_PHS_LENGTHS ) ;
memcpy ( sPhsRule - > u8PHSM , cPhsRule - > u8PHSM , MAX_PHS_LENGTHS ) ;
sPhsRule - > u8RefCnt = 0 ;
sPhsRule - > bUnclassifiedPHSRule = TRUE ;
sPhsRule - > PHSModifiedBytes = 0 ;
sPhsRule - > PHSModifiedNumPackets = 0 ;
sPhsRule - > PHSErrorNumPackets = 0 ;
/* Store The PHS Rule for this classifier */
/*
* Passing the argument u8PHSI instead of clsid . Because for DL with no classifier rule ,
* clsid will be zero hence we can ' t have multiple PHS rules for the same SF .
* To support multiple PHS rule , passing u8PHSI .
*/
PhsUpdateClassifierRule (
& Adapter - > stBCMPhsContext ,
uVCID ,
sPhsRule - > u8PHSI ,
sPhsRule ,
sPhsRule - > u8PHSI ) ;
}
}