lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1231344879-26069-3-git-send-email-cooloney@kernel.org>
Date:	Thu,  8 Jan 2009 00:14:39 +0800
From:	Bryan Wu <cooloney@...nel.org>
To:	jeff@...zik.org
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Graf Yang <graf.yang@...log.com>,
	Bryan Wu <cooloney@...nel.org>
Subject: [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver

From: Graf Yang <graf.yang@...log.com>

Fill EMAC_VLAN1 with 0x8100 to admit 1522 long bytes frames. EMAC_VLAN2
seems need not use for now.

Signed-off-by: Graf Yang <graf.yang@...log.com>
Signed-off-by: Bryan Wu <cooloney@...nel.org>
---
 drivers/net/bfin_mac.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 78e31aa..15d7e62 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -517,6 +517,14 @@ void setup_system_regs(struct net_device *dev)
 
 	bfin_write_EMAC_MMC_CTL(RSTC | CROLL);
 
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+#define VLAN_ETHER_TYPE 0x8100
+	/* The legal length of the frame is increased to 1522 bytes */
+	bfin_write_EMAC_VLAN1(VLAN_ETHER_TYPE);
+	/* The legal length of the frame is increased to 1538 bytes */
+	/*bfin_write_EMAC_VLAN2(VLAN_ETHER_TYPE);*/
+#endif
+
 	/* Initialize the TX DMA channel registers */
 	bfin_write_DMA2_X_COUNT(0);
 	bfin_write_DMA2_X_MODIFY(4);
-- 
1.5.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ