Commit e57723f
net: dsa: b53: properly bound ARL searches for < 4 ARL bin chips
When iterating over the ARL table we stop at max ARL entries / 2, but
this is only valid if the chip actually returns 2 results at once. For
chips with only one result register we will stop before reaching the end
of the table if it is more than half full.
Fix this by only dividing the maximum results by two if we have a chip
with more than one result register (i.e. those with 4 ARL bins).
Fixes: cd169d7 ("net: dsa: b53: Bound check ARL searches")
Signed-off-by: Jonas Gorski <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 0be04b5 commit e57723f
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2087 | 2087 | | |
2088 | 2088 | | |
2089 | 2089 | | |
| 2090 | + | |
2090 | 2091 | | |
2091 | 2092 | | |
2092 | | - | |
2093 | 2093 | | |
2094 | 2094 | | |
2095 | 2095 | | |
2096 | 2096 | | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
2097 | 2100 | | |
2098 | 2101 | | |
2099 | 2102 | | |
| |||
2115 | 2118 | | |
2116 | 2119 | | |
2117 | 2120 | | |
2118 | | - | |
| 2121 | + | |
2119 | 2122 | | |
2120 | 2123 | | |
2121 | 2124 | | |
| |||
2125 | 2128 | | |
2126 | 2129 | | |
2127 | 2130 | | |
2128 | | - | |
| 2131 | + | |
2129 | 2132 | | |
2130 | 2133 | | |
2131 | 2134 | | |
| |||
0 commit comments