summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-03-04iwl4965: disable 8K A-MSDU by defaultStanislaw Gruszka
iwlegacy version of this iwlwifi patch: commit aed7d9ac1836defe033b561f4306e39014ac56fd Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Date: Wed Feb 20 11:33:00 2013 +0200 iwlwifi: disable 8K A-MSDU by default 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>
2014-03-04Drivers:net:wireless:ti:wl1251: Fixed Sparse invalid assignment warningSurendra Patil
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>
2014-03-04rtlwifi: rtl8723be: Add new driverLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-04rtlwifi: rtl8723ae: rtl8723-common: Copy common dynamic power management codeLarry Finger
The drivers for RTL8723AE and RTL8723BE have some code in common. This commit copies the common power management routines into the shared code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-04rtlwifi: rtl8723ae: rtl8723-common: Copy common firmware codeLarry Finger
The drivers for RTL8723AE and RTL8723BE have some code in common. This commit copies the common firmware routines into the shared code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-04rtlwifi: rtl8723ae: rtl8723-common: Create new driver for common codeLarry Finger
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>
2014-03-04rtlwifi: Prepare existing drivers for new driverLarry Finger
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>
2014-03-04rtlwifi: btcoexist: Add new mini driverLarry Finger
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>
2014-03-04rtl818x: make sure TX descriptor writes are done before kicking DMAandrea merello
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>
2014-03-04rtl818x: Make sure the TX descriptor "valid" flag is written by lastandrea merello
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>
2014-03-04Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/ath/ath9k/recv.c drivers/net/wireless/mwifiex/pcie.c
2014-03-03wil6210: fix smatch warning in wil_cfg80211_get_station()Vladimir Kondratiev
Smatch suggests to propagate error code from wil_find_cid(), and, indeed, it is a good idea. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-03wil6210: fix buffer overflow in wil_txdesc_debugfs_show()Vladimir Kondratiev
Wrong index comparison logic, found by smatch: drivers/net/wireless/ath/wil6210/debugfs.c:402 wil_txdesc_debugfs_show() warn: buffer overflow 'wil->vring_tx' 24 <= 24 Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-03wl1251: use skb_trim to make skb shorterIvaylo Dimitrov
the current code is directly setting skb->len, which is not correct and brings problems with HAVE_EFFICIENT_UNALIGNED_ACCESS enabled in config Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-03wireless: Kconfig: add missing dependencyZhao, Gang
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>
2014-03-03ath9k_hw: tweak noise immunity thresholds for older chipsetsFelix Fietkau
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>
2014-03-03ath9k_hw: toggle weak signal detection in AP mode on older chipsetsFelix Fietkau
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>
2014-03-03ath9k: fix invalid max frame lengthSylvain Roger Rieunier
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>
2014-03-03net: Replace min macro with min_tSilvan Jegen
Instead of an explicit cast, use the min_t macro. Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-03Merge branch 'for-upstream' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
2014-02-28brcmfmac: reset suspend flag upon sdio suspend failureArend van Spriel
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>
2014-02-28mwifiex: update MCS information as per antenna settingsAmitkumar Karwar
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>
2014-02-28mwifiex: replace num_cmd_timeout with is_cmd_timedoutAmitkumar Karwar
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>
2014-02-28mwifiex: get rid of extra num_cmd_timeout variableAmitkumar Karwar
We already have one in mwifiex_adapter structure. 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>
2014-02-28mwifiex: block further commands after timeoutAmitkumar Karwar
This patch adds a check in command preparation routine. 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>
2014-02-28brcmfmac: use pre-allocated scatter-gather table for txglommingArend van Spriel
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>
2014-02-28brcmfmac: Correct mcs index reportDaniel Kim
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>
2014-02-28brcmfmac: Put frame sdio tx error handling in sub function.Hante Meuleman
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
2014-02-28mwifiex: stop AP at shutdown timeAmitkumar Karwar
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>
2014-02-28mwifiex: skipping pending commands after unloadAmitkumar Karwar
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>
2014-02-28mwifiex: abort scan while cancelling pending commandAmitkumar Karwar
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>
2014-02-28mwifiex: change transmit buffer size for 8897Amitkumar Karwar
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>
2014-02-28mwifiex: remove global variable cmd_wait_q_requiredBing Zhao
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>
2014-02-28rtlwifi: Remove redundant if clauseHeinrich Schuchardt
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28wil6210: do not reorder groupcast RxVladimir Kondratiev
Groupcast frames are not subject for BACK reordering because they are not ACK'ed and one can't request re-transmitt Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28wil6210: single station disconnectVladimir Kondratiev
implement del_station() method in the struct cfg80211_ops It allows to disconnect single peer from the AP Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28wil6210: use ether_addr_equalVladimir Kondratiev
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28wil6210: Provide signal strength indicationVladimir Kondratiev
When notifying about Rx mgmt (ex: during scan), extract signal strength reported by the hardware. signal is not MBM, it is arbitrary units 0..100 Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28wil6210: Fill vring2cid_tid table earlyVladimir Kondratiev
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>
2014-02-28wil6210: disconnect only requested peerVladimir Kondratiev
Disconnect event reported by the FW, should lead to disconnection of only requested peer. Find for the appropriate CID and disconnect only it For AP-like interface, notify cfg80211 with del_sta(), for the client type interface, disconnect and turn link off. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28wil6210: per-connection statisticsVladimir Kondratiev
Calculate statistics per connection, report with "iw station dump" Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28wil6210: dump_station initial supportVladimir Kondratiev
Rx stats is not calculated per STA - just give some number Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28wil6210: fix BACK status processingVladimir Kondratiev
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>
2014-02-28wil6210: broadcast TxVladimir Kondratiev
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>
2014-02-28wil6210: Find free vring for TxVladimir Kondratiev
There are 24 possible Tx vrings; when doind multiple connections, more then one vring has to be used. Search for free one and select it. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28wil6210: Block ACKVladimir Kondratiev
When running multiple connections, hardware can't do BACK reordering and it should be done on the host. Model after mac80211's implementation. Drop RCU for now; to be re-added when BACK will be stabilized BACK handshaking is not implemented yet in the hardware, pretend it was done to support the way FW operating Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28wil6210: multiple connect - initial supportVladimir Kondratiev
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>
2014-02-28wil6210: [DEBUG] Improve Vring printingVladimir Kondratiev
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>
2014-02-28wil6210: [DEBUG] allow to query Rx and all Tx VRING descriptorsVladimir Kondratiev
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>
2014-02-28wil6210: Tx management frameVladimir Kondratiev
Implement management frame passing. In order to receive frame on the other side, remain_on_channel() should be implemented as well Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>