Raja Mani [Thu, 4 Aug 2011 13:56:29 +0000 (19:26 +0530)]
ath6kl: Fix crash during the connection process
Sometimes, the network manager is failing to connect to the AP due
to the below kernel crash message. The reason behind this,
after issuing the connect command to the chip, the chip is sending
disconnect event and then immediately one connect event to the host
in some random cases.
The host driver resets all states (including cfg80211 state machine)
when it receives disconnect event from the chip. But, still the host
driver reports the next received connect event to cfg80211, at that time
cfg80211 SME state would have been in IDLE state, which was causing
the below kernel crash.
Now, host driver's sme state machine is checked every time before
delivering connect event to cfg80211
Kalle Valo [Thu, 21 Jul 2011 07:54:26 +0000 (10:54 +0300)]
ath6kl: change aggreation timeout message from an error to a debug message
When I connect to my Linksys WT610N AP supporting 11n I see a lot of
aggreation timeout errors:
[ 408.885053] ath6kl: aggr timeout (st 3109 end 3140)
[ 463.872108] ath6kl: aggr timeout (st 3671 end 3702)
[ 495.010060] ath6kl: aggr timeout (st 3983 end 4014)
[ 503.604047] ath6kl: aggr timeout (st 4065 end 0)
[ 518.963047] ath6kl: aggr timeout (st 141 end 172)
[ 525.014066] ath6kl: aggr timeout (st 205 end 236)
[ 573.957051] ath6kl: aggr timeout (st 701 end 732)
[ 585.019067] ath6kl: aggr timeout (st 816 end 847)
But still the connection seems to work. To not clutter the logs change
the error message to a debug message. But add a fixme comment so that
this will be investigated.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Thu, 21 Jul 2011 07:22:50 +0000 (10:22 +0300)]
ath6kl: fix crash when interface is closed but scan is ongoing
When ath6kl module was removed while a scan was ongoing the driver would
crash in ath6kl_cfg80211_scan_complete_event().
Fix the function not to iterate nodes when the scan is aborted. The nodes
are already freed when the module is being unloaded. This patch removes the
null check entirely as the wmi structure is not accessed anymore during
module unload.
Also fix a bug where the status was checked as a bitfield with '&' operator.
But it's not a bitfield, just a regular error code.
This is a port of my patch from ath6kl staging with the same title.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Thu, 21 Jul 2011 07:04:54 +0000 (10:04 +0300)]
ath6kl: fix atomicity in ath6kl_cfg80211_scan_node()
ath6kl_cfg80211_scan_node() was calling cfg80211_inform_bss_frame()
with CFP_KERNEL but the function is executed with a spin lock taken.
This is wrong and the function must use GFP_ATOMIC instead.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Thu, 21 Jul 2011 06:40:00 +0000 (09:40 +0300)]
ath6kl: don't force foreground scan when connected
In my setup data transfer stalls when there's data transmission during
scan. After some testing I found out that using background scan
when connected to makes the problem go away. This is more like
a workaround than a proper fix, but as the stall is so severe the
workaround is justified.
With a dual band card this increases scan time when connected from
1.9s to 4.4s. When not connected the scan time is not affected and
is the same 1.9s.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
After over 1100 (!) patches we have now reached a state where I would
like to start discussing about pushing the driver to the wireless
trees and replacing the staging driver.
The driver is now a lot smaller and looks like a proper Linux driver.
The size of the driver (measured with simple wc -l) dropped from 49
kLOC to 18 kLOC and the number of the .c and .h files dropped from 107
to 22. Most importantly the number of subdirectories reduced from 26
to zero :)
There are two remaining checkpatch warnings in the driver which we
decided to omit for now:
drivers/net/wireless/ath/ath6kl/debug.c:31:
WARNING: printk() should include KERN_ facility level
drivers/net/wireless/ath/ath6kl/sdio.c:527:
WARNING: msleep < 20ms can sleep for up to 20ms;
see Documentation/timers/timers-howto.txt
The driver has endian annotations for all the hardware specific
structures and there are no sparse errors. Unfortunately I don't have
any big endian hardware to test that right now.
We have been testing the driver both on x86 and arm platforms. The
code is also compiled with sparc and parisc cross compilers.
Notable missing features compared to the current staging driver are:
o HCI over SDIO support
o nl80211 testmode
o firmware logging
o suspend support
Testmode, firmware logging and suspend support will be added soon. HCI
over SDIO support will be more difficult as the HCI driver needs to
share code with the wifi driver. This is something we need to research
more.
Also I want to point out the changes I did for signed endian support.
As I wasn't able to find any support for signed endian annotations I
decided to follow what NTFS has done and added my own. Grep for sle16
and sle32, especially from wmi.h.
Various people have been working on the cleanup, the hall of
fame based on number of patches is:
543 Vasanthakumar Thiagarajan
403 Raja Mani
252 Kalle Valo
16 Vivek Natarajan
12 Suraj Sumangala
3 Joe Perches
2 Jouni Malinen
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com> Signed-off-by: Suraj Sumangala <surajs@qca.qualcomm.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Felix Fietkau [Thu, 28 Jul 2011 12:08:56 +0000 (14:08 +0200)]
ath9k_hw: calculate a much better approximation of channel noise
Currently ath9k presents the internal calibrated noise floor as channel
noise measurement, however this results in highly chip specific values
that are only useful as relative measurements but do not resemble any
real channel noise values.
In order to give a much better approximation of the real channel noise,
add the difference between the measured noise floor and the nominal
chip specific noise floor to the default minimum channel noise value,
which is currently used to calculate the signal strength from the RSSI
value. This may not be 100% accurate, but it's much better than what's
there before.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211/mesh: make the preq queue lock consistent
Make mesh_preq_queue_lock locking consistent with mesh_queue_preq() using
spin_lock_bh().
Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Wed, 27 Jul 2011 16:19:00 +0000 (17:19 +0100)]
libertas_usb: program OLPC EC wakeup mask for wake-on-WLAN
OLPC power management code has recently gone upstream. This piece
completes the puzzle for libertas_usb, which now programs the OLPC EC
for wlan wakeups when they have been requested.
Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Tue, 26 Jul 2011 22:52:41 +0000 (18:52 -0400)]
hostap_cs: support cards with "Version 01.02" as third product ID
Cards with numeric ID 0x0156:0x0002 and third ID "Version 01.02" can be
assumed to have Intersil firmware. Cards with Agere firmware use
"Version 01.01".
Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Tue, 26 Jul 2011 22:52:35 +0000 (18:52 -0400)]
pcmcia: add PCMCIA_DEVICE_MANF_CARD_PROD_ID3
This is needed to match wireless cards with Intersil firmware that have
ID 0x0156:0x0002 and the third ID "Version 01.02". Such cards are
currently matched by orinoco_cs, which doesn't support WPA. They should
be matched by hostap_cs.
The first and the second product ID vary widely, so there are few users
with some particular IDs. Of those, very few can submit a patch for
hostap_cs or write a useful bugreport. It's still important to support
their hardware properly.
With PCMCIA_DEVICE_MANF_CARD_PROD_ID3, it should be possible to cover
the remaining Intersil based designs that kept the numeric ID and the
"version" of the reference design.
Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Tue, 26 Jul 2011 15:36:48 +0000 (11:36 -0400)]
b43legacy: report core number
Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Fri, 5 Aug 2011 09:46:19 +0000 (11:46 +0200)]
mac80211: Don't use a buf_size=0 in ADDBA requests
According to 802.11-2007, 7.3.1.14 it is compliant to use a buf_size of
0 in ADDBA requests. But some devices (AVM Fritz Stick N) arn't able to
handle that correctly and will reply with an ADDBA reponse with a
buf_size of 0 which in turn will disallow BA sessions for these
devices.
To work around this problem, initialize hw.max_tx_aggregation_subframes
to the maximum AMPDU buffer size 0x40.
Using 0 as default for the bufsize was introduced in commit 5dd36bc933e8be84f8369ac64505a2938f9ce036 (mac80211: allow advertising
correct maximum aggregate size).
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Tue, 26 Jul 2011 10:18:27 +0000 (12:18 +0200)]
mac80211: Stop TX BA session if buf_size is zero
If we receive an ADDBA response with status code 0 and a buf_size of 0
we should stop the TX BA session as otherwise we'll end up queuing
frames in ieee80211_tx_prep_agg forever instead of sending them out as
non AMPDUs.
This fixes a problem with AVM Fritz Stick N wireless devices where
frames to this device are not transmitted anymore by mac80211.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Mon, 25 Jul 2011 21:40:22 +0000 (17:40 -0400)]
b43legacy: remove 64-bit DMA support
Devices supported by b43legacy don't support 64-bit DMA.
Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 23 Jul 2011 17:24:48 +0000 (10:24 -0700)]
mac80211: remove offchannel_tx API
For iwlwifi, I decided not to use this API since
it just increased the complexity for little gain.
Since nobody else intends to use it, let's kill
it again. If anybody later needs to have it, we
can always revive it then.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 23 Jul 2011 17:24:47 +0000 (10:24 -0700)]
iwlagn: support new P2P implementation
The previous P2P implementation turned out to
not work well and new uCode capabilities were
added to support P2P. Modify the driver to
take advantage of those, and also discover P2P
support automatically based on a uCode flag
instead of having a Kconfig symbol for P2P.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 23 Jul 2011 17:24:46 +0000 (10:24 -0700)]
iwlagn: move context init after firmware loading
The availability of contexts depends on the
firmware capabilities. Currently only the
presence of the second context depends on it,
but soon P2P support will also be different.
Move the context initialisation code to the
firmware-dependent setup before registering
with mac80211 to make it easier to handle.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 23 Jul 2011 17:24:45 +0000 (10:24 -0700)]
iwlagn: bump firmware API for some devices
We're working on improvements for the firmware
for some devices, and need to bump the API for
those since they won't be backward compatible
completely (the earlier patch reserving queue
10 for P2P).
Bump the API version to 6 for those devices
but don't warn users of version 5 yet.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 23 Jul 2011 17:24:44 +0000 (10:24 -0700)]
iwlagn: separate firmware version warning
We sometimes need to support new firmware API for
a while before we can publish them since testing
them fully takes a long time. We could keep all
the new code private, but that causes plenty of
problems and sometimes we can give a pre-release
version of firmware to people who need to test.
However, when we just bump the API version, the
driver will warn everybody that their firmware is
outdated, when in fact it isn't. (Currently our
case for this doesn't really change the API but
bumping the API version is necessary because the
firmware isn't fully backward compatible)
In order to handle this in the future, add a new
"api_ok" version; only below this will the driver
warn that the uCode is too old.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 23 Jul 2011 17:24:40 +0000 (10:24 -0700)]
iwlagn: reserve queue 10 for TX during scan dwell
New uCode images will use queue 10 for TX
during scan (for P2P offchannel operation
scan). We'll bump the API version of those,
but before we need to reserve queue 10 and
stop using it for aggregation.
To simplify the code, always reserve it,
we could continue using it on older uCode
images but that'd be rather complicated.
Also, we'll set it up to map to the right
FIFO as needed later, but as we don't use
the queue now that doesn't hurt.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Sat, 23 Jul 2011 13:29:09 +0000 (09:29 -0400)]
ath5k: eliminate CHANNEL_* macros, use AR5K_MODE_* in channel->hw_value
When checking for the band, use channel->band.
Change ath5k_hw_nic_wakeup() and ath5k_channel_ok() to take
ieee80211_channel. Change ath5k_hw_radio_revision() to take
ieee80211_band.
Signed-off-by: Pavel Roskin <proski@gnu.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Sat, 23 Jul 2011 13:29:03 +0000 (09:29 -0400)]
ath5k: remove most references to XR
XR is a proprietary feature of the chipset. It's not supported and
should not be supported.
Signed-off-by: Pavel Roskin <proski@gnu.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Sat, 23 Jul 2011 13:28:56 +0000 (09:28 -0400)]
ath5k: remove unused and write-only structures and fields
struct ath5k_avg_val is unused.
In struct ath5k_hw, lladdr, ah_radar and ah_mac_revision are write-only,
rxbufsize is unused, ah_phy is write-only and referenced by unused
macros.
In struct ath5k_vif, lladdr is write-only.
Remove AR5K_TUNE_RADAR_ALERT, which has no effect.
Signed-off-by: Pavel Roskin <proski@gnu.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Prepare bcm47xx to support different System buses. Before adding
support for bcma it should be possible to build bcm47xx without the
need of ssb. With this patch bcm47xx does not directly contain a
ssb_bus, but a union contain all the supported system buses. As a SoC
just uses one system bus a union is a good choice.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch adds support for using bcma on a Broadcom SoC as the system
bus. An SoC like the bcm4716 could register this bus and use it to
searches for the bcma cores and register the devices on this bus.
BCMA_HOSTTYPE_NONE was intended for SoCs at first but BCMA_HOSTTYPE_SOC
is a better name.
Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The chip common and mips core have to be setup early in the boot
process to get the cpu clock.
bcma_bus_early_register() gets pointers to some space to store the core
data and searches for the chip common and mips core and initializes
chip common. After that was done and the kernel is out of early boot we
just have to run bcma_bus_register() and it will search for the other
cores, initialize and register them.
The cores are getting the same numbers as before.
Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sergei Shtylyov [Fri, 22 Jul 2011 15:58:23 +0000 (19:58 +0400)]
ath9k: use pci_dev->subsystem_device
The driver reads PCI subsystem ID from the PCI configuration register while it's
already stored by the PCI subsystem in the 'subsystem_device' field of 'struct
pci_dev'...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Thu, 21 Jul 2011 19:43:44 +0000 (20:43 +0100)]
libertas_usb: use USB interface as parent device
Currently, "udevadm info -a -p /sys/class/net/wlan0" doesn't mention
the usb8xxx or libertas driver anywhere. This makes writing udev rules
a bit uncomfortable.
Using the USB interface as the parent device corrects the hierarchy.
Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Thu, 21 Jul 2011 19:43:17 +0000 (20:43 +0100)]
libertas: link mesh device to wiphy
The mesh device is now exposed as an interface of the wiphy.
This exposes the mesh device to the cfg80211 interface, allowing
mesh channel selection to be reimplemented, and available to
NetworkManager as it was before.
Some header tweaking was needed in order to implement lbs_mesh_activated().
Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 15 Jul 2011 11:01:38 +0000 (13:01 +0200)]
cfg80211: remove unused wext handler exports
A lot of code is dedicated to giving drivers the
ability to use cfg80211's wext handlers without
completely converting. However, only orinoco is
currently using this, and it is only partially
using it.
We reduce the size of both the source and binary
by removing those that nobody needs. If a driver
shows up that needs it during conversion, we can
add back those that are needed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 13 Jul 2011 08:39:18 +0000 (10:39 +0200)]
mwifiex: add wext include
In trying to remove the wext includes from mac80211
and cfg80211 I found that mwifiex currently uses
them. This is wrong, it shouldn't, but to not break
it completely include wext there.
Please remove this and fix all the resulting bugs.
Cc: Bing Zhao <bzhao@marvell.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 13 Jul 2011 08:39:16 +0000 (10:39 +0200)]
wl12xx: remove wext dependencies
This driver uses IW_ESSID_MAX_SIZE when it should
be using IEEE80211_MAX_SSID_LEN instead.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 13 Jul 2011 08:39:14 +0000 (10:39 +0200)]
b43legacy: remove wireless extensions inclusions
linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 13 Jul 2011 08:39:12 +0000 (10:39 +0200)]
ath5k: remove wireless extensions inclusions
linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>