Staging: bcm: Shortened code by using variable
authorMatthias Beyer <mail@beyermatthias.de>
Fri, 23 May 2014 20:23:39 +0000 (22:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 22:26:34 +0000 (07:26 +0900)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/CmHost.c

index 4564c63f908c953e19321dd5699be157bd08b3c0..6793e25b1ae4d50dcf7d04b31556c62cb641ce6e 100644 (file)
@@ -1881,19 +1881,22 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter, PUINT puiBuffer
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Going to Delete SF");
                        deleteSFBySfid(Adapter, uiSearchRuleIndex);
                } else {
-                       Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = ntohs(pHostInfo->VCID);
-                       Adapter->PackInfo[uiSearchRuleIndex].usCID = ntohs(pHostInfo->newCID);
-                       Adapter->PackInfo[uiSearchRuleIndex].bActive = false;
+                       struct bcm_packet_info *packinfo =
+                               &Adapter->PackInfo[uiSearchRuleIndex];
+
+                       packinfo->usVCID_Value = ntohs(pHostInfo->VCID);
+                       packinfo->usCID = ntohs(pHostInfo->newCID);
+                       packinfo->bActive = false;
 
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "pHostInfo->QoSParamSet: 0x%x\n", pHostInfo->QoSParamSet);
 
                        if (pHostInfo->QoSParamSet & 0x1)
-                               Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet = TRUE;
+                               packinfo->bAuthorizedSet = TRUE;
                        if (pHostInfo->QoSParamSet & 0x2)
-                               Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = TRUE;
+                               packinfo->bAdmittedSet = TRUE;
                        if (pHostInfo->QoSParamSet & 0x4) {
-                               Adapter->PackInfo[uiSearchRuleIndex].bActiveSet = TRUE;
-                               Adapter->PackInfo[uiSearchRuleIndex].bActive = TRUE;
+                               packinfo->bActiveSet = TRUE;
+                               packinfo->bActive = TRUE;
                        }
                }
        }