History

net: dsa: microchip: ksz8795: use num_vlans where possible

The value of the define VLAN_TABLE_ENTRIES can be derived from num_vlans. This patch is using the variable num_vlans instead and removes the extra define.

Michael Grzeschik committed 5 years ago

Commit 02ffbb01 parent 241ed712 files · +1 −2Browse files

Unified · Split

2 files
  1. drivers/net/dsa/microchip/ksz8795.c +1 −1
  2. drivers/net/dsa/microchip/ksz8795_reg.h +0 −1
drivers/net/dsa/microchip/ksz8795.c+1−1
@@ -1084,7 +1084,7 @@ static int ksz8795_setup(struct dsa_switch *ds) · 1083 unmodified lines
1084 (BROADCAST_STORM_VALUE *1084 (BROADCAST_STORM_VALUE *
1085 BROADCAST_STORM_PROT_RATE) / 100);1085 BROADCAST_STORM_PROT_RATE) / 100);
1086 1086
1087 for (i = 0; i < VLAN_TABLE_ENTRIES; i++)1087 for (i = 0; i < (dev->num_vlans / 4); i++)
1088 ksz8795_r_vlan_entries(dev, i);1088 ksz8795_r_vlan_entries(dev, i);
1089 1089
1090 /* Setup STP address for STP operation. */1090 /* Setup STP address for STP operation. */
drivers/net/dsa/microchip/ksz8795_reg.h+0−1
@@ -989,7 +989,6 @@ · 988 unmodified lines
989#define TAIL_TAG_OVERRIDE BIT(6)989#define TAIL_TAG_OVERRIDE BIT(6)
990#define TAIL_TAG_LOOKUP BIT(7)990#define TAIL_TAG_LOOKUP BIT(7)
991 991
992#define VLAN_TABLE_ENTRIES (4096 / 4)
993#define FID_ENTRIES 128992#define FID_ENTRIES 128
994 993
995#endif994#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t