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]
Date:	Tue, 23 Oct 2012 19:15:30 +0200
From:	Paolo Pisati <p.pisati@...il.com>
To:	netdev@...r.kernel.org
Cc:	Giuseppe Cavallaro <peppe.cavallaro@...com>,
	Kristoffer Glembo <kristoffer@...sler.com>
Subject: [PATCH 3/6] ksz884x: remove mac address handling as a module parameter

Signed-off-by: Paolo Pisati <p.pisati@...il.com>
---
 drivers/net/ethernet/micrel/ksz884x.c |   57 ---------------------------------
 1 file changed, 57 deletions(-)

diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 4b9f4bd..c70a1fc 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -6739,9 +6739,6 @@ static void dev_monitor(unsigned long ptr)
 
 static int msg_enable;
 
-static char *macaddr = ":";
-static char *mac1addr = ":";
-
 /*
  * This enables multiple network device mode for KSZ8842, which contains a
  * switch with two physical ports.  Some users like to take control of the
@@ -6852,51 +6849,6 @@ struct platform_info {
 
 static int net_device_present;
 
-static void get_mac_addr(struct dev_info *hw_priv, u8 *macaddr, int port)
-{
-	int i;
-	int j;
-	int got_num;
-	int num;
-
-	i = j = num = got_num = 0;
-	while (j < MAC_ADDR_LEN) {
-		if (macaddr[i]) {
-			int digit;
-
-			got_num = 1;
-			digit = hex_to_bin(macaddr[i]);
-			if (digit >= 0)
-				num = num * 16 + digit;
-			else if (':' == macaddr[i])
-				got_num = 2;
-			else
-				break;
-		} else if (got_num)
-			got_num = 2;
-		else
-			break;
-		if (2 == got_num) {
-			if (MAIN_PORT == port) {
-				hw_priv->hw.override_addr[j++] = (u8) num;
-				hw_priv->hw.override_addr[5] +=
-					hw_priv->hw.id;
-			} else {
-				hw_priv->hw.ksz_switch->other_addr[j++] =
-					(u8) num;
-				hw_priv->hw.ksz_switch->other_addr[5] +=
-					hw_priv->hw.id;
-			}
-			num = got_num = 0;
-		}
-		i++;
-	}
-	if (MAC_ADDR_LEN == j) {
-		if (MAIN_PORT == port)
-			hw_priv->hw.mac_override = 1;
-	}
-}
-
 #define KS884X_DMA_MASK			(~0x0UL)
 
 static void read_other_addr(struct ksz_hw *hw)
@@ -7050,9 +7002,6 @@ static int __devinit pcidev_init(struct pci_dev *pdev,
 	for (i = 0; i < TOTAL_PORT_NUM; i++)
 		init_waitqueue_head(&hw_priv->counter[i].counter);
 
-	if (macaddr[0] != ':')
-		get_mac_addr(hw_priv, macaddr, MAIN_PORT);
-
 	/* Read MAC address and initialize override address if not overrided. */
 	hw_read_addr(hw);
 
@@ -7060,8 +7009,6 @@ static int __devinit pcidev_init(struct pci_dev *pdev,
 	if (hw->dev_count > 1) {
 		memcpy(sw->other_addr, hw->override_addr, MAC_ADDR_LEN);
 		read_other_addr(hw);
-		if (mac1addr[0] != ':')
-			get_mac_addr(hw_priv, mac1addr, OTHER_PORT);
 	}
 
 	hw_setup(hw);
@@ -7276,13 +7223,9 @@ MODULE_LICENSE("GPL");
 module_param_named(message, msg_enable, int, 0);
 MODULE_PARM_DESC(message, "Message verbosity level (0=none, 31=all)");
 
-module_param(macaddr, charp, 0);
-module_param(mac1addr, charp, 0);
 module_param(fast_aging, int, 0);
 module_param(multi_dev, int, 0);
 module_param(stp, int, 0);
-MODULE_PARM_DESC(macaddr, "MAC address");
-MODULE_PARM_DESC(mac1addr, "Second MAC address");
 MODULE_PARM_DESC(fast_aging, "Fast aging");
 MODULE_PARM_DESC(multi_dev, "Multiple device interfaces");
 MODULE_PARM_DESC(stp, "STP support");
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ