Kalle Valo [Tue, 19 Mar 2013 13:25:20 +0000 (15:25 +0200)]
ath6kl: fix size_t printf warnings
My new tracing code for ath6kl introduced these warnings on 64-bit:
trace.h:38:1: warning: format '%d' expects argument of type 'int',
but argument 4 has type 'size_t' [-Wformat]
trace.h:61:1: warning: format '%d' expects argument of type 'int',
but argument 4 has type 'size_t' [-Wformat]
trace.h:84:1: warning: format '%d' expects argument of type 'int',
but argument 6 has type 'size_t' [-Wformat]
trace.h:119:1: warning: format '%d' expects argument of type 'int',
but argument 7 has type 'size_t' [-Wformat]
trace.h:173:1: warning: format '%d' expects argument of type 'int',
but argument 3 has type 'size_t' [-Wformat]
trace.h:193:1: warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t' [-Wformat]
trace.h:221:1: warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t' [-Wformat]
Fix them by using %zd.
Reported-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Fri, 15 Mar 2013 08:57:57 +0000 (09:57 +0100)]
rt2x00: Fix tx status reporting for reordered frames in rt2800pci
rt2800 hardware sometimes reorders tx frames when transmitting to
multiple BA enabled STAs concurrently.
For example a tx queue
[ STA1 | STA2 | STA1 | STA2 ]
can result in the tx status reports
[ STA1 | STA1 | STA2 | STA2 ]
when the hw decides to put the frames for STA1 in one AMPDU.
To mitigate this effect associate the currently processed tx status
to the first frame in the tx queue with a matching wcid.
This patch fixes several problems related to incorrect tx status
reporting. Furthermore the tx rate selection is much more stable when
communicating with multiple STAs.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Firmware returned VHT cap has the same format that cfg80211
expects. There is no need to parse the vht cap from the firmware
and then set it to ieee80211_sta_vht_cap. Just copying is
sufficient.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Ryan Hsu <ryanhsu@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Myoungje Kim [Sun, 10 Mar 2013 06:16:05 +0000 (08:16 +0200)]
ath6kl: Fix the byte alignment rule to avoid loss of bytes in a TCP segment
Either first 3 bytes of the first received tcp segment or last one
over MTU size file can be loss due to the byte alignment problem.
Although ATH6KL_HTC_ALIGN_BYTES was defined for 'extra bytes for htc header
alignment' in the patch "Fix buffer alignment for scatter-gather
I/O"(1df94a857), there exists the bytes loss issue which means that it will be
truncated 3 bytes in the transmitted file contents if a file which has over MTU
size is transferred through TCP/IP stack. It doesn't look like TCP/IP stack
bug of 3.5 or the latest version of kernel but the byte alignment issue. This
patch is to use the roundup() function for the byte alignment rather than the
predefined ATH6KL_HTC_ALIGN_BYTES.
kvalo: fixed indentation
Signed-off-by: Myoungje Kim <mjei78@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Sun, 10 Mar 2013 05:51:39 +0000 (07:51 +0200)]
ath6kl: remove false check from ath6kl_rx()
Dan found a check from ath6kl_rx() which doesn't make any sense at all:
" 1327 if (status || !(skb->data + HTC_HDR_LENGTH)) {
^^^^^^^^^^^^^^^^^^^^^^^^^^
skb->data is a pointer. This pointer math is always going to be false.
Should it be testing "packet->act_len < HTC_HDR_LENGTH" or something?"
I don't know what the check really was supposed to do, but I think Dan's guess
is right. Fix it accordingly.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Sun, 10 Mar 2013 05:51:29 +0000 (07:51 +0200)]
ath6kl: add an extra band check to ath6kl_wmi_beginscan_cmd()
Dan reported that smatch found a possible issue in ath6kl_wmi_beginscan_cmd()
where we might access sc->supp_rates beyond the end. It shouldn't happen as
ar->wiphy->bands always have just the first two bands set, but add an extra
check just to be sure.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Mon, 18 Mar 2013 11:42:22 +0000 (13:42 +0200)]
ath6kl: add tracing support to debug message macros
Now all log messages are sent through the tracing infrastruture as well.
Tracing point doesn't follow debug_mask module parameter, instead it sends
all debug messages, so once you enable ath6kl_log_dbg tracing point you will
get a lot of messages. Needs to be discussed if this is sensible or not.
The overhead should be small enough and we anyway include debug level as
well so it's easy to filter in user space.
I wasn't really sure what to do with ath6kl_dbg_dump() and for now decided
that it also sends the buffer to user space. But most likely in the future
ath6kl_dbg_dump() should go away in favor of using proper tracing points, but
we will see.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Mon, 18 Mar 2013 11:42:21 +0000 (13:42 +0200)]
ath6kl: adding tracing points for htc_mbox
Add tracing points for htc layer, just dumping the packets to user space.
I wasn't really sure what to do with the status value, it might not always
be accurate, but I included it anyway.
I skipped htc_pipe (and usb) implementation for now. Need to add those
tracepoints later.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Mon, 18 Mar 2013 11:42:21 +0000 (13:42 +0200)]
ath6kl: add tracing point for hif irqs
Add a tracing point for hif irq and dump the register content to user space.
This is in hif.c as we could use the same code also with SPI but, as ath6kl
doesn't SPI and most likely never will be, this is used just by SDIO so
name the trace point as ath6kl_sdio_irq to make it easier to manage filters.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Sat, 9 Mar 2013 10:01:50 +0000 (12:01 +0200)]
ath6kl: cold reset target after host warm boot
Julien reported that ar6004 usb device fails to initialise
after host has been rebooted and power is still on for the ar6004 device. He
found out that doing a cold reset fixes the issue.
I wasn't sure what would be the best way to detect if target needs a reset so I
settled on checking a timeout from htc_wait_recv_ctrl_message().
Reported-by: Julien Massot <jmassot@aldebaran-robotics.com> Tested-by: Julien Massot <jmassot@aldebaran-robotics.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Sat, 9 Mar 2013 10:01:43 +0000 (12:01 +0200)]
ath6kl: fix usb related error handling and warnings
It was annoying to debug usb warm reboot initialisation problems as many usb
related functions just ignored errors and it wasn't obvious from the kernel
logs what was failing. Fix all that so that error messages are printed and
errors are handled properly.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Rafał Miłecki [Thu, 7 Mar 2013 15:47:23 +0000 (16:47 +0100)]
b43: HT-PHY: implement stopping sample tone playback
It was another sequence I recognized in HT-PHY dump:
phy_read(0x00c7) -> 0x0001
phy_read(0x00c3) -> 0x0000
phy_write(0x00c3) <- 0x0002
phy_read(0x00c3) -> 0x0000
phy_write(0x00c3) <- 0x0000
The difference to N-PHY is that it writes to 6 tables instead of a one
(after above).
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 9 Mar 2013 12:52:12 +0000 (13:52 +0100)]
b43: HT-PHY: implement controlling TX power control
Don't enable it until we have (almost?) whole TX power management
figured out. It's similar to the N-PHY, the difference is that we call a
"fix" *before* disabling power control.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 7 Mar 2013 15:47:20 +0000 (16:47 +0100)]
b43: HT-PHY: implement CCA reset
It was just another similar-to-N-PHY and easy-to-track routine:
write32 0xb0601408 <- 0x00002057
phy_read(0x0001) -> 0x0000
phy_write(0x0001) <- 0x4000
phy_write(0x0001) <- 0x0000
write32 0xb0601408 <- 0x00002055
(b43_phy_ht_force_rf_sequence was moved up unmodified)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 7 Mar 2013 15:47:18 +0000 (16:47 +0100)]
b43: HT-PHY: implement spurious tone avoidance
On N-PHY it's also done after TX power fix, so it was easy to spot.
Unfortunately the MMIO logs I have from ndsiwrapper include channels
1-12 only, so enabling code for 13 and 14 is just a N-PHY-based guess.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 7 Mar 2013 15:47:17 +0000 (16:47 +0100)]
b43: HT-PHY: move TX fix to the separated function
On N-PHY after B43_PHY_B_TEST operation there is a call to TX power fix
function which iterates over available cores. It matches our HT-PHY code
which means it's probably also some TX fix.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 9 Mar 2013 12:43:49 +0000 (13:43 +0100)]
b43: HT-PHY: rename AFE defines
It you take a look at N-PHY analog switch function it touches every core
on the chipset. It seems HT-PHY does they same, it just has 3 cores
instead of 2 (which make sense since BCM4331 is 3x3). Rename AFE defines
to include core id.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Adjust driver for changes in the FW API.
Noticeable changes in the FW are:
- temperature sensing
- infrastructure for multiple connections
- infrastructure for P2P
- signal strength indication
This commit introduces only changes that are required to support same functionality
as previous firmware, no new features.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
New firmware allows for shorter SW reset procedure.
After SW reset, FW raises "fw done" IRQ, at this
moment mailbox control structures are initialized, driver caches it.
New status bit wil_status_reset_done introduced to track completion
of the reset. It is set by "fw ready" irq, and required for WMI rx flow
to access control structures.
WMI Tx flow protected by other status bit, wil_status_fwready. It can't
be set before wil_status_reset_done is set by design.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
On the DMG band, there is no 'normal' beacon frame.
Instead, transmitted is short 'DMG beacon' frame, that do not include IE's
So, beacon IE's are not relevant for the DMG band.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wei Yongjun [Tue, 12 Mar 2013 03:09:34 +0000 (11:09 +0800)]
wil6210: remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Mon, 11 Mar 2013 20:38:26 +0000 (15:38 -0500)]
ssb: pci: Fix flipping of MAC address
Since commit e565275 entitled "ssb: pci: Standardize a function to get mac
address", the SPROM readout of the MAC has had the values flipped so that
00:11:22:33:44:55 became 11:00:33:22:55:44. The fix has been tested on both
little- and big-endian architectures.
Reported-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Wed, 13 Mar 2013 15:28:13 +0000 (10:28 -0500)]
rtlwifi: rtl8192cu: Fix problem that prevents reassociation
The driver was failing to clear the BSSID when a disconnect happened. That
prevented a reconnection. This problem is reported at
https://bugzilla.redhat.com/show_bug.cgi?id=789605,
https://bugzilla.redhat.com/show_bug.cgi?id=866786,
https://bugzilla.redhat.com/show_bug.cgi?id=906734, and
https://bugzilla.kernel.org/show_bug.cgi?id=46171.
Thanks to Jussi Kivilinna for making the critical observation
that led to the solution.
Reported-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> Tested-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> Tested-by: Alessandro Lannocca <alessandro.lannocca@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
John Crispin [Wed, 13 Mar 2013 12:20:15 +0000 (13:20 +0100)]
rt2x00: fix rt2x00 to work with the new ralink SoC config symbols
Since v3.9-rc1 the kernel has basic support for Ralink WiSoC. The config symbols
are named slightly different than before. Fix the rt2x00 to match the new
symbols.
The commit causing this breakage is:
commit ae2b5bb6570481b50a7175c64176b82da0a81836
Author: John Crispin <blogic@openwrt.org>
Date: Sun Jan 20 22:05:30 2013 +0100
MIPS: ralink: adds Kbuild files
Signed-off-by: John Crispin <blogic@openwrt.org> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jonas Gorski [Mon, 11 Mar 2013 16:44:21 +0000 (17:44 +0100)]
mwl8k: don't overwrite regulatory settings on fw reload
Currently the caps are parsed on every firmware reload, causing any
channel flags to be cleared.
When there is a firmware to interface mode mismatch, the triggered
firmware reload causes a reset of the regulatory settings, causing all
channels to become available:
John W. Linville [Mon, 11 Mar 2013 18:59:46 +0000 (14:59 -0400)]
Merge tag 'nfc-next-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next
Samuel Ortiz <sameo@linux.intel.com> says:
This is the first NFC pull request for 3.10.
The 2 features we have with this one are:
- An LLCP Service Name Lookup (SNL) netlink interface for querying LLCP
service availability from user space.
Along the way, Thierry also improved the existing SNL interface for
aggregating SNL responses.
- An initial LLCP socket options implementation, for setting the Receive
Window (RW) and the Maximum Information Unit Extension (MIUX) per socket.
This is need for the LLCP validation tests.
We also have a microread MEI build failure here: I am not sending this one to
3.9 because the MEI bus code is not there yet, so it won't break for anyone
else than me.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 11 Mar 2013 18:07:55 +0000 (14:07 -0400)]
Merge tag 'nfc-fixes-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-fixes
Samuel Ortiz <sameo@linux.intel.com> says:
This is the first NFC pull request for 3.9 fixes
With this one we have:
- A fix for properly decreasing socket ack log.
- A timer and works cleanup upon NFC device removal.
- A monitoroing socket cleanup round from llcp_socket_release.
- A proper error report to pending sockets upon NFC device removal.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thierry Escande [Mon, 4 Mar 2013 14:43:32 +0000 (15:43 +0100)]
NFC: llcp: Add cleanup support for unreplied SNL requests
If the remote LLC doesn't reply in time to our SNL requests we remove
them from the list of pending requests. The timeout is fixed to an
arbitrary value of 3 times remote_lto.
When not replied, the local LLC broadcasts NFC_EVENT_LLC_SDRES nl events for
the concerned uris with sap values set to LLCP_SDP_UNBOUND (which is 65).
Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Thierry Escande [Fri, 15 Feb 2013 09:43:06 +0000 (10:43 +0100)]
NFC: llcp: Service Name Lookup netlink interface
This adds a netlink interface for service name lookup support.
Multiple URIs can be passed nested into the NFC_ATTR_LLC_SDP attribute
using the NFC_CMD_LLC_SDREQ netlink command.
When the SNL reply is received, a NFC_EVENT_LLC_SDRES event is sent to
the user space. URI and SAP tuples are passed back, nested into
NFC_ATTR_LLC_SDP attribute.
Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Thierry Escande [Fri, 15 Feb 2013 09:43:05 +0000 (10:43 +0100)]
NFC: llcp: Service Name Lookup SDRES aggregation
This modifies the way SDRES PDUs are sent back. If multiple SDREQs are
received within a single SNL PDU, all SDRES replies are sent packed in
one SNL PDU too.
Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Samuel Ortiz [Fri, 22 Feb 2013 09:53:25 +0000 (10:53 +0100)]
NFC: llcp: Implement socket options
Some LLCP services (e.g. the validation ones) require some control over
the LLCP link parameters like the receive window (RW) or the MIU extension
(MIUX). This can only be done through socket options.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ashok Nagarajan [Fri, 8 Mar 2013 18:58:45 +0000 (10:58 -0800)]
mwifiex: Trigger a card reset on reaching tx_timeout threshold
tx_timeout doesn't always lead to a cmd_timeout. There are
occurrences where cmd_timeout never gets triggered for a long
time and we encounter a kernel crash. In this patch, we track
the consecutive timeouts (tx_timeout_cnt). When tx_timeout_cnt
exceeds the threshold, trigger a card reset thereby avoiding a
kernel crash.
Signed-off-by: Ashok Nagarajan <asnagarajan@chromium.org> Signed-off-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The cause is a synchronous read from routine rtl92cu_update_hal_rate_table().
The resulting output is not critical, thus the debug statement is
deleted.
Reported-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>