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
10841084 (BROADCAST_STORM_VALUE *
10851085 BROADCAST_STORM_PROT_RATE) / 100);
10861086
1087− for (i = 0; i < VLAN_TABLE_ENTRIES; i++)
1087+ for (i = 0; i < (dev->num_vlans / 4); i++)
10881088 ksz8795_r_vlan_entries(dev, i);
10891089
10901090 /* Setup STP address for STP operation. */
drivers/net/dsa/microchip/ksz8795_reg.h+0−1
@@ -989,7 +989,6 @@ · 988 unmodified lines
989989 #define TAIL_TAG_OVERRIDE BIT(6)
990990 #define TAIL_TAG_LOOKUP BIT(7)
991991
992−#define VLAN_TABLE_ENTRIES (4096 / 4)
993992 #define FID_ENTRIES 128
994993
995994 #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