On 2010-03-09 12:28 PM, Jonas Gorski wrote:
> 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.
Applied in r20083, with one exception. I left out this change:
-#define   AR8216_GCTRL_MTU             BITS(0, 10)
+#define   AR8216_GCTRL_MTU             BITS(0, 14)
as it does not match my hardware info for AR8216. If the bitfield is
different on AR8316, then we should add a separate definition for that.

Thanks,

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to