Find the answer to your Linux question:
Results 1 to 3 of 3
Hi I have written a network driver with help of Alexender Rubino's book. My driver initialiation code works well and successfully initializes the net_device structure. The irq is to be ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Mar 2008
    Location
    Hyderabad
    Posts
    109

    Network Device Driver


    Hi
    I have written a network driver with help of Alexender Rubino's book.
    My driver initialiation code works well and successfully initializes the net_device structure. The irq is to be allocated in the open function. My open method starts as:-

    int netdriver_open(struct net_device *dev)
    {
    printk(KERN_DEBUG "Start of open method\n");
    ssleep(10000);
    ...
    Loading the module is successful. My interface is sn0. But when i try
    # ifconfig sn0 192.168.1.1
    SIOCSIFFLAGS: Invalid argument
    is displayed.
    There is no related message in /var/log/messages. The open method is not even called. Plz help

  2. #2
    Just Joined!
    Join Date
    Jun 2006
    Posts
    29
    Can you check u have something like below code

    Code:
    struct net_device *dev
    
    dev->open = netdriver_open; //used for calling file operation open()

  3. #3
    Linux Newbie
    Join Date
    Mar 2008
    Location
    Hyderabad
    Posts
    109

    Smile

    Hi
    Thanks. i have done with the probs. I modified code for 2.6.23 kernel it worked well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •