If p54u_load_firmware() fails, p54u_probe() does not deallocate
already allocated resources. The patch adds proper failure handling.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This warning arises because the code is testing the indices for the wrong maximum
values. In addition, the tests merely putput a warning, and then procedes to
corrupt memory. With this change, any such invalid memory access is avoided.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 13 Mar 2014 17:08:27 +0000 (13:08 -0400)]
wlan-ng: fixup staging driver for removal of ieee80211_dsss_chan_to_freq
Commit 3ebe8e257307 ("ieee80211: remove function
ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}") removed
ieee80211_dsss_chan_to_freq, but it neglected to account for this
staging driver...
Cc: Zhao, Gang <gamerh2o@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 13 Mar 2014 16:53:52 +0000 (12:53 -0400)]
rtl8821ae: fixup staging driver for revised ieee80211_is_robust_mgmt_frame
Commit d8ca16db6bb2 ("mac80211: add length check in
ieee80211_is_robust_mgmt_frame()") changed that API to take an skb,
and added "_ieee80211_is_robust_mgmt_frame" as a direct replacement
for the older API. This is the same fix that was applied to the other
rtlwifi drivers in that commit.
Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reversal of fortune -- I thought this was going to be resolved by other
means, but that hasn't materialized. Plus, apparently we now care more
than I realized about not breaking staging drivers...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marek Puzyniak [Wed, 5 Mar 2014 12:10:33 +0000 (13:10 +0100)]
ath10k: do not overwrite max_antenna_gain
Seems like we have an old bug, where we incidently overwrites
the max_antenna_gain we pass to firmware, with zero value.
End of all we are artifically reducing the output power.
This patch removes the excessive assignment on max_antenna_gain,
which is being provided by regulatory domain, and consequently
improves the tx power.
Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
It fixes following sparse check warning
>#make C=1 CF=-D__CHECK_ENDIAN__ drivers/net/wireless/mwl8k.o
>drivers/net/wireless/mwl8k.c:3089:6: warning: symbol 'mwl8k_update_survey' was not declared. Should it be static?
Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Thu, 6 Mar 2014 09:16:12 +0000 (10:16 +0100)]
brcmfmac: Use atomic functions for intstatus update.
The intstatus in sdio code can be updated from different
threads. To protect intstatus access, atomic functions are
used. One of them is set_bit, but this function is not
guaranteed atomic on all platforms. The loop was replaced
with local created OR function.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Wed, 5 Mar 2014 23:26:01 +0000 (17:26 -0600)]
rtlwifi: rtl8723be: Fix smatch warnings
Smatch reports the following:
drivers/net/wireless/rtlwifi/rtl8723be/fw.c:208 _rtl8723be_fill_h2c_command() warn: variable dereferenced before check 'rtlhal' (see line 69)
drivers/net/wireless/rtlwifi/rtl8723be/hw.c:1732 _rtl8723be_read_adapter_info() error: __builtin_memcpy() '&rtlefuse->efuse_map[0][0]' too small (256 vs 512)
The first one is fixed by removing two pointless tests for NULL pointers.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/rtl8723be/hw.c:2214:30: sparse: cast to restricted __le32
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 4 Mar 2014 22:53:53 +0000 (16:53 -0600)]
rtlwifi: rtl8723ae: Fix too long disable of IRQs
In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
<olivier@trillion01.com> fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8723ae.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 4 Mar 2014 22:53:52 +0000 (16:53 -0600)]
rtlwifi: rtl8188ee: Fix too long disable of IRQs
In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
<olivier@trillion01.com> fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8188ee.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 4 Mar 2014 22:53:51 +0000 (16:53 -0600)]
rtlwifi: rtl8192se: Fix too long disable of IRQs
In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
<olivier@trillion01.com> fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8192se.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 4 Mar 2014 22:53:50 +0000 (16:53 -0600)]
rtlwifi: rtl8192cu: Fix too long disable of IRQs
In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
<olivier@trillion01.com> fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8192cu.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
In a previous commit, Peter Wu removed this call as configure_filter takes care
of setting/clearing RCR_AAP. This patch makes the same change for rtl8723be.
In addition, a change is made in the logging level for one debug printout.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 4 Mar 2014 22:53:47 +0000 (16:53 -0600)]
rtlwifi: rtl8192ce: rtl8192cu: rtl8192de: rtl8192se: rtl8723ae: rtl8723be: rtl8188eu: Modify for new API
The addition of a driver for the RTL8821AE requires a new API for the
fill_tx_desc() and set_desc() callback routines. This commit makes the
appropriate modifications in all the other drivers.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Supporting 8K A-MSDU means that we need to allocate order 1
pages for every Rx packet. Even when there is no traffic.
This adds stress on the memory manager. The handling of
compound pages is also less trivial for the memory manager
and not using them will make the allocation code run faster
although I didn't really measure.
Eric also pointed out that having huge buffers with little
data in them is not very nice towards the TCP stack since
the truesize of the skb is huge. This doesn't allow TCP
to have a big Rx window.
See https://patchwork.kernel.org/patch/2167711/ for details.
Note that very few vendors will actually send A-MSDU.
Disable this feature by default.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sparse warns about invalid assignment in
drivers/net/wireless/ti/wl1251/cmd.c:451:42: warning: invalid assignment: |=
drivers/net/wireless/ti/wl1251/cmd.c:451:42: left side has type restricted __le16
drivers/net/wireless/ti/wl1251/cmd.c:451:42: right side has type int
Hence type converted right side to __le16.
Signed-off-by: Surendra Patil <surendra.tux@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Fri, 28 Feb 2014 21:16:47 +0000 (15:16 -0600)]
rtlwifi: rtl8723ae: rtl8723-common: Create new driver for common code
The drivers for RTL8723AE and RTL8723BE have some code in common.
This commit creates a driver for this code that will be shared, and
copies those common routines from rtl8723ae's phy code.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Fri, 28 Feb 2014 21:16:46 +0000 (15:16 -0600)]
rtlwifi: Prepare existing drivers for new driver
A driver for the RTL8723BE will soon be added. This patch adds the
necessary parts to the common headers, and modifies the existing
drivers for those changes.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Fri, 28 Feb 2014 21:16:43 +0000 (15:16 -0600)]
rtlwifi: btcoexist: Add new mini driver
A new driver in the rtlwifi family for the RTL8723BE will soon be added.
The bluetooth coexistence code for this device has been split into a separate
mini driver as it will be shared with other devices. This commit adds the
the headers and sources, and modifies Kconfig and Makefile to configure and
build this driver.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
andrea merello [Tue, 18 Feb 2014 01:10:46 +0000 (02:10 +0100)]
rtl818x: make sure TX descriptor writes are done before kicking DMA
The TX descriptors are consumed by the HW using DMA.
Even if in the driver code the TX descriptor writes appears before
the HW "dma kick" register writes, the CPU may reorder them.
If this happens, the TX may not happen at all becase the "valid"
descriptor flag may have not been set yet.
This patch adds a write memory barrier to ensures the TX
descriptor is written before writing to the HW "dma kick" register.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
andrea merello [Tue, 18 Feb 2014 01:10:45 +0000 (02:10 +0100)]
rtl818x: Make sure the TX descriptor "valid" flag is written by last
The TX descriptors are consumed by the HW using DMA.
Even if in the driver code the memory write that sets the "valid"
flag appears after all other writes, the CPU may reorder writes,
causing the HW to consider as valid a not-fully-written yet
descriptor.
This may cause HW incorrect behaviour.
This can happen because (AFAIK) the HW may attempt DMA
asynchronously without waiting to be kicked by the following
register write.
This patch adds a write memory barrier to enforce writes ordering.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
iwlwifi: mvm: don't WARN when statistics are handled late
Since the statistics handler is asynchrous, it can very well
be that we will handle the statistics (hence the RSSI
fluctuation) when we already disassociated.
Don't WARN on this case.
This solves: https://bugzilla.redhat.com/show_bug.cgi?id=1071998
Zhao, Gang [Sat, 1 Mar 2014 06:26:29 +0000 (14:26 +0800)]
wireless: Kconfig: add missing dependency
Previous driver changes to airo, atmel, wl3501_cs, and usb_zd1201 need
to include <net/cfg80211.h>, which depends on CFG80211, so add the
missing dependency.
Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 28 Feb 2014 18:02:25 +0000 (19:02 +0100)]
ath9k_hw: tweak noise immunity thresholds for older chipsets
Older chipsets are more sensitive to high PHY error counts, and the
current noise immunity thresholds were based on tests run at QCA with
newer chipsets.
This patch brings back the values from the old ANI implementation for
old chipsets, and it also disables weak signal detection on an earlier
noise immunity level, to improve overall radio stability on affected
devices.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 28 Feb 2014 18:02:24 +0000 (19:02 +0100)]
ath9k_hw: toggle weak signal detection in AP mode on older chipsets
The commit 80b4205b "ath9k: Fix OFDM weak signal detection for AP mode"
prevented weak signal detection changes from taking effect in AP mode on
all chipsets, claiming it is "not allowed".
The main reason for not disabling weak signal detection in AP mode is
that typically beacon RSSI is used to track whether it is needed to
boost range, and this is unavailable in AP mode for obvious reasons.
The problem with not disabling weak signal detection is that older
chipsets are very sensitive to high PHY error counts. When faced with
heavy noise, this can lead to an excessive amount of "Failed to stop
TX DMA" errors in the field.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
According to 802.11n-2012 standard in paragraph PPDU Fromat(20.3.2) HT-mixed
format Hearder PPDU contains : L_STF, L_LTF, L_SIG, HT_SIG, HT_STF, HT_LTF
they are symbols in the preamble, there are in time unit(us) that's for why
it can't be computed in bytes
Signed-off-by: Sylvain ROGER RIEUNIER <sylvain.roger.rieunier@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Thu, 27 Feb 2014 16:50:00 +0000 (18:50 +0200)]
ath10k: add vdev-id, return code to error codes
When using multiple vdevs (stations, aps, etc), it is
nice to be able to associate log messages with specific
interfaces. So, add vdev-id to most logging messages.
Add return code as well, where it was missing.
kvalo: unify some of the messages to follow the same style
Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Arend van Spriel [Tue, 25 Feb 2014 19:30:38 +0000 (20:30 +0100)]
brcmfmac: reset suspend flag upon sdio suspend failure
The suspend callback first sets the suspend flag used in the driver
but after that the actual suspend is done, which may fail. Reset the
flag upon suspend failure.
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:18 +0000 (19:35 -0800)]
mwifiex: update MCS information as per antenna settings
Even if the device is changed to 1X1 mode, data is sent with
higher MCS rates after association.
This patch fixes the problem by updating MCS information field
in HT capability when antenna setting changes so that correct
information will be advertised in association and probe request.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:17 +0000 (19:35 -0800)]
mwifiex: replace num_cmd_timeout with is_cmd_timedout
Command timeout happens when firmware goes into bad state.
There is no chance that next command will be successful after
this. Hence we will maintain a flag instead of count.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 27 Feb 2014 18:25:00 +0000 (19:25 +0100)]
brcmfmac: use pre-allocated scatter-gather table for txglomming
Instead of allocating a scatter-gather table for every transmit
reuse a pre-allocated table. The transmit path will be faster by
taking out this allocation.
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Kim [Tue, 25 Feb 2014 19:30:36 +0000 (20:30 +0100)]
brcmfmac: Correct mcs index report
There is a mismatch between the mcs index(0-7) reported to cfg80211
and the actual mcs index(0-15) in use. This patch resolves the mismatch
by setting mcs info with the number of chains read from FW.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Daniel Kim <dekim@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:17 +0000 (19:35 -0800)]
mwifiex: stop AP at shutdown time
Deauth is sent to AP when the device is acting as station at
shutdown time. Similarly we should stop AP operation also.
mwifiex_deauthenticate() takes care closing the connection
based on provided interface type.
Add a new function to simplify the code.
Reported-by: Avery Pennarun <apenwarr@gmail.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:16 +0000 (19:35 -0800)]
mwifiex: skipping pending commands after unload
We skip downloading other commands after FUNC_SHUTDOWN is queued
during driver unload. Main thread should be woken up each time
after freeing skipped command so that FUNC_SHUTDOWN gets served
in case if there are other pending commands before FUNC_SHUTDOWN.
Also, call mwifiex_complete_cmd() only for synchronous commands.
Reported-by: Avery Pennarun <apenwarr@gmail.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Maithili Hinge <maithili@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:15 +0000 (19:35 -0800)]
mwifiex: abort scan while cancelling pending command
mwifiex_cancel_pending_ioctl() and
mwifiex_cancel_all_pending_cmd() are called in command timeout
and driver unload paths respectively.
If scan operation is in progress, we should abort it smoothly.
Reported-by: Tim Shepard <shep@alum.mit.edu> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:13 +0000 (19:35 -0800)]
mwifiex: change transmit buffer size for 8897
Currently default Tx buffer size configured to firmware is 2K
for all chipsets. This patch changes it to 4K for SD/PCIe/USB
8897 chipsets as per firmware requirements.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bing Zhao [Fri, 28 Feb 2014 03:35:12 +0000 (19:35 -0800)]
mwifiex: remove global variable cmd_wait_q_required
There is a race condition while queuing synchronous command and
asynchronous command requested from different threads, because
the wait_q_enabled flag is set based on a global variable
cmd_wait_q_required.
The issue is fixed by removing this global variable and using a
unified function with an argument 'sync' passed into the
function.
Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Need to fill translation table before calling WMI with WMI_VRING_CFG_CMDID
since firmware may generate events during this call; and events need translation
table filled to be properly dispatched
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
When FW notifies about BACK status change, it provides ring ID.
Process BA status for requested connection only. As for now, FW
don't report Rx BACK status, it reports Tx one instead.
As per current algorithm used in the firmware, imply Rx BACK
state is in sync with Tx one
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hardware do not support "real" broadcast on the air.
Use method similar to the Directed Multicast Service (DMS) as
described in the 10.23.15.2 "DMS procedures"
This service copies frame and delivers unicast for each associated peer
Do the following: send original frame to 1-st Tx vring, and send copies
to all other active vrings.
As currently hardware/firmware don't support A-MSDU, convert broadcast
frame to unicast instead of wrapping it in A-MSDU
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Enable multiple (up to 8 - HW/FW limitation) simultaneous connections.
Each connection has its own CID (connection ID) that describes chip's
beam-forming entity. Tx Vring should refer to correct CID for frame to reach
its destination.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Print '_' for the 'idle' descriptors - this makes vring representation more visible.
Also, for the Tx side, differentiate descriptors having associated skb's - print ones
with skb as 'H' and without as 'h'. Good to represent scattered frames.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
wil6210: [DEBUG] allow to query Rx and all Tx VRING descriptors
Expand debug capabilities to query all Tx/Rx descriptors. Usefull to analyse
various hardware/software stall situations. Printed is whole descriptor content
and the frame itself.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Wed, 26 Feb 2014 12:32:32 +0000 (13:32 +0100)]
brcmfmac: Use atomic functions for intstatus update.
The intstatus in sdio code can be updated from different
threads. To protect intstatus access, atomic functions are
used. The loop was replaced using atomic_set_mask().
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Paul Stewart [Wed, 26 Feb 2014 00:31:37 +0000 (16:31 -0800)]
mwifiex: Track BA sequence number reset
Some stations reset the sequence number for traffic-ids (TIDs)
as they initiate a block-ACK session. In order to detect such
behavior, mwifiex must note the starting sequence number given
during the ADDBA request. If the first received sequence number
after the ADDBA falls outside the receive window for this TID but
after the the ADDBA starting sequence number, we can assume that
this AP has reset its sequence number during the ADDBA. In this
case we must adjust the input window backward to incorporate this
received sequence number instead of ignoring it. Otherwise, we
could fail to successfully retrieve an arbitrarily large number
of downstream frames at the beginning of the block-ACK session.
Signed-off-by: Paul Stewart <pstew@chromium.org> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:33 +0000 (20:30 +0100)]
brcmfmac: Small cleanup of redundant code.
In time some of the code got redundant, without being noticed.
This patch does not change any functionality, just removes
redundant code.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:32 +0000 (20:30 +0100)]
brcmfmac: Remove immediate sleep support from SDIO.
Immediate sleep support is an aggressive power saving option
that has not been enabled in brcmfmac and is removed to
simplify code.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:31 +0000 (20:30 +0100)]
brcmfmac: Minimize SDIO dpc scheduling.
SDIO dpc scheduling is done (repeated) when counter is set. This
counter gets decreased when dpc is finished. It is more efficient
to set counter to 0 before the dpc is actullay run. This will
minimize the frequency with which dpc is executed.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:30 +0000 (20:30 +0100)]
brcmfmac: de-init driver layers in correct order.
First clean up fw signalling, before cleaning up the bus and
proto layer. Old order can cause oops in some circumstances.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:29 +0000 (20:30 +0100)]
brcmfmac: Correct header debug dump for sdio tx hdrs.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Tue, 25 Feb 2014 19:30:28 +0000 (20:30 +0100)]
brcmfmac: remove unused variable data_len from brcmf_sdio_bus_txdata()
The local variable data_len is assigned but never used so get rid
of it.
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Tue, 25 Feb 2014 19:30:27 +0000 (20:30 +0100)]
brcmfmac: fix use of skb control buffer in SDIO driver part
The SDIO driver has a 16-bit field defined in the skbuff control buffer.
However, it is accessed as a u32 overwriting other control info. Another
issue is that the field is not initialized for networking packets, but
the control buffer content is unspecified as other networking layers can
use it.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:26 +0000 (20:30 +0100)]
brcmfmac: Make firmeware roaming a module param.
Internal firmware roaming is enabled by default. This patch
makes it possible to disable internal firmware roaming by
specifying roamoff=1 as module param.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>