* [PATCH] SoftMAC: Prevent multiple authentication attempts on the same network
From: Joseph Jezak @ 2006-06-11 16:00 UTC (permalink / raw)
To: NetDev; +Cc: bcm43xx-dev
This patch addresses the "No queue exists" messages commonly seen during
authentication and associating. These appear due to scheduling multiple
authentication attempts on the same network. To prevent this, I added a
flag to stop multiple authentication attempts by the association layer.
I also added a check to the wx handler to see if we're connecting to a
different network than the one already in progress. This scenario was
causing multiple requests on the same network because the network BSSID
was not being updated despite the fact that the ESSID changed.
Signed-off-by: Joseph Jezak <josejx@gentoo.org>
---
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h
index 052ed59..82a299a 100644
--- a/include/net/ieee80211softmac.h
+++ b/include/net/ieee80211softmac.h
@@ -101,6 +101,7 @@ struct ieee80211softmac_assoc_info {
*/
u8 static_essid:1,
associating:1,
+ assoc_wait:1,
bssvalid:1,
bssfixed:1;
diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c b/net/ieee80211/softmac/ieee80211softmac_assoc.c
index 57ea9f6..aa65a7e 100644
--- a/net/ieee80211/softmac/ieee80211softmac_assoc.c
+++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c
@@ -47,9 +47,7 @@ ieee80211softmac_assoc(struct ieee80211s
dprintk(KERN_INFO PFX "sent association request!\n");
- /* Change the state to associating */
spin_lock_irqsave(&mac->lock, flags);
- mac->associnfo.associating = 1;
mac->associated = 0; /* just to make sure */
/* Set a timer for timeout */
@@ -181,6 +179,10 @@ ieee80211softmac_assoc_work(void *d)
/* meh */
if (mac->associated)
ieee80211softmac_disassoc(mac, WLAN_REASON_DISASSOC_STA_HAS_LEFT);
+
+ spin_lock_irqsave(&mac->lock, flags);
+ mac->associnfo.associating = 1;
+ spin_unlock_irqrestore(&mac->lock, flags);
/* try to find the requested network in our list, if we found one already */
if (mac->associnfo.bssvalid || mac->associnfo.bssfixed)
@@ -274,19 +276,32 @@ ieee80211softmac_assoc_work(void *d)
memcpy(mac->associnfo.associate_essid.data, found->essid.data, IW_ESSID_MAX_SIZE + 1);
/* we found a network! authenticate (if necessary) and associate to it. */
- if (!found->authenticated) {
+ if (found->authenticating) {
+ dprintk(KERN_INFO PFX "Already requested authentication, waiting...\n");
+ if(!mac->associnfo.assoc_wait) {
+ mac->associnfo.assoc_wait = 1;
+ ieee80211softmac_notify_internal(mac, IEEE80211SOFTMAC_EVENT_ANY, found, ieee80211softmac_assoc_notify, NULL, GFP_KERNEL);
+ }
+ return;
+ }
+ if (!found->authenticated && !found->authenticating) {
/* This relies on the fact that _auth_req only queues the work,
* otherwise adding the notification would be racy. */
if (!ieee80211softmac_auth_req(mac, found)) {
- dprintk(KERN_INFO PFX "cannot associate without being authenticated, requested authentication\n");
- ieee80211softmac_notify_internal(mac, IEEE80211SOFTMAC_EVENT_ANY, found, ieee80211softmac_assoc_notify, NULL, GFP_KERNEL);
+ if(!mac->associnfo.assoc_wait) {
+ dprintk(KERN_INFO PFX "Cannot associate without being authenticated, requested authentication\n");
+ mac->associnfo.assoc_wait = 1;
+ ieee80211softmac_notify_internal(mac, IEEE80211SOFTMAC_EVENT_ANY, found, ieee80211softmac_assoc_notify, NULL, GFP_KERNEL);
+ }
} else {
printkl(KERN_WARNING PFX "Not authenticated, but requesting authentication failed. Giving up to associate\n");
+ mac->associnfo.assoc_wait = 0;
ieee80211softmac_call_events(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_FAILED, found);
}
return;
}
/* finally! now we can start associating */
+ mac->associnfo.assoc_wait = 0;
ieee80211softmac_assoc(mac, found);
}
diff --git a/net/ieee80211/softmac/ieee80211softmac_auth.c b/net/ieee80211/softmac/ieee80211softmac_auth.c
index 06e3326..23125ae 100644
--- a/net/ieee80211/softmac/ieee80211softmac_auth.c
+++ b/net/ieee80211/softmac/ieee80211softmac_auth.c
@@ -36,8 +36,9 @@ ieee80211softmac_auth_req(struct ieee802
struct ieee80211softmac_auth_queue_item *auth;
unsigned long flags;
- if (net->authenticating)
+ if (net->authenticating || net->authenticated)
return 0;
+ net->authenticating = 1;
/* Add the network if it's not already added */
ieee80211softmac_add_network(mac, net);
@@ -92,7 +93,6 @@ ieee80211softmac_auth_queue(void *data)
return;
}
net->authenticated = 0;
- net->authenticating = 1;
/* add a timeout call so we eventually give up waiting for an auth reply */
schedule_delayed_work(&auth->work, IEEE80211SOFTMAC_AUTH_TIMEOUT);
auth->retry--;
diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c
index 27edb2b..abd5f9c 100644
--- a/net/ieee80211/softmac/ieee80211softmac_wx.c
+++ b/net/ieee80211/softmac/ieee80211softmac_wx.c
@@ -70,12 +70,44 @@ ieee80211softmac_wx_set_essid(struct net
char *extra)
{
struct ieee80211softmac_device *sm = ieee80211_priv(net_dev);
+ struct ieee80211softmac_network *n;
+ struct ieee80211softmac_auth_queue_item *authptr;
int length = 0;
unsigned long flags;
-
+
+ /* Check if we're already associating to this or another network
+ * If it's another network, cancel and start over with our new network
+ * If it's our network, ignore the change, we're already doing it!
+ */
+ if((sm->associnfo.associating || sm->associated) &&
+ (data->essid.flags && data->essid.length && extra)) {
+ /* Get the associating network */
+ n = ieee80211softmac_get_network_by_bssid(sm, sm->associnfo.bssid);
+ if(n && n->essid.len == (data->essid.length - 1) &&
+ !memcmp(n->essid.data, extra, n->essid.len)) {
+ dprintk(KERN_INFO PFX "Already associating or associated to "MAC_FMT"\n",
+ MAC_ARG(sm->associnfo.bssid));
+ return 0;
+ } else {
+ dprintk(KERN_INFO PFX "Canceling existing associate request!\n");
+ spin_lock_irqsave(&sm->lock,flags);
+ /* Cancel assoc work */
+ cancel_delayed_work(&sm->associnfo.work);
+ /* We don't have to do this, but it's a little cleaner */
+ list_for_each_entry(authptr, &sm->auth_queue, list)
+ cancel_delayed_work(&authptr->work);
+ sm->associnfo.bssvalid = 0;
+ sm->associnfo.bssfixed = 0;
+ spin_unlock_irqrestore(&sm->lock,flags);
+ flush_scheduled_work();
+ }
+ }
+
+
spin_lock_irqsave(&sm->lock, flags);
-
+
sm->associnfo.static_essid = 0;
+ sm->associnfo.assoc_wait = 0;
if (data->essid.flags && data->essid.length && extra /*required?*/) {
length = min(data->essid.length - 1, IW_ESSID_MAX_SIZE);
^ permalink raw reply related
* Re: [RFC ] [2 of 4] IEEE802.11 Regulatory/Geographical Support for drivers - database
From: Larry Finger @ 2006-06-11 15:59 UTC (permalink / raw)
To: netdev
In-Reply-To: <20060611094236.GE24167@p15091797.pureserver.info>
Hi Uli,
Thanks for the comments.
Ulrich Kunitz wrote:
> two minor comments.
>
> 1. I appreciate that you are keeping everything in 80 character
> lines. So I believe the one line extending 80 characters is an
> oversight.
I have tried, but will watch that more carefully.
>
> 2. Could you just add a simple explanation for the pow column for
> the uninformed reader?
It was described in the initial text material that was not sent out. I have duplicated that info at
the beginning of each type of group description, and have added it to the header on the debug output
as follows:
AT, HR, CY, CZ, DK, EE, EU, FI, FR, GF, DE, VA, HU, IE, IT, LV, LT, LU, MK, MT
NL, PL, RE, SI, SE, GB
Indoor Group 1 with 18 channels in 5 GHz bands
Chn Freq Pow(dBm) Flags
36 5180 23 PASSIVE H_RULES
40 5200 23 PASSIVE H_RULES
44 5220 23 PASSIVE H_RULES
48 5240 23 PASSIVE H_RULES
52 5260 23 PASSIVE H_RULES
Larry
^ permalink raw reply
* Re: [patch 7/8] lock validator: fix ns83820.c irq-flags bug
From: Arjan van de Ven @ 2006-06-11 15:00 UTC (permalink / raw)
To: Jeff Garzik; +Cc: akpm, netdev, mingo, bcrl
In-Reply-To: <448C2EEE.1020405@garzik.org>
Jeff Garzik wrote:
> The driver's locking is definitely wrong, but I don't think this is the
> fix,
it's an obvious correct fix in the correctness sense though...
>
> Jesus, the locking here is awful. No wonder there are bugs.
... which given that fact, is for 2.6.17 probably the right thing, pending
a nicer fix for 2.6.18
I fully agree with you that the locking is trying to be WAAAY too smart
for it's own good, and that a much simpler scheme is called for.
^ permalink raw reply
* Re: [patch 7/8] lock validator: fix ns83820.c irq-flags bug
From: Jeff Garzik @ 2006-06-11 14:55 UTC (permalink / raw)
To: akpm, arjan; +Cc: netdev, mingo, bcrl
In-Reply-To: <200606090519.k595JmDG032032@shell0.pdx.osdl.net>
akpm@osdl.org wrote:
> From: Ingo Molnar <mingo@elte.hu>
>
> Barry K. Nathan reported the following lockdep warning:
>
> [ 197.343948] BUG: warning at kernel/lockdep.c:1856/trace_hardirqs_on()
> [ 197.345928] [<c010329b>] show_trace_log_lvl+0x5b/0x105
> [ 197.346359] [<c0103896>] show_trace+0x1b/0x20
> [ 197.346759] [<c01038ed>] dump_stack+0x1f/0x24
> [ 197.347159] [<c012efa2>] trace_hardirqs_on+0xfb/0x185
> [ 197.348873] [<c029b009>] _spin_unlock_irq+0x24/0x2d
> [ 197.350620] [<e09034e8>] do_tx_done+0x171/0x179 [ns83820]
> [ 197.350895] [<e090445c>] ns83820_irq+0x149/0x20b [ns83820]
> [ 197.351166] [<c013b4b8>] handle_IRQ_event+0x1d/0x52
> [ 197.353216] [<c013c6c2>] handle_level_irq+0x97/0xe1
> [ 197.355157] [<c01048c3>] do_IRQ+0x8b/0xac
> [ 197.355612] [<c0102d9d>] common_interrupt+0x25/0x2c
The driver's locking is definitely wrong, but I don't think this is the
fix, because PCI drivers with a single interrupt should be using
spin_lock() in the interrupt handler. Anything more would be uncivilized :)
/me starts to do a better patch...
Jesus, the locking here is awful. No wonder there are bugs.
Since this driver isn't seeing a ton of work these days, I think the
best thing to do would be to _simplify_ the locking. This driver is
grabbing so many locks, turning interrupts off+on so often that any
benefit the multiple locks had is probably long gone, particularly on
modern machines.
Let me see what I can do with it...
Jeff
^ permalink raw reply
* Re: [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Mikael Pettersson @ 2006-06-11 14:37 UTC (permalink / raw)
To: rdunlap, sam; +Cc: akpm, jgarzik, linux-kernel, netdev
On Sat, 10 Jun 2006 22:38:00 +0200, Sam Ravnborg wrote:
>> --- linux-2617-rc6.orig/drivers/net/ne.c
>> +++ linux-2617-rc6/drivers/net/ne.c
>> @@ -829,7 +829,7 @@ that the ne2k probe is the last 8390 bas
>> is at boot) and so the probe will get confused by any other 8390 cards.
>> ISA device autoprobes on a running machine are not recommended anyway. */
>>
>> -int init_module(void)
>> +int __init init_module(void)
>> {
>> int this_dev, found = 0;
>
>When you anyway touches the driver I suggest to name the function
><module>_init, <module>_cleanup and use module_init(), module_cleanup().
Maybe not: in the ne.c driver init_module() is inside #ifdef MODULE,
so conversion to ne_init() + module_init(ne_init) would be a no-op
except for making the code larger. In the non-MODULE case Space.c
calls ne_probe() directly.
/Mikael
^ permalink raw reply
* Hello
From: Mrs. Florence Lloyd @ 2006-06-11 13:53 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/plain, Size: 1813 bytes --]
DDear Sir,
Haven found you listed in the World Trade Centre Chambers of Commerce directory of my country, I find it pleasurable to offer you my partnership in business, for which purpose I have tried to call your telephone number several times but it seems disconnected or changed, I only pray at this time that your address is still valid.
I am contacting you regarding a brief for the Investment of Twenty Five Million Dollars (US$ 25,000,000:00) in your country, as I presently have a client who is interested in investing in your country, but haven never done business in your country before. I find it imperative to solicit for a partnership.
Hence upon receipt of this letter, I implore you to kindly respond and let me know how possible it is to work with you in mutual partnership under the conditions that:
1. My client's fund is held in cash.
2. My client is willing to invest immediately.
3. My client will pay you a commission of 15% of the investment fund for logistics and protocols.
4. My client desires absolute confidentiality in the handling and management of this brief.
I must draw your attention to the fact that I have kept the information's herein this letter stated brief; as I do not know if you will receive this letter and or what your response will be, If you do have the interest and the capability to partner with me under the above stated conditionality, I will appreciate your response sent back to me by fax or call me Immediately.
I will appreciate that you include a brief profile of your self and your company for me to better appreciate your personality. I look forward to your response and our partnership.
Have a nice day.
Sincerely Yours.
Mrs. Florence Lloyd
Lloyds Investment Consulting UK
Tel: + 44 7031958835
Email: lloydsinvestment.consult@yahoo.co.uk
^ permalink raw reply
* http://bugzilla.kernel.org/show_bug.cgi?id=6197
From: Andrew Morton @ 2006-06-11 12:51 UTC (permalink / raw)
To: netdev; +Cc: Patrick McHardy
The reporter claims this is a netfilter bug.
^ permalink raw reply
* UNHERALDED NEWS WITH COMMENTS: About rising interest rates and much more
From: info @ 2006-06-12 0:36 UTC (permalink / raw)
To: netdev
Reply-To: Edward
Subscribe here (twice weekly):http://straitgateministry.net
UNHERALDED NEWS WITH COMMENTS: About rising interest rates, gifts to Israel, Christian-Zionism on the march, Wall Street and Oil....
READ THE FULL STORIES HERE: http://straitgateministry.net (Unheralded News)
"My Name is Rachel Corrie" is banned in New York theaters
Albawaba Jun 08, 2006
"The impact of this decision is enormous--it is bigger than Rachel and bigger than this play," Cindy Corrie, Rachel's mother, said. "There was something about this play that made them (Israeli Patriots?) feel so vulnerable.
'CENTRIST' DEMOCRATS SOUND WARNING About 'Liberal Fundamentalism'
CNSNews.com Jun 07, 2006
"MoveOn.org's political action committee recently endorsed Lieberman Democratic challenger, noting grassroots frustration with Lieberman's "continued support for the war in Iraq" and his support for "Big Oil's energy bill."
WILL BUSH'S APPEAL TO RELIGIOUS RIGHT on gay marriage backfire among Jews?
JTA Jun 06, 2006
Another rut in the road between Israel and the "Christian Right;" 75% of American Jews tell us the favor homosexual marriage, and the Christian Right overwhelmingly claims to opposes it. But don't worry, its only a lover's spat, Christian-Zionist is Judaism. -Ed.
FED WARNING
Associated Press Jun 06, 2006
So far this year, inflation at the consumer level has been elevated in large part by rising energy prices, Bernanke said. As measured by the Consumer Price Index, "core" inflation rose at an annual rate of 3.2 percent over the last three months and 2.8 percent over the past six months. "These are unwelcome developments," he said.
ISRAEL SAYS HAS 200 NUCLEAR WARHEADS
Global News Service of the Jewish people (JTA) Jun 06, 2006
Editor Asks: Why would a peace loving country need 200 nuclear warheads? Would that not be five or ten bombs for every population area in the Mideast?
AMNESTY INTERNATIONAL COUNTS Israeli/Palestinian kill rate
JTA Global News Service for Jewish People
Israel has always maintained a reprisal ratio of about 5 executed Philistines for every Israeli lost to bomb or bullet. The ratio is much higher among children, about 8 to 1. Historically this ratio has varied but always 3 or more Palestinians are executed for every Israeli death.- ed
HILLARY SEEKS 'ENERGY REVOLUTION' with spending scheme
CNSNews.com
"Greater fuel efficiency and a $50 billion research fund" is the Clinton Program. She would subsidize industry to do what they will have to do anyway when buyers will no longer drive home SUV'S that hold 40 gallons of Gas. War increases the cost of everything, especially fuel. Mrs. Clinton did not oppose war spending, which is why the ladies in Pink protested her.- ed
FED 'CANNOT IGNORE' STOCK MOVEMENTS To Set Interest Rates
AP Economics Writer
Ben Shalome Bernake wrote. "There is little or no evidence that the Fed "is better able than the market to identify speculative bubbles and that it can successfully `deflate' such bubbles without harming the broader economy." Ben is far too modest, for the FED does not predict "bubbles" it causes them to happen, and it contracts debt without the least concern for collateral damage. That is what it is doing right now.-ed
KNESSET CHRISTIAN ALLIES CAUCUS for Jewish-Christian Relations
CNS News
May 25, 2006, Unity Coalition for Israel
The Knesset Christian Allies Caucus Presented the Newly Created KCAC
Women's Council Today in its First Meeting of the Seventeenth Knesset
Speaker of Knesset Dalia Itzik Addresses the KCAC Women's Council
Judeo-Christian Values at Center of Council's Strategy to Liberate
Oppressed Women Around the World
Tuesday, May 23, 2006- The Knesset Christian Allies Caucus (KCAC)
met today in the Knesset and launched the KCAC Women's Council, a powerful
union of Israeli and Christian women focused on advancing the status of
women worldwide using Judeo-Christian values.
It was announced in the meeting that an Israeli board of directors in
Jerusalem and an international board of directors in the United States
will govern the Women's Council through a joint steering committee. ..... Kay Arthur,
Chairwoman of the international board, spoke of the importance of Jews and
Christians working together for the advancement of the status of women.
"You have the Tanach. We have the Bible. The word of God is our
common ground," she declared.
yshtern1@knesset.gov.il
054-697-4172
JIMMY CARTER: Punishing the innocent is a crime
International Herald Tribune
Carter: " Although Hamas leaders have refused to recognize the state of Israel while their territory is being occupied, Prime Minister Ismail Haniyeh has expressed approval for peace talks between Abbas and Prime Minister Ehud Olmert of Israel. "
WALL STREET AIMS to buy into the Euro exchanges
Associated Press Paris
Cashing in on the bull market: Thain said the NYSE would most likely have to issue its own bonds, borrowing at least some of the $3 billion necessary for Euronext shareholders. The NYSE Group currently has about $650 million in cash available.
READ ALL THE FULL STORIES HERE:
http://straitgateministry.net (Unheralded News)
Strait Gate Ministry HAS A GIFT TO YOU while they last (you find it and pay the shipping cost):
Click here: http://straitgateministry.net (a hint: try "bookstore")
"ONE NATION UNDER ISRAEL" by Andrew Hurley, 345 page documentary, may be the best historically documented expose of the hijacking of the American Congress. It is a popular lament that, "Congress is out of control," but nothing could be further from the truth. Author Andrew Hurley explains that Congress is not under the control of its constituents but answers to a foreign power. And Andrew Hurley provides a blueprint for peace in the Mideast
Strait Gate Ministry
P.O. Box 14491
Scottsdale, AZ 85267
http://straitgateministry.net
cecarl@straitgateministry.net
To be blocked from future mailings reply with Delete'
Write it in the subject line please.
^ permalink raw reply
* Re: [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Jan Engelhardt @ 2006-06-11 10:25 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: rdunlap, akpm, jgarzik, linux-kernel, netdev
In-Reply-To: <200606110051.k5B0pLBI010621@harpo.it.uu.se>
>
>The messages above are from when I used gcc-4.1.1.
>With gcc-3.2.3 I only see a single warning.
>
FTR, gcc 4.0.x is also 'affected'.
Jan Engelhardt
--
^ permalink raw reply
* Re: [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Jan Engelhardt @ 2006-06-11 10:23 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Randy.Dunlap, Mikael Pettersson, linux-kernel, netdev, jgarzik,
akpm
In-Reply-To: <20060610203800.GC9502@mars.ravnborg.org>
>> Doesn't look serious. init_module() is not __init, but it calls
>> some __init functions and touches some __initdata.
>
>This is the typical case with inconsistent tagging.
>
Worse yet, I once experienced a double-definition error, that is, I had
__init int init_module(void) {
/* module1 */
}
and, in another .c file,
__init int init_module(void) {
/* module2 */
}
and making them both CONFIG_...=y gave a typical double-definition link
time error in vmlinux. The proper way (IMO) is
static __init int blah_init(void) { ... }
module_init(blah_init);
Then it does not even matter if blah_init is defined in two different
modules.
>>
>> -int init_module(void)
>> +int __init init_module(void)
>> {
>> int this_dev, found = 0;
>
>When you anyway touches the driver I suggest to name the function
><module>_init, <module>_cleanup and use module_init(), module_cleanup().
Jan Engelhardt
--
^ permalink raw reply
* Re: [RFC] [patch 2/6] [Network namespace] Network device sharing by view
From: Andrew Morton @ 2006-06-11 10:18 UTC (permalink / raw)
To: dlezcano; +Cc: linux-kernel, netdev, serue, haveblue, clg, dlezcano
In-Reply-To: <20060609210625.144158000@localhost.localdomain>
On Fri, 09 Jun 2006 23:02:04 +0200
dlezcano@fr.ibm.com wrote:
> +int net_ns_dev_add(const char *devname,
> + struct net_ns_dev_list *devlist)
> +{
> + struct net_ns_dev *db;
> + struct net_device *dev;
> + int ret = 0;
> +
> + read_lock(&dev_base_lock);
> +
> + for (dev = dev_base; dev; dev = dev->next)
> + if (!strncmp(dev->name, devname, IFNAMSIZ))
> + break;
> +
> + if (!dev) {
> + ret = -ENODEV;
> + goto out;
> + }
> +
> + db = kmalloc(sizeof(*db), GFP_KERNEL);
sleep-in-spinlock. Please always test new code with all kernel debugging
options enabled.
^ permalink raw reply
* Re: [RFC ] [1 of 4] IEEE802.11 Regulatory/Geographical Support for drivers - statement of project
From: Ulrich Kunitz @ 2006-06-11 10:07 UTC (permalink / raw)
To: netdev
In-Reply-To: <448210EF.10103@lwfinger.net>
Larry,
I've not read your patches your detail, so I comment only on your
description.
> 1. A new routine, ieee80211_init_geo has been written that is called by a
> driver wishing to use this functionality. The arguments are an
> ieee80211_device, a two-character ISO3661 country code, and a flag that is
> true if the device is to be used outdoors. This new routine does the
> following:
The problem is the driver doesn't have good ideas, whether the
device is outdoor and in which country it operates. Devices have
some information available, but I have definitely a device
marketed in Canada, which had an EEPROM value for ETSI as
regulatory domain. I would expect the daemon to know, in which
country it is and whether the device is used outdoors. Keep also
in mind, that this information will be available from the AP at a
later time.
So there should be an explicit method to request the minimum set
or the configuration of daemon. Later the set can be changed again
by the AP information provided.
> b) It then creates a new directory, '/proc/net/ieee80211_geo', and
> populates it with 2 files for communication with the daemon. The first,
> which is read by the daemon, contains the country and outdoor codes, and
> the second is for the the daemon to write the 'struct ieee80211_geo' data
> corresponding to the country and indoor/outdoor information passed from the
> kernel.
Michael Buesch already commented on /proc/net. I don't think, that
this will be popular with a lot of folks. sysfs should be
supported and the mechanism should be comparable to firmware
loading. Maybe this could be some kind of udev extension. And make
it device specific, the whole approach should not break, if you
are accessing two devices connecting to two different access
points at the same time, where one of them is configured by the
central networking folks, who don't bother to adapt there configs
to specific countries and the other is a perfectly conformant
local AP, which is used for "testing" purposes.
> 2. The user-space daemon, which need not be run as root, does the following:
It needs only to run temporarily run as root. I would definitely
recommend that all file parsing activities should not run as root.
> e) It then spins waiting for the existence of file
> '/proc/net/ieee80211_geo/country', which is the indication that the kernel
> is requesting data.
Again the whole interface should be device specific.
> I welcome your comments. Part 2 will show a debug dump of the converted
> database, Part 3 will present the patch needed to add the new routine to
> the ieee80211 routines, and Part 4 will show the patches needed to modify
> the bcm43xx driver to use the new routine..
Cheers,
Uli
--
Uli Kunitz
^ permalink raw reply
* Re: [RFC ] [2 of 4] IEEE802.11 Regulatory/Geographical Support for drivers - database
From: Ulrich Kunitz @ 2006-06-11 9:42 UTC (permalink / raw)
To: netdev
In-Reply-To: <4482110B.4080404@lwfinger.net>
On 06-06-03 17:45 Larry Finger wrote:
> This message shows each of the 2.4 GHz and 5 GHz bands split into indoor
> and outdoor usage. For each group, the ISO name for that country is shown
> before the channel listing. There are a lot of countries that do not belong
> in the default group. I welcome any input you can provide for these missing
> countries, and any other incorrect information. Note: The country code EU
> is a pseudonym for the entire European Union.
>
> Thanks, Larry
>
> =============================================================================================
>
> IEEE80211 Regulatory/Geographical Daemon (V0.1)
> Using Database Version of 26 May 2006
>
Hi Larry,
two minor comments.
1. I appreciate that you are keeping everything in 80 character
lines. So I believe the one line extending 80 characters is an
oversight.
2. Could you just add a simple explanation for the pow column for
the uninformed reader?
Regards,
Uli
--
Uli Kunitz
^ permalink raw reply
* Set up a password reminder
From: August Chen @ 2006-06-11 6:48 UTC (permalink / raw)
To: netdev
-S''ensationall r'evoolution in m''edicine!
-En large your p''e'n'i's up to 10 cm or up to 4 i'nches!
-It's h'e'r'b'a'l solution what hasn't side e'ffect, but has 100% g'uaranted results!
-Don't lose your chance and but know wihtout d'oubts, you will be i'mpressed with results!
Clisk here: http://teensnj.info
tipple cardiovascular battlefront wordy borderline puffin adult reb bereft lebanese
focussed jake cloture deportee crumble wrongful allyl alva dolphin
vietnam plagued camp retch expulsion southwest aviary pegging swore roberts virginal
beaux gallus bistable chess coverall salamander bernardo tab
eden prolix inflexible cobblestone tangent chemise autoclave chambermaid
foss gutsy tackle papacy aquarium dawson suffuse caucus
^ permalink raw reply
* Re: Updated sysctl documentation take #2
From: Randy.Dunlap @ 2006-06-11 3:41 UTC (permalink / raw)
To: Diego Calleja; +Cc: linux-kernel, akpm, netdev, linux-xfs, ecki, lkml
In-Reply-To: <20060608001806.028ab05a.diegocg@gmail.com>
On Thu, 8 Jun 2006 00:18:06 +0200 Diego Calleja wrote:
> El Wed, 7 Jun 2006 13:06:53 -0700,
> "Randy.Dunlap" <rdunlap@xenotime.net> escribió:
>
> > OK, that's all for the README file. I'll look at the rest of it
> > sometime this week. I don't think that it's quite ready to be merged.
>
> Thank's for your review, altought I didn't though someone was to review
> so deeply a documentation patch ;) I've gone through all the files and
> fixed the 72-col limit and everything I could. I've updated the patch
> http://terra.es/personal/diegocg/sysctl-docs
Here are some more comments for you.
1. There are quite a few lines (17) ending with ^M (carriage return)
that should be removed.
2. Lines like this one should end with a period (full stop):
+This file is SPARC-only
3. I would put this comment near the top of each file, not at
the end:
+PLEASE KEEP THIS FILE ORDERED ALPHABETICALLY.
Other than that, it's looking good to me.
Thanks,
---
~Randy
^ permalink raw reply
* Re: [Bugme-new] [Bug 6646] New: UDP socket doesn't return to bound state after association is dissolved by connect(..AF_UNSPEC)
From: David Miller @ 2006-06-11 1:10 UTC (permalink / raw)
To: akpm; +Cc: netdev, yujiang.wang, bugme-daemon
In-Reply-To: <20060605000751.f3bc7ed3.akpm@osdl.org>
From: Andrew Morton <akpm@osdl.org>
Date: Mon, 5 Jun 2006 00:07:51 -0700
> > When disconnect a UDP socket, Linux kernel set local port to zero if the port
> > number comes from a implicit bind. Linux connect(2) man page reads:
> > "Generally, connection-based protocol sockets may successfully *connect* only
> > once; connectionless protocol sockets may use *connect* multiple times to change
> > their association. Connectionless sockets may dissolve the association by
> > connecting to an address with the /sa_family/ member of *sockaddr* set to
> > *AF_UNSPEC*."
> > But dissolve the association should not impact the local binding, while
> > currently it does. In contrast, Unix variants like Solaris don't alter local
> > binding when disconnecting a UDP socket.
You can only preserve the parts of a local binding which are
explicitly specified. Since you make an explicit bind to a source
address, that will be preserved by the disconnect.
However, since you use a zero anonymous port during the bind,
the one choosen by the kernel will not be preserved. If you
had choosen an explicit port during bind() it would be preserved
by the disconnect.
This behavior is intentional and will not change.
^ permalink raw reply
* Re: [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Mikael Pettersson @ 2006-06-11 0:51 UTC (permalink / raw)
To: rdunlap; +Cc: akpm, jgarzik, linux-kernel, netdev
On Sat, 10 Jun 2006 12:13:35 -0700, Randy.Dunlap wrote:
>On Sat, 10 Jun 2006 14:11:42 +0200 (MEST) Mikael Pettersson wrote:
>
>> While compiling 2.6.17-rc6 for a 486 with an NE2000 ISA ethernet card, I got:
>>
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x158) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x176) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x183) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x1ea) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x251) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x266) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x29b) and 'ne_block_input'
>>
>> Not sure how serious this is; the driver seems to work fine later on.
>
>Doesn't look serious. init_module() is not __init, but it calls
>some __init functions and touches some __initdata.
>
>BTW, I would be happy to see some consistent results from modpost
>section checking. I don't see all of these warnings (I see only 1)
>when using gcc 3.3.6. What gcc version are you using?
>Does that matter? (not directed at anyone in particular)
The messages above are from when I used gcc-4.1.1.
With gcc-3.2.3 I only see a single warning.
>Patch below fixes it for me. Please test/report.
Worked for me too. Thanks.
/Mikael
>---
>
>From: Randy Dunlap <rdunlap@xenotime.net>
>
>Fix section mismatch warnings:
>WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x396) and 'cleanup_card'
>WARNING: drivers/net/ne2.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x483) and 'cleanup_card'
>
>Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
>---
> drivers/net/ne.c | 2 +-
> drivers/net/ne2.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>--- linux-2617-rc6.orig/drivers/net/ne.c
>+++ linux-2617-rc6/drivers/net/ne.c
>@@ -829,7 +829,7 @@ that the ne2k probe is the last 8390 bas
> is at boot) and so the probe will get confused by any other 8390 cards.
> ISA device autoprobes on a running machine are not recommended anyway. */
>
>-int init_module(void)
>+int __init init_module(void)
> {
> int this_dev, found = 0;
>
>--- linux-2617-rc6.orig/drivers/net/ne2.c
>+++ linux-2617-rc6/drivers/net/ne2.c
>@@ -780,7 +780,7 @@ MODULE_PARM_DESC(bad, "(ignored)");
>
> /* Module code fixed by David Weinehall */
>
>-int init_module(void)
>+int __init init_module(void)
> {
> struct net_device *dev;
> int this_dev, found = 0;
>
^ permalink raw reply
* Re: [RFT] Realtek 8168 ethernet support
From: Francois Romieu @ 2006-06-10 22:48 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Randy.Dunlap, Daniel Drake, netdev
In-Reply-To: <20060610120523.GA24288@electric-eye.fr.zoreil.com>
Francois Romieu <romieu@fr.zoreil.com> :
[...]
> -> the != ... && ... != test above seems inverted.
Answering to myself: yes, it is. The 8100 and 8101 are PCI Express
fast ethernet only (but they should do 802.1q, go figure).
--
Ueimor
^ permalink raw reply
* [PATCH 2.6.17-rc6-mm2] eth1394: replace __constant_htons by htons
From: Stefan Richter @ 2006-06-10 21:44 UTC (permalink / raw)
To: linux1394-devel; +Cc: netdev, Alexey Dobriyan
In-Reply-To: <20060527094019.4d451093@localhost.localdomain>
...and __constant_ntohs, __constant_ntohl, __constant_cpu_to_be32 too
where possible. Htons and friends are resolved to constants in these
places anyway. Also fix an endianess glitch in a log message, spotted
by Alexey Dobriyan.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/ieee1394/eth1394.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
Index: linux-2.6.17-rc6-mm2/drivers/ieee1394/eth1394.c
===================================================================
--- linux-2.6.17-rc6-mm2.orig/drivers/ieee1394/eth1394.c 2006-06-10 21:18:28.000000000 +0200
+++ linux-2.6.17-rc6-mm2/drivers/ieee1394/eth1394.c 2006-06-10 21:33:59.000000000 +0200
@@ -770,7 +770,7 @@ static int ether1394_rebuild_header(stru
default:
ETH1394_PRINT(KERN_DEBUG, dev->name,
"unable to resolve type %04x addresses.\n",
- eth->h_proto);
+ ntohs(eth->h_proto));
break;
}
@@ -792,9 +792,8 @@ static int ether1394_header_cache(struct
(16 - ETH1394_HLEN));
struct net_device *dev = neigh->dev;
- if (type == __constant_htons(ETH_P_802_3)) {
+ if (type == htons(ETH_P_802_3))
return -1;
- }
eth->h_proto = type;
memcpy(eth->h_dest, neigh->ha, dev->addr_len);
@@ -883,7 +882,7 @@ static inline u16 ether1394_parse_encap(
/* If this is an ARP packet, convert it. First, we want to make
* use of some of the fields, since they tell us a little bit
* about the sending machine. */
- if (ether_type == __constant_htons (ETH_P_ARP)) {
+ if (ether_type == htons(ETH_P_ARP)) {
struct eth1394_arp *arp1394 = (struct eth1394_arp*)skb->data;
struct arphdr *arp = (struct arphdr *)skb->data;
unsigned char *arp_ptr = (unsigned char *)(arp + 1);
@@ -939,8 +938,8 @@ static inline u16 ether1394_parse_encap(
}
/* Now add the ethernet header. */
- if (dev->hard_header (skb, dev, __constant_ntohs (ether_type),
- &dest_hw, NULL, skb->len) >= 0)
+ if (dev->hard_header(skb, dev, ntohs(ether_type), &dest_hw, NULL,
+ skb->len) >= 0)
ret = ether1394_type_trans(skb, dev);
return ret;
@@ -1509,8 +1508,8 @@ static inline void ether1394_prep_gasp_p
p->data = ((quadlet_t*)skb->data) - 2;
p->data[0] = cpu_to_be32((priv->host->node_id << 16) |
ETHER1394_GASP_SPECIFIER_ID_HI);
- p->data[1] = __constant_cpu_to_be32((ETHER1394_GASP_SPECIFIER_ID_LO << 24) |
- ETHER1394_GASP_VERSION);
+ p->data[1] = cpu_to_be32((ETHER1394_GASP_SPECIFIER_ID_LO << 24) |
+ ETHER1394_GASP_VERSION);
/* Setting the node id to ALL_NODES (not LOCAL_BUS | ALL_NODES)
* prevents hpsb_send_packet() from setting the speed to an arbitrary
@@ -1665,9 +1664,9 @@ static int ether1394_tx (struct sk_buff
/* Set the transmission type for the packet. ARP packets and IP
* broadcast packets are sent via GASP. */
if (memcmp(eth->h_dest, dev->broadcast, ETH1394_ALEN) == 0 ||
- proto == __constant_htons(ETH_P_ARP) ||
- (proto == __constant_htons(ETH_P_IP) &&
- IN_MULTICAST(__constant_ntohl(skb->nh.iph->daddr)))) {
+ proto == htons(ETH_P_ARP) ||
+ (proto == htons(ETH_P_IP) &&
+ IN_MULTICAST(ntohl(skb->nh.iph->daddr)))) {
tx_type = ETH1394_GASP;
dest_node = LOCAL_BUS | ALL_NODES;
max_payload = priv->bc_maxpayload - ETHER1394_GASP_OVERHEAD;
@@ -1699,7 +1698,7 @@ static int ether1394_tx (struct sk_buff
}
/* If this is an ARP packet, convert it */
- if (proto == __constant_htons (ETH_P_ARP))
+ if (proto == htons(ETH_P_ARP))
ether1394_arp_to_1394arp (skb, dev);
ptask->hdr.words.word1 = 0;
^ permalink raw reply
* Re: [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Sam Ravnborg @ 2006-06-10 20:38 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: Mikael Pettersson, linux-kernel, netdev, jgarzik, akpm
In-Reply-To: <20060610121335.447e19f2.rdunlap@xenotime.net>
> >
> > Not sure how serious this is; the driver seems to work fine later on.
>
> Doesn't look serious. init_module() is not __init, but it calls
> some __init functions and touches some __initdata.
This is the typical case with inconsistent tagging.
> BTW, I would be happy to see some consistent results from modpost
> section checking. I don't see all of these warnings (I see only 1)
> when using gcc 3.3.6. What gcc version are you using?
> Does that matter? (not directed at anyone in particular)
I did not see anyone of them - strange.
I did not dig into it, but objdump -rR ne.o should tell the number of
mismatches with soem carefull checking.
> --- linux-2617-rc6.orig/drivers/net/ne.c
> +++ linux-2617-rc6/drivers/net/ne.c
> @@ -829,7 +829,7 @@ that the ne2k probe is the last 8390 bas
> is at boot) and so the probe will get confused by any other 8390 cards.
> ISA device autoprobes on a running machine are not recommended anyway. */
>
> -int init_module(void)
> +int __init init_module(void)
> {
> int this_dev, found = 0;
When you anyway touches the driver I suggest to name the function
<module>_init, <module>_cleanup and use module_init(), module_cleanup().
Sam
^ permalink raw reply
* [PATCH] smc ethernet: fix section mismatch warnings
From: Randy.Dunlap @ 2006-06-10 20:30 UTC (permalink / raw)
To: netdev; +Cc: p_gortmaker, akpm, jgarzik, nico
From: Randy Dunlap <rdunlap@xenotime.net>
Priority: not critical; makes init code discardable.
Removes one duplicate assignment.
Fix section mismatch warnings:
WARNING: drivers/net/smc-ultra.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x369) and 'cleanup_card'
WARNING: drivers/net/smc-ultra32.o - Section mismatch: reference to .init.text:ultra32_probe from .text between 'init_module' (at offset 0x254) and 'cleanup_module'
WARNING: drivers/net/smc9194.o - Section mismatch: reference to .init.text:smc_init from .text between 'init_module' (at offset 0x997) and 'cleanup_module'
WARNING: drivers/net/smc9194.o - Section mismatch: reference to .init.data: from .data between 'smcdev.0' (at offset 0x44) and '__param_str_io'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/net/smc-ultra.c | 2 +-
drivers/net/smc-ultra32.c | 2 +-
drivers/net/smc9194.c | 7 ++-----
3 files changed, 4 insertions(+), 7 deletions(-)
--- linux-2617-rc6.orig/drivers/net/smc-ultra.c
+++ linux-2617-rc6/drivers/net/smc-ultra.c
@@ -553,7 +553,7 @@ MODULE_LICENSE("GPL");
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int
+int __init
init_module(void)
{
struct net_device *dev;
--- linux-2617-rc6.orig/drivers/net/smc-ultra32.c
+++ linux-2617-rc6/drivers/net/smc-ultra32.c
@@ -421,7 +421,7 @@ static struct net_device *dev_ultra[MAX_
MODULE_DESCRIPTION("SMC Ultra32 EISA ethernet driver");
MODULE_LICENSE("GPL");
-int init_module(void)
+int __init init_module(void)
{
int this_dev, found = 0;
--- linux-2617-rc6.orig/drivers/net/smc9194.c
+++ linux-2617-rc6/drivers/net/smc9194.c
@@ -732,12 +732,9 @@ static int ifport;
struct net_device * __init smc_init(int unit)
{
struct net_device *dev = alloc_etherdev(sizeof(struct smc_local));
- static struct devlist *smcdev = smc_devlist;
+ struct devlist *smcdev = smc_devlist;
int err = 0;
-#ifndef NO_AUTOPROBE
- smcdev = smc_devlist;
-#endif
if (!dev)
return ERR_PTR(-ENODEV);
@@ -1607,7 +1604,7 @@ MODULE_PARM_DESC(io, "SMC 99194 I/O base
MODULE_PARM_DESC(irq, "SMC 99194 IRQ number");
MODULE_PARM_DESC(ifport, "SMC 99194 interface port (0-default, 1-TP, 2-AUI)");
-int init_module(void)
+int __init init_module(void)
{
if (io == 0)
printk(KERN_WARNING
---
^ permalink raw reply
* [PATCH] hp ethernet: fix section mismatches
From: Randy.Dunlap @ 2006-06-10 20:32 UTC (permalink / raw)
To: netdev; +Cc: akpm, jgarzik
From: Randy Dunlap <rdunlap@xenotime.net>
Priority: not critical; makes init code discardable.
Fix section mismatch warnings:
WARNING: drivers/net/hp-plus.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x387) and 'cleanup_card'
WARNING: drivers/net/hp.o - Section mismatch: reference to .init.data: from .text between 'hp_init_card' (at offset 0x310) and 'init_module'
WARNING: drivers/net/hp.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x367) and 'cleanup_card'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/net/hp-plus.c | 2 +-
drivers/net/hp.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--- linux-2617-rc6.orig/drivers/net/hp-plus.c
+++ linux-2617-rc6/drivers/net/hp-plus.c
@@ -446,7 +446,7 @@ MODULE_LICENSE("GPL");
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int
+int __init
init_module(void)
{
struct net_device *dev;
--- linux-2617-rc6.orig/drivers/net/hp.c
+++ linux-2617-rc6/drivers/net/hp.c
@@ -384,7 +384,7 @@ hp_block_output(struct net_device *dev,
}
/* This function resets the ethercard if something screws up. */
-static void
+static void __init
hp_init_card(struct net_device *dev)
{
int irq = dev->irq;
@@ -409,7 +409,7 @@ MODULE_LICENSE("GPL");
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int
+int __init
init_module(void)
{
struct net_device *dev;
---
^ permalink raw reply
* [PATCH] 3c5zz ethernet: fix section warnings
From: Randy.Dunlap @ 2006-06-10 20:33 UTC (permalink / raw)
To: netdev; +Cc: philb, p_gortmaker, jgarzik, akpm
From: Randy Dunlap <rdunlap@xenotime.net>
Priority: not critical; makes init code discardable.
Fix section mismatch warnings:
WARNING: drivers/net/3c501.o - Section mismatch: reference to .init.text:el1_probe from .text between 'init_module' (at offset 0x812) and 'cleanup_module'
WARNING: drivers/net/3c503.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x661) and 'cleanup_card'
WARNING: drivers/net/3c505.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x228d) and 'cleanup_module'
WARNING: drivers/net/3c507.o - Section mismatch: reference to .init.text:el16_probe from .text between 'init_module' (at offset 0xa99) and 'cleanup_module'
WARNING: drivers/net/3c523.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x12e7) and 'cleanup_module'
WARNING: drivers/net/3c527.o - Section mismatch: reference to .init.text:mc32_probe from .text between 'init_module' (at offset 0xd8d) and 'cleanup_module'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/net/3c501.c | 2 +-
drivers/net/3c503.c | 2 +-
drivers/net/3c505.c | 2 +-
drivers/net/3c507.c | 2 +-
drivers/net/3c523.c | 2 +-
drivers/net/3c527.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
--- linux-2617-rc6.orig/drivers/net/3c501.c
+++ linux-2617-rc6/drivers/net/3c501.c
@@ -909,7 +909,7 @@ MODULE_PARM_DESC(irq, "EtherLink IRQ num
* here also causes the module to be unloaded
*/
-int init_module(void)
+int __init init_module(void)
{
dev_3c501 = el1_probe(-1);
if (IS_ERR(dev_3c501))
--- linux-2617-rc6.orig/drivers/net/3c503.c
+++ linux-2617-rc6/drivers/net/3c503.c
@@ -688,7 +688,7 @@ MODULE_LICENSE("GPL");
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int
+int __init
init_module(void)
{
struct net_device *dev;
--- linux-2617-rc6.orig/drivers/net/3c505.c
+++ linux-2617-rc6/drivers/net/3c505.c
@@ -1633,7 +1633,7 @@ MODULE_PARM_DESC(io, "EtherLink Plus I/O
MODULE_PARM_DESC(irq, "EtherLink Plus IRQ number(s) (assigned)");
MODULE_PARM_DESC(dma, "EtherLink Plus DMA channel(s)");
-int init_module(void)
+int __init init_module(void)
{
int this_dev, found = 0;
--- linux-2617-rc6.orig/drivers/net/3c507.c
+++ linux-2617-rc6/drivers/net/3c507.c
@@ -932,7 +932,7 @@ module_param(irq, int, 0);
MODULE_PARM_DESC(io, "EtherLink16 I/O base address");
MODULE_PARM_DESC(irq, "(ignored)");
-int init_module(void)
+int __init init_module(void)
{
if (io == 0)
printk("3c507: You should not use auto-probing with insmod!\n");
--- linux-2617-rc6.orig/drivers/net/3c523.c
+++ linux-2617-rc6/drivers/net/3c523.c
@@ -1277,7 +1277,7 @@ MODULE_PARM_DESC(io, "EtherLink/MC I/O b
MODULE_PARM_DESC(irq, "EtherLink/MC IRQ number(s)");
MODULE_LICENSE("GPL");
-int init_module(void)
+int __init init_module(void)
{
int this_dev,found = 0;
--- linux-2617-rc6.orig/drivers/net/3c527.c
+++ linux-2617-rc6/drivers/net/3c527.c
@@ -1646,7 +1646,7 @@ static struct net_device *this_device;
* insmod multiple modules for now but it's a hack.
*/
-int init_module(void)
+int __init init_module(void)
{
this_device = mc32_probe(-1);
if (IS_ERR(this_device))
---
^ permalink raw reply
* Re: [linux-usb-devel] [PATCH RFC] ZyDAS ZD1211 USB-WLAN driver
From: Daniel Drake @ 2006-06-10 19:37 UTC (permalink / raw)
To: Oliver Neukum; +Cc: linux-usb-devel, John W. Linville, netdev, Ulrich Kunitz
In-Reply-To: <200606031951.09135.oliver@neukum.org>
Oliver Neukum wrote:
> +static void disconnect(struct usb_interface *intf)
> +{
>
> This is racy. It allows io to disconnected devices. You must take the
> lock and set a flag that you test after you've taken the lock elsewhere.
It's been a bit of an adventure, but I'm now fairly confident that only
a single-line change is required to fix this: stop the TX queue early on
in the netdev->stop function.
When disconnect() happens, we call unregister_netdev(). This will call
netdev->stop if the interface was up, and netdev->stop ensures that no
more packets are queued for transmission, and that the host does not
receive any more packets or interrupts from the device.
unregister_netdev() also does some synchronization and rtnl stuff, and
after it has returned, it is guaranteed that no ioctls or other
functions (hard_start_xmit/set_mac_address) are in progress, and it is
guaranteed that no more of those will happen.
In disconnect() we also kill all urbs that we know about. All of our URB
completions handle the cancelled case without generating further I/O.
Additionally, the return values of all of our usb I/O function calls are
checked and propagated up, so most code will simply stop when the device
gets unplugged.
At this point, it's now safe to say that nobody is using (or will use)
the various structures, so disconnect() frees the whole lot and returns.
Do you agree, or did you have certain other race paths in mind which I
might have missed?
Thanks,
Daniel
^ permalink raw reply
* [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Randy.Dunlap @ 2006-06-10 19:13 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: linux-kernel, netdev, jgarzik, akpm
In-Reply-To: <200606101211.k5ACBgtl029545@harpo.it.uu.se>
On Sat, 10 Jun 2006 14:11:42 +0200 (MEST) Mikael Pettersson wrote:
> While compiling 2.6.17-rc6 for a 486 with an NE2000 ISA ethernet card, I got:
>
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x158) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x176) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x183) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x1ea) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x251) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x266) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x29b) and 'ne_block_input'
>
> Not sure how serious this is; the driver seems to work fine later on.
Doesn't look serious. init_module() is not __init, but it calls
some __init functions and touches some __initdata.
BTW, I would be happy to see some consistent results from modpost
section checking. I don't see all of these warnings (I see only 1)
when using gcc 3.3.6. What gcc version are you using?
Does that matter? (not directed at anyone in particular)
Patch below fixes it for me. Please test/report.
---
From: Randy Dunlap <rdunlap@xenotime.net>
Fix section mismatch warnings:
WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x396) and 'cleanup_card'
WARNING: drivers/net/ne2.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x483) and 'cleanup_card'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/net/ne.c | 2 +-
drivers/net/ne2.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- linux-2617-rc6.orig/drivers/net/ne.c
+++ linux-2617-rc6/drivers/net/ne.c
@@ -829,7 +829,7 @@ that the ne2k probe is the last 8390 bas
is at boot) and so the probe will get confused by any other 8390 cards.
ISA device autoprobes on a running machine are not recommended anyway. */
-int init_module(void)
+int __init init_module(void)
{
int this_dev, found = 0;
--- linux-2617-rc6.orig/drivers/net/ne2.c
+++ linux-2617-rc6/drivers/net/ne2.c
@@ -780,7 +780,7 @@ MODULE_PARM_DESC(bad, "(ignored)");
/* Module code fixed by David Weinehall */
-int init_module(void)
+int __init init_module(void)
{
struct net_device *dev;
int this_dev, found = 0;
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox