The initial assumption that there are eight PoE ports is not always
valid. This assumption was corrected with the receipt of the first
status packet, but that is too late. When this packet arrives, the
initial config will have already happened. Thys ports above 8 do not
get configured. One might dare call this a race condition.
Use the config file to determine the port count. Remove the assumption
that the system has eight ports. It is not problematic if the config
has more ports than the sytem. The MCU will respond with all f's to
commands for invalid ports.
The case where the system has more ports than the config is not
handled. It doesn't have to be. The "poe info" command only sends data
for configred ports that are enabled. There's no point in probing
anything more.
The initial assumption that there are eight PoE ports is not always valid. This assumption was corrected with the receipt of the first status packet, but that is too late. When this packet arrives, the initial config will have already happened. Thys ports above 8 do not get configured. One might dare call this a race condition.
Use the config file to determine the port count. Remove the assumption that the system has eight ports. It is not problematic if the config has more ports than the sytem. The MCU will respond with all f's to commands for invalid ports.
The case where the system has more ports than the config is not handled. It doesn't have to be. The "poe info" command only sends data for configred ports that are enabled. There's no point in probing anything more.
Signed-off-by: Alexandru Gagniuc mr.nuke.me@gmail.com