ocelot.c (e5c9a223da3c5bb9563ecf4ebe0c32de39dbc620) | ocelot.c (21ce7f3e16fbf89faaf149cfe0f730edfc553914) |
---|---|
1// SPDX-License-Identifier: (GPL-2.0 OR MIT) 2/* 3 * Microsemi Ocelot Switch driver 4 * 5 * Copyright (c) 2017 Microsemi Corporation 6 */ 7#include <linux/etherdevice.h> 8#include <linux/ethtool.h> --- 1017 unchanged lines hidden (view full) --- 1026 return 0; 1027} 1028 1029int ocelot_fdb_dump(struct ocelot *ocelot, int port, 1030 dsa_fdb_dump_cb_t *cb, void *data) 1031{ 1032 int i, j; 1033 | 1// SPDX-License-Identifier: (GPL-2.0 OR MIT) 2/* 3 * Microsemi Ocelot Switch driver 4 * 5 * Copyright (c) 2017 Microsemi Corporation 6 */ 7#include <linux/etherdevice.h> 8#include <linux/ethtool.h> --- 1017 unchanged lines hidden (view full) --- 1026 return 0; 1027} 1028 1029int ocelot_fdb_dump(struct ocelot *ocelot, int port, 1030 dsa_fdb_dump_cb_t *cb, void *data) 1031{ 1032 int i, j; 1033 |
1034 /* Loop through all the mac tables entries. There are 1024 rows of 4 1035 * entries. 1036 */ 1037 for (i = 0; i < 1024; i++) { | 1034 /* Loop through all the mac tables entries. */ 1035 for (i = 0; i < ocelot->num_mact_rows; i++) { |
1038 for (j = 0; j < 4; j++) { 1039 struct ocelot_mact_entry entry; 1040 bool is_static; 1041 int ret; 1042 1043 ret = ocelot_mact_read(ocelot, port, i, j, &entry); 1044 /* If the entry is invalid (wrong port, invalid...), 1045 * skip it. --- 1519 unchanged lines hidden --- | 1036 for (j = 0; j < 4; j++) { 1037 struct ocelot_mact_entry entry; 1038 bool is_static; 1039 int ret; 1040 1041 ret = ocelot_mact_read(ocelot, port, i, j, &entry); 1042 /* If the entry is invalid (wrong port, invalid...), 1043 * skip it. --- 1519 unchanged lines hidden --- |