* Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks
From: Patrick McHardy @ 2005-12-04 22:49 UTC (permalink / raw)
To: Herbert Xu; +Cc: netdev, netfilter-devel, davem
In-Reply-To: <20051204221002.GA17056@gondor.apana.org.au>
Herbert Xu wrote:
> On Sun, Dec 04, 2005 at 11:06:02PM +0100, Patrick McHardy wrote:
>
> If there is a DNAT in the way, this will jump to the very start of
> the stack. So if we have a hostile IPsec peer, and the DNAT rules
> are such that this can occur, then we could be in trouble (especially
> because policy/selector verification does not occur until all IPsec
> has been done so we can't check inner address validitiy at this point).
We could return NET_XMIT_BYPASS from ip_xfrm_transport_hook(), although
it looks a bit ugly to use NET_XMIT* on the input path.
^ permalink raw reply
* [PATCH] natsemi: NAPI support
From: Mark Brown @ 2005-12-04 22:47 UTC (permalink / raw)
To: Jeff Garzik, Tim Hockin; +Cc: Harald Welte, netdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 8906 bytes --]
This patch against 2.6.14 converts the natsemi driver to use NAPI. It
was originally based on one written by Harald Welte, though it has since
been modified quite a bit, most extensively in order to remove the
ability to disable NAPI since none of the other drivers seem to provide
that functionality any more.
Signed-off-by: Mark Brown <broonie@sirena.org.uk>
--- linux-2.6.14/drivers/net/natsemi.c.orig 2005-11-29 19:29:12.000000000 +0000
+++ linux/drivers/net/natsemi.c 2005-12-04 22:13:33.000000000 +0000
@@ -3,6 +3,7 @@
Written/copyright 1999-2001 by Donald Becker.
Portions copyright (c) 2001,2002 Sun Microsystems (thockin@sun.com)
Portions copyright 2001,2002 Manfred Spraul (manfred@colorfullife.com)
+ Portions copyright 2004 Harald Welte <laforge@gnumonks.org>
This software may be used and distributed according to the terms of
the GNU General Public License (GPL), incorporated herein by reference.
@@ -136,7 +137,6 @@
TODO:
* big endian support with CFG:BEM instead of cpu_to_le32
* support for an external PHY
- * NAPI
*/
#include <linux/config.h>
@@ -160,6 +160,7 @@
#include <linux/mii.h>
#include <linux/crc32.h>
#include <linux/bitops.h>
+#include <linux/prefetch.h>
#include <asm/processor.h> /* Processor type for cache alignment. */
#include <asm/io.h>
#include <asm/irq.h>
@@ -183,8 +184,6 @@
NETIF_MSG_TX_ERR)
static int debug = -1;
-/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
-static int max_interrupt_work = 20;
static int mtu;
/* Maximum number of multicast addresses to filter (vs. rx-all-multicast).
@@ -251,14 +250,11 @@
MODULE_DESCRIPTION("National Semiconductor DP8381x series PCI Ethernet driver");
MODULE_LICENSE("GPL");
-module_param(max_interrupt_work, int, 0);
module_param(mtu, int, 0);
module_param(debug, int, 0);
module_param(rx_copybreak, int, 0);
module_param_array(options, int, NULL, 0);
module_param_array(full_duplex, int, NULL, 0);
-MODULE_PARM_DESC(max_interrupt_work,
- "DP8381x maximum events handled per interrupt");
MODULE_PARM_DESC(mtu, "DP8381x MTU (all boards)");
MODULE_PARM_DESC(debug, "DP8381x default debug level");
MODULE_PARM_DESC(rx_copybreak,
@@ -691,6 +687,8 @@
/* Based on MTU+slack. */
unsigned int rx_buf_sz;
int oom;
+ /* Interrupt status */
+ u32 intr_status;
/* Do not touch the nic registers */
int hands_off;
/* external phy that is used: only valid if dev->if_port != PORT_TP */
@@ -748,7 +746,8 @@
static int start_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs);
static void netdev_error(struct net_device *dev, int intr_status);
-static void netdev_rx(struct net_device *dev);
+static int natsemi_poll(struct net_device *dev, int *budget);
+static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do);
static void netdev_tx_done(struct net_device *dev);
static int natsemi_change_mtu(struct net_device *dev, int new_mtu);
#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -776,6 +775,18 @@
return (void __iomem *) dev->base_addr;
}
+static inline void natsemi_irq_enable(struct net_device *dev)
+{
+ writel(1, ns_ioaddr(dev) + IntrEnable);
+ readl(ns_ioaddr(dev) + IntrEnable);
+}
+
+static inline void natsemi_irq_disable(struct net_device *dev)
+{
+ writel(0, ns_ioaddr(dev) + IntrEnable);
+ readl(ns_ioaddr(dev) + IntrEnable);
+}
+
static void move_int_phy(struct net_device *dev, int addr)
{
struct netdev_private *np = netdev_priv(dev);
@@ -879,6 +890,7 @@
spin_lock_init(&np->lock);
np->msg_enable = (debug >= 0) ? (1<<debug)-1 : NATSEMI_DEF_MSG;
np->hands_off = 0;
+ np->intr_status = 0;
/* Initial port:
* - If the nic was configured to use an external phy and if find_mii
@@ -932,6 +944,9 @@
dev->do_ioctl = &netdev_ioctl;
dev->tx_timeout = &tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
+ dev->poll = natsemi_poll;
+ dev->weight = 64;
+
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = &natsemi_poll_controller;
#endif
@@ -2158,68 +2173,93 @@
}
}
-/* The interrupt handler does all of the Rx thread work and cleans up
- after the Tx thread. */
+/* The interrupt handler doesn't actually handle interrupts itself, it
+ * schedules a NAPI poll if there is anything to do. */
static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs)
{
struct net_device *dev = dev_instance;
struct netdev_private *np = netdev_priv(dev);
void __iomem * ioaddr = ns_ioaddr(dev);
- int boguscnt = max_interrupt_work;
- unsigned int handled = 0;
if (np->hands_off)
return IRQ_NONE;
- do {
- /* Reading automatically acknowledges all int sources. */
- u32 intr_status = readl(ioaddr + IntrStatus);
+
+ /* Reading automatically acknowledges. */
+ np->intr_status = readl(ioaddr + IntrStatus);
- if (netif_msg_intr(np))
- printk(KERN_DEBUG
- "%s: Interrupt, status %#08x, mask %#08x.\n",
- dev->name, intr_status,
- readl(ioaddr + IntrMask));
+ if (netif_msg_intr(np))
+ printk(KERN_DEBUG
+ "%s: Interrupt, status %#08x, mask %#08x.\n",
+ dev->name, np->intr_status,
+ readl(ioaddr + IntrMask));
- if (intr_status == 0)
- break;
- handled = 1;
+ if (!np->intr_status)
+ return IRQ_NONE;
- if (intr_status &
- (IntrRxDone | IntrRxIntr | RxStatusFIFOOver |
- IntrRxErr | IntrRxOverrun)) {
- netdev_rx(dev);
- }
+ prefetch(&np->rx_skbuff[np->cur_rx % RX_RING_SIZE]);
+
+ if (netif_rx_schedule_prep(dev)) {
+ /* Disable interrupts and register for poll */
+ natsemi_irq_disable(dev);
+ __netif_rx_schedule(dev);
+ }
+ return IRQ_HANDLED;
+}
+
+/* This is the NAPI poll routine. As well as the standard RX handling
+ * it also handles all other interrupts that the chip might raise.
+ */
+static int natsemi_poll(struct net_device *dev, int *budget)
+{
+ struct netdev_private *np = netdev_priv(dev);
+ void __iomem * ioaddr = ns_ioaddr(dev);
- if (intr_status &
- (IntrTxDone | IntrTxIntr | IntrTxIdle | IntrTxErr)) {
+ int work_to_do = min(*budget, dev->quota);
+ int work_done = 0;
+
+ spin_lock_irq(&np->lock);
+ if (np->hands_off) {
+ spin_unlock_irq(&np->lock);
+ return 0;
+ }
+ spin_unlock_irq(&np->lock);
+
+ do {
+ if (np->intr_status &
+ (IntrTxDone | IntrTxIntr | IntrTxIdle | IntrTxErr)) {
spin_lock(&np->lock);
netdev_tx_done(dev);
spin_unlock(&np->lock);
}
-
+
/* Abnormal error summary/uncommon events handlers. */
- if (intr_status & IntrAbnormalSummary)
- netdev_error(dev, intr_status);
-
- if (--boguscnt < 0) {
- if (netif_msg_intr(np))
- printk(KERN_WARNING
- "%s: Too much work at interrupt, "
- "status=%#08x.\n",
- dev->name, intr_status);
- break;
+ if (np->intr_status & IntrAbnormalSummary)
+ netdev_error(dev, np->intr_status);
+
+ if (np->intr_status &
+ (IntrRxDone | IntrRxIntr | RxStatusFIFOOver |
+ IntrRxErr | IntrRxOverrun)) {
+ netdev_rx(dev, &work_done, work_to_do);
}
- } while (1);
+
+ *budget -= work_done;
+ dev->quota -= work_done;
- if (netif_msg_intr(np))
- printk(KERN_DEBUG "%s: exiting interrupt.\n", dev->name);
+ if (work_done >= work_to_do)
+ return 1;
- return IRQ_RETVAL(handled);
+ np->intr_status = readl(ioaddr + IntrStatus);
+ } while (np->intr_status);
+
+ netif_rx_complete(dev);
+ natsemi_irq_enable(dev);
+
+ return 0;
}
/* This routine is logically part of the interrupt handler, but separated
for clarity and better register allocation. */
-static void netdev_rx(struct net_device *dev)
+static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do)
{
struct netdev_private *np = netdev_priv(dev);
int entry = np->cur_rx % RX_RING_SIZE;
@@ -2237,6 +2277,12 @@
entry, desc_status);
if (--boguscnt < 0)
break;
+
+ if (*work_done >= work_to_do)
+ break;
+
+ (*work_done)++;
+
pkt_len = (desc_status & DescSizeMask) - 4;
if ((desc_status&(DescMore|DescPktOK|DescRxLong)) != DescPktOK){
if (desc_status & DescMore) {
@@ -2293,7 +2339,7 @@
np->rx_skbuff[entry] = NULL;
}
skb->protocol = eth_type_trans(skb, dev);
- netif_rx(skb);
+ netif_receive_skb(skb);
dev->last_rx = jiffies;
np->stats.rx_packets++;
np->stats.rx_bytes += pkt_len;
@@ -3175,6 +3221,8 @@
disable_irq(dev->irq);
spin_lock_irq(&np->lock);
+ netif_poll_disable(dev);
+
writel(0, ioaddr + IntrEnable);
np->hands_off = 1;
natsemi_stop_rxtx(dev);
@@ -3235,6 +3283,7 @@
mod_timer(&np->timer, jiffies + 1*HZ);
}
netif_device_attach(dev);
+ netif_poll_enable(dev);
out:
rtnl_unlock();
return 0;
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply
* Re: [PATCH 05/13]: [IPV4/6]: Netfilter IPsec output hooks
From: Herbert Xu @ 2005-12-04 22:15 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netdev, netfilter-devel, davem
In-Reply-To: <43936905.2000700@trash.net>
On Sun, Dec 04, 2005 at 11:09:09PM +0100, Patrick McHardy wrote:
>
> Thanks, I've added the correct patch now :) Unless I missed something,
> it was still missing a call to dst_output after the last transform
> in xfrm4_output_finish, unless we keep the loop in dst_output.
Good catch. The lines
err = 0;
if (!skb->dst->xfrm)
break;
should read
if (!skb->dst->xfrm)
return dst_output(skb);
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks
From: Herbert Xu @ 2005-12-04 22:10 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netdev, netfilter-devel, davem
In-Reply-To: <4393684A.8030208@trash.net>
On Sun, Dec 04, 2005 at 11:06:02PM +0100, Patrick McHardy wrote:
>
> >I'm worried about this bit. This looks like it'll go back to the top
> >of the IP stack with the existing call chain. So could grow as the
> >number of transforms increase.
>
> Its not so bad. It adds ip_xfrm_transport_hook and
> ip_local_deliver_finish to the call stack, but since two subsequent
> transport mode SAs are always processed at once it can't take this
> path again without calling netif_rx in between.
If there is a DNAT in the way, this will jump to the very start of
the stack. So if we have a hostile IPsec peer, and the DNAT rules
are such that this can occur, then we could be in trouble (especially
because policy/selector verification does not occur until all IPsec
has been done so we can't check inner address validitiy at this point).
> Besides the double counting, packets also appear on the packet sockets
> after transport mode decapsulation with the original approach. For
> IPv6 there's also the double-parsing of extension header issue.
Having the packets appear twice on AF_PACKET is probably desirable :)
I'll need to think about the double-parsing though.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH 05/13]: [IPV4/6]: Netfilter IPsec output hooks
From: Patrick McHardy @ 2005-12-04 22:09 UTC (permalink / raw)
To: Herbert Xu; +Cc: netdev, netfilter-devel, davem
In-Reply-To: <20051128045611.GA9571@gondor.apana.org.au>
Herbert Xu wrote:
>>before tunnel mode transforms and added a missing dst_output call
>>for the final packet.
>
> This shouldn't be necessary if you apply it on top of my previous
> patch which made xfrm[46]_output process the first SA and all subsequent
> transport mode SAs. I've included that patch here again.
Thanks, I've added the correct patch now :) Unless I missed something,
it was still missing a call to dst_output after the last transform
in xfrm4_output_finish, unless we keep the loop in dst_output.
^ permalink raw reply
* Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks
From: Patrick McHardy @ 2005-12-04 22:06 UTC (permalink / raw)
To: Herbert Xu; +Cc: netdev, netfilter-devel, davem
In-Reply-To: <20051201012711.GA2527@gondor.apana.org.au>
Herbert Xu wrote:
> On Sun, Nov 20, 2005 at 04:31:36PM +0000, Patrick McHardy wrote:
>
>>@@ -145,7 +149,17 @@ int xfrm4_rcv_encap(struct sk_buff *skb,
>> netif_rx(skb);
>> return 0;
>> } else {
>>+#ifdef CONFIG_NETFILTER
>>+ __skb_push(skb, skb->data - skb->nh.raw);
>>+ skb->nh.iph->tot_len = htons(skb->len);
>>+ ip_send_check(skb->nh.iph);
>>+
>>+ NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, skb->dev, NULL,
>>+ ip_xfrm_transport_hook);
>>+ return 0;
>>+#else
>> return -skb->nh.iph->protocol;
>>+#endif
>
>
> I'm worried about this bit. This looks like it'll go back to the top
> of the IP stack with the existing call chain. So could grow as the
> number of transforms increase.
Its not so bad. It adds ip_xfrm_transport_hook and
ip_local_deliver_finish to the call stack, but since two subsequent
transport mode SAs are always processed at once it can't take this
path again without calling netif_rx in between.
> Perhaps we need to play a dst_input/netif_rx trick here.
>
> Actually, was there a problem with your original netif_rx approach
> apart from the issue with double counting?
Besides the double counting, packets also appear on the packet sockets
after transport mode decapsulation with the original approach. For
IPv6 there's also the double-parsing of extension header issue.
^ permalink raw reply
* smtp mail failed
From: hostmaster @ 2005-12-04 20:59 UTC (permalink / raw)
To: priv-mail
[-- Attachment #1: Type: text/plain, Size: 241 bytes --]
This is an automatically generated Delivery Status Notification.
SMTP_Error []
I'm afraid I wasn't able to deliver your message.
This is a permanent error; I've given up. Sorry it didn't work out.
The full mail-text and header is attached!
[-- Attachment #2: mail.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* Re: [-mm patch] remove code for WIRELESS_EXT < 18
From: Adrian Bunk @ 2005-12-04 19:52 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, linux-kernel
In-Reply-To: <4393447E.3020003@pobox.com>
On Sun, Dec 04, 2005 at 02:33:18PM -0500, Jeff Garzik wrote:
> Adrian Bunk wrote:
> >WIRELESS_EXT < 18 will never be true in the kernel.
> >
> >
> >Signed-off-by: Adrian Bunk <bunk@stusta.de>
> >
> >---
> >
> > drivers/net/wireless/ipw2100.c | 434 ----------------------
> > drivers/net/wireless/tiacx/acx_struct.h | 5
> > drivers/net/wireless/tiacx/common.c | 4
> > drivers/net/wireless/tiacx/conv.c | 2
> > drivers/net/wireless/tiacx/ioctl.c | 441 -----------------------
> > drivers/net/wireless/tiacx/pci.c | 8
> > drivers/net/wireless/tiacx/usb.c | 6
> > drivers/net/wireless/tiacx/wlan.c | 2
> > drivers/net/wireless/tiacx/wlan_compat.h | 9
> > 9 files changed, 1 insertion(+), 910 deletions(-)
>
> NAK, patches non-existent files.
>
> [jgarzik@pretzel linux-2.6]$ ls drivers/net/wireless/tiacx
> ls: drivers/net/wireless/tiacx: No such file or directory
As the subject says, it's against -mm.
How should I resend it?
One patch against ipw2100.c and one patch for the tiacx stuff?
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply
* Re: [-mm patch] remove code for WIRELESS_EXT < 18
From: Jeff Garzik @ 2005-12-04 19:33 UTC (permalink / raw)
To: Adrian Bunk; +Cc: netdev, linux-kernel
In-Reply-To: <20051203122720.GF31395@stusta.de>
Adrian Bunk wrote:
> WIRELESS_EXT < 18 will never be true in the kernel.
>
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> ---
>
> drivers/net/wireless/ipw2100.c | 434 ----------------------
> drivers/net/wireless/tiacx/acx_struct.h | 5
> drivers/net/wireless/tiacx/common.c | 4
> drivers/net/wireless/tiacx/conv.c | 2
> drivers/net/wireless/tiacx/ioctl.c | 441 -----------------------
> drivers/net/wireless/tiacx/pci.c | 8
> drivers/net/wireless/tiacx/usb.c | 6
> drivers/net/wireless/tiacx/wlan.c | 2
> drivers/net/wireless/tiacx/wlan_compat.h | 9
> 9 files changed, 1 insertion(+), 910 deletions(-)
NAK, patches non-existent files.
[jgarzik@pretzel linux-2.6]$ ls drivers/net/wireless/tiacx
ls: drivers/net/wireless/tiacx: No such file or directory
^ permalink raw reply
* ¿À´Ãµµ Æí¾ÈÇϼ¼¿ä?
From: ¹æ ¿µÁ¦ @ 2005-12-04 13:50 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: multipart/alternative, Size: 2259 bytes --]
^ permalink raw reply
* ¿À´Ãµµ Æí¾ÈÇϼ¼¿ä?
From: ÇÇ »ó±¹ @ 2005-12-03 23:47 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: multipart/alternative, Size: 2258 bytes --]
^ permalink raw reply
* Get rid of all you owe with out paying another dollar
From: randell reynolds @ 2005-12-03 21:09 UTC (permalink / raw)
To: Ezra Hunter; +Cc: outgoing, fox, netdev, apache, sullivan
Eliminate all that you are indebted for without sending an other dollar.
Eliminate the embarrassing collection contacts. Eliminate the sending of
payments! Wild as it may seem the majority lending institutions not
following the banking laws here in the US. Incredible but right! Visit us
for comprehensive particulars on the subject our approach at NO cost or
responsibility. You have zilch to loose and lots to secure.
http://ca.geocities.com/burthenderley/
Exhaustive knowledge or to bring to a hault obtaining or to view our mailng
address
Multiply leads quickly through experienced and high volume e-mail
advertising
Use the the largest and finest markettgroup@emailacc.com
Instead of considering it an accident and paying no attention to it you
immediately appeared to me--a mere boy--and offered your services. I was
very anxious to do something, returned the Demon, evasively
You've no idea how stupid it is for me to live invisible and unknown, while
all the time I have in my possession secrets of untold benefit to the world
^ permalink raw reply
* Re: [RFC] ip / ifconfig redesign
From: Al Boldi @ 2005-12-03 20:25 UTC (permalink / raw)
To: Ben Greear; +Cc: netdev, linux-net
In-Reply-To: <4391E4FC.1040200@candelatech.com>
Ben Greear wrote:
> Al Boldi wrote:
> > Here specifically, ip/ifconfig is implemented upside-down requiring a
> > link/dev to exist for an address to be defined, in effect containing
> > layer 3 inside layer 2, when an address should be allowed to be defined
> > w/o a link/dev much like an app is allowed to be defined w/o an address.
>
> You can add multiple virtual IP addresses to physical interfaces. It
> makes no sense to have an IP without any association to an interface
> in my opinion. Often, when you have multiple interfaces, you most
> definately want different IPs associated specifically with particular
> interfaces. Think about redundant paths, routers, firewalls, and such.
This proposal does not reduce the current features, but instead attempts to
remove certain dependencies to aid scalability, usability, and flexibility.
Can you explain why these dependencies are necessary?
> If you do see a benefit to your proposal, please describe how you would
> use it, and why you cannot do this thing with today's code.
Does not my previous post answer this question?
> Philosophical musings about the 'proper' way to do things without concrete
> examples is unlikely to get you very far :)
I am only trying to be honest about it; no philosophical musings meant.
Thanks!
--
Al
^ permalink raw reply
* Re: [RFC] ip / ifconfig redesign
From: Ben Greear @ 2005-12-03 18:33 UTC (permalink / raw)
To: Al Boldi; +Cc: netdev, linux-net
In-Reply-To: <200512031646.45332.a1426z@gawab.com>
Al Boldi wrote:
> Here specifically, ip/ifconfig is implemented upside-down requiring a
> link/dev to exist for an address to be defined, in effect containing layer 3
> inside layer 2, when an address should be allowed to be defined w/o a
> link/dev much like an app is allowed to be defined w/o an address.
[Removed lkml from CC list]
You can add multiple virtual IP addresses to physical interfaces. It
makes no sense to have an IP without any association to an interface
in my opinion. Often, when you have multiple interfaces, you most definately
want different IPs associated specifically with particular interfaces.
Think about redundant paths, routers, firewalls, and such.
If you do see a benefit to your proposal, please describe how you would
use it, and why you cannot do this thing with today's code. Philosophical
musings about the 'proper' way to do things without concrete examples is
unlikely to get you very far :)
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* (no subject)
From: ikoey8y36vihioyt @ 2005-12-03 17:41 UTC (permalink / raw)
^ permalink raw reply
* 無線遙控器、車載背袋、耳機、高分子鋰電池、車充、
From: P.o.r.t.a.b.l.e. .D.V.D @ 2005-12-03 16:29 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3852 bytes --]
=?Big5?B?pKSk5aTipVU=?=
To: "netdennis" <netdennis@yahoo.com.tw>
Content-Type: multipart/alternative;
boundary="=_NextPart_2rfkindysadvnqw3nerasdf";
charset="BIG-5"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Sender: "P.o.r.t.a.b.l.e. .D.V.D" <louhou@pchome.com.tw>
Reply-To: louhou@pchome.com.tw
Date: Sun, 4 Dec 2005 00:19:02 +0800
X-Priority: 2
X-Library: Indy 9.00.10
X-Mailer:Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE:Produced By Mircosoft MimeOLE V6.00.2600.0000
Return-Path:louhou@pchome.com.tw
This is a multi-part message in MIME format
--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
charset="BIG-5"
--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Type: text/html
Content-Transfer-Encoding: 7bit
charset="BIG-5"
<html> <head> <meta http-equiv=Content-Type content="text/html; charset=big5"> <link rel=Edit-Time-Data href="./sobon-email.files/editdata.mso"> <title>eBOOK ¥iÄ⦡ DVD¼½©ñ¾÷</title> <style> <!-- .Section1 {page:Section1;} --> </style> </head> <body bgcolor="#FFFFFF" background="sobon-email.files/BACKGRND.gif" class="Normal" lang=ZH-TW> <div class=Section1 style='layout-grid:18.0pt'> <p align=center style='text-align:center;'><span lang=EN-US style='font-family:·s²Ó©úÅé;'><span style='color: black;text-decoration:none;text-underline:none'><img src="http://myweb.hinet.net/home6/astrong/pics/slover.jpg" width="512" height="218"></span></span></p> <p align=center style='text-align:center;'><span style="font-family: ·s²Ó©úÅé"><font color="#000000" size="5">³Ì</font><font size="5">n¦n</font><font color="#0000FF" size="6"><font color="#000000" size="5">ªº<font color="#FF0000" size="7">¸t
½Ï§ª«</font></font></font></span></p> <p align=center style='text-align:center;'><span!
style="font-family: ·s²Ó©úÅé"><font color="#000000" size="5">¥»DVD¦³ªþ</font><font color="#0000FF" size="5">[<font color="#FF00FF">TFT¿Ã¹õ</font>][<font color="#FF00FF">¹q¦À</font>][<font color="#FF00FF">¨®¸üI¥]</font>][<font color="#FF00FF">¨®¥R</font>][<font color="#FF00FF">¦Õ¾÷</font>]¡A</font></span></p> <p align=center style='text-align:center;'> </p> <p align=center style='text-align:center;'><b><span style="font-family: ·s²Ó©úÅé; font-size: 18.0pt;"><font color="#FFFFFF" size="+3"><em>³Ì¨Î¶P§¡A³Ì¦n®T¼Ö</em></font></span></b></p> <p align=center style='text-align:center;'><b><span style='font-family: ·s²Ó©úÅé;'>ì»ù </span><span lang=EN-US style='font-family:Verdana;color:#CC0000; '>$9,900 </span><span style='font-family:·s²Ó©úÅé; '>¤¸¡A¸t½Ï¸`¯S´f»ù</span><span lang=EN-US style='font-size:13.5pt;font-family:Verdana;color:#CC0000;'> $5,900</span><span lang=EN-US style
='font-family:·s²Ó©úÅé;'> ¤¸</span></b></p> <p align=center style='text-align:center;'>!
<b><span style="font-family: ·s²Ó©úÅé"><font color="#000000" size="2">
[¶l±H§Ö»¼¶O¥Î150¤¸]¥~¥[</font></span></b></p> <p align=center style='text-align:center;'><A href="http://211.21.239.215/email/eBOOK_PD7001_Order5900.asp" target=_blank><img src="http://myweb.hinet.net/home6/astrong/email/order_now_btn_1.gif" width="113" height="31" border="0"></A><==«ö³o¸Ì¯S»ùqÁÊ (¥u³Ñ10¥x)</p> <table width="84%" border="0"> <tr> <td width="18%"><div align="right"></div></td> <td width="34%"><div align="left"></div> <div align="left"><font size="4"><strong><span lang=EN-US style='font-size:10.0pt;font-family:·s²Ó©úÅé; '>Äâ±a¦¡DVD¼½©ñ¾÷ ©x¤èºô¯¸ </span></strong></font><font color="#FF0000" size="5"></font></div></td> </tr> <tr> <td> </td> <td><font size="4"><a href="http://211.21.239.216/DVD-Player/eBOOK_PD7001_Menu.htm">http://211.21.239.216/DVD-Player/eBOOK_PD7001_Menu.htm</a></font></td> </t
r> </table> </div> </body> </html>
--=_NextPart_2rfkindysadvnqw3nerasdf--
^ permalink raw reply
* Re: [RFC] ip / ifconfig redesign
From: Al Boldi @ 2005-12-03 13:46 UTC (permalink / raw)
To: netdev; +Cc: linux-net, linux-kernel
In-Reply-To: <200512022253.19029.a1426z@gawab.com>
Pekka Savola wrote:
> Al Boldi wrote:
> > Consider this new approach for better address management:
> > 1. Allow the definition of an address pool
> > 2. Relate links to addresses
> > 3. Implement to make things backward-compatible.
> >
> > The obvious benefit here, would be the transparent ability for apps to
> > bind to addresses, regardless of the link existence.
> >
> That's called 'the loopback address', right? :)
Jan-Benedict Glaw wrote:
> # echo 1 > /proc/sys/net/ipv4/ip_nonlocal_bind
>
> and/or bind to address 0 (aka 0.0.0.0) instead of a given IP address.
Ben Greear wrote:
> > Another benefit includes the ability to scale the link level
> > transparently, regardless of the application bind state.
>
> Can you do this with the current code by using scripts/whatever to move
> virtual IPs around the interfaces?
Maybe, but wouldn't that be a workaround?
linux-os \(Dick Johnson\) wrote:
> It really doesn't have anything to do with the kernel.
Maybe I shouldn't have cc'd kernel.
Marc Singer wrote:
> It might make sense to allow the address to exist without a link in
> order to allow a local port listener to continue to accept connections
> even though the network moved to another link, e.g. wireless to
> wired. Then again, perhaps, this shouldn't matter.
>
> What does Mr. Boldi propose?
Jesper Juhl wrote:
> I'm only guessing since I'm not entirely sure what Mr. Boldi means,
> but my guess is that he's proposing that an app can bind to an IP
> address without that address being assigned to any currently available
> interface and then later if that IP does get assigned to an interface
> the app will start recieving traffic then. Also possibly allowing the
> address to be removed from one interface and then later assigned to
> another one without apps noticing.
> I don't know /if/ that is what was meant, but that's how I read it.
Yes! And much more...
One reason why linux is great is because it's flexible. But flexibility
sometimes leads you to fulfill requirements in a workaround fashion. Things
get worse when you start building on these workarounds.
GNU/OpenSource is prone to such a development.
What I propose is to stop and think always; identify the problem and provide
for a _scalable_ solution. Procrastinating using workarounds may make your
development cycle seem faster, when in fact you are inhibiting it.
Here specifically, ip/ifconfig is implemented upside-down requiring a
link/dev to exist for an address to be defined, in effect containing layer 3
inside layer 2, when an address should be allowed to be defined w/o a
link/dev much like an app is allowed to be defined w/o an address.
Thanks for all your comments!
--
Al
^ permalink raw reply
* [2.6 patch] net/: fix the WIRELESS_EXT abuse
From: Adrian Bunk @ 2005-12-03 12:32 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, linux-kernel
Using WIRELESS_EXT instead of CONFIG_NET_RADIO is simply ugly.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
net/core/dev.c | 10 ++++------
net/core/net-sysfs.c | 8 --------
net/socket.c | 9 +++------
3 files changed, 7 insertions(+), 20 deletions(-)
--- linux-2.6.15-rc3-mm1/net/core/dev.c.old 2005-12-03 03:04:37.000000000 +0100
+++ linux-2.6.15-rc3-mm1/net/core/dev.c 2005-12-03 03:05:12.000000000 +0100
@@ -109,10 +109,8 @@
#include <linux/netpoll.h>
#include <linux/rcupdate.h>
#include <linux/delay.h>
-#ifdef CONFIG_NET_RADIO
-#include <linux/wireless.h> /* Note : will define WIRELESS_EXT */
+#include <linux/wireless.h>
#include <net/iw_handler.h>
-#endif /* CONFIG_NET_RADIO */
#include <asm/current.h>
/*
@@ -2032,7 +2030,7 @@
.release = seq_release,
};
-#ifdef WIRELESS_EXT
+#ifdef CONFIG_NET_RADIO
extern int wireless_proc_init(void);
#else
#define wireless_proc_init() 0
@@ -2585,7 +2583,7 @@
ret = -EFAULT;
return ret;
}
-#ifdef WIRELESS_EXT
+#ifdef CONFIG_NET_RADIO
/* Take care of Wireless Extensions */
if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) {
/* If command is `set a parameter', or
@@ -2606,7 +2604,7 @@
ret = -EFAULT;
return ret;
}
-#endif /* WIRELESS_EXT */
+#endif /* CONFIG_NET_RADIO */
return -EINVAL;
}
}
--- linux-2.6.15-rc3-mm1/net/core/net-sysfs.c.old 2005-12-03 03:05:22.000000000 +0100
+++ linux-2.6.15-rc3-mm1/net/core/net-sysfs.c 2005-12-03 03:06:55.000000000 +0100
@@ -306,7 +306,6 @@
.attrs = netstat_attrs,
};
-#ifdef WIRELESS_EXT
/* helper function that does all the locking etc for wireless stats */
static ssize_t wireless_show(struct class_device *cd, char *buf,
ssize_t (*format)(const struct iw_statistics *,
@@ -366,7 +365,6 @@
.name = "wireless",
.attrs = wireless_attrs,
};
-#endif
#ifdef CONFIG_HOTPLUG
static int netdev_uevent(struct class_device *cd, char **envp,
@@ -419,10 +417,8 @@
if (net->get_stats)
sysfs_remove_group(&class_dev->kobj, &netstat_group);
-#ifdef WIRELESS_EXT
if (net->get_wireless_stats)
sysfs_remove_group(&class_dev->kobj, &wireless_group);
-#endif
class_device_del(class_dev);
}
@@ -452,7 +448,6 @@
(ret = sysfs_create_group(&class_dev->kobj, &netstat_group)))
goto out_unreg;
-#ifdef WIRELESS_EXT
if (net->get_wireless_stats &&
(ret = sysfs_create_group(&class_dev->kobj, &wireless_group)))
goto out_cleanup;
@@ -461,9 +456,6 @@
out_cleanup:
if (net->get_stats)
sysfs_remove_group(&class_dev->kobj, &netstat_group);
-#else
- return 0;
-#endif
out_unreg:
printk(KERN_WARNING "%s: sysfs attribute registration failed %d\n",
--- linux-2.6.15-rc3-mm1/net/socket.c.old 2005-12-03 03:06:03.000000000 +0100
+++ linux-2.6.15-rc3-mm1/net/socket.c 2005-12-03 03:06:36.000000000 +0100
@@ -84,10 +84,7 @@
#include <linux/compat.h>
#include <linux/kmod.h>
#include <linux/audit.h>
-
-#ifdef CONFIG_NET_RADIO
-#include <linux/wireless.h> /* Note : will define WIRELESS_EXT */
-#endif /* CONFIG_NET_RADIO */
+#include <linux/wireless.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
@@ -844,11 +841,11 @@
if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
err = dev_ioctl(cmd, argp);
} else
-#ifdef WIRELESS_EXT
+#ifdef CONFIG_NET_RADIO
if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) {
err = dev_ioctl(cmd, argp);
} else
-#endif /* WIRELESS_EXT */
+#endif /* CONFIG_NET_RADIO */
switch (cmd) {
case FIOSETOWN:
case SIOCSPGRP:
^ permalink raw reply
* [-mm patch] remove code for WIRELESS_EXT < 18
From: Adrian Bunk @ 2005-12-03 12:27 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, linux-kernel
WIRELESS_EXT < 18 will never be true in the kernel.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/net/wireless/ipw2100.c | 434 ----------------------
drivers/net/wireless/tiacx/acx_struct.h | 5
drivers/net/wireless/tiacx/common.c | 4
drivers/net/wireless/tiacx/conv.c | 2
drivers/net/wireless/tiacx/ioctl.c | 441 -----------------------
drivers/net/wireless/tiacx/pci.c | 8
drivers/net/wireless/tiacx/usb.c | 6
drivers/net/wireless/tiacx/wlan.c | 2
drivers/net/wireless/tiacx/wlan_compat.h | 9
9 files changed, 1 insertion(+), 910 deletions(-)
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/ipw2100.c.old 2005-12-03 02:56:37.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/ipw2100.c 2005-12-03 02:58:09.000000000 +0100
@@ -5735,70 +5735,6 @@
return &priv->ieee->stats;
}
-#if WIRELESS_EXT < 18
-/* Support for wpa_supplicant before WE-18, deprecated. */
-
-/* following definitions must match definitions in driver_ipw.c */
-
-#define IPW2100_IOCTL_WPA_SUPPLICANT SIOCIWFIRSTPRIV+30
-
-#define IPW2100_CMD_SET_WPA_PARAM 1
-#define IPW2100_CMD_SET_WPA_IE 2
-#define IPW2100_CMD_SET_ENCRYPTION 3
-#define IPW2100_CMD_MLME 4
-
-#define IPW2100_PARAM_WPA_ENABLED 1
-#define IPW2100_PARAM_TKIP_COUNTERMEASURES 2
-#define IPW2100_PARAM_DROP_UNENCRYPTED 3
-#define IPW2100_PARAM_PRIVACY_INVOKED 4
-#define IPW2100_PARAM_AUTH_ALGS 5
-#define IPW2100_PARAM_IEEE_802_1X 6
-
-#define IPW2100_MLME_STA_DEAUTH 1
-#define IPW2100_MLME_STA_DISASSOC 2
-
-#define IPW2100_CRYPT_ERR_UNKNOWN_ALG 2
-#define IPW2100_CRYPT_ERR_UNKNOWN_ADDR 3
-#define IPW2100_CRYPT_ERR_CRYPT_INIT_FAILED 4
-#define IPW2100_CRYPT_ERR_KEY_SET_FAILED 5
-#define IPW2100_CRYPT_ERR_TX_KEY_SET_FAILED 6
-#define IPW2100_CRYPT_ERR_CARD_CONF_FAILED 7
-
-#define IPW2100_CRYPT_ALG_NAME_LEN 16
-
-struct ipw2100_param {
- u32 cmd;
- u8 sta_addr[ETH_ALEN];
- union {
- struct {
- u8 name;
- u32 value;
- } wpa_param;
- struct {
- u32 len;
- u8 reserved[32];
- u8 data[0];
- } wpa_ie;
- struct {
- u32 command;
- u32 reason_code;
- } mlme;
- struct {
- u8 alg[IPW2100_CRYPT_ALG_NAME_LEN];
- u8 set_tx;
- u32 err;
- u8 idx;
- u8 seq[8]; /* sequence counter (set: RX, get: TX) */
- u16 key_len;
- u8 key[0];
- } crypt;
-
- } u;
-};
-
-/* end of driver_ipw.c code */
-#endif /* WIRELESS_EXT < 18 */
-
static int ipw2100_wpa_enable(struct ipw2100_priv *priv, int value)
{
/* This is called when wpa_supplicant loads and closes the driver
@@ -5807,11 +5743,6 @@
return 0;
}
-#if WIRELESS_EXT < 18
-#define IW_AUTH_ALG_OPEN_SYSTEM 0x1
-#define IW_AUTH_ALG_SHARED_KEY 0x2
-#endif
-
static int ipw2100_wpa_set_auth_algs(struct ipw2100_priv *priv, int value)
{
@@ -5855,360 +5786,6 @@
ipw2100_set_wpa_ie(priv, &frame, 0);
}
-#if WIRELESS_EXT < 18
-static int ipw2100_wpa_set_param(struct net_device *dev, u8 name, u32 value)
-{
- struct ipw2100_priv *priv = ieee80211_priv(dev);
- struct ieee80211_crypt_data *crypt;
- unsigned long flags;
- int ret = 0;
-
- switch (name) {
- case IPW2100_PARAM_WPA_ENABLED:
- ret = ipw2100_wpa_enable(priv, value);
- break;
-
- case IPW2100_PARAM_TKIP_COUNTERMEASURES:
- crypt = priv->ieee->crypt[priv->ieee->tx_keyidx];
- if (!crypt || !crypt->ops->set_flags || !crypt->ops->get_flags)
- break;
-
- flags = crypt->ops->get_flags(crypt->priv);
-
- if (value)
- flags |= IEEE80211_CRYPTO_TKIP_COUNTERMEASURES;
- else
- flags &= ~IEEE80211_CRYPTO_TKIP_COUNTERMEASURES;
-
- crypt->ops->set_flags(flags, crypt->priv);
-
- break;
-
- case IPW2100_PARAM_DROP_UNENCRYPTED:{
- /* See IW_AUTH_DROP_UNENCRYPTED handling for details */
- struct ieee80211_security sec = {
- .flags = SEC_ENABLED,
- .enabled = value,
- };
- priv->ieee->drop_unencrypted = value;
- /* We only change SEC_LEVEL for open mode. Others
- * are set by ipw_wpa_set_encryption.
- */
- if (!value) {
- sec.flags |= SEC_LEVEL;
- sec.level = SEC_LEVEL_0;
- } else {
- sec.flags |= SEC_LEVEL;
- sec.level = SEC_LEVEL_1;
- }
- if (priv->ieee->set_security)
- priv->ieee->set_security(priv->ieee->dev, &sec);
- break;
- }
-
- case IPW2100_PARAM_PRIVACY_INVOKED:
- priv->ieee->privacy_invoked = value;
- break;
-
- case IPW2100_PARAM_AUTH_ALGS:
- ret = ipw2100_wpa_set_auth_algs(priv, value);
- break;
-
- case IPW2100_PARAM_IEEE_802_1X:
- priv->ieee->ieee802_1x = value;
- break;
-
- default:
- printk(KERN_ERR DRV_NAME ": %s: Unknown WPA param: %d\n",
- dev->name, name);
- ret = -EOPNOTSUPP;
- }
-
- return ret;
-}
-
-static int ipw2100_wpa_mlme(struct net_device *dev, int command, int reason)
-{
-
- struct ipw2100_priv *priv = ieee80211_priv(dev);
- int ret = 0;
-
- switch (command) {
- case IPW2100_MLME_STA_DEAUTH:
- // silently ignore
- break;
-
- case IPW2100_MLME_STA_DISASSOC:
- ipw2100_disassociate_bssid(priv);
- break;
-
- default:
- printk(KERN_ERR DRV_NAME ": %s: Unknown MLME request: %d\n",
- dev->name, command);
- ret = -EOPNOTSUPP;
- }
-
- return ret;
-}
-
-static int ipw2100_wpa_set_wpa_ie(struct net_device *dev,
- struct ipw2100_param *param, int plen)
-{
-
- struct ipw2100_priv *priv = ieee80211_priv(dev);
- struct ieee80211_device *ieee = priv->ieee;
- u8 *buf;
-
- if (!ieee->wpa_enabled)
- return -EOPNOTSUPP;
-
- if (param->u.wpa_ie.len > MAX_WPA_IE_LEN ||
- (param->u.wpa_ie.len && param->u.wpa_ie.data == NULL))
- return -EINVAL;
-
- if (param->u.wpa_ie.len) {
- buf = kmalloc(param->u.wpa_ie.len, GFP_KERNEL);
- if (buf == NULL)
- return -ENOMEM;
-
- memcpy(buf, param->u.wpa_ie.data, param->u.wpa_ie.len);
-
- kfree(ieee->wpa_ie);
- ieee->wpa_ie = buf;
- ieee->wpa_ie_len = param->u.wpa_ie.len;
-
- } else {
- kfree(ieee->wpa_ie);
- ieee->wpa_ie = NULL;
- ieee->wpa_ie_len = 0;
- }
-
- ipw2100_wpa_assoc_frame(priv, ieee->wpa_ie, ieee->wpa_ie_len);
-
- return 0;
-}
-
-/* implementation borrowed from hostap driver */
-
-static int ipw2100_wpa_set_encryption(struct net_device *dev,
- struct ipw2100_param *param,
- int param_len)
-{
- int ret = 0;
- struct ipw2100_priv *priv = ieee80211_priv(dev);
- struct ieee80211_device *ieee = priv->ieee;
- struct ieee80211_crypto_ops *ops;
- struct ieee80211_crypt_data **crypt;
-
- struct ieee80211_security sec = {
- .flags = 0,
- };
-
- param->u.crypt.err = 0;
- param->u.crypt.alg[IPW2100_CRYPT_ALG_NAME_LEN - 1] = '\0';
-
- if (param_len !=
- (int)((char *)param->u.crypt.key - (char *)param) +
- param->u.crypt.key_len) {
- IPW_DEBUG_INFO("Len mismatch %d, %d\n", param_len,
- param->u.crypt.key_len);
- return -EINVAL;
- }
- if (param->sta_addr[0] == 0xff && param->sta_addr[1] == 0xff &&
- param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff &&
- param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) {
- if (param->u.crypt.idx >= WEP_KEYS)
- return -EINVAL;
- crypt = &ieee->crypt[param->u.crypt.idx];
- } else {
- return -EINVAL;
- }
-
- sec.flags |= SEC_ENABLED | SEC_ENCRYPT;
- if (strcmp(param->u.crypt.alg, "none") == 0) {
- if (crypt) {
- sec.enabled = 0;
- sec.encrypt = 0;
- sec.level = SEC_LEVEL_0;
- sec.flags |= SEC_LEVEL;
- ieee80211_crypt_delayed_deinit(ieee, crypt);
- }
- goto done;
- }
- sec.enabled = 1;
- sec.encrypt = 1;
-
- ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
- if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0) {
- request_module("ieee80211_crypt_wep");
- ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
- } else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0) {
- request_module("ieee80211_crypt_tkip");
- ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
- } else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0) {
- request_module("ieee80211_crypt_ccmp");
- ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
- }
- if (ops == NULL) {
- IPW_DEBUG_INFO("%s: unknown crypto alg '%s'\n",
- dev->name, param->u.crypt.alg);
- param->u.crypt.err = IPW2100_CRYPT_ERR_UNKNOWN_ALG;
- ret = -EINVAL;
- goto done;
- }
-
- if (*crypt == NULL || (*crypt)->ops != ops) {
- struct ieee80211_crypt_data *new_crypt;
-
- ieee80211_crypt_delayed_deinit(ieee, crypt);
-
- new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data), GFP_KERNEL);
- if (new_crypt == NULL) {
- ret = -ENOMEM;
- goto done;
- }
- new_crypt->ops = ops;
- if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
- new_crypt->priv =
- new_crypt->ops->init(param->u.crypt.idx);
-
- if (new_crypt->priv == NULL) {
- kfree(new_crypt);
- param->u.crypt.err =
- IPW2100_CRYPT_ERR_CRYPT_INIT_FAILED;
- ret = -EINVAL;
- goto done;
- }
-
- *crypt = new_crypt;
- }
-
- if (param->u.crypt.key_len > 0 && (*crypt)->ops->set_key &&
- (*crypt)->ops->set_key(param->u.crypt.key,
- param->u.crypt.key_len, param->u.crypt.seq,
- (*crypt)->priv) < 0) {
- IPW_DEBUG_INFO("%s: key setting failed\n", dev->name);
- param->u.crypt.err = IPW2100_CRYPT_ERR_KEY_SET_FAILED;
- ret = -EINVAL;
- goto done;
- }
-
- if (param->u.crypt.set_tx) {
- ieee->tx_keyidx = param->u.crypt.idx;
- sec.active_key = param->u.crypt.idx;
- sec.flags |= SEC_ACTIVE_KEY;
- }
-
- if (ops->name != NULL) {
-
- if (strcmp(ops->name, "WEP") == 0) {
- memcpy(sec.keys[param->u.crypt.idx],
- param->u.crypt.key, param->u.crypt.key_len);
- sec.key_sizes[param->u.crypt.idx] =
- param->u.crypt.key_len;
- sec.flags |= (1 << param->u.crypt.idx);
- sec.flags |= SEC_LEVEL;
- sec.level = SEC_LEVEL_1;
- } else if (strcmp(ops->name, "TKIP") == 0) {
- sec.flags |= SEC_LEVEL;
- sec.level = SEC_LEVEL_2;
- } else if (strcmp(ops->name, "CCMP") == 0) {
- sec.flags |= SEC_LEVEL;
- sec.level = SEC_LEVEL_3;
- }
- }
- done:
- if (ieee->set_security)
- ieee->set_security(ieee->dev, &sec);
-
- /* Do not reset port if card is in Managed mode since resetting will
- * generate new IEEE 802.11 authentication which may end up in looping
- * with IEEE 802.1X. If your hardware requires a reset after WEP
- * configuration (for example... Prism2), implement the reset_port in
- * the callbacks structures used to initialize the 802.11 stack. */
- if (ieee->reset_on_keychange &&
- ieee->iw_mode != IW_MODE_INFRA &&
- ieee->reset_port && ieee->reset_port(dev)) {
- IPW_DEBUG_INFO("%s: reset_port failed\n", dev->name);
- param->u.crypt.err = IPW2100_CRYPT_ERR_CARD_CONF_FAILED;
- return -EINVAL;
- }
-
- return ret;
-}
-
-static int ipw2100_wpa_supplicant(struct net_device *dev, struct iw_point *p)
-{
-
- struct ipw2100_param *param;
- int ret = 0;
-
- IPW_DEBUG_IOCTL("wpa_supplicant: len=%d\n", p->length);
-
- if (p->length < sizeof(struct ipw2100_param) || !p->pointer)
- return -EINVAL;
-
- param = (struct ipw2100_param *)kmalloc(p->length, GFP_KERNEL);
- if (param == NULL)
- return -ENOMEM;
-
- if (copy_from_user(param, p->pointer, p->length)) {
- kfree(param);
- return -EFAULT;
- }
-
- switch (param->cmd) {
-
- case IPW2100_CMD_SET_WPA_PARAM:
- ret = ipw2100_wpa_set_param(dev, param->u.wpa_param.name,
- param->u.wpa_param.value);
- break;
-
- case IPW2100_CMD_SET_WPA_IE:
- ret = ipw2100_wpa_set_wpa_ie(dev, param, p->length);
- break;
-
- case IPW2100_CMD_SET_ENCRYPTION:
- ret = ipw2100_wpa_set_encryption(dev, param, p->length);
- break;
-
- case IPW2100_CMD_MLME:
- ret = ipw2100_wpa_mlme(dev, param->u.mlme.command,
- param->u.mlme.reason_code);
- break;
-
- default:
- printk(KERN_ERR DRV_NAME
- ": %s: Unknown WPA supplicant request: %d\n", dev->name,
- param->cmd);
- ret = -EOPNOTSUPP;
-
- }
-
- if (ret == 0 && copy_to_user(p->pointer, param, p->length))
- ret = -EFAULT;
-
- kfree(param);
- return ret;
-}
-
-static int ipw2100_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
-{
- struct iwreq *wrq = (struct iwreq *)rq;
- int ret = -1;
- switch (cmd) {
- case IPW2100_IOCTL_WPA_SUPPLICANT:
- ret = ipw2100_wpa_supplicant(dev, &wrq->u.data);
- return ret;
-
- default:
- return -EOPNOTSUPP;
- }
-
- return -EOPNOTSUPP;
-}
-#endif /* WIRELESS_EXT < 18 */
-
static void ipw_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
@@ -6337,9 +5914,6 @@
dev->open = ipw2100_open;
dev->stop = ipw2100_close;
dev->init = ipw2100_net_init;
-#if WIRELESS_EXT < 18
- dev->do_ioctl = ipw2100_ioctl;
-#endif
dev->get_stats = ipw2100_stats;
dev->ethtool_ops = &ipw2100_ethtool_ops;
dev->tx_timeout = ipw2100_tx_timeout;
@@ -7852,7 +7426,6 @@
return 0;
}
-#if WIRELESS_EXT > 17
/*
* WE-18 WPA support
*/
@@ -8114,7 +7687,6 @@
}
return 0;
}
-#endif /* WIRELESS_EXT > 17 */
/*
*
@@ -8347,11 +7919,7 @@
NULL, /* SIOCWIWTHRSPY */
ipw2100_wx_set_wap, /* SIOCSIWAP */
ipw2100_wx_get_wap, /* SIOCGIWAP */
-#if WIRELESS_EXT > 17
ipw2100_wx_set_mlme, /* SIOCSIWMLME */
-#else
- NULL, /* -- hole -- */
-#endif
NULL, /* SIOCGIWAPLIST -- deprecated */
ipw2100_wx_set_scan, /* SIOCSIWSCAN */
ipw2100_wx_get_scan, /* SIOCGIWSCAN */
@@ -8375,7 +7943,6 @@
ipw2100_wx_get_encode, /* SIOCGIWENCODE */
ipw2100_wx_set_power, /* SIOCSIWPOWER */
ipw2100_wx_get_power, /* SIOCGIWPOWER */
-#if WIRELESS_EXT > 17
NULL, /* -- hole -- */
NULL, /* -- hole -- */
ipw2100_wx_set_genie, /* SIOCSIWGENIE */
@@ -8385,7 +7952,6 @@
ipw2100_wx_set_encodeext, /* SIOCSIWENCODEEXT */
ipw2100_wx_get_encodeext, /* SIOCGIWENCODEEXT */
NULL, /* SIOCSIWPMKSA */
-#endif
};
#define IPW2100_PRIV_SET_MONITOR SIOCIWFIRSTPRIV
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/acx_struct.h.old 2005-12-03 02:58:36.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/acx_struct.h 2005-12-03 02:59:36.000000000 +0100
@@ -1053,9 +1053,8 @@
* the struct net_device. */
/*** Device statistics ***/
struct net_device_stats stats; /* net device statistics */
-#ifdef WIRELESS_EXT
struct iw_statistics wstats; /* wireless statistics */
-#endif
+
/*** Power managment ***/
struct pm_dev *pm; /* PM crap */
@@ -1103,9 +1102,7 @@
u8 scan_rate;
u16 scan_duration;
u16 scan_probe_delay;
-#if WIRELESS_EXT > 15
struct iw_spy_data spy_data; /* FIXME: needs to be implemented! */
-#endif
/*** Wireless network settings ***/
/* copy of the device address (ifconfig hw ether) that we actually use
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/common.c.old 2005-12-03 02:59:47.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/common.c 2005-12-03 03:00:04.000000000 +0100
@@ -46,9 +46,7 @@
#include <linux/wireless.h>
#include <linux/pm.h>
#include <linux/vmalloc.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif /* WE >= 13 */
#include "acx.h"
@@ -2707,7 +2705,6 @@
acxlog(L_ASSOC, "%s(%d):%s\n",
__func__, new_status, acx_get_status_name(new_status));
-#if WIRELESS_EXT > 13 /* wireless_send_event() and SIOCGIWSCAN */
/* wireless_send_event never sleeps */
if (ACX_STATUS_4_ASSOCIATED == new_status) {
union iwreq_data wrqu;
@@ -2729,7 +2726,6 @@
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(priv->netdev, SIOCGIWAP, &wrqu, NULL);
}
-#endif
priv->status = new_status;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/conv.c.old 2005-12-03 03:00:17.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/conv.c 2005-12-03 03:00:26.000000000 +0100
@@ -36,9 +36,7 @@
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include "acx.h"
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/ioctl.c.old 2005-12-03 03:00:37.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/ioctl.c 2005-12-03 03:02:07.000000000 +0100
@@ -39,9 +39,7 @@
#include <linux/if_arp.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif /* WE >= 13 */
#include "acx.h"
@@ -329,11 +327,9 @@
case IW_MODE_AUTO:
priv->mode = ACX_MODE_OFF;
break;
-#if WIRELESS_EXT > 14
case IW_MODE_MONITOR:
priv->mode = ACX_MODE_MONITOR;
break;
-#endif /* WIRELESS_EXT > 14 */
case IW_MODE_ADHOC:
priv->mode = ACX_MODE_0_ADHOC;
break;
@@ -381,10 +377,8 @@
switch (priv->mode) {
case ACX_MODE_OFF:
*uwrq = IW_MODE_AUTO; break;
-#if WIRELESS_EXT > 14
case ACX_MODE_MONITOR:
*uwrq = IW_MODE_MONITOR; break;
-#endif /* WIRELESS_EXT > 14 */
case ACX_MODE_0_ADHOC:
*uwrq = IW_MODE_ADHOC; break;
case ACX_MODE_2_STA:
@@ -616,7 +610,6 @@
}
-#if WIRELESS_EXT > 13
/***********************************************************************
** acx_s_scan_add_station
*/
@@ -778,7 +771,6 @@
FN_EXIT1(result);
return result;
}
-#endif /* WIRELESS_EXT > 13 */
/*----------------------------------------------------------------
@@ -1480,39 +1472,6 @@
}
-/*================================================================*/
-/* Private functions */
-/*================================================================*/
-
-#if WIRELESS_EXT < 13
-/*----------------------------------------------------------------
-* acx_ioctl_get_iw_priv
-*
-* Comment: I added the monitor mode and changed the stuff below
-* to look more like the orinoco driver
-*----------------------------------------------------------------*/
-static int
-acx_ioctl_get_iw_priv(struct iwreq *iwr)
-{
- int result = -EINVAL;
-
- if (!iwr->u.data.pointer)
- return -EINVAL;
- result = verify_area(VERIFY_WRITE, iwr->u.data.pointer,
- sizeof(acx_ioctl_private_args));
- if (result)
- return result;
-
- iwr->u.data.length = VEC_SIZE(acx_ioctl_private_args);
- if (copy_to_user(iwr->u.data.pointer,
- acx_ioctl_private_args, sizeof(acx_ioctl_private_args)) != 0)
- result = -EFAULT;
-
- return result;
-}
-#endif
-
-
/*----------------------------------------------------------------
* acx_ioctl_get_nick
*----------------------------------------------------------------*/
@@ -2585,7 +2544,6 @@
/***********************************************************************
*/
-#if WIRELESS_EXT >= 13
static const iw_handler acx_ioctl_handler[] =
{
(iw_handler) acx_ioctl_commit, /* SIOCSIWCOMMIT */
@@ -2624,13 +2582,8 @@
(iw_handler) acx_ioctl_get_ap, /* SIOCGIWAP */
(iw_handler) NULL, /* [nothing] */
(iw_handler) acx_ioctl_get_aplist, /* SIOCGIWAPLIST */
-#if WIRELESS_EXT > 13
(iw_handler) acx_ioctl_set_scan, /* SIOCSIWSCAN */
(iw_handler) acx_ioctl_get_scan, /* SIOCGIWSCAN */
-#else /* WE > 13 */
- (iw_handler) NULL, /* SIOCSIWSCAN */
- (iw_handler) NULL, /* SIOCGIWSCAN */
-#endif /* WE > 13 */
(iw_handler) acx_ioctl_set_essid, /* SIOCSIWESSID */
(iw_handler) acx_ioctl_get_essid, /* SIOCGIWESSID */
(iw_handler) acx_ioctl_set_nick, /* SIOCSIWNICKN */
@@ -2694,397 +2647,3 @@
.private_args = (struct iw_priv_args *) acx_ioctl_private_args,
};
-#endif /* WE >= 13 */
-
-
-#if WIRELESS_EXT < 13
-/*================================================================*/
-/* Main function */
-/*================================================================*/
-/*----------------------------------------------------------------
-* acx_e_ioctl_old
-*
-* Comment:
-* This is the *OLD* ioctl handler.
-* Make sure to not only place your additions here, but instead mainly
-* in the new one (acx_ioctl_handler[])!
-*----------------------------------------------------------------*/
-int
-acx_e_ioctl_old(netdevice_t *dev, struct ifreq *ifr, int cmd)
-{
- wlandevice_t *priv = netdev_priv(dev);
- int result = 0;
- struct iwreq *iwr = (struct iwreq *)ifr;
-
- acxlog(L_IOCTL, "%s cmd = 0x%04X\n", __func__, cmd);
-
- /* This is the way it is done in the orinoco driver.
- * Check to see if device is present.
- */
- if (0 == netif_device_present(dev)) {
- return -ENODEV;
- }
-
- switch (cmd) {
-/* WE 13 and higher will use acx_ioctl_handler_def */
- case SIOCGIWNAME:
- /* get name == wireless protocol */
- result = acx_ioctl_get_name(dev, NULL,
- (char *)&(iwr->u.name), NULL);
- break;
-
- case SIOCSIWNWID: /* pre-802.11, */
- case SIOCGIWNWID: /* not supported. */
- result = -EOPNOTSUPP;
- break;
-
- case SIOCSIWFREQ:
- /* set channel/frequency (Hz)
- data can be frequency or channel :
- 0-1000 = channel
- > 1000 = frequency in Hz */
- result = acx_ioctl_set_freq(dev, NULL, &(iwr->u.freq), NULL);
- break;
-
- case SIOCGIWFREQ:
- /* get channel/frequency (Hz) */
- result = acx_ioctl_get_freq(dev, NULL, &(iwr->u.freq), NULL);
- break;
-
- case SIOCSIWMODE:
- /* set operation mode */
- result = acx_ioctl_set_mode(dev, NULL, &(iwr->u.mode), NULL);
- break;
-
- case SIOCGIWMODE:
- /* get operation mode */
- result = acx_ioctl_get_mode(dev, NULL, &(iwr->u.mode), NULL);
- break;
-
- case SIOCSIWSENS:
- /* Set sensitivity */
- result = acx_ioctl_set_sens(dev, NULL, &(iwr->u.sens), NULL);
- break;
-
- case SIOCGIWSENS:
- /* Get sensitivity */
- result = acx_ioctl_get_sens(dev, NULL, &(iwr->u.sens), NULL);
- break;
-
-#if WIRELESS_EXT > 10
- case SIOCGIWRANGE:
- /* Get range of parameters */
- {
- struct iw_range range;
- result = acx_ioctl_get_range(dev, NULL,
- &(iwr->u.data), (char *)&range);
- if (copy_to_user(iwr->u.data.pointer, &range,
- sizeof(struct iw_range)))
- result = -EFAULT;
- }
- break;
-#endif
-
- case SIOCGIWPRIV:
- result = acx_ioctl_get_iw_priv(iwr);
- break;
-
- /* FIXME: */
- /* case SIOCSIWSPY: */
- /* case SIOCGIWSPY: */
- /* case SIOCSIWTHRSPY: */
- /* case SIOCGIWTHRSPY: */
-
- case SIOCSIWAP:
- /* set access point by MAC address */
- result = acx_ioctl_set_ap(dev, NULL, &(iwr->u.ap_addr),
- NULL);
- break;
-
- case SIOCGIWAP:
- /* get access point MAC address */
- result = acx_ioctl_get_ap(dev, NULL, &(iwr->u.ap_addr),
- NULL);
- break;
-
- case SIOCGIWAPLIST:
- /* get list of access points in range */
- result = acx_ioctl_get_aplist(dev, NULL, &(iwr->u.data),
- NULL);
- break;
-
-#if NOT_FINISHED_YET
- /* FIXME: do proper interfacing to activate that! */
- case SIOCSIWSCAN:
- /* start a station scan */
- result = acx_ioctl_set_scan(iwr, priv);
- break;
-
- case SIOCGIWSCAN:
- /* get list of stations found during scan */
- result = acx_ioctl_get_scan(iwr, priv);
- break;
-#endif
-
- case SIOCSIWESSID:
- /* set ESSID (network name) */
- {
- char essid[IW_ESSID_MAX_SIZE+1];
-
- if (iwr->u.essid.length > IW_ESSID_MAX_SIZE)
- {
- result = -E2BIG;
- break;
- }
- if (copy_from_user(essid, iwr->u.essid.pointer,
- iwr->u.essid.length))
- {
- result = -EFAULT;
- break;
- }
- result = acx_ioctl_set_essid(dev, NULL,
- &(iwr->u.essid), essid);
- }
- break;
-
- case SIOCGIWESSID:
- /* get ESSID */
- {
- char essid[IW_ESSID_MAX_SIZE+1];
- if (iwr->u.essid.pointer)
- result = acx_ioctl_get_essid(dev, NULL,
- &(iwr->u.essid), essid);
- if (copy_to_user(iwr->u.essid.pointer, essid,
- iwr->u.essid.length))
- result = -EFAULT;
- }
- break;
-
- case SIOCSIWNICKN:
- /* set nick */
- {
- char nick[IW_ESSID_MAX_SIZE+1];
-
- if (iwr->u.data.length > IW_ESSID_MAX_SIZE)
- {
- result = -E2BIG;
- break;
- }
- if (copy_from_user(nick, iwr->u.data.pointer,
- iwr->u.data.length))
- {
- result = -EFAULT;
- break;
- }
- result = acx_ioctl_set_nick(dev, NULL,
- &(iwr->u.data), nick);
- }
- break;
-
- case SIOCGIWNICKN:
- /* get nick */
- {
- char nick[IW_ESSID_MAX_SIZE+1];
- if (iwr->u.data.pointer)
- result = acx_ioctl_get_nick(dev, NULL,
- &(iwr->u.data), nick);
- if (copy_to_user(iwr->u.data.pointer, nick,
- iwr->u.data.length))
- result = -EFAULT;
- }
- break;
-
- case SIOCSIWRATE:
- /* set default bit rate (bps) */
- result = acx_ioctl_set_rate(dev, NULL, &(iwr->u.bitrate),
- NULL);
- break;
-
- case SIOCGIWRATE:
- /* get default bit rate (bps) */
- result = acx_ioctl_get_rate(dev, NULL, &(iwr->u.bitrate),
- NULL);
- break;
-
- case SIOCSIWRTS:
- /* set RTS threshold value */
- result = acx_ioctl_set_rts(dev, NULL, &(iwr->u.rts), NULL);
- break;
- case SIOCGIWRTS:
- /* get RTS threshold value */
- result = acx_ioctl_get_rts(dev, NULL, &(iwr->u.rts), NULL);
- break;
-
- /* FIXME: */
- /* case SIOCSIWFRAG: */
- /* case SIOCGIWFRAG: */
-
-#if WIRELESS_EXT > 9
- case SIOCGIWTXPOW:
- /* get tx power */
- result = acx_ioctl_get_txpow(dev, NULL, &(iwr->u.txpower),
- NULL);
- break;
-
- case SIOCSIWTXPOW:
- /* set tx power */
- result = acx_ioctl_set_txpow(dev, NULL, &(iwr->u.txpower),
- NULL);
- break;
-#endif
-
- case SIOCSIWRETRY:
- result = acx_ioctl_set_retry(dev, NULL, &(iwr->u.retry), NULL);
- break;
-
- case SIOCGIWRETRY:
- result = acx_ioctl_get_retry(dev, NULL, &(iwr->u.retry), NULL);
- break;
-
- case SIOCSIWENCODE:
- {
- /* set encoding token & mode */
- u8 key[29];
- if (iwr->u.encoding.pointer) {
- if (iwr->u.encoding.length > 29) {
- result = -E2BIG;
- break;
- }
- if (copy_from_user(key, iwr->u.encoding.pointer,
- iwr->u.encoding.length)) {
- result = -EFAULT;
- break;
- }
- }
- else
- if (iwr->u.encoding.length) {
- result = -EINVAL;
- break;
- }
- result = acx_ioctl_set_encode(dev, NULL,
- &(iwr->u.encoding), key);
- }
- break;
-
- case SIOCGIWENCODE:
- {
- /* get encoding token & mode */
- u8 key[29];
-
- result = acx_ioctl_get_encode(dev, NULL,
- &(iwr->u.encoding), key);
- if (iwr->u.encoding.pointer) {
- if (copy_to_user(iwr->u.encoding.pointer,
- key, iwr->u.encoding.length))
- result = -EFAULT;
- }
- }
- break;
-
- /******************** iwpriv ioctls below ********************/
-#if ACX_DEBUG
- case ACX100_IOCTL_DEBUG:
- acx_ioctl_set_debug(dev, NULL, NULL, iwr->u.name);
- break;
-#endif
-
- case ACX100_IOCTL_SET_PLED:
- acx100_ioctl_set_led_power(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_PLED:
- acx100_ioctl_get_led_power(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_LIST_DOM:
- acx_ioctl_list_reg_domain(dev, NULL, NULL, NULL);
- break;
-
- case ACX100_IOCTL_SET_DOM:
- acx_ioctl_set_reg_domain(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_DOM:
- acx_ioctl_get_reg_domain(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_SCAN_PARAMS:
- acx_ioctl_set_scan_params(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_SCAN_PARAMS:
- acx_ioctl_get_scan_params(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_PREAMB:
- acx_ioctl_set_short_preamble(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_PREAMB:
- acx_ioctl_get_short_preamble(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_ANT:
- acx_ioctl_set_antenna(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_GET_ANT:
- acx_ioctl_get_antenna(dev, NULL, NULL, NULL);
- break;
-
- case ACX100_IOCTL_RX_ANT:
- acx_ioctl_set_rx_antenna(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_TX_ANT:
- acx_ioctl_set_tx_antenna(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_ED:
- acx_ioctl_set_ed_threshold(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_SET_CCA:
- acx_ioctl_set_cca(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_MONITOR: /* set sniff (monitor) mode */
- acxlog(L_IOCTL, "%s: IWPRIV monitor\n", dev->name);
-
- /* can only be done by admin */
- if (!capable(CAP_NET_ADMIN)) {
- result = -EPERM;
- break;
- }
- result = acx_ioctl_wlansniff(dev, NULL, NULL, iwr->u.name);
- break;
-
- case ACX100_IOCTL_TEST:
- acx_ioctl_unknown11(dev, NULL, NULL, NULL);
- break;
-
- case ACX111_IOCTL_INFO:
- acx111_ioctl_info(dev, NULL, NULL, NULL);
- break;
-
- default:
- acxlog(L_IOCTL, "wireless ioctl 0x%04X queried "
- "but not implemented yet\n", cmd);
- result = -EOPNOTSUPP;
- break;
- }
-
- if ((priv->dev_state_mask & ACX_STATE_IFACE_UP) && priv->set_mask) {
- acx_sem_lock(priv);
- acx_s_update_card_settings(priv, 0, 0);
- acx_sem_unlock(priv);
- }
-
- /* older WEs don't have a commit handler,
- * so we need to fix return code in this case */
- if (-EINPROGRESS == result)
- result = 0;
-
- return result;
-}
-#endif /* WE < 13 */
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/pci.c.old 2005-12-03 03:02:16.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/pci.c 2005-12-03 03:02:30.000000000 +0100
@@ -45,9 +45,7 @@
#include <linux/if_arp.h>
#include <linux/rtnetlink.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include <linux/netdevice.h>
#include <linux/ioport.h>
#include <linux/pci.h>
@@ -1820,11 +1818,7 @@
dev->hard_start_xmit = &acx_i_start_xmit;
dev->get_stats = &acx_e_get_stats;
dev->get_wireless_stats = &acx_e_get_wireless_stats;
-#if WIRELESS_EXT >= 13
dev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
-#else
- dev->do_ioctl = &acx_e_ioctl_old;
-#endif
dev->set_multicast_list = &acxpci_i_set_multicast_list;
dev->tx_timeout = &acxpci_i_tx_timeout;
dev->change_mtu = &acx_e_change_mtu;
@@ -3842,7 +3836,6 @@
r100 = txdesc->u.r1.rate;
r111 = txdesc->u.r2.rate111;
-#if WIRELESS_EXT > 13 /* wireless_send_event() and IWEVTXDROP are WE13 */
/* need to check for certain error conditions before we
* clean the descriptor: we still need valid descr data here */
if (unlikely(0x30 & error)) {
@@ -3857,7 +3850,6 @@
MAC_COPY(wrqu.addr.sa_data, hdr->a1);
wireless_send_event(priv->netdev, IWEVTXDROP, &wrqu, NULL);
}
-#endif
/* ...and free the desc */
txdesc->error = 0;
txdesc->ack_failures = 0;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/usb.c.old 2005-12-03 03:02:40.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/usb.c 2005-12-03 03:02:49.000000000 +0100
@@ -61,9 +61,7 @@
#include <linux/rtnetlink.h>
#include <linux/etherdevice.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include <linux/vmalloc.h>
#include "acx.h"
@@ -871,11 +869,7 @@
dev->hard_start_xmit = (void *)&acx_i_start_xmit;
dev->get_stats = (void *)&acx_e_get_stats;
dev->get_wireless_stats = (void *)&acx_e_get_wireless_stats;
-#if WIRELESS_EXT >= 13
dev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
-#else
- dev->do_ioctl = (void *)&acx_e_ioctl_old;
-#endif
dev->set_multicast_list = (void *)&acx100usb_i_set_rx_mode;
#ifdef HAVE_TX_TIMEOUT
dev->tx_timeout = &acx100usb_i_tx_timeout;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan.c.old 2005-12-03 03:02:58.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan.c 2005-12-03 03:03:02.000000000 +0100
@@ -43,9 +43,7 @@
#include <linux/types.h>
#include <linux/if_arp.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include "acx.h"
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan_compat.h.old 2005-12-03 03:03:11.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan_compat.h 2005-12-03 03:03:19.000000000 +0100
@@ -228,15 +228,6 @@
typedef struct net_device netdevice_t;
#endif
-#ifdef WIRELESS_EXT
-#if (WIRELESS_EXT < 13)
-struct iw_request_info {
- __u16 cmd; /* Wireless Extension command */
- __u16 flags; /* More to come ;-) */
-};
-#endif
-#endif
-
/* Interrupt handler backwards compatibility stuff */
#ifndef IRQ_NONE
#define IRQ_NONE
^ permalink raw reply
* [RFC: -mm patch] drivers/net/wireless/hostap/hostap_main.c shouldn't #include C files
From: Adrian Bunk @ 2005-12-03 12:23 UTC (permalink / raw)
To: jkmaline; +Cc: hostap, linux-kernel, netdev
This patch contains an attempt to properly build hostap.o without
#incude'ing C files.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/net/wireless/hostap/Makefile | 3
drivers/net/wireless/hostap/hostap.h | 37 +++++++++++
drivers/net/wireless/hostap/hostap_80211.h | 3
drivers/net/wireless/hostap/hostap_80211_rx.c | 11 +++
drivers/net/wireless/hostap/hostap_80211_tx.c | 15 ++++
drivers/net/wireless/hostap/hostap_ap.c | 36 ++++++----
drivers/net/wireless/hostap/hostap_ap.h | 2
drivers/net/wireless/hostap/hostap_common.h | 3
drivers/net/wireless/hostap/hostap_info.c | 3
drivers/net/wireless/hostap/hostap_ioctl.c | 12 ++-
drivers/net/wireless/hostap/hostap_main.c | 60 +-----------------
drivers/net/wireless/hostap/hostap_proc.c | 7 ++
drivers/net/wireless/hostap/hostap_wlan.h | 4 +
include/net/ieee80211_crypt.h | 1
14 files changed, 120 insertions(+), 77 deletions(-)
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/Makefile.old 2005-12-03 00:40:33.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/Makefile 2005-12-03 00:49:47.000000000 +0100
@@ -1,4 +1,5 @@
-hostap-y := hostap_main.o
+hostap-y := hostap_80211_rx.o hostap_80211_tx.o hostap_ap.o hostap_info.o \
+ hostap_ioctl.o hostap_main.o hostap_proc.o
obj-$(CONFIG_HOSTAP) += hostap.o
obj-$(CONFIG_HOSTAP_CS) += hostap_cs.o
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap.h.old 2005-12-03 00:41:48.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap.h 2005-12-03 02:37:21.000000000 +0100
@@ -1,6 +1,15 @@
#ifndef HOSTAP_H
#define HOSTAP_H
+#include <linux/ethtool.h>
+
+#include "hostap_wlan.h"
+#include "hostap_ap.h"
+
+static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
+ 2447, 2452, 2457, 2462, 2467, 2472, 2484 };
+#define FREQ_COUNT (sizeof(freq_list) / sizeof(freq_list[0]))
+
/* hostap.c */
extern struct proc_dir_entry *hostap_proc;
@@ -40,6 +49,26 @@
int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype,
u8 *body, size_t bodylen);
int prism2_sta_deauth(local_info_t *local, u16 reason);
+int prism2_wds_add(local_info_t *local, u8 *remote_addr,
+ int rtnl_locked);
+int prism2_wds_del(local_info_t *local, u8 *remote_addr,
+ int rtnl_locked, int do_not_remove);
+
+
+/* hostap_ap.c */
+
+int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
+int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
+void ap_control_flush_macs(struct mac_restrictions *mac_restrictions);
+int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac);
+void ap_control_kickall(struct ap_data *ap);
+void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
+ struct ieee80211_crypt_data ***crypt);
+int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
+ struct iw_quality qual[], int buf_size,
+ int aplist);
+int prism2_ap_translate_scan(struct net_device *dev, char *buffer);
+int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param);
/* hostap_proc.c */
@@ -54,4 +83,12 @@
void hostap_info_process(local_info_t *local, struct sk_buff *skb);
+/* hostap_ioctl.c */
+
+extern const struct iw_handler_def hostap_iw_handler_def;
+extern struct ethtool_ops prism2_ethtool_ops;
+
+int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
+
+
#endif /* HOSTAP_H */
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_common.h.old 2005-12-03 01:19:43.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_common.h 2005-12-03 01:21:13.000000000 +0100
@@ -1,6 +1,9 @@
#ifndef HOSTAP_COMMON_H
#define HOSTAP_COMMON_H
+#include <linux/types.h>
+#include <linux/if_ether.h>
+
#define BIT(x) (1 << (x))
#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_wlan.h.old 2005-12-03 01:22:53.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_wlan.h 2005-12-03 01:26:43.000000000 +0100
@@ -1,6 +1,10 @@
#ifndef HOSTAP_WLAN_H
#define HOSTAP_WLAN_H
+#include <linux/wireless.h>
+#include <linux/netdevice.h>
+#include <net/iw_handler.h>
+
#include "hostap_config.h"
#include "hostap_common.h"
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ap.h.old 2005-12-03 01:28:46.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ap.h 2005-12-03 01:29:01.000000000 +0100
@@ -1,6 +1,8 @@
#ifndef HOSTAP_AP_H
#define HOSTAP_AP_H
+#include "hostap_80211.h"
+
/* AP data structures for STAs */
/* maximum number of frames to buffer per STA */
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211.h.old 2005-12-03 01:07:18.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211.h 2005-12-03 01:11:00.000000000 +0100
@@ -1,6 +1,9 @@
#ifndef HOSTAP_80211_H
#define HOSTAP_80211_H
+#include <linux/types.h>
+#include <net/ieee80211_crypt.h>
+
struct hostap_ieee80211_mgmt {
u16 frame_control;
u16 duration;
--- linux-2.6.15-rc3-mm1/include/net/ieee80211_crypt.h.old 2005-12-03 00:58:15.000000000 +0100
+++ linux-2.6.15-rc3-mm1/include/net/ieee80211_crypt.h 2005-12-03 00:58:38.000000000 +0100
@@ -24,6 +24,7 @@
#define IEEE80211_CRYPT_H
#include <linux/skbuff.h>
+#include <net/ieee80211.h>
enum {
IEEE80211_CRYPTO_TKIP_COUNTERMEASURES = (1 << 0),
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_main.c.old 2005-12-03 00:40:11.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_main.c 2005-12-03 02:24:34.000000000 +0100
@@ -24,6 +24,7 @@
#include <linux/kmod.h>
#include <linux/rtnetlink.h>
#include <linux/wireless.h>
+#include <linux/etherdevice.h>
#include <net/iw_handler.h>
#include <net/ieee80211.h>
#include <net/ieee80211_crypt.h>
@@ -47,57 +48,6 @@
#define PRISM2_MAX_MTU (PRISM2_MAX_FRAME_SIZE - (6 /* LLC */ + 8 /* WEP */))
-/* hostap.c */
-static int prism2_wds_add(local_info_t *local, u8 *remote_addr,
- int rtnl_locked);
-static int prism2_wds_del(local_info_t *local, u8 *remote_addr,
- int rtnl_locked, int do_not_remove);
-
-/* hostap_ap.c */
-static int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
- struct iw_quality qual[], int buf_size,
- int aplist);
-static int prism2_ap_translate_scan(struct net_device *dev, char *buffer);
-static int prism2_hostapd(struct ap_data *ap,
- struct prism2_hostapd_param *param);
-static void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
- struct ieee80211_crypt_data ***crypt);
-static void ap_control_kickall(struct ap_data *ap);
-#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
-static int ap_control_add_mac(struct mac_restrictions *mac_restrictions,
- u8 *mac);
-static int ap_control_del_mac(struct mac_restrictions *mac_restrictions,
- u8 *mac);
-static void ap_control_flush_macs(struct mac_restrictions *mac_restrictions);
-static int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev,
- u8 *mac);
-#endif /* !PRISM2_NO_KERNEL_IEEE80211_MGMT */
-
-
-static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
- 2447, 2452, 2457, 2462, 2467, 2472, 2484 };
-#define FREQ_COUNT (sizeof(freq_list) / sizeof(freq_list[0]))
-
-
-/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
-/* Ethernet-II snap header (RFC1042 for most EtherTypes) */
-static unsigned char rfc1042_header[] =
-{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
-/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
-static unsigned char bridge_tunnel_header[] =
-{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
-/* No encapsulation header if EtherType < 0x600 (=length) */
-
-
-/* FIX: these could be compiled separately and linked together to hostap.o */
-#include "hostap_ap.c"
-#include "hostap_info.c"
-#include "hostap_ioctl.c"
-#include "hostap_proc.c"
-#include "hostap_80211_rx.c"
-#include "hostap_80211_tx.c"
-
-
struct net_device * hostap_add_interface(struct local_info *local,
int type, int rtnl_locked,
const char *prefix,
@@ -196,8 +146,8 @@
}
-static int prism2_wds_add(local_info_t *local, u8 *remote_addr,
- int rtnl_locked)
+int prism2_wds_add(local_info_t *local, u8 *remote_addr,
+ int rtnl_locked)
{
struct net_device *dev;
struct list_head *ptr;
@@ -258,8 +208,8 @@
}
-static int prism2_wds_del(local_info_t *local, u8 *remote_addr,
- int rtnl_locked, int do_not_remove)
+int prism2_wds_del(local_info_t *local, u8 *remote_addr,
+ int rtnl_locked, int do_not_remove)
{
unsigned long flags;
struct list_head *ptr;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211_rx.c.old 2005-12-03 00:53:21.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211_rx.c 2005-12-03 02:35:11.000000000 +0100
@@ -1,7 +1,18 @@
#include <linux/etherdevice.h>
+#include <net/ieee80211_crypt.h>
#include "hostap_80211.h"
#include "hostap.h"
+#include "hostap_ap.h"
+
+/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
+/* Ethernet-II snap header (RFC1042 for most EtherTypes) */
+static unsigned char rfc1042_header[] =
+{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
+/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
+static unsigned char bridge_tunnel_header[] =
+{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
+/* No encapsulation header if EtherType < 0x600 (=length) */
void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
struct hostap_80211_rx_status *rx_stats)
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211_tx.c.old 2005-12-03 01:05:49.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_80211_tx.c 2005-12-03 02:35:19.000000000 +0100
@@ -1,3 +1,18 @@
+#include "hostap_80211.h"
+#include "hostap_common.h"
+#include "hostap_wlan.h"
+#include "hostap.h"
+#include "hostap_ap.h"
+
+/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
+/* Ethernet-II snap header (RFC1042 for most EtherTypes) */
+static unsigned char rfc1042_header[] =
+{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
+/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
+static unsigned char bridge_tunnel_header[] =
+{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
+/* No encapsulation header if EtherType < 0x600 (=length) */
+
void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
{
struct ieee80211_hdr_4addr *hdr;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ap.c.old 2005-12-03 01:18:28.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ap.c 2005-12-03 02:21:57.000000000 +0100
@@ -16,6 +16,14 @@
* (8802.11: 5.5)
*/
+#include <linux/proc_fs.h>
+#include <linux/delay.h>
+#include <linux/random.h>
+
+#include "hostap_wlan.h"
+#include "hostap.h"
+#include "hostap_ap.h"
+
static int other_ap_policy[MAX_PARM_DEVICES] = { AP_OTHER_AP_SKIP_ALL,
DEF_INTS };
module_param_array(other_ap_policy, int, NULL, 0444);
@@ -360,8 +368,7 @@
}
-static int ap_control_add_mac(struct mac_restrictions *mac_restrictions,
- u8 *mac)
+int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac)
{
struct mac_entry *entry;
@@ -380,8 +387,7 @@
}
-static int ap_control_del_mac(struct mac_restrictions *mac_restrictions,
- u8 *mac)
+int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac)
{
struct list_head *ptr;
struct mac_entry *entry;
@@ -433,7 +439,7 @@
}
-static void ap_control_flush_macs(struct mac_restrictions *mac_restrictions)
+void ap_control_flush_macs(struct mac_restrictions *mac_restrictions)
{
struct list_head *ptr, *n;
struct mac_entry *entry;
@@ -454,8 +460,7 @@
}
-static int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev,
- u8 *mac)
+int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac)
{
struct sta_info *sta;
u16 resp;
@@ -486,7 +491,7 @@
#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
-static void ap_control_kickall(struct ap_data *ap)
+void ap_control_kickall(struct ap_data *ap)
{
struct list_head *ptr, *n;
struct sta_info *sta;
@@ -2321,9 +2326,9 @@
}
-static int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
- struct iw_quality qual[], int buf_size,
- int aplist)
+int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
+ struct iw_quality qual[], int buf_size,
+ int aplist)
{
struct ap_data *ap = local->ap;
struct list_head *ptr;
@@ -2363,7 +2368,7 @@
/* Translate our list of Access Points & Stations to a card independant
* format that the Wireless Tools will understand - Jean II */
-static int prism2_ap_translate_scan(struct net_device *dev, char *buffer)
+int prism2_ap_translate_scan(struct net_device *dev, char *buffer)
{
struct hostap_interface *iface;
local_info_t *local;
@@ -2608,8 +2613,7 @@
}
-static int prism2_hostapd(struct ap_data *ap,
- struct prism2_hostapd_param *param)
+int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param)
{
switch (param->cmd) {
case PRISM2_HOSTAPD_FLUSH:
@@ -3207,8 +3211,8 @@
}
-static void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
- struct ieee80211_crypt_data ***crypt)
+void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
+ struct ieee80211_crypt_data ***crypt)
{
struct sta_info *sta;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_info.c.old 2005-12-03 01:49:24.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_info.c 2005-12-03 01:51:43.000000000 +0100
@@ -1,5 +1,8 @@
/* Host AP driver Info Frame processing (part of hostap.o module) */
+#include "hostap_wlan.h"
+#include "hostap.h"
+#include "hostap_ap.h"
/* Called only as a tasklet (software IRQ) */
static void prism2_info_commtallies16(local_info_t *local, unsigned char *buf,
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ioctl.c.old 2005-12-03 01:52:34.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ioctl.c 2005-12-03 02:27:09.000000000 +0100
@@ -1,11 +1,13 @@
/* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */
-#ifdef in_atomic
-/* Get kernel_locked() for in_atomic() */
+#include <linux/types.h>
#include <linux/smp_lock.h>
-#endif
#include <linux/ethtool.h>
+#include <net/ieee80211_crypt.h>
+#include "hostap_wlan.h"
+#include "hostap.h"
+#include "hostap_ap.h"
static struct iw_statistics *hostap_get_wireless_stats(struct net_device *dev)
{
@@ -3910,7 +3912,7 @@
local->sta_fw_ver & 0xff);
}
-static struct ethtool_ops prism2_ethtool_ops = {
+struct ethtool_ops prism2_ethtool_ops = {
.get_drvinfo = prism2_get_drvinfo
};
@@ -3985,7 +3987,7 @@
(iw_handler) prism2_ioctl_priv_readmif, /* 3 */
};
-static const struct iw_handler_def hostap_iw_handler_def =
+const struct iw_handler_def hostap_iw_handler_def =
{
.num_standard = sizeof(prism2_handler) / sizeof(iw_handler),
.num_private = sizeof(prism2_private_handler) / sizeof(iw_handler),
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_proc.c.old 2005-12-03 02:29:08.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_proc.c 2005-12-03 02:32:00.000000000 +0100
@@ -1,5 +1,12 @@
/* /proc routines for Host AP driver */
+#include <linux/types.h>
+#include <linux/proc_fs.h>
+#include <net/ieee80211_crypt.h>
+
+#include "hostap_wlan.h"
+#include "hostap.h"
+
#define PROC_LIMIT (PAGE_SIZE - 80)
^ permalink raw reply
* Your_Password
From: Admin @ 2005-12-03 11:21 UTC (permalink / raw)
To: priv-mail
[-- Attachment #1: Type: text/plain, Size: 119 bytes --]
Account and Password Information are attached!
***** Go to: http://www.decadance.de
***** Email: postman@decadance.de
[-- Attachment #2: reg_pass.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* WINING NOTIFICATION
From: lottery board @ 2005-12-03 8:22 UTC (permalink / raw)
To: lottery_board_0012
From: Mrs. Alexandria Moore.
EURO-AFRO-AMERICA LOTTERY
Headquarters: 32 LEDGERS WAY,
SOMMERSET, BA11 2UD LONDON,
UNITED KINGDOM.
Ref: EAASL/WPL3726/25
Batch: 2005/091/BK456
Dear Sir/Madam,
CONGRATULATIONS WINNING NOTIFICATION
We happily announce to you the draw of the Euro-Afro-American Sweepstake
Online Lottery International programs held in
conjunction with www.canada.com/lotteries on saturday, 29th october, 2005 in
Ontario, Canada. Your e-mail address attached to ticket number: B9564
75604545 188 with!
Serial number 97560 drew the winning numbers: 4,14,19,25,26,49 Bonus
Ball(21) which subsequently won you the lottery in the 1st Division. All
participants were selected randomly from world-wide internet users through
computer drawing system and extracted from over 10,000,000 personal/company
email addresses.You can confirm the results by
clicking on this link
http://www.canada.com/lotteries/results.aspx?id=6
You have therefore been approved for a payout of US$ 1,820,000.00 (One
Million,Eight Hundred and Twenty Thousand United States Dollars) in cash
credited to file
KPC/9080118308/02. This is from a total cash prize of US$ 10.92 Million
dollars,
shared amongst the six lucky winners in this category world-wide.
Please note that your lucky winning ticket falls within our African booklet
representative office in Africa as indicated in your play coupon. In view of
this, your US$1,820,000:00 (One Million Eight Hundred and Twenty Thousand
United States Dollars) will be released to you by our corresponding paying
Bank in Johannesburg, South Africa as soon as your claim is verified and
approved by Our African fiduciary agent in London. He will immediately
commence the
process to facilitate the release of your funds as soon as you contact him.
His contact
details are as follow;
MR. FRANKLIN COLE .
Tele:+44-703-1844-103
E-mail : lottery_board_2005@hotmail.com
COLLIER FINANCE
London, UK.
This promotion takes place annually. For security reasons, you are advised
to keep
your winning information confidential till your claim is processed and your
money
remitted to your account. This is part of our precautionary measure to avoid
double
claiming and unwarranted abuse of this program. Please be warned. To file
for your
claim, please contact our African correspondent in London immediately with
the
following information;
1.Your fullnames
2.Your home address
3.Your telephone and fax numbers
4.Your date of birth
5.Your sex/marital status and
6 Your nationality.
7.Also forward your reference and batch numbers
included in this mail to him for the
purpose of verification in our system.
Please be informed that all winnings must be claimed within 30 days of this
notice.
To avoid unnecessary delay and complications, please quote your
reference/batch
numbers in any of your correspondence with our agents or us.
Yours Sincerely,
Mrs. Alexandria Moore.
United Kingdom Zonal Co-coordinator.
CONGRATULATIONS!!! US$ 1.82 MILLION DOLLARS WINNER.
^ permalink raw reply
* WINING NOTIFICATION
From: lottery board @ 2005-12-03 8:21 UTC (permalink / raw)
To: lottery_board_0012
From: Mrs. Alexandria Moore.
EURO-AFRO-AMERICA LOTTERY
Headquarters: 32 LEDGERS WAY,
SOMMERSET, BA11 2UD LONDON,
UNITED KINGDOM.
Ref: EAASL/WPL3726/25
Batch: 2005/091/BK456
Dear Sir/Madam,
CONGRATULATIONS WINNING NOTIFICATION
We happily announce to you the draw of the Euro-Afro-American Sweepstake
Online Lottery International programs held in
conjunction with www.canada.com/lotteries on saturday, 29th october, 2005 in
Ontario, Canada. Your e-mail address attached to ticket number: B9564
75604545 188 with!
Serial number 97560 drew the winning numbers: 4,14,19,25,26,49 Bonus
Ball(21) which subsequently won you the lottery in the 1st Division. All
participants were selected randomly from world-wide internet users through
computer drawing system and extracted from over 10,000,000 personal/company
email addresses.You can confirm the results by
clicking on this link
http://www.canada.com/lotteries/results.aspx?id=6
You have therefore been approved for a payout of US$ 1,820,000.00 (One
Million,Eight Hundred and Twenty Thousand United States Dollars) in cash
credited to file
KPC/9080118308/02. This is from a total cash prize of US$ 10.92 Million
dollars,
shared amongst the six lucky winners in this category world-wide.
Please note that your lucky winning ticket falls within our African booklet
representative office in Africa as indicated in your play coupon. In view of
this, your US$1,820,000:00 (One Million Eight Hundred and Twenty Thousand
United States Dollars) will be released to you by our corresponding paying
Bank in Johannesburg, South Africa as soon as your claim is verified and
approved by Our African fiduciary agent in London. He will immediately
commence the
process to facilitate the release of your funds as soon as you contact him.
His contact
details are as follow;
MR. FRANKLIN COLE .
Tele:+44-703-1844-103
E-mail : lottery_board_2005@hotmail.com
COLLIER FINANCE
London, UK.
This promotion takes place annually. For security reasons, you are advised
to keep
your winning information confidential till your claim is processed and your
money
remitted to your account. This is part of our precautionary measure to avoid
double
claiming and unwarranted abuse of this program. Please be warned. To file
for your
claim, please contact our African correspondent in London immediately with
the
following information;
1.Your fullnames
2.Your home address
3.Your telephone and fax numbers
4.Your date of birth
5.Your sex/marital status and
6 Your nationality.
7.Also forward your reference and batch numbers
included in this mail to him for the
purpose of verification in our system.
Please be informed that all winnings must be claimed within 30 days of this
notice.
To avoid unnecessary delay and complications, please quote your
reference/batch
numbers in any of your correspondence with our agents or us.
Yours Sincerely,
Mrs. Alexandria Moore.
United Kingdom Zonal Co-coordinator.
CONGRATULATIONS!!! US$ 1.82 MILLION DOLLARS WINNER.
^ permalink raw reply
* ¿À´Ãµµ Æí¾ÈÇϼ¼¿ä?
From: Áö ¸®±º @ 2005-12-03 0:29 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: multipart/alternative, Size: 2262 bytes --]
^ permalink raw reply
* Re: [RFC] ip / ifconfig redesign
From: Jesper Juhl @ 2005-12-02 22:49 UTC (permalink / raw)
To: linux-os (Dick Johnson); +Cc: Al Boldi, netdev, linux-net, Linux kernel
In-Reply-To: <Pine.LNX.4.61.0512021527090.11277@chaos.analogic.com>
On 12/2/05, linux-os (Dick Johnson) <linux-os@analogic.com> wrote:
>
> On Fri, 2 Dec 2005, Al Boldi wrote:
>
> > The current ip / ifconfig configuration is arcane and inflexible. The reason
> > being, that they are based on design principles inherited from the last
> > century.
> >
> > In a GNU/OpenSource environment, OpenMinds should not inhibit themselves
> > achieving new design-goals to enable a flexible non-redundant configuration.
> >
> > Specifically, '#> ip addr ' exhibits this issue clearly, by requiring to
> > associate the address to a link instead of the other way around.
> >
> > Consider this new approach for better address management:
> > 1. Allow the definition of an address pool
> > 2. Relate links to addresses
> > 3. Implement to make things backward-compatible.
> >
> > The obvious benefit here, would be the transparent ability for apps to bind
> > to addresses, regardless of the link existence.
> >
>
> A link needs to exist for it to have an address.
>
I'm only guessing since I'm not entirely sure what Mr. Boldi means,
but my guess is that he's proposing that an app can bind to an IP
address without that address being assigned to any currently available
interface and then later if that IP does get assigned to an interface
the app will start recieving traffic then. Also possibly allowing the
address to be removed from one interface and then later assigned to
another one without apps noticing.
I don't know /if/ that is what was meant, but that's how I read it.
> > Another benefit includes the ability to scale the link level transparently,
> > regardless of the application bind state.
> >
>
> That doesn't make any sense. Multiple applications can bind to the
> same address. Then can't bind to the same port because they won't
> get all their data.
>
> > And there may be many other benefits... (i.e. 100% OSI compliance)
> >
> What does Open Source Initiative have to do with this at all???
> You are just spewing stuff out.
>
I'm believe Mr. Boldi is refering to OSI as in Open Systems
Interconnection (http://en.wikipedia.org/wiki/OSI_model), not as in
Open Source Initiative.
> > --
> > Al
>
> Also, how does this involve the kernel? The interface to the kernel
> for hardware configuration is via ioctl(). For logic, sockets.
>
> If the user-level tools suck, then they should be fixed. It
> really doesn't have anything to do with the kernel.
>
> Cheers,
> Dick Johnson
>
[snip]
>
> Thank you.
>
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ 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