summaryrefslogtreecommitdiffstats
path: root/drivers/net/ibmveth.c
diff options
context:
space:
mode:
authorSantiago Leon <santil@us.ibm.com>2006-10-03 12:24:39 -0500
committerJeff Garzik <jeff@garzik.org>2006-10-05 06:43:23 -0400
commit03a85d0907b2455c772b8fb179b0c07a66b00ddb (patch)
tree7fdd36057604315737d6c14e590eec6ceb6be687 /drivers/net/ibmveth.c
parent4347ef15f76dca33ae8da769d6900a468253bda2 (diff)
downloadop-kernel-dev-03a85d0907b2455c772b8fb179b0c07a66b00ddb.zip
op-kernel-dev-03a85d0907b2455c772b8fb179b0c07a66b00ddb.tar.gz
[PATCH] ibmveth: rename proc entry name
This patch changes the name of the proc file for each ibmveth adapter from the network device name to the slot number in the virtual bus. The proc file is created when the device is probed, so a change in the name of the device will not be reflected in the name of the proc file giving problems when identifying and removing the adapter. The slot number is a property that does not change through the life of the adapter so we use that instead. Signed-off-by: Santiago Leon <santil@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ibmveth.c')
-rw-r--r--drivers/net/ibmveth.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 2ec49d2..6aff2bc 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -1165,7 +1165,9 @@ static void ibmveth_proc_register_adapter(struct ibmveth_adapter *adapter)
{
struct proc_dir_entry *entry;
if (ibmveth_proc_dir) {
- entry = create_proc_entry(adapter->netdev->name, S_IFREG, ibmveth_proc_dir);
+ char u_addr[10];
+ sprintf(u_addr, "%x", adapter->vdev->unit_address);
+ entry = create_proc_entry(u_addr, S_IFREG, ibmveth_proc_dir);
if (!entry) {
ibmveth_error_printk("Cannot create adapter proc entry");
} else {
@@ -1180,7 +1182,9 @@ static void ibmveth_proc_register_adapter(struct ibmveth_adapter *adapter)
static void ibmveth_proc_unregister_adapter(struct ibmveth_adapter *adapter)
{
if (ibmveth_proc_dir) {
- remove_proc_entry(adapter->netdev->name, ibmveth_proc_dir);
+ char u_addr[10];
+ sprintf(u_addr, "%x", adapter->vdev->unit_address);
+ remove_proc_entry(u_addr, ibmveth_proc_dir);
}
}
OpenPOWER on IntegriCloud