Luciano Coelho [Wed, 30 Jan 2013 08:53:14 +0000 (10:53 +0200)]
wlcore: don't hide real error code when booting fails
There's no need to hide the actual error that was reported when
booting fails. For instance, on I/O error, we were returing
-EINVALID, which doesn't make sense at all.
Luciano Coelho [Fri, 25 Jan 2013 10:05:34 +0000 (12:05 +0200)]
wlcore: move wl12xx_platform_data up and make it truly optional
The platform data is used not only by wlcore-based drivers, but also
by wl1251. Move it up in the directory hierarchy to reflect this.
Additionally, make it truly optional. At the moment, disabling
platform data while wl1251_sdio or wlcore_sdio are enabled doesn't
work, but it will be necessary when device tree support is
implemented.
Signed-off-by: Luciano Coelho <coelho@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com>
Luciano Coelho [Wed, 23 Jan 2013 14:40:37 +0000 (16:40 +0200)]
wlcore: use PLATFORM_DEVID_AUTO for plat dev creation to avoid conflicts
The platform devices can be created by both wlcore_sdio and
wlcore_spi. Theoretically, if both are connected to the same board,
there will be a conflict.
Reported-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Fri, 25 Jan 2013 09:57:48 +0000 (11:57 +0200)]
wlcore: remove if_ops from platform_data
We can't pass pointers from the platform data to the modules, because
with DT it cannot be done. Those pointers are not set by the board
files anyway. It's the bus modules that set them, so they can be
safely removed from the platform data without changing any board
files.
Create a new structure that the bus modules pass to wlcore. This
structure contains the if_ops pointers and a pointer to the actual
platform data.
Signed-off-by: Luciano Coelho <coelho@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com>
Luciano Coelho [Wed, 12 Dec 2012 08:14:22 +0000 (10:14 +0200)]
wlcore: use single-role version when verifying the PLT firmware
The PLT firmware used by wl12xx for calibration always has the same
version number as the single-role firmware.
Currntly the driver rejects the PLT firmware since anything that is
not single-role uses the multi-role version. Fix this by using the
single-role version for everything except multi-role.
Larry Finger [Fri, 1 Feb 2013 16:40:27 +0000 (10:40 -0600)]
rtlwifi: rtl8723ae: Fix W=1 compile warnings
Whe this driver is built with "make W=1", the following warnings are output:
drivers/net/wireless/rtlwifi/rtl8723ae/fw.c:515:5: warning: variable ‘own’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.c:1436:5: warning: variable ‘bt_retry_cnt’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/hw.c:706:6: warning: variable ‘reg_ratr’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/hw.c:2033:41: warning: variable ‘cur_rfstate’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:620:23: warning: variable ‘radiob_arraylen’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:619:7: warning: variable ‘radiob_array_table’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:617:7: warning: variable ‘rtstatus’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:1534:6: warning: variable ‘bbvalue’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:1716:6: warning: variable ‘reg_ecc’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:1715:61: warning: variable ‘reg_ec4’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:1715:34: warning: variable ‘reg_eac’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/rtl8723ae/trx.c:247:6: warning: variable ‘psaddr’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Fri, 1 Feb 2013 16:40:23 +0000 (10:40 -0600)]
rtlwifi: Fix warnings in usb.c
Building this driver with "make W=1" results in the following 2 warnings:
drivers/net/wireless/rtlwifi/usb.c:829:21: warning: variable ‘urb_list’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/usb.c:828:23: warning: variable ‘skb_list’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: users@rt2x00.serialmonkey.com Cc: linux-wireless@vger.kernel.org Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sven Eckelmann [Thu, 31 Jan 2013 09:26:44 +0000 (10:26 +0100)]
ath9k: Select RELAY for ATH9K_DEBUGFS
The spectral scan support activated through ATH9K_DEBUGFS depends on RELAY for
the kernel->userspace communication. Not activating RELAY causes build
failures.
The RELAY is added as select instead of depend to do it similar like
the only other user of RELAY: BLK_DEV_IO_TRACE
Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bing Zhao [Thu, 31 Jan 2013 03:56:01 +0000 (19:56 -0800)]
mwifiex: do not reconfigure tx buffer size in firmware while associating
It's observed that reconfiguration of tx buffer size before
association can cause data path failure in firmware after
associated. Although this is only found with PCIe cards, but
potentially it could happen with any other interfaces as well.
The tx buffer reconfiguration is not really useful in firmware.
Let's remove it for all interfaces.
Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The ath9k hardware reports whenever an frame was part
of an A-MPDU. MAC80211 already provides the necessary
API to pass this additional information along to
whomever needs it.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Devices were taken from Ralink Linux drivers:
- RT5370
0x043e, 0x7a32
0x043e, 0x7a42
0x0471, 0x2126
0x0471, 0x2180
0x0471, 0x2181
0x0471, 0x2182
Identify these ones:
0x04da, 0x23f6 in CONFIG_RT2800USB_RT53XX is a Panasonic device
0x07d1, 0x3c17 in RT2800USB_UNKNOWN is a RT3070
0x0586, 0x341a in RT2800USB_UNKNOWN is a RT3070
Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: users@rt2x00.serialmonkey.com Cc: linux-wireless@vger.kernel.org Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch is based on "iwlwifi: report A-MPDU status".
(12bf6f45d1703858)
Since the firmware will give us an A-MPDU bit and
only a single PHY information packet for all the
subframes in an A-MPDU, we can easily report the
minimal A-MPDU information for radiotap.
Cc: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andre Guedes [Fri, 1 Feb 2013 14:21:30 +0000 (11:21 -0300)]
Bluetooth: Refactor mgmt_pending_foreach
This patch does a trivial refactor in mgmt_pending_foreach function.
It replaces list_for_each_safe by list_for_each_entry_safe, simplifying
the function.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Andre Guedes [Tue, 29 Jan 2013 22:59:56 +0000 (19:59 -0300)]
Bluetooth: Reduce critical section in sco_conn_ready
This patch reduces the critical section protected by sco_conn_lock in
sco_conn_ready function. The lock is acquired only when it is really
needed.
This patch fixes the following lockdep warning which is generated
when the host terminates a SCO connection.
Today, this warning is a false positive. There is no way those
two threads reported by lockdep are running at the same time since
hdev->workqueue (where rx_work is queued) is single-thread. However,
if somehow this behavior is changed in future, we will have a
potential deadlock.
======================================================
[ INFO: possible circular locking dependency detected ]
3.8.0-rc1+ #7 Not tainted
-------------------------------------------------------
kworker/u:1H/1018 is trying to acquire lock:
(&(&conn->lock)->rlock){+.+...}, at: [<ffffffffa0033ba6>] sco_chan_del+0x66/0x190 [bluetooth]
but task is already holding lock:
(slock-AF_BLUETOOTH-BTPROTO_SCO){+.+...}, at: [<ffffffffa0033d5a>] sco_conn_del+0x8a/0xe0 [bluetooth]
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
Johan Hedberg [Sun, 27 Jan 2013 14:32:00 +0000 (08:32 -0600)]
Bluetooth: Fix link security setting when powering on
If a controller is powered on while the HCI_AUTO_OFF flag is set the
link security setting (HCI_LINK_SECURITY) might not be in sync with the
actual state of the controller (HCI_AUTH). This patch fixes the issue by
checking for inequality between the intended and actual settings and
sends a HCI_Write_Auth_Enable command if necessary.
Johan Hedberg [Sat, 26 Jan 2013 22:31:33 +0000 (00:31 +0200)]
Bluetooth: Refactor UUID-16 list generation into its own function
We will need to create three separate UUID lists in the EIR data (for
16, 32 and 128 bit UUIDs) so the code is easier to follow if each list
is generated in their own function.
Johan Hedberg [Sat, 26 Jan 2013 22:31:32 +0000 (00:31 +0200)]
Bluetooth: Remove useless eir_len variable from EIR creation
The amount of data encoded so far in the create_eir() function can be
calculated simply through the difference between the data and ptr
pointer variables. The eir_len variable then becomes essentially
useless.
Johan Hedberg [Sat, 26 Jan 2013 22:31:31 +0000 (00:31 +0200)]
Bluetooth: Simplify UUID16 list generation for EIR
There's no need to use two separate loops to generate a UUID list for
the EIR data. This patch merges the two loops previously used for the
16-bit UUID list generation into a single loop, thus simplifying the
code a great deal.
Johan Hedberg [Sat, 26 Jan 2013 22:31:29 +0000 (00:31 +0200)]
Bluetooth: Keep track of UUID type upon addition
The primary purpose of the UUIDs is to enable generation of EIR and AD
data. In these data formats the UUIDs are split into separate fields
based on whether they're 16, 32 or 128 bit UUIDs. To make the generation
of these data fields simpler this patch adds a type member to the
bt_uuid struct and assigns a value to it as soon as the UUID is added to
the kernel. This way the type doesn't need to be calculated each time
the UUID list is later iterated.
Johan Hedberg [Sat, 26 Jan 2013 22:31:27 +0000 (00:31 +0200)]
Bluetooth: Store UUIDs in the same order that they were added
We should be encoding UUIDs to the EIR data in the same order that they
were added to the kernel, i.e. each UUID should be added to the end of
the UUIDs list. This patch fixes the issue by using list_add_tail
instead of list_add for storing the UUIDs.
Lilach Edelstein [Wed, 16 Jan 2013 09:34:49 +0000 (11:34 +0200)]
iwlwifi: move register access lock into transport
Move the reg_lock that protects HW register access
into the transport implementation. Locking is no
longer exposed, but handled internally in grab and
release NIC access. This simplifies the users.
Lilach Edelstein [Sun, 13 Jan 2013 11:31:10 +0000 (13:31 +0200)]
iwlwifi: add iwl_set_bits_mask to transport API
Express iwl_set_bit() and iwl_clear_bit() through iwl_set_bits_mask()
and add the latter to the transport's API in order to allow different
implementation for different transport types in the future.
As the rate scaling algorithm will attempt to enable
aggregation over and over again, the message will
flood the log if there is, for example, Bluetooth
streaming music. Make it a debug messages instead of
printing it all the time.
Johannes Berg [Thu, 24 Jan 2013 13:14:22 +0000 (14:14 +0100)]
iwlwifi: add NVM and PHY DB code for new MVM driver
The new MVM (multi-virtual MAC) firmware driver
requires NVM (non-volatile memory) parsing code
and some PHY information database code. Add this
separately.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Firmware crash on attempt to delete Rx chain.
Driver part of Rx chain removed only in preparation for the target reset;
as reset is the only flow that removes Rx chain in the firmware.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Due to multi-tx-queue design, wil_start_xmit() used to be executed
concurrently for different queues. Then, these transmits delivered
to the same queue, creating race.
As result, Tx descriptor may be skipped, causing stall in hardware.
Convert to single Tx queue fixes it.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Guenter Roeck [Sun, 27 Jan 2013 18:55:41 +0000 (10:55 -0800)]
net: iwlegacy: remove unused variable
Fix:
drivers/net/wireless/iwlegacy/4965.c: In function ‘il4965_post_associate’:
drivers/net/wireless/iwlegacy/4965.c:1751:25: warning: variable ‘conf’ set but
not used [-Wunused-but-set-variable]
seen when building allmodconfig on x86_64 with W=1 by removing the unused
variable.
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch is based on "iwlwifi: fix antenna bitmask".
(362b0563b28506d53)
Like the new iwlagn devices, the old 4965N device only
supports a maximum of three antennas. Hence only three
bits are used, the fourth bit is likely the A-MPDU
indicator.
Cc: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Sat, 26 Jan 2013 20:39:44 +0000 (21:39 +0100)]
bcma: add gpio_to_irq
The old bcm47xx gpio code had support for gpio_to_irq, but the new
code did not provide this function, but returned -ENXIO all the time.
This patch adds the missing function.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Sat, 26 Jan 2013 20:38:35 +0000 (21:38 +0100)]
ssb: add gpio_to_irq
The old bcm47xx gpio code had support for gpio_to_irq, but the new
code did not provide this function, but returned -ENXIO all the time.
This patch adds the missing function.
arch/mips/bcm47xx/wgt634u.c calls gpio_to_irq() and got the correct irq
number with the old gpio handling code. With this patch the code in
wgt634u.c should work again. I do not have a wgt634u to test this.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bing Zhao [Sat, 26 Jan 2013 02:23:00 +0000 (18:23 -0800)]
mwifiex: do not overwrite error code from lower layer driver
Instead of converting it to a bogus error code -1, we should
return the original error code from lower layer driver. This
error code will be printed so it may give user some clues on
what has happened.
Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: don't return zero on failure paths in mwifiex_pcie_init()
If pci_iomap() fails in mwifiex_pcie_init(), it breaks off initialization,
deallocates all resources, but returns zero.
The patch adds -EIO as return value in this case.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chun-Yeow Yeoh [Fri, 25 Jan 2013 04:47:50 +0000 (12:47 +0800)]
rt2x00: allow AP and mesh mode to operate simultaneously
Allow AP and Mesh mode to operate concurrently using
single radio. Verify this using fonera 2.0n featuring
RT3052 chipset and also TP-LINK TL-WN727N featuring
RT5370 chipset.
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemal.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2800usb: move "TX status missed" messages to debug level
Those messages can flood in dmesg, so do not print them by default.
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Some messages provide useful information, but are disabled without
CONFIG_RT2X00_DEBUG=y, so enable them by default
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sven Eckelmann [Wed, 23 Jan 2013 19:12:39 +0000 (20:12 +0100)]
ath9k: Update spectral scan output data
The sample data received through the spectral scan can be either in big or
little endian byteorder. This information isn't stored in the output file.
Therefore it is not possible for the analyzer software to find the correct byte
order.
It is relative common to get the data from a low end AP in big endian mode and
transfer it to another computer in little endian mode to analyze it. Therefore,
it would be better to store it in network (big endian) byte order.
The extension of the 8 bit bins for each bin to 16 bit is not necessary. This
operation can be done in userspace or on a different machine. Instead the
max_exp defining the amount of shifting required for each bin is exported to
userspace.
The change of the output format requires a change of the type in the sample
tlv to allow the userspace program to correctly detect the bin format.
Reported-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
[siwu@hrz.tu-chemnitz.de: squashed patches, update commit message, rebase, fix endianess bug] Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Simon Wunderlich [Wed, 23 Jan 2013 16:38:06 +0000 (17:38 +0100)]
ath9k: reorder error codes for spectral
When using the spectral scan feature, frames with phy errors are
returned for further processing to the driver. However, if the frames
also have an invalid CRC (which seems to happen quite often), the frame
is marked with bad CRC and not with the PHY error bit. The FFT
processing function will thus miss the frames.
Fix this by changing the precedence in error marking.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Simon Wunderlich [Wed, 23 Jan 2013 16:38:05 +0000 (17:38 +0100)]
ath9k: drop spectral packets after processing them
Spectral packets are "bogus" packets and should not be further evaluated
by the RX path.
Statistics are added to keep track of these packets.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Simon Wunderlich [Wed, 23 Jan 2013 16:38:04 +0000 (17:38 +0100)]
ath9k: add debug parameters for spectral scan
Export the various parameters to userspace.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Wed, 23 Jan 2013 00:29:03 +0000 (16:29 -0800)]
mwifiex: fix invalid access of PCIe RxBD ring buffer descriptor
This patch fixes invalid access of RxBD ring buffer descriptor's
length and flag inside PCIe send_data_complete() routine. We are
supposed to modify TxBD buffer descriptor's length and flag here.
Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>