lbs_mac_event_disconnected() was called once and then never again
upon a hardware MAC event.
The reason was that the driver didn't clean the correct bit in the interrupt
cause register of the chip.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
I'm not sure why it was doing this, and I'm not sure I _want_ to know
why. But calling it NETIF_F_DYNALLOC doesn't change the fact that the
kernel believes it to be NETIF_F_IPV6_CSUM, and that IPv6 communication
is hence buggered.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Properly account for queue commands, this fixes a problem reported
by Holger Schurig when using the debugfs interface.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Incoming packets have to be aligned or the IP stack becomes upset.
Make sure to shift them two bytes to achieve this.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fixes for slow hardware.
Signed-off-by: Vitaly V. Bursov <vitalyvb@ukr.net>
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Make the get-nickname wireless extension actually work. Before
this patch, I could do "iwconfig eth1 nick BLAH" but "iwconfig
eth1" would have still showed "MRVL-USB8388" to me. Hey, and that
was wrong anyway, I'm on a CF card, not on USB :-)
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-By: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This makes scripts/checkincludes.pl happy.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
* make scan debug output cleaner
* change some LBS_DEB_ASSOC messages to LBS_DEB_SCAN, which is more correct
* move helper functions together
* print function return value in the tracing code at one central location
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-By: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This fixes three "warning: Using plain integer as NULL pointer"
sparse warnings.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Some versions of gcc replace strstr() calls with a single-character `needle'
parameter by strchr() behind our back. This causes a link error if strchr() is
defined as an inline function in <asm/string.h> (e.g. on m68k):
| drivers/built-in.o: In function `libertas_parse_chan':
| linux/drivers/net/wireless/libertas/debugfs.c:209: undefined reference to `strchr'
| drivers/built-in.o: In function `libertas_parse_ssid':
| linux/drivers/net/wireless/libertas/debugfs.c:260: undefined reference to `strchr'
Avoid this by explicitly calling strchr() instead.
Also include <linux/string.h>, because this file calls lots of str*() routines.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-By: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-By: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Don't write constants that are (per documentation and struct) u8
as 0x0001, use 0x01 instead. Also remove an useless cast.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-By: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The 88w8385 chip, using SDIO interface and firmware release 5.0.11p0,
has problems when both unicast and multicast WPA keys are set in one
command. This patch ensures the keys are set independently.
The original author of this patch is Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fixing memory alignment problems on the blackfin architecture (maybe on the
ARM also)
Signed-off-by: Vladimir Davydov <vladimir.davydov@promwad.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Reserve two bytes to align pointer to the IP header.
Signed-off-by: Vladimir Davydov <vladimir.davydov@promwad.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The following patch fixes the tx transmit timeout problem, which is
caused by the interrupts being incorrectly check and masked. The patch
moves the interrupt masking code so that interrupts are enabled only
when the driver is registered and only disabled when the driver is
unregistered.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Corrects a minor bug with priv->dnld_sent being set incorrectly in
if_cs_host_to_card.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
These have been superceded by the new ->get_sset_count() hook.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
It's been a useless no-op for long enough in 2.6 so I figured it's time to
remove it. The number of people that could object because they're
maintaining unified 2.4 and 2.6 drivers is probably rather small.
[ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireless/libertas/if_cs.c: In function 'if_cs_prog_helper':
drivers/net/wireless/libertas/if_cs.c:462: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
drivers/net/wireless/libertas/if_cs.c: In function 'if_cs_prog_real':
drivers/net/wireless/libertas/if_cs.c:538: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
kmalloc() and friends return void*, no need to cast it.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Advertise support for 802.11g bitrates when starting adhoc
networks, not just 802.11b bitrates.
Signed-off-by: Brajesh Dave <brajeshd@marvell.com>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch strips away possible mess in regioncode (eg. on my card - 88W8305
chipset - I get 0x3031 instead of expected 0x0031 and as a result the driver
defaults to USA region which is obviously incorrect). Following patch fixes
the issue.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Make sure that errors reported by the hardware layer is properly
handled. Otherwise commands tend to get stuck in limbo.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ensures that any platform specific code that might live in libertas_reset_device
(for example, OLPC tells the EC to do a GPIO-toggled reset of the wireless
from libertas_reset_device) isn't called. Could be handled better by
interface-specific callbacks and a flag for "other hardware reset".
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Marcelo Tosatti <marcelo@kvack.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch moves all firmware load responsibility into the interface-specific
code and gets rid of the firmware pointer in the generic card structure. It
also removes 3 fairly unecessary callbacks: hw_register_dev, hw_unregister_dev,
and hw_prog_firmware. It also makes the init sequence from interface
probe functions more logical, as there are paired add/remove and start/stop
calls into generic libertas code.
Because the USB driver code uses the same TX URB callback for both firmware
upload (where the generic libertas structure isn't initialized yet) and for
normal operation (where it is), some bits of USB code have to deal with
'priv' being NULL. All USB firmware upload bits have been changed to not
require 'priv' at all, but simply the USB card structure.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
A few fields being converted to the wrong sized type, and a few missed
endian conversions.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Describe the association response status code the firmware
returns, based on mail to libertas-dev from Ronak.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Don't trust the firmware to always send them at the right time,
ignore them when the driver thinks mesh autostart is disabled.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Boot2 version used to be hardcoded in the uploaded firmware,
this patch preserves the boot2 version before uploading firmware
and sends it to the firmware again on resume.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Push WEXT scan requests to a workqueue and have each partial scan queue
the next part, then only report results when the complete scan has finished.
Full scans don't go through the work queue.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Driver support for the monitor mode support that will be available in the next
OLPC 'bleeding edge' Marvell firmware release (most likely, 5.110.16.p2).
To activate monitor mode,
echo mode > /sys/class/net/{ethX,mshX}/device/libertas_rtap
where mode is the hex mask that specifies which frames to sniff (in short, 0x1
for data, 0x2 for all management but beacons, 0x4 for beacons). Any non zero
mode will activate the monitor mode, inhibiting transmission in ethX and mshX
interfaces and routing all the incoming traffic to a new rtapX interface that
will output the packets in 802.11+radiotap headers format.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
o SIOCGIWNAME is not designed to return the version number of the driver.
On the other hand, you are free to abuse SIOCGIWNICKN for that purpose.
o Don't attempt to fix the WE19/WE20 transition in the driver, because
your fixes are bogus, and redundant with the code in the kernel (you may
endup with +2, you can't read 32 char ESSID...).
o In SIOCSIWTXPOW, if you specified in iwrange that you want dBm, you
should only get dBm, which allow to reduce code bloat.
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
After loading the firmware, mesh autostart will be disabled. After that, the
user will still be able to enable or disable it at will. On suspend, it will be
always activated and later on resume it will go back to the state it had before
going to sleep.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
CAPINFO_MASK changed on commits 981f187b and a091095b. Reverting to the original
value. Also move CAPINFO_MASK into the sole user, join.c. CAPINFO_MASK
should be in host CPU byte order; capability is converted to device
byte order elsewhere.
This fixes OLPC ticket #2161
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Send association event to userspace when reassociating to the same
ad-hoc network, because it's still an association.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Purely cosmetic: this moves an lbs_deb_enter() to the proper place
and changes an erraneous lbs_deb_enter_args() into lbs_deb_leave_args()
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>