net: rtl8169: Add support for RTL8168evl/8111evl
[oweals/u-boot.git] / drivers / net / npe / IxEthDBPortUpdate.c
index cdf114bfc4311002578ce34d8d18fc00cafe77c7..92af331a540e3c0c0048f2046d861512075862a3 100644 (file)
  * All rights reserved.
  * 
  * @par
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Intel Corporation nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- * @par
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
+ * SPDX-License-Identifier:    BSD-3-Clause
  * @par
  * -- End of Copyright Notice --
  */
@@ -60,7 +36,7 @@ extern HashTable dbHashtable;
  *
  * @param typeArray array indexed on record types, each
  * element indicating whether the record type requires an
- * automatic update (TRUE) or not (FALSE)
+ * automatic update (true) or not (false)
  * 
  * Automatic updates are done for registered record types
  * upon adding, updating (that is, updating the record portID) 
@@ -70,7 +46,7 @@ extern HashTable dbHashtable;
  *
  * It is assumed that the typeArray parameter is allocated large
  * enough to hold all the user defined types. Also, the type
- * array should be initialized to FALSE as this function only
+ * array should be initialized to false as this function only
  * caters for types which do require automatic updates.
  *
  * Note that this function should be called by the component
@@ -84,8 +60,8 @@ extern HashTable dbHashtable;
 IX_ETH_DB_PUBLIC
 UINT32 ixEthDBUpdateTypeRegister(BOOL *typeArray)
 {
-    typeArray[IX_ETH_DB_FILTERING_RECORD]      = TRUE;
-    typeArray[IX_ETH_DB_FILTERING_VLAN_RECORD] = TRUE;
+    typeArray[IX_ETH_DB_FILTERING_RECORD]      = true;
+    typeArray[IX_ETH_DB_FILTERING_VLAN_RECORD] = true;
 
     return 2;
 }
@@ -174,7 +150,7 @@ void ixEthDBCreateTrees(IxEthDBPortMap updatePorts)
 {
     UINT32 portIndex;
     BOOL result;
-    BOOL portsLeft = TRUE;
+    BOOL portsLeft = true;
 
     while (portsLeft)
     {
@@ -305,11 +281,11 @@ void ixEthDBCreateTrees(IxEthDBPortMap updatePorts)
             }
 
             /* mark tree as valid */
-            port->updateMethod.searchTreePendingWrite = TRUE;
+            port->updateMethod.searchTreePendingWrite = true;
         }
         else
         {
-            portsLeft = FALSE;
+            portsLeft = false;
 
             IX_ETH_DB_UPDATE_TRACE("DB: (Update) No trees to create this round\n");            
         }
@@ -374,7 +350,7 @@ IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBRecordType ty
 
     /* forget last used search tree */
     port->updateMethod.searchTree             = NULL;
-    port->updateMethod.searchTreePendingWrite = FALSE;
+    port->updateMethod.searchTreePendingWrite = false;
 
     /* dependending on the update type we do different things */
     if (type == IX_ETH_DB_FILTERING_RECORD || type == IX_ETH_DB_WIFI_RECORD)
@@ -393,9 +369,9 @@ IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBRecordType ty
         }
         else
         {
-            ixEthDBPortInfo[portID].agingEnabled                = FALSE;
-            ixEthDBPortInfo[portID].updateMethod.updateEnabled  = FALSE;
-            ixEthDBPortInfo[portID].updateMethod.userControlled = TRUE;
+            ixEthDBPortInfo[portID].agingEnabled                = false;
+            ixEthDBPortInfo[portID].updateMethod.updateEnabled  = false;
+            ixEthDBPortInfo[portID].updateMethod.userControlled = true;
 
             ERROR_LOG("EthDB: (PortUpdate) disabling aging and updates on port %d (assumed dead)\n", portID);