LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 06-07-2012, 05:29 AM   #1
mahesh kumar.E
LQ Newbie
 
Registered: Jun 2012
Posts: 2

Rep: Reputation: Disabled
is it deadcode in mac80211/iface.c in .ndo_open


"iface.c" 1403L

if (!is_zero_ether_addr(dev->dev_addr) && !is_valid_ether_addr(dev->dev_addr))
return -EADDRNOTAVAIL;


HERE IT IS CHECKED FOR NULL AND INVALID ADDR IF SO RETURNS ERROR ELSE PROCEED TO ieee80211_do_open IN WHICH THE ABOVE CONDITION IS CHECKED AGAIN,
I THINK CODE WITH IN THAT BLOCK WILL NEVER EXECUTE.

if (is_zero_ether_addr(dev->dev_addr)) {// ITS ALWAYS ZERO
memcpy(dev->dev_addr,
local->hw.wiphy->perm_addr,
ETH_ALEN);
memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN);

if (!is_valid_ether_addr(dev->dev_addr)) {
if (!local->open_count)
drv_stop(local);
return -EADDRNOTAVAIL;
}
}
 
Old 06-07-2012, 05:39 AM   #2
mahesh kumar.E
LQ Newbie
 
Registered: Jun 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
sorry !!! messed up ,if is_zero_ether_addr returns 1 if the addr is zero and if condition failed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot install mac80211 framework anurupr Linux - Networking 4 03-01-2011 03:22 PM
Problem with iface line in /etc/networking/interfaces robert77546 Linux - Networking 1 04-01-2010 05:23 PM
mac80211 installing error faribah Linux - Wireless Networking 0 07-01-2009 06:14 AM
12.0 ACPI/Ethernet IFace issues gankoji Slackware 7 05-05-2008 02:38 AM
How to count amount of data btwn iface and IPAddr krizzz Linux - Networking 1 10-20-2004 07:11 PM


All times are GMT -5. The time now is 09:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration