device open function not called on ifconfig up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

I am implementing a network driver for IXP2400 quad gigabit ethernet card as a loadable linux module. After loading the module (network driver) "ifconfig -a" shows all the existing interfaces. But upon bringing the interface up using "ifconfig ixp0 up" (ixp0 is the name of one of the interfaces), the device Close function is getting invoked instead of device open function. Any idea why this happens?

In file, net/core/dev.c, in function dev_change_flags(), the following code shows a call to device close function if a condition is true. But I have initialised the device flags to 0 in device probe function.

       if ((old_flags^flags)&IFF_UP)   /* Bit is different  ? */
       {
               ret = ((old_flags & IFF_UP) ? dev_close : dev_open)(dev);

               if (ret == 0)
                       dev_mc_upload(dev);
       }

I could not find any other call to the device close function in the kernel source other than the above and one during unregistering the device. Please clarify ...

thanks and regards,
Rajeevalochan Ramaswamy


- : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux