Loading drivers/staging/bcm/CmHost.c +23 −9 Original line number Original line Diff line number Diff line Loading @@ -14,6 +14,9 @@ enum E_CLASSIFIER_ACTION { }; }; static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter, B_UINT16 tid); static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter, B_UINT16 tid); static void restore_endianess_of_pstClassifierEntry( struct bcm_classifier_rule *pstClassifierEntry, enum bcm_ipaddr_context eIpAddrContext); /************************************************************ /************************************************************ * Function - SearchSfid * Function - SearchSfid Loading Loading @@ -200,15 +203,10 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *pstClassifierEntry, } } if (bIpVersion6) { if (bIpVersion6) { /* Restore EndianNess of Struct */ /* Restore EndianNess of Struct */ for (i = 0; i < MAX_IP_RANGE_LENGTH * 4; i++) { restore_endianess_of_pstClassifierEntry( if (eIpAddrContext == eSrcIpAddress) { pstClassifierEntry, pstClassifierEntry->stSrcIpAddress.ulIpv6Addr[i] = ntohl(pstClassifierEntry->stSrcIpAddress.ulIpv6Addr[i]); eIpAddrContext pstClassifierEntry->stSrcIpAddress.ulIpv6Mask[i] = ntohl(pstClassifierEntry->stSrcIpAddress.ulIpv6Mask[i]); ); } else if (eIpAddrContext == eDestIpAddress) { pstClassifierEntry->stDestIpAddress.ulIpv6Addr[i] = ntohl(pstClassifierEntry->stDestIpAddress.ulIpv6Addr[i]); pstClassifierEntry->stDestIpAddress.ulIpv6Mask[i] = ntohl(pstClassifierEntry->stDestIpAddress.ulIpv6Mask[i]); } } } } } } } } Loading Loading @@ -1919,3 +1917,19 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter, } } } } } } static void restore_endianess_of_pstClassifierEntry( struct bcm_classifier_rule *pstClassifierEntry, enum bcm_ipaddr_context eIpAddrContext) { int i; for (i = 0; i < MAX_IP_RANGE_LENGTH * 4; i++) { if (eIpAddrContext == eSrcIpAddress) { pstClassifierEntry->stSrcIpAddress.ulIpv6Addr[i] = ntohl(pstClassifierEntry->stSrcIpAddress.ulIpv6Addr[i]); pstClassifierEntry->stSrcIpAddress.ulIpv6Mask[i] = ntohl(pstClassifierEntry->stSrcIpAddress.ulIpv6Mask[i]); } else if (eIpAddrContext == eDestIpAddress) { pstClassifierEntry->stDestIpAddress.ulIpv6Addr[i] = ntohl(pstClassifierEntry->stDestIpAddress.ulIpv6Addr[i]); pstClassifierEntry->stDestIpAddress.ulIpv6Mask[i] = ntohl(pstClassifierEntry->stDestIpAddress.ulIpv6Mask[i]); } } } Loading
drivers/staging/bcm/CmHost.c +23 −9 Original line number Original line Diff line number Diff line Loading @@ -14,6 +14,9 @@ enum E_CLASSIFIER_ACTION { }; }; static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter, B_UINT16 tid); static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter, B_UINT16 tid); static void restore_endianess_of_pstClassifierEntry( struct bcm_classifier_rule *pstClassifierEntry, enum bcm_ipaddr_context eIpAddrContext); /************************************************************ /************************************************************ * Function - SearchSfid * Function - SearchSfid Loading Loading @@ -200,15 +203,10 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *pstClassifierEntry, } } if (bIpVersion6) { if (bIpVersion6) { /* Restore EndianNess of Struct */ /* Restore EndianNess of Struct */ for (i = 0; i < MAX_IP_RANGE_LENGTH * 4; i++) { restore_endianess_of_pstClassifierEntry( if (eIpAddrContext == eSrcIpAddress) { pstClassifierEntry, pstClassifierEntry->stSrcIpAddress.ulIpv6Addr[i] = ntohl(pstClassifierEntry->stSrcIpAddress.ulIpv6Addr[i]); eIpAddrContext pstClassifierEntry->stSrcIpAddress.ulIpv6Mask[i] = ntohl(pstClassifierEntry->stSrcIpAddress.ulIpv6Mask[i]); ); } else if (eIpAddrContext == eDestIpAddress) { pstClassifierEntry->stDestIpAddress.ulIpv6Addr[i] = ntohl(pstClassifierEntry->stDestIpAddress.ulIpv6Addr[i]); pstClassifierEntry->stDestIpAddress.ulIpv6Mask[i] = ntohl(pstClassifierEntry->stDestIpAddress.ulIpv6Mask[i]); } } } } } } } } Loading Loading @@ -1919,3 +1917,19 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter, } } } } } } static void restore_endianess_of_pstClassifierEntry( struct bcm_classifier_rule *pstClassifierEntry, enum bcm_ipaddr_context eIpAddrContext) { int i; for (i = 0; i < MAX_IP_RANGE_LENGTH * 4; i++) { if (eIpAddrContext == eSrcIpAddress) { pstClassifierEntry->stSrcIpAddress.ulIpv6Addr[i] = ntohl(pstClassifierEntry->stSrcIpAddress.ulIpv6Addr[i]); pstClassifierEntry->stSrcIpAddress.ulIpv6Mask[i] = ntohl(pstClassifierEntry->stSrcIpAddress.ulIpv6Mask[i]); } else if (eIpAddrContext == eDestIpAddress) { pstClassifierEntry->stDestIpAddress.ulIpv6Addr[i] = ntohl(pstClassifierEntry->stDestIpAddress.ulIpv6Addr[i]); pstClassifierEntry->stDestIpAddress.ulIpv6Mask[i] = ntohl(pstClassifierEntry->stDestIpAddress.ulIpv6Mask[i]); } } }