aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-07-28 05:10:03 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-30 00:41:46 -0400
commit044824d96208c8ec4863f9c54a529e00a1f1d37c (patch)
tree9b7628f12f648ce970f751624f6d26949ce19473 /drivers/net/netxen
parent6cf5767c7107c606644503f3e95bc1855386a70f (diff)
netxen: fix CONFIG_INET=n build
Wrap dest IP hashing code with #ifdef CONFIG_INET, this feature makes no sense without INET, but other driver can still work. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 2bbefa6a37b..40549a0e9ff 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1875,6 +1875,8 @@ static void netxen_nic_poll_controller(struct net_device *netdev)
1875} 1875}
1876#endif 1876#endif
1877 1877
1878#ifdef CONFIG_INET
1879
1878#define is_netxen_netdev(dev) (dev->netdev_ops == &netxen_netdev_ops) 1880#define is_netxen_netdev(dev) (dev->netdev_ops == &netxen_netdev_ops)
1879 1881
1880static int 1882static int
@@ -1993,6 +1995,7 @@ static struct notifier_block netxen_netdev_cb = {
1993static struct notifier_block netxen_inetaddr_cb = { 1995static struct notifier_block netxen_inetaddr_cb = {
1994 .notifier_call = netxen_inetaddr_event, 1996 .notifier_call = netxen_inetaddr_event,
1995}; 1997};
1998#endif
1996 1999
1997static struct pci_driver netxen_driver = { 2000static struct pci_driver netxen_driver = {
1998 .name = netxen_nic_driver_name, 2001 .name = netxen_nic_driver_name,
@@ -2012,8 +2015,10 @@ static int __init netxen_init_module(void)
2012 if ((netxen_workq = create_singlethread_workqueue("netxen")) == NULL) 2015 if ((netxen_workq = create_singlethread_workqueue("netxen")) == NULL)
2013 return -ENOMEM; 2016 return -ENOMEM;
2014 2017
2018#ifdef CONFIG_INET
2015 register_netdevice_notifier(&netxen_netdev_cb); 2019 register_netdevice_notifier(&netxen_netdev_cb);
2016 register_inetaddr_notifier(&netxen_inetaddr_cb); 2020 register_inetaddr_notifier(&netxen_inetaddr_cb);
2021#endif
2017 2022
2018 return pci_register_driver(&netxen_driver); 2023 return pci_register_driver(&netxen_driver);
2019} 2024}
@@ -2024,8 +2029,10 @@ static void __exit netxen_exit_module(void)
2024{ 2029{
2025 pci_unregister_driver(&netxen_driver); 2030 pci_unregister_driver(&netxen_driver);
2026 2031
2032#ifdef CONFIG_INET
2027 unregister_inetaddr_notifier(&netxen_inetaddr_cb); 2033 unregister_inetaddr_notifier(&netxen_inetaddr_cb);
2028 unregister_netdevice_notifier(&netxen_netdev_cb); 2034 unregister_netdevice_notifier(&netxen_netdev_cb);
2035#endif
2029 destroy_workqueue(netxen_workq); 2036 destroy_workqueue(netxen_workq);
2030} 2037}
2031 2038