While trying to add ar8316 support to the ar8216 driver, I noticed several small issues in the driver itself. Since I lack an ar8216 to test, somebody please verify I did not break it.
This patch makes the following changes: * Create defines for some magic values/masks. * Change vlan_id to u16, to allow VIDs > 255. * Add a range check to set_pvid as it isn't a VID, but the index in the vlan table. * Set the max VID to 4094, since 4095 is a reserved value and should not be used. * In mangle_rx replace the provided VID with the VID of the table entry of the port, not the index of the table (this one needs review). * In hw_apply, remove a redundant emptiness check (was already checked several lines above). * In no vlan mode do not set the ingress mode to secure, as there are no vlan table entries, but to use the port's destination masks. Otherwise the switch won't forward anything. * In read_status tell that the phy is up (taken from the rtl8306 driver). The change in mange_rx needs to be verified. Perhaps I missed some assumption somewhere else, but it looks like it should be that way. This change has only any effect in situations where the vlan's VIDs aren't the same as their position in the table. Regards, Jonas Gorski
Several-small-fixes-for-ar8216-driver.patch
Description: Binary data
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
