#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 );
 
 
                                                                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,
        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:
 
 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;
        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);
 
 {
        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=
 
 
 
-static BOOLEAN ValidatePHSRuleComplete(IN S_PHS_RULE *psPhsRule)
+static BOOLEAN ValidatePHSRuleComplete(IN struct bcm_phs_rule *psPhsRule)
 {
        if(psPhsRule)
        {
 
 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;
 }
 
 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)
 {
 
 
 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;
 }
 
 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;
        {
                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;
 
         /* Update The PHS rule */
                memcpy(psClassifierRules->pstPhsRule,
-                   psPhsRule, sizeof(S_PHS_RULE));
+                   psPhsRule, sizeof(struct bcm_phs_rule));
        }
        else
        {
 
 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);
                //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
 
 }
 
-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;
 //-----------------------------------------------------------------------------
 
 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;
 //     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;