[arswitch] Break out of the loop upon any error, not just -1.
This fixes the AR9340 "unimplemented" thingy for now.
This commit is contained in:
parent
286a5a1c7e
commit
7ed0831923
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328871
@ -1187,7 +1187,7 @@ arswitch_atu_fetch_table(device_t dev, etherswitch_atu_table_t *table)
|
||||
err = sc->hal.arswitch_atu_fetch_table(sc, NULL, 0);
|
||||
|
||||
/* fetch - ideally yes we'd fetch into a separate table then switch */
|
||||
while (err != -1 && nitems < sc->atu.size) {
|
||||
while (err == 0 && nitems < sc->atu.size) {
|
||||
err = sc->hal.arswitch_atu_fetch_table(sc,
|
||||
&sc->atu.entries[nitems], 1);
|
||||
if (err == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user