]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/dsa/dsa.c
dsa: add support for original DSA tagging format
[linux-2.6-omap-h63xx.git] / net / dsa / dsa.c
index 6cc5be2ec7f1b654aa0c843de691a8ed91a8052f..f8c549281c306cdf29ab7a182cfba7445fe1c6ad 100644 (file)
@@ -202,6 +202,22 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
 }
 
 
+/* hooks for ethertype-less tagging formats *********************************/
+/*
+ * The original DSA tag format and some other tag formats have no
+ * ethertype, which means that we need to add a little hack to the
+ * networking receive path to make sure that received frames get
+ * the right ->protocol assigned to them when one of those tag
+ * formats is in use.
+ */
+bool dsa_uses_dsa_tags(void *dsa_ptr)
+{
+       struct dsa_switch *ds = dsa_ptr;
+
+       return !!(ds->tag_protocol == htons(ETH_P_DSA));
+}
+
+
 /* link polling *************************************************************/
 static void dsa_link_poll_work(struct work_struct *ugly)
 {