Re: [PATCH] hostap: allow flashing firmware

2006-01-05 Thread Ingo Oeser
Jouni Malinen schrieb:
 [...] that scary comment is there
 on purpose and it is not fully obsolete. It is still possible to get
 HFA3841 cards into state which require hardware modifications to recover
 from (i.e., they are as good as dead for most users). Taken into this
 account, I would prefer that the help text for HOSTAP_FIRMWARE_NVRAM
 would include a warning about the potential issues of using incorrect
 firmware images. In most cases, RAM (volatile) download can be used to
 upgrade the firmware without having to modify the flash contents. This
 is also what the current Windows drivers are doing.

What about doing it in two steps (first RAM then FLASH)?

1. RAM download
2. Verify that the device works as expected and uses the new firmware 
3a. Verifcation ok - download firmware to FLASH
3b. Verifcation failed - Tell user, reset device and use old firmware 
from FLASH

Is this possible or too simple to be true?


Regards

Ingo Oeser

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] hostap: allow flashing firmware

2006-01-05 Thread Henrik Brix Andersen
On Wed, Jan 04, 2006 at 09:18:57PM -0800, Jouni Malinen wrote:
 I'm not completely against this change, but that scary comment is there
 on purpose and it is not fully obsolete. It is still possible to get
 HFA3841 cards into state which require hardware modifications to recover
 from (i.e., they are as good as dead for most users). Taken into this
 account, I would prefer that the help text for HOSTAP_FIRMWARE_NVRAM
 would include a warning about the potential issues of using incorrect
 firmware images. In most cases, RAM (volatile) download can be used to
 upgrade the firmware without having to modify the flash contents. This
 is also what the current Windows drivers are doing.

I would welcome such a warning as well - perhaps make
CONFIG_HOSTAP_FIRMWARE_NVRAM depend on CONFIG_EXPERIMENTAL as well?

Regards,
Brix
-- 
Henrik Brix Andersen [EMAIL PROTECTED]
Gentoo Metadistribution | Mobile computing herd


pgp0oH7xkQIko.pgp
Description: PGP signature


Re: [PATCH] hostap: allow flashing firmware

2006-01-05 Thread Stefan Rompf
Am Donnerstag 05 Januar 2006 12:27 schrieb Ingo Oeser:

 What about doing it in two steps (first RAM then FLASH)?
 [...]
 Is this possible or too simple to be true?

RAM firmware and flash firmware are different files, so if one works, it's no 
guarantee that the other will, too.

Stefan
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] fix ipvs compilation

2006-01-05 Thread Adrian Bunk
I don't know which change broke it, but I'm getting the following 
compile error in Linus' tree:

--  snip  --

...
  CC  net/ipv4/ipvs/ip_vs_sched.o
net/ipv4/ipvs/ip_vs_sched.c: In function 'ip_vs_sched_getbyname':
net/ipv4/ipvs/ip_vs_sched.c:110: warning: implicit declaration of function 
'local_bh_disable'
net/ipv4/ipvs/ip_vs_sched.c:124: warning: implicit declaration of function 
'local_bh_enable'
...
  CC  net/ipv4/ipvs/ip_vs_est.o
net/ipv4/ipvs/ip_vs_est.c: In function 'ip_vs_new_estimator':
net/ipv4/ipvs/ip_vs_est.c:147: warning: implicit declaration of function 
'local_bh_disable'
net/ipv4/ipvs/ip_vs_est.c:156: warning: implicit declaration of function 
'local_bh_enable'
...
  LD  .tmp_vmlinux1
net/built-in.o: In function 
`ip_vs_sched_getbyname':ip_vs_sched.c:(.text+0x99cfa): undefined reference to 
`local_bh_disable'
net/built-in.o: In function `register_ip_vs_scheduler': undefined reference to 
`local_bh_disable'
net/built-in.o: In function `unregister_ip_vs_scheduler': undefined reference 
to `local_bh_disable'
net/built-in.o: In function `ip_vs_new_estimator': undefined reference to 
`local_bh_disable'
net/built-in.o: In function `ip_vs_kill_estimator': undefined reference to 
`local_bh_disable'
net/built-in.o: more undefined references to `local_bh_disable' follow
make: *** [.tmp_vmlinux1] Error 1

--  snip  --


This patch fixes them by #include'ing linux/interrupt.h.


Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

--- linux-git/net/ipv4/ipvs/ip_vs_sched.c.old   2006-01-05 14:56:44.0 
+0100
+++ linux-git/net/ipv4/ipvs/ip_vs_sched.c   2006-01-05 14:56:59.0 
+0100
@@ -22,6 +22,7 @@
 #include linux/module.h
 #include linux/sched.h
 #include linux/spinlock.h
+#include linux/interrupt.h
 #include asm/string.h
 #include linux/kmod.h
 
--- linux-git/net/ipv4/ipvs/ip_vs_est.c.old 2006-01-05 14:57:15.0 
+0100
+++ linux-git/net/ipv4/ipvs/ip_vs_est.c 2006-01-05 14:57:27.0 +0100
@@ -18,6 +18,7 @@
 #include linux/jiffies.h
 #include linux/slab.h
 #include linux/types.h
+#include linux/interrupt.h
 
 #include net/ip_vs.h
 

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [2.6 patch] fix ipvs compilation

2006-01-05 Thread Arnaldo Carvalho de Melo
On 1/5/06, Adrian Bunk [EMAIL PROTECTED] wrote:
 I don't know which change broke it, but I'm getting the following
 compile error in Linus' tree:

 --  snip  --

 ...
   CC  net/ipv4/ipvs/ip_vs_sched.o
 net/ipv4/ipvs/ip_vs_sched.c: In function 'ip_vs_sched_getbyname':
 net/ipv4/ipvs/ip_vs_sched.c:110: warning: implicit declaration of function 
 'local_bh_disable'
 net/ipv4/ipvs/ip_vs_sched.c:124: warning: implicit declaration of function 
 'local_bh_enable'

Thanks Adrian, its related to some header sanitization work I did.

Acked-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED]

- Arnaldo
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [2.6 patch] fix ipvs compilation

2006-01-05 Thread Arnaldo Carvalho de Melo
On 1/5/06, Roberto Nibali [EMAIL PROTECTED] wrote:
 [trimmed recipients a bit]

   CC  net/ipv4/ipvs/ip_vs_sched.o
 net/ipv4/ipvs/ip_vs_sched.c: In function 'ip_vs_sched_getbyname':
 net/ipv4/ipvs/ip_vs_sched.c:110: warning: implicit declaration of function 
 'local_bh_disable'
 net/ipv4/ipvs/ip_vs_sched.c:124: warning: implicit declaration of function 
 'local_bh_enable'
 
 
  Thanks Adrian, its related to some header sanitization work I did.
 
  Acked-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED]

 Thanks for the heads-up and Adrian for the fix.

 Sidenote: At first I was a bit confused as to why this broke since my
 local copy of IPVS still works. But to be honest, I would like to clean
 up the IPVS headers in general. I believe we can cut short maybe half of
 the includes in the various ip_vs* modules.

Cool, if nobody beats me to it I'll eventually get to cleanup the
header usage in
ipvs, but its not something pressing, I just don't like the include
hell and from time
to time clean it up a bit when adding new abstractions :-)

- Arnaldo
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] gianfar: Use new PHY_ID_FMT macro

2006-01-05 Thread Kumar Gala
Make the driver produce the string used by phy_connect and have
board specific code pass the integer mii bus id and phy device id
for the specific controller instance.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]

---
commit 2b67fe22e3c88ad9941c9e9f7b668d0fe661be88
tree 9fb376123d3cf4bc335b98b0f902ab08acb86f37
parent 1a6720f78a7fb69451983e6b73723b57594ecac1
author Kumar Gala [EMAIL PROTECTED] Thu, 05 Jan 2006 09:46:17 -0600
committer Kumar Gala [EMAIL PROTECTED] Thu, 05 Jan 2006 09:46:17 -0600

 drivers/net/gianfar.c   |5 -
 include/linux/fsl_devices.h |3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 637b73a..0c18dbd 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -399,12 +399,15 @@ static int init_phy(struct net_device *d
priv-einfo-device_flags  FSL_GIANFAR_DEV_HAS_GIGABIT ?
SUPPORTED_1000baseT_Full : 0;
struct phy_device *phydev;
+   char phy_id[BUS_ID_SIZE];
 
priv-oldlink = 0;
priv-oldspeed = 0;
priv-oldduplex = -1;
 
-   phydev = phy_connect(dev, priv-einfo-bus_id, adjust_link, 0);
+   snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv-einfo-bus_id, 
priv-einfo-phy_id);
+
+   phydev = phy_connect(dev, phy_id, adjust_link, 0);
 
if (IS_ERR(phydev)) {
printk(KERN_ERR %s: Could not attach to PHY\n, dev-name);
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index a7a2b85..a9f1cfd 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -50,7 +50,8 @@ struct gianfar_platform_data {
 
/* board specific information */
u32 board_flags;
-   const char *bus_id;
+   u32 bus_id;
+   u32 phy_id;
u8 mac_addr[6];
 };
 



-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] phy: Added a macro to represent the string format used to match a phy device

2006-01-05 Thread Kumar Gala
Add the PHY_ID_FMT macro to ensure that the format of the id string used by
a driver to match to its specific phy is consistent between the mdio_bus
and the driver.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]

---
commit 470500bb2f548d79e8981e4b1d9841f3d01dd657
tree 45768e543ada5fae24eaa207d031ef5371fd6319
parent 8d8188e951e8433057d0591b0b7db02c1cd9a28e
author Kumar Gala [EMAIL PROTECTED] Thu, 05 Jan 2006 09:30:44 -0600
committer Kumar Gala [EMAIL PROTECTED] Thu, 05 Jan 2006 09:30:44 -0600

 drivers/net/phy/mdio_bus.c |2 +-
 drivers/net/phy/phy.c  |2 +-
 include/linux/phy.h|3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 02940c0..459443b 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -81,7 +81,7 @@ int mdiobus_register(struct mii_bus *bus
 
phydev-dev.parent = bus-dev;
phydev-dev.bus = mdio_bus_type;
-   sprintf(phydev-dev.bus_id, phy%d:%d, bus-id, i);
+   snprintf(phydev-dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, 
bus-id, i);
 
phydev-bus = bus;
 
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index b8686e4..1474b7c 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -42,7 +42,7 @@
  */
 void phy_print_status(struct phy_device *phydev)
 {
-   pr_info(%s: Link is %s, phydev-dev.bus_id,
+   pr_info(PHY: %s - Link is %s, phydev-dev.bus_id,
phydev-link ? Up : Down);
if (phydev-link)
printk( - %d/%s, phydev-speed,
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 92a9696..331521a 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -53,6 +53,9 @@
 
 #define PHY_MAX_ADDR 32
 
+/* Used when trying to connect to a specific phy (mii bus id:phy device id) */
+#define PHY_ID_FMT %x:%02x
+
 /* The Bus class for PHYs.  Devices which provide access to
  * PHYs should register using this structure */
 struct mii_bus {

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] gianfar mii: Use proper resource for MII memory region

2006-01-05 Thread Kumar Gala
We can now have the gianfar mii platform device have a proper
resource for the IO memory region for its registers.  Previously
we passed this information that the platform_data structure because
we couldn't handle overlapping memory regions for platform devices.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]

---
commit 7b5d230825fc228414dce7dc2bfdace4ecea4613
tree f822e58596f00a8e18e01e959630a59d95552d4e
parent 470500bb2f548d79e8981e4b1d9841f3d01dd657
author Kumar Gala [EMAIL PROTECTED] Thu, 05 Jan 2006 09:33:44 -0600
committer Kumar Gala [EMAIL PROTECTED] Thu, 05 Jan 2006 09:33:44 -0600

 drivers/net/gianfar_mii.c   |5 -
 include/linux/fsl_devices.h |3 ---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index 04a462c..74e52fc 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -128,6 +128,7 @@ int gfar_mdio_probe(struct device *dev)
struct gianfar_mdio_data *pdata;
struct gfar_mii *regs;
struct mii_bus *new_bus;
+   struct resource *r;
int err = 0;
 
if (NULL == dev)
@@ -151,8 +152,10 @@ int gfar_mdio_probe(struct device *dev)
return -ENODEV;
}
 
+   r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
/* Set the PHY base address */
-   regs = (struct gfar_mii *) ioremap(pdata-paddr, 
+   regs = (struct gfar_mii *) ioremap(r-start,
sizeof (struct gfar_mii));
 
if (NULL == regs) {
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 934aa9b..a7a2b85 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -55,9 +55,6 @@ struct gianfar_platform_data {
 };
 
 struct gianfar_mdio_data {
-   /* device specific information */
-   u32 paddr;
-
/* board specific information */
int irq[32];
 };

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC: 2.6 patch] remove drivers/net/eepro100.c

2006-01-05 Thread Jeff Garzik

Adrian Bunk wrote:

This patch removes the obsolete drivers/net/eepro100.c driver.

Is there any known problem in e100 still preventing us from removing 
this driver (it seems noone was able anymore to verify the ARM problem)?


Still waiting to see if e100 in -mm works on ARM.

Jeff



-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC: 2.6 patch] remove drivers/net/eepro100.c

2006-01-05 Thread Lennert Buytenhek
On Thu, Jan 05, 2006 at 01:57:07PM -0500, Jeff Garzik wrote:

 This patch removes the obsolete drivers/net/eepro100.c driver.
 
 Is there any known problem in e100 still preventing us from removing 
 this driver (it seems noone was able anymore to verify the ARM problem)?
 
 Still waiting to see if e100 in -mm works on ARM.

e100 seems to work okay on the (modern) ARM CPUs I've tried.  The case
where e100 failed but eepro100 worked was (I think) on older ARM hardware,
and I'm not sure whether that kind of hardware is used anymore..


cheers,
Lennert
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] drivers/net/s2io.c: make code static

2006-01-05 Thread Adrian Bunk
This patch makes some needlessly global code static.


Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/net/s2io.c |   22 +++---
 drivers/net/s2io.h |   17 +++--
 2 files changed, 18 insertions(+), 21 deletions(-)

--- linux-2.6.15-mm1-full/drivers/net/s2io.h.old2006-01-05 
20:46:34.0 +0100
+++ linux-2.6.15-mm1-full/drivers/net/s2io.h2006-01-05 21:10:33.0 
+0100
@@ -64,7 +64,7 @@
 #defineINTR_DBG4
 
 /* Global variable that defines the present debug level of the driver. */
-int debug_level = ERR_DBG; /* Default level. */
+static int debug_level = ERR_DBG;
 
 /* DEBUG message print. */
 #define DBG_PRINT(dbg_level, args...)  if(!(debug_leveldbg_level)) 
printk(args)
@@ -268,7 +268,7 @@
 #define MAX_RX_RINGS 8
 
 /* FIFO mappings for all possible number of fifos configured */
-int fifo_map[][MAX_TX_FIFOS] = {
+static int fifo_map[][MAX_TX_FIFOS] = {
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1},
{0, 0, 0, 1, 1, 1, 2, 2},
@@ -911,18 +911,16 @@
 static void alarm_intr_handler(struct s2io_nic *sp);
 
 static int s2io_starter(void);
-void s2io_closer(void);
 static void s2io_tx_watchdog(struct net_device *dev);
 static void s2io_tasklet(unsigned long dev_addr);
 static void s2io_set_multicast(struct net_device *dev);
 static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp);
-void s2io_link(nic_t * sp, int link);
-void s2io_reset(nic_t * sp);
+static void s2io_link(nic_t * sp, int link);
 #if defined(CONFIG_S2IO_NAPI)
 static int s2io_poll(struct net_device *dev, int *budget);
 #endif
 static void s2io_init_pci(nic_t * sp);
-int s2io_set_mac_addr(struct net_device *dev, u8 * addr);
+static int s2io_set_mac_addr(struct net_device *dev, u8 * addr);
 static void s2io_alarm_handle(unsigned long data);
 static int s2io_enable_msi(nic_t *nic);
 static irqreturn_t s2io_msi_handle(int irq, void *dev_id, struct pt_regs 
*regs);
@@ -930,14 +928,13 @@
 s2io_msix_ring_handle(int irq, void *dev_id, struct pt_regs *regs);
 static irqreturn_t
 s2io_msix_fifo_handle(int irq, void *dev_id, struct pt_regs *regs);
-int s2io_enable_msi_x(nic_t *nic);
 static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs);
 static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag);
 static struct ethtool_ops netdev_ethtool_ops;
 static void s2io_set_link(unsigned long data);
-int s2io_set_swapper(nic_t * sp);
+static int s2io_set_swapper(nic_t * sp);
 static void s2io_card_down(nic_t *nic);
 static int s2io_card_up(nic_t *nic);
-int get_xena_rev_id(struct pci_dev *pdev);
-void restore_xmsi_data(nic_t *nic);
+static int get_xena_rev_id(struct pci_dev *pdev);
+static void restore_xmsi_data(nic_t *nic);
 #endif /* _S2IO_H */
--- linux-2.6.15-mm1-full/drivers/net/s2io.c.old2006-01-05 
20:45:51.0 +0100
+++ linux-2.6.15-mm1-full/drivers/net/s2io.c2006-01-05 20:54:26.0 
+0100
@@ -72,8 +72,8 @@
 static char s2io_driver_name[] = Neterion;
 static char s2io_driver_version[] = DRV_VERSION;
 
-int rxd_size[4] = {32,48,48,64};
-int rxd_count[4] = {127,85,85,63};
+static int rxd_size[4] = {32,48,48,64};
+static int rxd_count[4] = {127,85,85,63};
 
 static inline int RXD_IS_UP2DT(RxD_t *rxdp)
 {
@@ -2127,7 +2127,7 @@
}
 }
 
-int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
+static int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
 {
struct net_device *dev = nic-dev;
struct sk_buff *frag_list;
@@ -2852,7 +2852,7 @@
  *  void.
  */
 
-void s2io_reset(nic_t * sp)
+static void s2io_reset(nic_t * sp)
 {
XENA_dev_config_t __iomem *bar0 = sp-bar0;
u64 val64;
@@ -2940,7 +2940,7 @@
  *  SUCCESS on success and FAILURE on failure.
  */
 
-int s2io_set_swapper(nic_t * sp)
+static int s2io_set_swapper(nic_t * sp)
 {
struct net_device *dev = sp-dev;
XENA_dev_config_t __iomem *bar0 = sp-bar0;
@@ -3089,7 +3089,7 @@
return ret;
 }
 
-void restore_xmsi_data(nic_t *nic)
+static void restore_xmsi_data(nic_t *nic)
 {
XENA_dev_config_t __iomem *bar0 = nic-bar0;
u64 val64;
@@ -3180,7 +3180,7 @@
return 0;
 }
 
-int s2io_enable_msi_x(nic_t *nic)
+static int s2io_enable_msi_x(nic_t *nic)
 {
XENA_dev_config_t __iomem *bar0 = nic-bar0;
u64 tx_mat, rx_mat;
@@ -4128,7 +4128,7 @@
  *  as defined in errno.h file on failure.
  */
 
-int s2io_set_mac_addr(struct net_device *dev, u8 * addr)
+static int s2io_set_mac_addr(struct net_device *dev, u8 * addr)
 {
nic_t *sp = dev-priv;
XENA_dev_config_t __iomem *bar0 = sp-bar0;
@@ -5713,7 +5713,7 @@
  *  void.
  */
 
-void s2io_link(nic_t * sp, int link)
+static void s2io_link(nic_t * sp, int link)
 {
struct net_device *dev = (struct net_device *) sp-dev;
 
@@ -5738,7 +5738,7 @@
  *  returns the revision ID of the device.
  */
 
-int get_xena_rev_id(struct pci_dev *pdev)
+static int 

[RFC: 2.6 patch] drivers/net/wireless/hostap/hostap_main.c shouldn't #include C files

2006-01-05 Thread Adrian Bunk
This patch contains an attempt to properly build hostap.o without
#incude'ing C files.


Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

Now that hostap_main.c renaming is in Linus' tree, this patch applies 
against Linus' tree.

 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 |8 ++
 drivers/net/wireless/hostap/hostap_wlan.h |4 +
 include/net/ieee80211_crypt.h |1 
 14 files changed, 120 insertions(+), 78 deletions(-)


--- linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/Makefile.old   
2005-12-03 00:40:33.0 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/Makefile   2005-12-03 
00:49:47.0 +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.0 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap.h   2005-12-03 
02:37:21.0 +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.0 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_common.h
2005-12-03 01:21:13.0 +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.0 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_wlan.h  
2005-12-03 01:26:43.0 +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.0 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/hostap/hostap_ap.h
2005-12-03 01:29:01.0 +0100
@@ -1,6 +1,8 @@
 #ifndef HOSTAP_AP_H
 #define HOSTAP_AP_H
 
+#include hostap_80211.h
+
 /* AP data structures for STAs */
 
 /* 

[PATCH 1/3] sky2: ensure receive buffer alignment

2006-01-05 Thread Stephen Hemminger
Index: netdev-2.6/drivers/net/sky2.c
===
--- netdev-2.6.orig/drivers/net/sky2.c
+++ netdev-2.6/drivers/net/sky2.c
@@ -75,6 +75,7 @@
 #define RX_LE_BYTES(RX_LE_SIZE*sizeof(struct sky2_rx_le))
 #define RX_MAX_PENDING (RX_LE_SIZE/2 - 2)
 #define RX_DEF_PENDING RX_MAX_PENDING
+#define RX_SKB_ALIGN   8
 
 #define TX_RING_SIZE   512
 #define TX_DEF_PENDING (TX_RING_SIZE - 1)
@@ -905,15 +906,30 @@ static void sky2_vlan_rx_kill_vid(struct
 #endif
 
 /*
+ * It appears the hardware has a bug in the FIFO logic that
+ * cause it to hang if the FIFO gets overrun and the receive buffer
+ * is not aligned. alloc_skb() doesn't align if slab
+ * debugging is enabled.
+ */
+static inline struct sk_buff *sky2_alloc_skb(unsigned int size, gfp_t gfp_mask)
+{
+   struct sk_buff *skb;
+
+   skb = alloc_skb(size + RX_SKB_ALIGN, gfp_mask);
+   if (likely(skb)) {
+   unsigned long p = (unsigned long) skb-data;
+   skb_reserve(skb,
+   ((p + RX_SKB_ALIGN - 1)  ~(RX_SKB_ALIGN - 1)) - p);
+   }
+
+   return skb;
+}
+
+/*
  * Allocate and setup receiver buffer pool.
  * In case of 64 bit dma, there are 2X as many list elements
  * available as ring entries
  * and need to reserve one list element so we don't wrap around.
- *
- * It appears the hardware has a bug in the FIFO logic that
- * cause it to hang if the FIFO gets overrun and the receive buffer
- * is not aligned.  This means we can't use skb_reserve to align
- * the IP header.
  */
 static int sky2_rx_start(struct sky2_port *sky2)
 {
@@ -929,7 +945,7 @@ static int sky2_rx_start(struct sky2_por
for (i = 0; i  sky2-rx_pending; i++) {
struct ring_info *re = sky2-rx_ring + i;
 
-   re-skb = dev_alloc_skb(sky2-rx_bufsize);
+   re-skb = sky2_alloc_skb(sky2-rx_bufsize, GFP_KERNEL);
if (!re-skb)
goto nomem;
 
@@ -1713,7 +1729,7 @@ static struct sk_buff *sky2_receive(stru
} else {
struct sk_buff *nskb;
 
-   nskb = dev_alloc_skb(sky2-rx_bufsize);
+   nskb = sky2_alloc_skb(sky2-rx_bufsize, GFP_ATOMIC);
if (!nskb)
goto resubmit;
 

--

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] sky2: version 0.12

2006-01-05 Thread Stephen Hemminger
Index: netdev-2.6/drivers/net/sky2.c
===
--- netdev-2.6.orig/drivers/net/sky2.c
+++ netdev-2.6/drivers/net/sky2.c
@@ -57,7 +57,7 @@
 #include sky2.h
 
 #define DRV_NAME   sky2
-#define DRV_VERSION0.11
+#define DRV_VERSION0.12
 #define PFXDRV_NAME  
 
 /*

--

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] sky2: need to set_consistent_dma_mask

2006-01-05 Thread Stephen Hemminger
Index: netdev-2.6/drivers/net/sky2.c
===
--- netdev-2.6.orig/drivers/net/sky2.c
+++ netdev-2.6/drivers/net/sky2.c
@@ -3054,13 +3054,17 @@ static int __devinit sky2_probe(struct p
goto err_out_free_regions;
}
 
-   if (sizeof(dma_addr_t)  sizeof(u32)) {
-   err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
-   if (!err)
-   using_dac = 1;
-   }
+   if (sizeof(dma_addr_t)  sizeof(u32) 
+   !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
+   using_dac = 1;
+   err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+   if (err  0) {
+   printk(KERN_ERR PFX %s unable to obtain 64 bit DMA 
+  for consistent allocations\n, pci_name(pdev));
+   goto err_out_free_regions;
+   }
 
-   if (!using_dac) {
+   } else {
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
if (err) {
printk(KERN_ERR PFX %s no usable DMA configuration\n,
@@ -3068,6 +3072,7 @@ static int __devinit sky2_probe(struct p
goto err_out_free_regions;
}
}
+
 #ifdef __BIG_ENDIAN
/* byte swap descriptors in hardware */
{

--

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] sky2: call pci_set_consistent_dma_mask

2006-01-05 Thread Stephen Hemminger
Need to call pci_set_consistent_dma_mask in the case of 64 bit
DMA.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]


--- netdev-2.6.orig/drivers/net/sky2.c
+++ netdev-2.6/drivers/net/sky2.c
@@ -3054,13 +3054,17 @@ static int __devinit sky2_probe(struct p
goto err_out_free_regions;
}
 
-   if (sizeof(dma_addr_t)  sizeof(u32)) {
-   err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
-   if (!err)
-   using_dac = 1;
-   }
+   if (sizeof(dma_addr_t)  sizeof(u32) 
+   !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
+   using_dac = 1;
+   err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+   if (err  0) {
+   printk(KERN_ERR PFX %s unable to obtain 64 bit DMA 
+  for consistent allocations\n, pci_name(pdev));
+   goto err_out_free_regions;
+   }
 
-   if (!using_dac) {
+   } else {
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
if (err) {
printk(KERN_ERR PFX %s no usable DMA configuration\n,
@@ -3068,6 +3072,7 @@ static int __devinit sky2_probe(struct p
goto err_out_free_regions;
}
}
+
 #ifdef __BIG_ENDIAN
/* byte swap descriptors in hardware */
{

--

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] sky2: version 0.12

2006-01-05 Thread Stephen Hemminger
Version update.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]

--- netdev-2.6.orig/drivers/net/sky2.c
+++ netdev-2.6/drivers/net/sky2.c
@@ -57,7 +57,7 @@
 #include sky2.h
 
 #define DRV_NAME   sky2
-#define DRV_VERSION0.11
+#define DRV_VERSION0.12
 #define PFXDRV_NAME  
 
 /*

--

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/3] sky2: 0.12 fixes

2006-01-05 Thread Stephen Hemminger
Update to sky2 to fix (ignore previous post)
* DMA alignment when CONFIG_DEBUG_SLAB
* pci_set_consistent_dma_mask
--

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Change sk_run_filter()'s return type in net/core/filter.c

2006-01-05 Thread Kris Katterjohn
This changes sk_run_filter()'s return type from int to unsigned.

Signed-off-by: Kris Katterjohn [EMAIL PROTECTED]

Zero all ready gets returned if an error occurs, and net/packet/af_packet.c
treats the return type as unsigned anyway. For some reason, under the BPF RET
statements, fentry-k and A were cast to unsigned when A is all ready unsigned
and they'd both be converted back to int! I dropped the cast on both; fentry-k
get converted anyway.

No other files need to be changed because no return values are really changed.

Thanks!

--- x/net/core/filter.c 2006-01-05 12:27:17.0 -0600
+++ y/net/core/filter.c 2006-01-05 17:02:32.0 -0600
@@ -75,7 +75,7 @@ static inline void *load_pointer(struct 
  * len is the number of filter blocks in the array.
  */
  
-int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
+unsigned sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int 
flen)
 {
struct sock_filter *fentry; /* We walk down these */
void *ptr;
@@ -241,9 +241,9 @@ load_b:
A = X;
continue;
case BPF_RET|BPF_K:
-   return ((unsigned int)fentry-k);
+   return fentry-k;
case BPF_RET|BPF_A:
-   return ((unsigned int)A);
+   return A;
case BPF_ST:
mem[fentry-k] = A;
continue;

--- x/include/linux/filter.h2006-01-02 21:21:10.0 -0600
+++ y/include/linux/filter.h2006-01-05 17:02:58.0 -0600
@@ -143,7 +143,7 @@ static inline unsigned int sk_filter_len
 struct sk_buff;
 struct sock;
 
-extern int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int 
flen);
+extern unsigned sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, 
int flen);
 extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
 extern int sk_chk_filter(struct sock_filter *filter, int flen);
 #endif /* __KERNEL__ */


-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] skge: fix dma mask setup.

2006-01-05 Thread Stephen Hemminger
There are a couple of problems in the DMA setup code for skge.
* In the 64 bit case, it doesn't set the consistent mask.
* In the 32 bit case, the error check is backwards!
It likely will only be visible as a bug on 64 bit platforms.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]


--- skge-2.6.orig/drivers/net/skge.c
+++ skge-2.6/drivers/net/skge.c
@@ -3243,12 +3243,22 @@ static int __devinit skge_probe(struct p
 
pci_set_master(pdev);
 
-   if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)))
+   if (sizeof(dma_addr_t)  sizeof(u32) 
+   !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
using_dac = 1;
-   else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {
-   printk(KERN_ERR PFX %s no usable DMA configuration\n,
-  pci_name(pdev));
-   goto err_out_free_regions;
+   err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+   if (err  0) {
+   printk(KERN_ERR PFX %s unable to obtain 64 bit DMA 
+  for consistent allocations\n, pci_name(pdev));
+   goto err_out_free_regions;
+   }
+   } else {
+   err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+   if (err) {
+   printk(KERN_ERR PFX %s no usable DMA configuration\n,
+  pci_name(pdev));
+   goto err_out_free_regions;
+   }
}
 
 #ifdef __BIG_ENDIAN
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Change sk_run_filter()'s return type in net/core/filter.c

2006-01-05 Thread David S. Miller
From: Kris Katterjohn [EMAIL PROTECTED]
Date: Thu, 5 Jan 2006 15:25:13 -0800

 Zero all ready gets returned if an error occurs, and net/packet/af_packet.c
 treats the return type as unsigned anyway. For some reason, under the BPF RET
 statements, fentry-k and A were cast to unsigned when A is all ready unsigned
 and they'd both be converted back to int! I dropped the cast on both; 
 fentry-k
 get converted anyway.
 
 No other files need to be changed because no return values are really changed.

sk_filter() thinks the return value is an int, and applies that
signed value to skb_trim(), yikes!

Can you fix that up too and respin your patch?

Thanks.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: IPv6 priority in TC filter

2006-01-05 Thread David S. Miller
From: Devanshu Mehta [EMAIL PROTECTED]
Date: Tue, 03 Jan 2006 13:58:09 -0500

 From f_u32.c:
 
if (strcmp(*argv, priority) == 0) {
NEXT_ARG();
res = parse_u8(argc, argv, sel, 0, 0);
goto done;
}
 ...
 I believe, the code above should actually read:
 
if (strcmp(*argv, priority) == 0) {
NEXT_ARG();
res = parse_u8(argc, argv, sel, 4, 0);
goto done;
}
 
 though I may be mistaken as to the actual syntax of parse_u8().

That looks about right to me.  Did you do testing with this
fix made?

Jamal/Thomas/Stephen?
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [2.6 patch] fix ipvs compilation

2006-01-05 Thread Horms
On Thu, Jan 05, 2006 at 05:08:23PM +0100, Roberto Nibali wrote:
 Sidenote: At first I was a bit confused as to why this broke since my
 local copy of IPVS still works. But to be honest, I would like to clean
 up the IPVS headers in general. I believe we can cut short maybe half of
 the includes in the various ip_vs* modules.
  
 Cool, if nobody beats me to it I'll eventually get to cleanup the
 header usage in
 ipvs, but its not something pressing, I just don't like the include
 hell and from time
 to time clean it up a bit when adding new abstractions :-)
 
 Go for it, some of the headers are remnants of the 2.4 kernel and said 
 new abstractions. I will try to move some functionality into ip_vs.h, 
 which should be the only place with a large number of includes anyway.
 
 Of course Horms has to ack all of this, but I don't think he'll object, 
 so long as everything still compiles and works like before. BTW, Adrian, 
 if you have some time and lust and haven't gone through the ../ipvs/ 
 directory yet, your excellent cleanups are also very much appreciated :).

Indeed, I have no objections to cleanups in ipvs/

-- 
Horms
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: IPv6 priority in TC filter

2006-01-05 Thread jamal
On Thu, 2006-05-01 at 16:39 -0800, David S. Miller wrote:
 From: Devanshu Mehta [EMAIL PROTECTED]
 Date: Tue, 03 Jan 2006 13:58:09 -0500
 
  From f_u32.c:
  
 if (strcmp(*argv, priority) == 0) {
 NEXT_ARG();
 res = parse_u8(argc, argv, sel, 0, 0);
 goto done;
 }
  ...
  I believe, the code above should actually read:
  
 if (strcmp(*argv, priority) == 0) {
 NEXT_ARG();
 res = parse_u8(argc, argv, sel, 4, 0);
 goto done;
 }
  
  though I may be mistaken as to the actual syntax of parse_u8().
 
 That looks about right to me.  Did you do testing with this
 fix made?
 
 Jamal/Thomas/Stephen?
 

It is correct. 

However, to be even more correct priority is the wrong term to use -
perhaps class would be a better description if insistance on keeping
it as 8 bits? But even that is inaccurate - per RFC 2474 section 3 there
is no longer a field called traffic class, rather 6 bits DSCP field and
2 bits tagged as unused which have since been allocated for ECN.

So a nicer patch would perhaps change the suggested patch to be class
then introduce some new english wrapper to u32 so one can specify
the dscp directly without having to compute hex masks i.e along the
lines of:
tc filter add dev eth2.1070 parent 10: protocol ipv6 prio 1 u32 match 
ip6 dscp 64 flowid 10:1

cheers,
jamal

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


State of the Union: Wireless

2006-01-05 Thread Jeff Garzik


State of the Union - Wireless
  January 5, 2006


Another banner year has passed, with Linux once again proving
its superiority in the area of crappy wireless (WiFi) support.
Linux oldsters love the current state of wireless, because it hearkens
back to the heady days of Yuri Gagarin, Sputnik and Linux kernel 0.99,
when getting hardware to work under Linux required either engineering
knowledge or luck (or both).

Linux has made remarkable progress in the area of hardware support,
in the past five years, reaching a state where it is unusual for
mainstream hardware to -not- be supported by Linux as soon as it
is released.  Unfortunately, this does not extend to wireless.

Wireless drivers today are scattered to the four winds:  many
are in-tree, but for older hardware, and lack active maintainers.
They work.  A few drivers exist for relatively modern WiFi hardware
in-tree; they work, but they don't have active maintainers either.
Current hardware, many of it softmac, is driven by a wild variety of
drivers, for a wide variety of wireless stacks, none of them in-tree.
Or, the in-tree drivers are simply out of date versions of actively
maintained out-of-tree drivers.  In one or two cases, users have turned
to awful emulation solutions like NdisWrapper.  But can you blame them?
They just want their hardware to work.

Twelve months ago, the community consensus was that the best basis for
a wireless stack was HostAP, or as it turned out, a HostAP derivative
whose sole users are the Intel ipw drivers.  So that got merged.
Now, twelve months later, fashion has changed, ieee80211 lost a lot of
momentum, and it seems that the DeviceScape wireless stack is all the
rage, and there are convincing arguments for merging the DeviceScape
code floating about.

But you -- I'm talking to all you wireless kernel hackers -- need to
come up with some solutions for some key issues:

* We really have no wireless maintainer.  I'm just the defacto guy,
  with no interest in the job.  The ideal maintainer knows 802.11 well,
  uses git, and isn't an asshole with no taste.  I'm just the guy who
  wants to make sure the net driver portion doesn't turn out to be a
  stinker (read: review and pass up the chain).

* Once you pick your favorite stack, STICK WITH IT.  In Linux, there
  is collectively very little patience with a rewrite every 12 months,
  particularly one that is dropped in out of the blue rather then
  evolved out of existing code.

In Linux, today's wireless code will probably live at least 10 years,
if not more.  Long term maintainability is paramount.  This is
why we prefer to evolve code, rather than constantly rewrite it.
Rewrites are often improvements, but bring in their own wave of
bugs and incompatibilities, while eliminating years of carefully
culminated knowledge buried in the existing code.  As a solution,
pragmatic users wind up running both the pre-rewrite code and the
new code -- duplicate code.  Code duplication in turn brings in its
own wave of bugs, and assaults on open source's economies of scale.

* Wireless drivers and the wireless stack need to be maintained IN-TREE
  as a COLLECTIVE ENTITY, not piecemeal maintenance as its done now.

The whole point of working in-tree, the whole point of this open source
thing is that everybody works on the same code, and the entire Internet
is your test bed.  Quality improves the more people work together.
The entire Linux kernel engineering process is focused on getting core
kernel code out to distributions (then to end users) and power users.
Out-of-tree code breaks that model, breaking the It Just Works(tm)
theme applicable to other Linux-supported hardware.

* Release early, release often.  Pushing from an external repository to
  the official kernel tree every few months creates more problems
  than it solves.  Out-of-tree drivers fail to take advantage of
  recent kernel changes and coding practices, which leads to bugs and
  incompatibilities.  Slow pushing leads to huge periodic updates,
  which are awful for debugging, testing, and general use.

* Wireless management, in particular the wireless kernel-user
  interface, needs some thinking.  Wireless Extensions (WE) isn't
  cutting it, but I haven't seen any netlink work yet (or some
  other interface).  Whatever the userspace interface is, it will be
  basically carved in stone for years (unlike kernel APIs), so this
  needs a lot more thought than people have been giving it.

* ALL wireless stacks need work.  It is currently fashionable to laud
  DeviceScape and trash in-kernel ieee80211, but outside of the
  cheerleading, BOTH have real technical issues that need addressing.
  IOW, no matter what code is chosen, _somebody_ is on the hook for
  a fair amount of work.  A switch is not without its costs.

* I would prefer that people patch the in-tree ieee80211 code,
  probably in the direction of Jiri Benc's proposed ieee80211_device
  direction.  I take patches from all 

Re: [2.6 patch] fix ipvs compilation

2006-01-05 Thread Joe
On 1/5/06, Adrian Bunk [EMAIL PROTECTED] wrote:
 I don't know which change broke it, but I'm getting the following
 compile error in Linus' tree:

 --  snip  --

 ...
   CC  net/ipv4/ipvs/ip_vs_sched.o
 net/ipv4/ipvs/ip_vs_sched.c: In function 'ip_vs_sched_getbyname':
 net/ipv4/ipvs/ip_vs_sched.c:110: warning: implicit declaration of function 
 'local_bh_disable'
 net/ipv4/ipvs/ip_vs_sched.c:124: warning: implicit declaration of function 
 'local_bh_enable'
 ...
   CC  net/ipv4/ipvs/ip_vs_est.o
 net/ipv4/ipvs/ip_vs_est.c: In function 'ip_vs_new_estimator':
 net/ipv4/ipvs/ip_vs_est.c:147: warning: implicit declaration of function 
 'local_bh_disable'
 net/ipv4/ipvs/ip_vs_est.c:156: warning: implicit declaration of function 
 'local_bh_enable'
 ...
   LD  .tmp_vmlinux1
 net/built-in.o: In function 
 `ip_vs_sched_getbyname':ip_vs_sched.c:(.text+0x99cfa): undefined reference to 
 `local_bh_disable'
 net/built-in.o: In function `register_ip_vs_scheduler': undefined reference 
 to `local_bh_disable'
 net/built-in.o: In function `unregister_ip_vs_scheduler': undefined reference 
 to `local_bh_disable'
 net/built-in.o: In function `ip_vs_new_estimator': undefined reference to 
 `local_bh_disable'
 net/built-in.o: In function `ip_vs_kill_estimator': undefined reference to 
 `local_bh_disable'
 net/built-in.o: more undefined references to `local_bh_disable' follow
 make: *** [.tmp_vmlinux1] Error 1

 --  snip  --


 This patch fixes them by #include'ing linux/interrupt.h.


 Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

 --- linux-git/net/ipv4/ipvs/ip_vs_sched.c.old   2006-01-05 14:56:44.0 
 +0100
 +++ linux-git/net/ipv4/ipvs/ip_vs_sched.c   2006-01-05 14:56:59.0 
 +0100
 @@ -22,6 +22,7 @@
  #include linux/module.h
  #include linux/sched.h
  #include linux/spinlock.h
 +#include linux/interrupt.h
  #include asm/string.h
  #include linux/kmod.h

 --- linux-git/net/ipv4/ipvs/ip_vs_est.c.old 2006-01-05 14:57:15.0 
 +0100
 +++ linux-git/net/ipv4/ipvs/ip_vs_est.c 2006-01-05 14:57:27.0 +0100
 @@ -18,6 +18,7 @@
  #include linux/jiffies.h
  #include linux/slab.h
  #include linux/types.h
 +#include linux/interrupt.h

  #include net/ip_vs.h



Thats not all either,  ./net/ipv4/netfilter/ipt_helper.c has the same
error and the same fix.

Here's the patch for this one.  Sorry for the dupe.. i sent the last
as html by accident.

--- linux/net/ipv4/netfilter/ipt_helper.c.old2006-01-05
19:38:32.498991515 -0500
+++ linux/net/ipv4/netfilter/ipt_helper.c2006-01-05 19:40:30.047057859 -0500
@@ -13,6 +13,7 @@
 #include linux/module.h
 #include linux/skbuff.h
 #include linux/netfilter.h
+#include linux/interrupt.h
 #if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE)
 #include linux/netfilter_ipv4/ip_conntrack.h
 #include linux/netfilter_ipv4/ip_conntrack_core.h
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Change sk_run_filter()'s return type in net/core/filter.c

2006-01-05 Thread Kris Katterjohn
 Whoops! Here you go:

Whoops again. Screwed that last patch up. I gotta stop doing this stuff when I'm
tired and I need to check myself :)

Sorry. Again.

--- x/net/core/filter.c 2006-01-05 12:27:17.0 -0600
+++ y/net/core/filter.c 2006-01-05 17:02:32.0 -0600
@@ -75,7 +75,7 @@ static inline void *load_pointer(struct 
  * len is the number of filter blocks in the array.
  */
  
-int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
+unsigned sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int 
flen)
 {
struct sock_filter *fentry; /* We walk down these */
void *ptr;
@@ -241,9 +241,9 @@ load_b:
A = X;
continue;
case BPF_RET|BPF_K:
-   return ((unsigned int)fentry-k);
+   return fentry-k;
case BPF_RET|BPF_A:
-   return ((unsigned int)A);
+   return A;
case BPF_ST:
mem[fentry-k] = A;
continue;

--- x/include/linux/filter.h2006-01-02 21:21:10.0 -0600
+++ y/include/linux/filter.h2006-01-05 17:02:58.0 -0600
@@ -143,7 +143,7 @@ static inline unsigned int sk_filter_len
 struct sk_buff;
 struct sock;
 
-extern int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int 
flen);
+extern unsigned sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, 
int flen);
 extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
 extern int sk_chk_filter(struct sock_filter *filter, int flen);
 #endif /* __KERNEL__ */

--- x/include/net/sock.h2006-01-05 23:06:00.0 -0600
+++ y/include/net/sock.h2006-01-05 23:06:06.0 -0600
@@ -856,8 +856,8 @@ static inline int sk_filter(struct sock 

filter = sk-sk_filter;
if (filter) {
-   int pkt_len = sk_run_filter(skb, filter-insns,
-   filter-len);
+   unsigned pkt_len = sk_run_filter(skb, filter-insns,
+filter-len);
if (!pkt_len)
err = -EPERM;
else


-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html