summaryrefslogtreecommitdiffstats
path: root/drivers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mwifiex: replace ra_list_curr by list rotation.Andreas Fenkart2013-04-234-69/+40
| | | | | | | | | | | | | | After a packet is successfully transmitted, ra list is rotated, so the ra next to the one transmitted, will be the first in the list. This way we pick the ra' in a round robin fashion. This significantly simplifies iteration in mwifiex_wmm_get_highest_priolist_ptr to a call to list_for_each_entry. List rotation is done via list_move, where the head itself is temporarily removed and then re-inserted after the item just transferred. Signed-off-by: Andreas Fenkart <andreas.fenkart@streamunlimited.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmfmac: add credit borrowing mechanismArend van Spriel2013-04-231-8/+87
| | | | | | | | | | | | The firmware provides credits to the driver per WMM-AC. When only AC_BE are to be transmitted to the firmware the driver may use credits from other priorities to send AC_BE packets towards the firmware. Reviewed-by: Hante Meuleman <meuleman@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>
* brcmfmac: correct error handling in brcmf_fws_init()Arend van Spriel2013-04-232-9/+24
| | | | | | | | | | | | | In brcmf_fws_init() the error flows were not properly handled and the caller ignored the return value. The only action that is allowed to fail in brcmf_fws_init() is setting the tlv in firmware as the feature is not supported on all devices. Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Hante Meuleman <meuleman@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>
* brcmfmac: flush queue upon MACDESC_DEL firmware signalArend van Spriel2013-04-231-2/+3
| | | | | | | | | | When firmware signals the driver to remove a destination entry it may have sk_buff packets queued for it. These should be freed. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmfmac: support critical protocol API for DHCPPiotr Haber2013-04-235-1/+576
| | | | | | | | | | | | | Adds support for the critical protocol API provided by nl80211 which gives Wifi traffic priority over a Bluetooth (e)SCO connection and disables scanning during DCHP negotiation. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmfmac: allow scanning to be suppressed in the driverArend van Spriel2013-04-232-1/+13
| | | | | | | | | | During the DHCP protocol exchange it is benificial to suppress scan requests which may decrease time to complete DHCP protocol. Reviewed-by: Hante Meuleman <meuleman@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>
* ath9k: Fix RX DMA mappingSujith Manoharan2013-04-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the commit "ath9k: improve dma map failure handling", the wrong buffer was DMA-unmapped, introducing warnings like the one below. This patch fixes the issue. WARNING: at /home/sujith/dev/wireless-testing/lib/dma-debug.c:986 check_sync+0x4bc/0x580() Hardware name: LIFEBOOK AH531 ath9k 0000:02:00.0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x00000000d9012800] [size=48 bytes] Pid: 86, comm: kworker/u:5 Tainted: G W O 3.9.0-rc8-wl-debug #106 Call Trace: [<ffffffff810410c0>] warn_slowpath_common+0x70/0xa0 [<ffffffff8104113c>] warn_slowpath_fmt+0x4c/0x50 [<ffffffff8125432c>] check_sync+0x4bc/0x580 [<ffffffff8109e5f7>] ? trace_hardirqs_on_caller+0xa7/0x190 [<ffffffff8109e6ed>] ? trace_hardirqs_on+0xd/0x10 [<ffffffff81254488>] debug_dma_sync_single_for_device+0x48/0x50 [<ffffffffa0a53825>] ? ath9k_iowrite32+0x35/0x90 [ath9k] [<ffffffff812512f0>] ? swiotlb_tbl_sync_single+0x50/0x90 [<ffffffff81251350>] ? swiotlb_sync_single+0x20/0x30 [<ffffffff8125137f>] ? swiotlb_sync_single_for_device+0xf/0x20 [<ffffffffa0a58baf>] ath_rx_edma_buf_link+0xef/0x140 [ath9k] [<ffffffffa0a58c4e>] ath_rx_addbuffer_edma+0x4e/0x90 [ath9k] [<ffffffffa0a59c51>] ath_startrecv+0xf1/0x120 [ath9k] [<ffffffffa0a550e0>] ath_complete_reset+0x20/0x130 [ath9k] [<ffffffffa0a5790d>] ath_reset_internal+0x10d/0x210 [ath9k] [<ffffffffa0a5878c>] ath9k_config+0x47c/0x7b0 [ath9k] [<ffffffffa06d4978>] ieee80211_hw_config+0x88/0x3f0 [mac80211] [<ffffffffa06d4a3f>] ? ieee80211_hw_config+0x14f/0x3f0 [mac80211] [<ffffffffa06dbed1>] __ieee80211_scan_completed+0xc1/0x440 [mac80211] [<ffffffffa06dd002>] ieee80211_scan_work+0x82/0x440 [mac80211] [<ffffffff810606a3>] process_one_work+0x1e3/0x530 [<ffffffff81060641>] ? process_one_work+0x181/0x530 [<ffffffff8106163f>] worker_thread+0x10f/0x3c0 [<ffffffff81061530>] ? manage_workers+0x330/0x330 [<ffffffff810665da>] kthread+0xea/0xf0 [<ffffffff810664f0>] ? kthread_create_on_node+0x140/0x140 [<ffffffff8146085c>] ret_from_fork+0x7c/0xb0 [<ffffffff810664f0>] ? kthread_create_on_node+0x140/0x140 Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Use lockless variants for the RX fifo queueSujith Manoharan2013-04-231-2/+2
| | | | | | | | | | | | | | The RX fifo can be accessed from the common tasklet or it can be reaped/cleaned when RX is stopped, which is done when doing a reset or channel change - this happens in process context. Since it is ensured that there are no pending tasklets when stopping RX and cleaning the FIFO, there is no need to use SKB queue functions which take internal locks. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Reduce deep indentationSujith Manoharan2013-04-231-46/+44
| | | | | | | | | The EDMA case is handled first, so the else condition can be removed. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove unused argument "size"Sujith Manoharan2013-04-231-9/+3
| | | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add support for the new rate control APIFelix Fietkau2013-04-233-8/+19
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: merge ath_tx_start_dma into ath_tx_startFelix Fietkau2013-04-231-44/+36
| | | | | | | | The split makes no sense and merging the functions makes further changes easier to implement Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtl8192c:dm: Properly initialize local array and set value.Han Shen2013-04-231-2/+2
| | | | | | | | | | GCC 4.8 is spitting out uninitialized-variable warnings against "drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c". This patch adds initialization to the variable and properly sets its value. Signed-off-by: Han Shen (shenhan@google.com) Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: apply coverage class on slottime tooMathias Kretschmer2013-04-231-1/+2
| | | | | | | | | | | | | | According to 802.11-2007 17.3.8.6 (slot time), the slot time should be increased by 3 us * coverage class. The code only increased the ack timeout, which is fixed by this patch. We have noticed in our long shot scenario that we see less collisions with this patch. Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> [add standard reference and commit message] Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of git://git.infradead.org/users/rafal/b43-nextJohn W. Linville2013-04-239-442/+661
|\
| * b43: N-PHY: don't use deprecated b43_radio_foo16Rafał Miłecki2013-04-231-59/+59
| | | | | | | | | | | | | | All radio ops are 16b (there is only 1 exception for reg 0x1), so we deprecated b43_radio_read16 and b43_radio_write16 long time ago. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: clean init tablesRafał Miłecki2013-04-232-58/+62
| | | | | | | | | | | | | | Sort defines, use one macro for all revs, support for 5GHz when uploading antenna table. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: move tables init function to tables fileRafał Miłecki2013-04-233-16/+12
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: use defines for (re)storing VCM configRafał Miłecki2013-04-231-5/+14
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: use shortcut "ctl" in functions namesRafał Miłecki2013-04-231-22/+22
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: use enum for INTC override function argumentRafał Miłecki2013-04-231-18/+28
| | | | | | | | | | | | Also make a function name shorter so we can easily fit 80 chars. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: define missing registersRafał Miłecki2013-04-232-38/+182
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: use defines for board_typeRafał Miłecki2013-04-232-5/+5
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: fix "NB" RSSI calibration on PHYs rev2-Rafał Miłecki2013-04-231-1/+1
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: use enum for RSSI type everywhere we use itRafał Miłecki2013-04-231-43/+61
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: rename RSSI types to be shorter and more accurateRafał Miłecki2013-04-231-19/+19
| | | | | | | | | | | | Thanks to Broadcom releasing some code we can use better names. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: use more friendly variables names in RSSI codeRafał Miłecki2013-04-231-28/+36
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: simplify conditions in RSSI offset scale functionRafał Miłecki2013-04-231-55/+65
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: N-PHY: use enum for RAIL typeRafał Miłecki2013-04-231-9/+17
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: HT-PHY: use enum for RSSI typesRafał Miłecki2013-04-231-5/+16
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: HT-PHY: store TX power state before disabling itRafał Miłecki2013-04-231-4/+6
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: HT-PHY: define regs for power estimationRafał Miłecki2013-04-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In MMIO dumps of ndiswrapper there are following PHY ops: phy_read(0x0118) -> 0x013d phy_read(0x01ed) -> 0x993d phy_read(0x0119) -> 0x012f phy_read(0x01ee) -> 0x992f phy_read(0x011a) -> 0x0139 phy_read(0x0969) -> 0x9939 It matches the code of wlc_phy_txpower_est_power_nphy (from brcm80211), so we know the registers meaning. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: HT-PHY: do some extra TSSI setup after configuring TXRafał Miłecki2013-04-231-0/+13
| | | | | | | | | | | | | | | | | | | | After b43_phy_ht_tx_power_ctl_setup there are some extra radio ops: radio_read(0x08bf) -> 0x0001 radio_write(0x08bf) <- 0x0001 radio_write(0x0159) <- 0x0011 On N-PHY we write 0x11 to TSSI regs, so it's probably sth similar. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: HT-PHY: finish calculating values for idle TSSIRafał Miłecki2013-04-231-2/+18
| | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: HT-PHY: tables: don't duplicate core-generic regsRafał Miłecki2013-04-233-59/+23
| | | | | | | | | | | | | | Now when we know many radio regs at 0x000 are core-generic, I've noticed we duplicate some values in the tables. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
| * b43: HT-PHY: rename defines addressing cores on the 2059 radioRafał Miłecki2013-04-232-14/+14
| | | | | | | | | | | | | | | | | | After comparing writes to registers at 0x000, 0x400 and 0x800 it seems there are many very similar writes. So 0x000 offset is not for accessing something totally different, but probably just the first out of three cores. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
* | Merge branch 'master' of ↵John W. Linville2013-04-238-146/+170
|\ \ | |/ |/| | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
| * ath9k_hw: change AR9580 initvals to fix a stability issueFelix Fietkau2013-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | The hardware parsing of Control Wrapper Frames needs to be disabled, as it has been causing spurious decryption error reports. The initvals for other chips have been updated to disable it, but AR9580 was left out for some reason. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ssb: implement spurious tone avoidanceRafał Miłecki2013-04-102-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | And make use of it in b43. This fixes a regression introduced with 49d55cef5b1925a5c1efb6aaddaa40fc7c693335 b43: N-PHY: implement spurious tone avoidance This commit made BCM4322 use only MCS 0 on channel 13, which of course resulted in performance drop (down to 0.7Mb/s). Reported-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: request firmware in .start() callbackArend van Spriel2013-04-081-132/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | The firmware is requested from user-space. To assure the request is handled it is recommended to do the request upon IFF_UP. For a mac80211 driver the .start() callback can be considered the equivalent. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmfmac: remove advertising P2P device supportArend van Spriel2013-04-081-6/+1
| | | | | | | | | | | | | | | | | | | | | | For v3.9 kernel the P2P functionality was merged, but it does not fully support the P2P_DEVICE interface type. This patch removes advertising that support. Reviewed-by: Hante Meuleman <meuleman@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>
| * ath9k_htc: accept 1.x firmware newer than 1.3Felix Fietkau2013-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | Since the firmware has been open sourced, the minor version has been bumped to 1.4 and the API/ABI will stay compatible across further 1.x releases. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: fix DFS detector called in softirq contextZefir Kurtisi2013-04-082-4/+4
| | | | | | | | | | Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: remove redundant initialization for bss_descriptorBing Zhao2013-04-222-29/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialization of bss_descriptor is unnecessary as the entire structure will be overwritten by a memcpy followed by. Initialize disable_11ac flag properly by setting it to true in mwifiex_fill_new_bss_desc(). Reported-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: fix use-after-free in beacon_ie processingBing Zhao2013-04-222-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | beacon_ie buffer is allocated in mwifiex_fill_new_bss_desc() and the buffer pointer is saved in bss_desc->beacon_buf. beacon_ie is freed before the function returns. However, bss_desc->beacon_buf is still being accessed afterwards. Fix it by freeing beacon_ie (bss_desc->beacon_buf) in caller's scope. Reviewed-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: don't try to associate when bss_mode is not STABing Zhao2013-04-221-11/+6
| | | | | | | | | | | | | | | | | | | | | | We have blocked association attempts on interfaces configured in AP and AD-HOC modes. P2P mode should be blocked too. Furthermore, an error code must be returned if we are unable to associate. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: make use of msecs_to_jiffies()Bing Zhao2013-04-222-2/+2
| | | | | | | | | | | | | | | | Use msecs_to_jiffies() wherever possible. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: correct bss_mode check while appending vht operation IEBing Zhao2013-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | priv->bss_mode uses NL80211_IFTYPE_* definitions. HostCmd_BSS_MODE_IBSS is used in ad-hoc start/join command between driver and firmware. Coincidentally both HostCmd_BSS_MODE_IBSS and NL80211_IFTYPE_STATION are defined as 2. That explains why nobody complained. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: use PCI_DMA_FROMDEVICE for RX queue de-initAvinash Patil2013-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | There is a typo in mwifiex_cleanup_rxq_ring() which uses PCI_DMA_TODEVICE while unmapping PCI memory. We should actually use PCI_DMA_FROMDEVICE. Signed-off-by: Avinash Patil <patila@marvell.com> 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>
* | mwifiex: configure p2p interface during initializationBing Zhao2013-04-221-0/+3
| | | | | | | | | | | | | | | | | | | | Send P2P_MODE_CFG cmd to firmware when p2p interface is created. Without proper p2p configuration firmware may behave incorrectly while handling commands sent through this interface. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>