Re: [build error] drivers/char/pcmcia/ipwireless/hardware.c:571:error: invalid use of undefined type 'struct ipw_network'

From: Ingo Molnar
Date: Mon Jul 28 2008 - 18:07:00 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> drivers/char/pcmcia/ipwireless/hardware.c:571: error: invalid use of
> undefined type 'struct ipw_network'
>
> http://redhat.com/~mingo/misc/config-Mon_Jul_28_23_36_20_CEST_2008.bad
>
> probably due to a string of commits to that file from today.

hm, has this version of the driver ever been built successfully? Because
struct ipw_network is defined in network.c [only], and then used in
hardware.c.

It could be changed to void * if the structure wasnt relied on by:

const int min_capacity =
ipwireless_ppp_mru(hw->network + 2);

so changing it to void * would break this part of the code.

furthermore, what does that "hw->network + 2" mean? It points into
la-la-land AFAICS, because it's initialized as:

struct ipw_network *network =
kzalloc(sizeof(struct ipw_network), GFP_ATOMIC);

and then written into hw->network via:

ipwireless_associate_network(hw, network);

it's getting late here, so i might be missing some really obvious
solution (and Jiri is asleep i suspect), so below is a temporary patch
that marks the driver CONFIG_BROKEN until this is resolved. This gets
allyesconfig going on x86.

Ingo

--------------->