Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353805
b: refs/heads/master
c: a903d65
h: refs/heads/master
i:
  353803: aeca8bb
v: v3
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent ca707e2 commit 9a90a63
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37fed6ac26c7637bce6e60c17f5d2bb468c8ffd0
refs/heads/master: a903d65055199bfad94ae3af598d45970f62f8c2
2 changes: 1 addition & 1 deletion trunk/drivers/staging/bcm/Adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct bcm_classifier_rule {
UCHAR ucDirection;
BOOLEAN bIpv6Protocol;
UINT32 u32PHSRuleID;
S_PHS_RULE sPhsRule;
struct bcm_phs_rule sPhsRule;
UCHAR u8AssociatedPHSI;

/* Classification fields for ETH CS */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/bcm/CmHost.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer
B_UINT16 u16PacketClassificationRuleIndex = 0;
int i;
struct bcm_convergence_types *psfCSType = NULL;
S_PHS_RULE sPhsRule;
struct bcm_phs_rule sPhsRule;
USHORT uVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
UINT UGIValue = 0;

Expand Down Expand Up @@ -703,7 +703,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer
/* Update PHS Rule For the Classifier */
if (sPhsRule.u8PHSI) {
Adapter->astClassifierTable[uiClassifierIndex].u32PHSRuleID = sPhsRule.u8PHSI;
memcpy(&Adapter->astClassifierTable[uiClassifierIndex].sPhsRule, &sPhsRule, sizeof(S_PHS_RULE));
memcpy(&Adapter->astClassifierTable[uiClassifierIndex].sPhsRule, &sPhsRule, sizeof(struct bcm_phs_rule));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/bcm/PHSDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#define ERR_CLSID_MATCH_FAIL 0x808
#define ERR_PHSRULE_MATCH_FAIL 0x809

typedef struct _S_PHS_RULE {
struct bcm_phs_rule {
u8 u8PHSI;
u8 u8PHSFLength;
u8 u8PHSF[MAX_PHS_LENGTHS];
Expand All @@ -51,7 +51,7 @@ typedef struct _S_PHS_RULE {
long PHSModifiedBytes;
unsigned long PHSModifiedNumPackets;
unsigned long PHSErrorNumPackets;
} S_PHS_RULE;
};

enum bcm_phs_classifier_context {
eActiveClassifierRuleContext,
Expand All @@ -62,7 +62,7 @@ struct bcm_phs_classifier_entry {
u8 bUsed;
u16 uiClassifierRuleId;
u8 u8PHSI;
S_PHS_RULE *pstPhsRule;
struct bcm_phs_rule *pstPhsRule;
u8 bUnclassifiedPHSRule;
};

Expand Down
56 changes: 28 additions & 28 deletions trunk/drivers/staging/bcm/PHSModule.c
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
#include "headers.h"

static UINT CreateSFToClassifierRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId, struct bcm_phs_table *psServiceFlowTable,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);
static UINT CreateSFToClassifierRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId, struct bcm_phs_table *psServiceFlowTable, struct bcm_phs_rule *psPhsRule, B_UINT8 u8AssociatedPHSI);

static UINT CreateClassiferToPHSRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId, struct bcm_phs_entry *pstServiceFlowEntry,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);
static UINT CreateClassiferToPHSRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId, struct bcm_phs_entry *pstServiceFlowEntry, struct bcm_phs_rule *psPhsRule, B_UINT8 u8AssociatedPHSI);

static UINT CreateClassifierPHSRule(B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule, enum bcm_phs_classifier_context eClsContext,B_UINT8 u8AssociatedPHSI);
static UINT CreateClassifierPHSRule(B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *psPhsRule, enum bcm_phs_classifier_context eClsContext,B_UINT8 u8AssociatedPHSI);

static UINT UpdateClassifierPHSRule(B_UINT16 uiClsId, struct bcm_phs_classifier_entry *pstClassifierEntry, struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);
static UINT UpdateClassifierPHSRule(B_UINT16 uiClsId, struct bcm_phs_classifier_entry *pstClassifierEntry, struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *psPhsRule, B_UINT8 u8AssociatedPHSI);

static BOOLEAN ValidatePHSRuleComplete(S_PHS_RULE *psPhsRule);
static BOOLEAN ValidatePHSRuleComplete(struct bcm_phs_rule *psPhsRule);

static BOOLEAN DerefPhsRule(B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable,S_PHS_RULE *pstPhsRule);
static BOOLEAN DerefPhsRule(B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *pstPhsRule);

static UINT GetClassifierEntry(struct bcm_phs_classifier_table *pstClassifierTable,B_UINT32 uiClsid, enum bcm_phs_classifier_context eClsContext, struct bcm_phs_classifier_entry **ppstClassifierEntry);

static UINT GetPhsRuleEntry(struct bcm_phs_classifier_table *pstClassifierTable,B_UINT32 uiPHSI, enum bcm_phs_classifier_context eClsContext,S_PHS_RULE **ppstPhsRule);
static UINT GetPhsRuleEntry(struct bcm_phs_classifier_table *pstClassifierTable,B_UINT32 uiPHSI, enum bcm_phs_classifier_context eClsContext, struct bcm_phs_rule **ppstPhsRule);

static void free_phs_serviceflow_rules(struct bcm_phs_table *psServiceFlowRulesTable);

static int phs_compress(S_PHS_RULE *phs_members,unsigned char *in_buf,
static int phs_compress(struct bcm_phs_rule *phs_members, unsigned char *in_buf,
unsigned char *out_buf,unsigned int *header_size,UINT *new_header_size );


static int verify_suppress_phsf(unsigned char *in_buffer,unsigned char *out_buffer,
unsigned char *phsf,unsigned char *phsm,unsigned int phss,unsigned int phsv,UINT *new_header_size );

static int phs_decompress(unsigned char *in_buf,unsigned char *out_buf,\
S_PHS_RULE *phs_rules,UINT *header_size);
struct bcm_phs_rule *phs_rules, UINT *header_size);


static ULONG PhsCompress(void* pvContext,
Expand Down Expand Up @@ -381,7 +381,7 @@ Routine Description:
IN void* pvContext - PHS Driver Specific Context
IN B_UINT16 uiVcid - The Service Flow ID for which the PHS rule applies
IN B_UINT16 uiClsId - The Classifier ID within the Service Flow for which the PHS rule applies.
IN S_PHS_RULE *psPhsRule - The PHS Rule strcuture to be added to the PHS Rule table.
IN struct bcm_phs_rule *psPhsRule - The PHS Rule strcuture to be added to the PHS Rule table.
Return Value:
Expand All @@ -392,7 +392,7 @@ Return Value:
ULONG PhsUpdateClassifierRule(IN void* pvContext,
IN B_UINT16 uiVcid ,
IN B_UINT16 uiClsId ,
IN S_PHS_RULE *psPhsRule,
IN struct bcm_phs_rule *psPhsRule,
IN B_UINT8 u8AssociatedPHSI)
{
ULONG lStatus =0;
Expand Down Expand Up @@ -682,7 +682,7 @@ ULONG PhsCompress(IN void* pvContext,
UINT nSFIndex =0, nClsidIndex =0 ;
struct bcm_phs_entry *pstServiceFlowEntry = NULL;
struct bcm_phs_classifier_entry *pstClassifierEntry = NULL;
S_PHS_RULE *pstPhsRule = NULL;
struct bcm_phs_rule *pstPhsRule = NULL;
ULONG lStatus =0;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);

Expand Down Expand Up @@ -776,7 +776,7 @@ ULONG PhsDeCompress(IN void* pvContext,
{
UINT nSFIndex =0, nPhsRuleIndex =0 ;
struct bcm_phs_entry *pstServiceFlowEntry = NULL;
S_PHS_RULE *pstPhsRule = NULL;
struct bcm_phs_rule *pstPhsRule = NULL;
UINT phsi;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
struct bcm_phs_extension *pDeviceExtension=
Expand Down Expand Up @@ -898,7 +898,7 @@ static void free_phs_serviceflow_rules(struct bcm_phs_table *psServiceFlowRulesT



static BOOLEAN ValidatePHSRuleComplete(IN S_PHS_RULE *psPhsRule)
static BOOLEAN ValidatePHSRuleComplete(IN struct bcm_phs_rule *psPhsRule)
{
if(psPhsRule)
{
Expand Down Expand Up @@ -983,7 +983,7 @@ UINT GetClassifierEntry(IN struct bcm_phs_classifier_table *pstClassifierTable,

static UINT GetPhsRuleEntry(IN struct bcm_phs_classifier_table *pstClassifierTable,
IN B_UINT32 uiPHSI, enum bcm_phs_classifier_context eClsContext,
OUT S_PHS_RULE **ppstPhsRule)
OUT struct bcm_phs_rule **ppstPhsRule)
{
int i;
struct bcm_phs_classifier_entry *pstClassifierRule = NULL;
Expand Down Expand Up @@ -1013,7 +1013,7 @@ static UINT GetPhsRuleEntry(IN struct bcm_phs_classifier_table *pstClassifierTab
}

UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid,IN B_UINT16 uiClsId,
IN struct bcm_phs_table *psServiceFlowTable,S_PHS_RULE *psPhsRule,
IN struct bcm_phs_table *psServiceFlowTable, struct bcm_phs_rule *psPhsRule,
B_UINT8 u8AssociatedPHSI)
{

Expand Down Expand Up @@ -1051,7 +1051,7 @@ UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid,IN B_UINT16 uiClsId,

UINT CreateClassiferToPHSRuleMapping(IN B_UINT16 uiVcid,
IN B_UINT16 uiClsId,IN struct bcm_phs_entry *pstServiceFlowEntry,
S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI)
struct bcm_phs_rule *psPhsRule, B_UINT8 u8AssociatedPHSI)
{
struct bcm_phs_classifier_entry *pstClassifierEntry = NULL;
UINT uiStatus =PHS_SUCCESS;
Expand Down Expand Up @@ -1141,7 +1141,7 @@ UINT CreateClassiferToPHSRuleMapping(IN B_UINT16 uiVcid,
}

static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId,
struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule,
struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *psPhsRule,
enum bcm_phs_classifier_context eClsContext,B_UINT8 u8AssociatedPHSI)
{
UINT iClassifierIndex = 0;
Expand Down Expand Up @@ -1227,7 +1227,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId,
{
if(psClassifierRules->pstPhsRule == NULL)
{
psClassifierRules->pstPhsRule = kmalloc(sizeof(S_PHS_RULE),GFP_KERNEL);
psClassifierRules->pstPhsRule = kmalloc(sizeof(struct bcm_phs_rule),GFP_KERNEL);

if(NULL == psClassifierRules->pstPhsRule)
return ERR_PHSRULE_MEMALLOC_FAIL;
Expand All @@ -1240,7 +1240,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId,

/* Update The PHS rule */
memcpy(psClassifierRules->pstPhsRule,
psPhsRule, sizeof(S_PHS_RULE));
psPhsRule, sizeof(struct bcm_phs_rule));
}
else
{
Expand All @@ -1253,10 +1253,10 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId,

static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId,
IN struct bcm_phs_classifier_entry *pstClassifierEntry,
struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule,
struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *psPhsRule,
B_UINT8 u8AssociatedPHSI)
{
S_PHS_RULE *pstAddPhsRule = NULL;
struct bcm_phs_rule *pstAddPhsRule = NULL;
UINT nPhsRuleIndex = 0;
BOOLEAN bPHSRuleOrphaned = FALSE;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
Expand All @@ -1281,13 +1281,13 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId,
//Step 2.a PHS Rule Does Not Exist .Create New PHS Rule for uiClsId
if(FALSE == bPHSRuleOrphaned)
{
pstClassifierEntry->pstPhsRule = kmalloc(sizeof(S_PHS_RULE), GFP_KERNEL);
pstClassifierEntry->pstPhsRule = kmalloc(sizeof(struct bcm_phs_rule), GFP_KERNEL);
if(NULL == pstClassifierEntry->pstPhsRule)
{
return ERR_PHSRULE_MEMALLOC_FAIL;
}
}
memcpy(pstClassifierEntry->pstPhsRule, psPhsRule, sizeof(S_PHS_RULE));
memcpy(pstClassifierEntry->pstPhsRule, psPhsRule, sizeof(struct bcm_phs_rule));

}
else
Expand All @@ -1312,7 +1312,7 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId,

}

static BOOLEAN DerefPhsRule(IN B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable,S_PHS_RULE *pstPhsRule)
static BOOLEAN DerefPhsRule(IN B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *pstPhsRule)
{
if(pstPhsRule==NULL)
return FALSE;
Expand Down Expand Up @@ -1408,10 +1408,10 @@ void DumpPhsRules(struct bcm_phs_extension *pDeviceExtension)
//-----------------------------------------------------------------------------

int phs_decompress(unsigned char *in_buf,unsigned char *out_buf,
S_PHS_RULE *decomp_phs_rules,UINT *header_size)
struct bcm_phs_rule *decomp_phs_rules, UINT *header_size)
{
int phss,size=0;
S_PHS_RULE *tmp_memb;
struct bcm_phs_rule *tmp_memb;
int bit,i=0;
unsigned char *phsf,*phsm;
int in_buf_len = *header_size-1;
Expand Down Expand Up @@ -1490,7 +1490,7 @@ int phs_decompress(unsigned char *in_buf,unsigned char *out_buf,
// size-The number of bytes copied into the output buffer i.e dynamic fields
// 0 -If PHS rule is NULL.If PHSV field is not set.If the verification fails.
//-----------------------------------------------------------------------------
static int phs_compress(S_PHS_RULE *phs_rule,unsigned char *in_buf
static int phs_compress(struct bcm_phs_rule *phs_rule, unsigned char *in_buf
,unsigned char *out_buf,UINT *header_size,UINT *new_header_size)
{
unsigned char *old_addr = out_buf;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/bcm/PHSModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int phs_init(struct bcm_phs_extension *pPhsdeviceExtension,struct bcm_mini_adapt
int PhsCleanup(struct bcm_phs_extension *pPHSDeviceExt);

//Utility Functions
ULONG PhsUpdateClassifierRule(void* pvContext,B_UINT16 uiVcid,B_UINT16 uiClsId,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI );
ULONG PhsUpdateClassifierRule(void* pvContext,B_UINT16 uiVcid,B_UINT16 uiClsId, struct bcm_phs_rule *psPhsRule,B_UINT8 u8AssociatedPHSI );

ULONG PhsDeletePHSRule(void* pvContext,B_UINT16 uiVcid,B_UINT8 u8PHSI);

Expand All @@ -39,7 +39,7 @@ ULONG PhsDeleteClassifierRule(void* pvContext, B_UINT16 uiVcid ,B_UINT16 uiClsI
ULONG PhsDeleteSFRules(void* pvContext,B_UINT16 uiVcid) ;


BOOLEAN ValidatePHSRule(S_PHS_RULE *psPhsRule);
BOOLEAN ValidatePHSRule(struct bcm_phs_rule *psPhsRule);

UINT GetServiceFlowEntry(struct bcm_phs_table *psServiceFlowTable,B_UINT16 uiVcid, struct bcm_phs_entry **ppstServiceFlowEntry);

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/bcm/hostmibs.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
INT ProcessGetHostMibs(struct bcm_mini_adapter *Adapter, struct bcm_host_stats_mibs *pstHostMibs)
{
struct bcm_phs_entry *pstServiceFlowEntry = NULL;
S_PHS_RULE *pstPhsRule = NULL;
struct bcm_phs_rule *pstPhsRule = NULL;
struct bcm_phs_classifier_table *pstClassifierTable = NULL;
struct bcm_phs_classifier_entry *pstClassifierRule = NULL;
struct bcm_phs_extension *pDeviceExtension = (struct bcm_phs_extension *) &Adapter->stBCMPhsContext;
Expand Down Expand Up @@ -70,7 +70,7 @@ INT ProcessGetHostMibs(struct bcm_mini_adapter *Adapter, struct bcm_host_stats_m

memcpy(&pstHostMibs->
astPhsRulesTable[nPhsTableIndex].u8PHSI,
&pstPhsRule->u8PHSI, sizeof(S_PHS_RULE));
&pstPhsRule->u8PHSI, sizeof(struct bcm_phs_rule));
nPhsTableIndex++;

}
Expand Down

0 comments on commit 9a90a63

Please sign in to comment.