iwi stability when doing large file transfers/backups
damien.bergamini at free.fr
damien.bergamini at free.fr
Thu Mar 2 06:03:24 PST 2006
The one who wrote that diff, whoever he is, obviously don't
understand C code.
Otherwise, why would he write such nonsense:
static uint32_t
iwi_toggle_event(uint32_t r)
{
r &= ~IWI_RST_STANDBY;
if (r & IWI_RST_GATE_ODMA)
r &= ~IWI_RST_GATE_ODMA;
if (r & IWI_RST_GATE_IDMA)
r &= ~IWI_RST_GATE_IDMA;
if (r & IWI_RST_GATE_ADMA)
r &= ~IWI_RST_GATE_ADMA;
return r;
}
when you could just write:
r &= ~(IWI_RST_STANDBY | IWI_RST_GATE_ODMA |
IWI_RST_GATE_IDMA | IWI_RST_GATE_ADMA);
but he sure knows how to steel code from others and
violate the GPL by the way:
>From Linux ipw2200-1.1.0 (GPL):
static u32 ipw_register_toggle(u32 reg)
{
reg &= ~IPW_START_STANDBY;
if (reg & IPW_GATE_ODMA)
reg &= ~IPW_GATE_ODMA;
if (reg & IPW_GATE_IDMA)
reg &= ~IPW_GATE_IDMA;
if (reg & IPW_GATE_ADMA)
reg &= ~IPW_GATE_ADMA;
return reg;
}
...mmm very similar right?
Damien
More information about the freebsd-net
mailing list