Commit graph

443878 commits

Author SHA1 Message Date
Daniel Mack 86f6cf4127 net: of_mdio: add of_mdiobus_link_phydev()
Add a function to walk the list of subnodes of a mdio bus and look for
a node that matches the phy's address with its 'reg' property. If found,
set the of_node pointer for the phy. This allows auto-probed pyh
devices to be augmented by information passed in via DT.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-29 15:23:29 -07:00
Daniel Mack 8f8382888c net: of_mdio: factor out code to parse a phy's 'reg' property
Factor out some logic into of_mdio_parse_addr() so it can be reused
later. While at it, use of_property_read_u32() rather than open-coding
the same logic again.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-29 15:23:18 -07:00
Paul Bolle a3b9d55350 rtlwifi: rtl8192cu: remove check for CONFIG_AUTOSUSPEND
A check for CONFIG_AUTOSUSPEND was included in this driver when it was
added in v2.6.39. But that Kconfig symbol doesn't exist. Remove that
check and the single line it hides.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:39 -04:00
Sachin Kamat 6e6f1fa60f rtlwifi: rtl8723ae: Remove duplicate inclusion of fw_common.h
fw_common.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:38 -04:00
Sachin Kamat 8ac070c02d rtlwifi: rtl8723be: Remove duplicate inclusion of phy.h
phy.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:38 -04:00
Rajkumar Manoharan 71a5f88120 ath9k: Fix interface combinations for multi-channel concurrency
Currently mac80211 does not support WDS and DFS with channel context
drivers. So advertise these features only when the driver is not
supporting channel context and modparam "use_chanctx" is introduced
for preparing channel context support in ath9k.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:37 -04:00
Bing Zhao 915f36d2e5 mwifiex: change hscfg gap parameter to avoid potential firmware deadlock
If host sleep parameter gap is set to 0xff, firmware will wait
for an ack from host to confirm the success of host wakeup.
This prevents firmware from uploading data packet before host
actually wakes up.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:36 -04:00
Avinash Patil a983e48b27 mwifiex: set TDLS link for newly created RA list
Current implementation sets tdls_link flag only while restoring
packets from TDLS queue. If traffic to peer starts after TDLS is
setup, there is no way to set TDLS link flag to true. Do this
while creating RA list and we confirm that there exist a TDLS
peer for which setup is complete.

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>
2014-05-29 13:10:36 -04:00
Avinash Patil 2144504983 mwifiex: fix a crash in extended scan event processing
[113.967694] Unable to handle kernel NULL pointer dereference
               at virtual address 00000020
............
[113.967859] PC is at mwifiex_update_rxreor_flags+0xfc/0x430
............
[113.968110] mwifiex_update_rxreor_flags+0xfc/0x430
[113.968129] mwifiex_handle_event_ext_scan_report+0x1e4/0x21c
[113.968148] mwifiex_process_sta_event+0x410/0x508
[113.968165] mwifiex_process_event+0x184/0x1e0
[113.968181] mwifiex_main_process+0x220/0x48c
[113.968197] mwifiex_sdio_interrupt+0xc8/0x1cc
[113.968210] sdio_irq_thread+0x11c/0x290

In case of legacy scan, adapter->curr_cmd is guranteed to be
non-NULL in check_next_scan_cmd. This may not be case in
extended scan where scan command response would come earlier and
set curr_cmd to NULL. Extended scan event comes later and while
trying to complete IOCTL for scan, driver would crash in
dereferencing adapter->curr_cmd->wait_q_enabled.

Avoid this by completing IOCTL in case of legacy scans only.
Internal scan would be completed while handling extended scan
command response.

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>
2014-05-29 13:10:35 -04:00
Rafał Miłecki 6fe551434c b43: N-PHY: optimize radio switching on/off
Broadcom's wl 6.30.223.141 has some optimizations for radios 0x205[67].

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:34 -04:00
Rafał Miłecki 90e569d195 b43: N-PHY: optimize init by doing some ops just once
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:33 -04:00
Rafał Miłecki 09951ad493 b43: PHY: allow init optimizations by tracking PHY state
PHY has to be often re-initialized (e.g. during band switching after PHY
reset), however some operations have to be performed only once (only
power reset affects them).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:33 -04:00
Vladimir Kondratiev cf42c4e5d3 wil6210: optimize wil_release_reorder_frames
In case of receiving frame with sequence number far greater than current,
wil_release_reorder_frames() will iterate many times over empty buffer.

Optimize this case by checking buffer emptiness and simply update
head_seq_num without iterating.

Suggested-by: Vladimir Shulman <Vladimir.Shulman@Wilocity.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:32 -04:00
Vladimir Kondratiev 39c52ee8cb wil6210: improve pointers printing
use proper format %pad for the dma_addr_t arguments;
prefix %p with 0x, as %p don't print is by itself

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:31 -04:00
Vladimir Kondratiev 047e5d74b6 wil6210: detect scan timeouts
If scan has not finished in some reasonable time (10sec), interpret it as
if firmware error occurs but was not reported. Firmware should report
scan completion for every scan request, so it is error condition indeed.
Perform firmware recovery procedure.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:31 -04:00
Vladimir Kondratiev 5bb6423e8f wil6210: inline functions for vring hi/lo watermarks
Provide clear definition of the watermarks for the vring descriptor space.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:30 -04:00
Vladimir Kondratiev fc219eed07 wil6210: limit fw error recovery attempts
In case there is something fundamentally wrong with the firmware
(example: RF cable disconnected), FW will always crash immediately
after reset. This leads to infinite fw error recovery loop.

Count consecutive unsuccessful error recovery attempts in a short period
of time, and stop doing recovery after some reasonable count.
It is still possible to manually reset fw doing
interface down/up sequence.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:29 -04:00
Vladimir Kondratiev d87bac1b26 wil6210: limit MTU
Obey 802.11 spec that defines max. data size 7920 bytes

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:28 -04:00
Rajkumar Manoharan 60ccc107c9 ath9k: Fix deadlock while updating p2p beacon timer
pm_lock is taken twice while syncing HW TSF of p2p vif.
Fix this by taking the lock at caller side.

Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:10:28 -04:00
Arend van Spriel 52f98a57d8 brcmfmac: remove firmware list from USB driver
The USB driver was using a list for firmware info that was
used in suspend/resume scenario. Now that brcmfmac is using
the asynchronous firmware request this is no longer needed.

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>
2014-05-29 13:10:27 -04:00
Hante Meuleman c40edfc042 brcmfmac: Remove interrupt endpoint usage from USB driver.
The USB bus driver always configured an USB intr EP urb. The
driver did not use the result at all and with newer firmware it is
causing continues errors on this EP.

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>
2014-05-29 13:10:26 -04:00
Daniel Kim 7dd3abc14f brcmfmac: Increase max buffer size for receiving control message from dongle
The max buffer size for receiving control message from dongle needs to be
increased considering possible block padding. Otherwise some big control
message can't be received due to buffer overrun check.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@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-05-29 13:10:26 -04:00
Arend van Spriel 6833965c46 brcmutil: assure unused bits are cleared in 11n chanspec
The firmware channel specification is a bitfield using a
16-bit integer, but only 14 lsb are used. Upon encoding
this value assure all 16 bits are cleared.

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>
2014-05-29 13:10:25 -04:00
Arend van Spriel 71ded72a2b brcmfmac: make brcmf_fw_nvram_strip() static
The function brcmf_fw_nvram_strip() is no longer called so
it does not need to be exposed.

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>
2014-05-29 13:10:24 -04:00
Arend van Spriel 5b8045d484 brcmfmac: use asynchronous firmware request in USB
This patch adds use of asynchronous firmware request to
the driver USB layer.

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>
2014-05-29 13:10:23 -04:00
Arend van Spriel bd0e1b1d38 brcmfmac: use asynchronous firmware request in SDIO
This patch adds use of asynchronous firmware request to
the driver SDIO layer.

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>
2014-05-29 13:10:23 -04:00
Arend van Spriel c1416e77a6 brcmfmac: introduce asynchronous firmware loading
The driver needs firmware to be loaded to the device, which
is done through the firmware class API. The synchronous call
request_firmware() need root filesystem to be mounted and/or
user-mode helper. These may not be avaliable on the moment
it is called. Instead use request_firmware_nowait().

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>
2014-05-29 13:10:22 -04:00
Hante Meuleman de389a533b brcmfmac: Add log of superspeed device detection to USB probe.
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-05-29 13:08:12 -04:00
Arend van Spriel 4dd7de1f9e brcmfmac: rework usb callback operations
The resume callbacks do partly the same a the probe callback
so put common code in separate function for use in the callbacks.
This also fixes suspend/resume regression introduced by

    brcmfmac: remove .init() callback for internal bus interface

    The .init() callback was the first function called by the common
    bus function brcmf_bus_start(). Given that it is not really
    necessary and the bus layer can call it before calling the
    brcmf_bus_start() function.

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>
2014-05-29 13:08:12 -04:00
Arend van Spriel 4faf28b7b4 brcmfmac: call brcmf_detach() unconditional in sdio .remove() callback
The function brcmf_detach() checks whether it needs to do his stuff
or can return immediately. No need to have the same check in the
calling code.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
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>
2014-05-29 13:08:12 -04:00
Arend van Spriel dabedab983 brcmfmac: rename nvram.[ch] for upcoming firmware handling functions
The firmware processing will be modified to use asynchronous request
firmware api. In preparation this patch is simple rename of source
and header file to which the functionality will be added.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
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>
2014-05-29 13:08:12 -04:00
Arend van Spriel f33d7a9141 brcmfmac: remove .init() callback for internal bus interface
The .init() callback was the first function called by the common
bus function brcmf_bus_start(). Given that it is not really
necessary and the bus layer can call it before calling the
brcmf_bus_start() function.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
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>
2014-05-29 13:08:11 -04:00
Arend van Spriel 5a394eba4b brcmfmac: make chandef_to_chanspec() function static
The function chandef_to_chanspec() was added by

    brcmfmac: determine chanspec from struct cfg80211_chan_def info

    The struct cfg80211_chan_def contains additional info to derive the
    bandwidth and side-band information of the chanspec. This patch adds
    chandef_to_chanspec() function used in IBSS join and starting AP
    operation.

However, it introduced a sparse warning because the function
is only called from within the source file wl_cfg80211.c.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@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>
2014-05-29 13:08:11 -04:00
Arend van Spriel 0f0fe990e3 brcmfmac: restore mpc before passing scan status to cfg80211
Before informing cfg80211 about the scan status the device should
be put back in mpc state. If done after user-space may initiate
another (scheduled) scan and fail because scan is still busy as
shown in logging below:

[ 3301.367376] brcmfmac: brcmf_fweh_event_worker event ESCAN_RESULT (69)
[ 3301.377305] brcmfmac: brcmf_fweh_event_worker   version 2 flags 0 status 0
[ 3301.384993] brcmutil: event payload, len=12
[ 3301.389208] 00000000: 0c 00 00 00 6d 00 00 00 34 12 00 00
[ 3301.389214] brcmfmac: brcmf_sdio_kso_control Enter: on=0
[ 3301.402196] brcmfmac: brcmf_inform_bss scanned AP count (0)
[ 3301.407808] brcmfmac: brcmf_notify_escan_complete Enter
[ 3301.413064] brcmfmac: brcmf_notify_escan_complete ESCAN Completed scan: Done
[ 3301.420137] brcmfmac: brcmf_sdio_bus_txctl Enter
[ 3301.420368] brcmfmac: brcmf_cfg80211_sched_scan_start Enter
[ 3301.420370] brcmfmac: brcmf_cfg80211_sched_scan_start:
				Scanning already: status (1)
[ 3301.440190] brcmfmac: brcmf_sdio_kso_control Enter: on=1
[ 3301.448695] brcmfmac: brcmf_sdio_tx_ctrlframe Enter
[ 3301.453662] brcmfmac: brcmf_sdio_bus_rxctl Enter
[ 3301.458326] brcmfmac: brcmf_sdio_isr Enter
[ 3301.462523] brcmfmac: brcmf_sdio_dpc Enter
[ 3301.466632] brcmfmac: brcmf_sdio_readframes Enter
[ 3301.471431] brcmfmac: brcmf_sdio_read_control Enter
[ 3301.476340] brcmfmac: brcmf_set_mpc MPC : 1

Reviewed-by: Hante Meuleman <meuleman@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>
2014-05-29 13:08:11 -04:00
Arend van Spriel 181f2d177e brcmfmac: reduce log level for invalid scheduled scan request
When a regular scan does not return any networks user-space does
request a scheduled scan without any matchset or ssid. This can
not be handled by the firmware so we return -EINVAL. However, as
this request is done let us not add an error message to the log.

Reviewed-by: Hante Meuleman <meuleman@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>
2014-05-29 13:08:11 -04:00
Benoit Taine 304014a6ba wcn36xx: Use kmemdup instead of kmalloc + memcpy
This issue was reported by coccicheck using the semantic patch
at scripts/coccinelle/api/memdup.cocci

Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:08:11 -04:00
Manuel Schölling 55fdb8585d mwifiex: use time_after()
To be future-proof and for better readability the time comparisons are
modified to use time_after() instead of plain, error-prone math.

Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:08:11 -04:00
Andrea Merello 347f8fdb61 at76c50x-usb: Make WEP encryption working.
Currently the driver uses HW encryption.
Whenever mac80211 calls the set_key() callback the driver restarts the
whole HW configuration procedure, in order to set (also) the new
WEP key.
However, by doing this, it causes the card to loose association information,
and the HW becomes unable to communicate with the BSS.

This patch adds support for sending another HW command, that sets only
the wep key, instead of resetting all.
Mac80211 key-set requests are thus handled via this new command.

Tested on my at76c503

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:08:10 -04:00
Andrea Merello 174beab7d4 at76c50x-usb: Don't perform DMA from stack memory
Loading the driver with DMA debugging enabled makes the kernel to complain
about the ehci driver trying to perform DMA from memory from the stack.

[ 9848.229514] WARNING: CPU: 1 PID: 627 at lib/dma-debug.c:1153 check_for_stack+0xa4/0xf0()
[ 9848.237678] ehci-pci 0000:00:04.1: DMA-API: device driver maps memory fromstack [addr=ffff88006c80da01]

This is due to at76c50x-usb driver passing buffers allocated on the stack to
the USB layer, that attempts DMA. This occurs is several places.

This patch fixes the problem by allocating those buffers via kmalloc.

Since this adds some kfree() before leaving a couple of functions, I caught the
occasion to clean-up the exit path on error.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:08:10 -04:00
Felix Fietkau 7dd74f5fab ath9k: avoid passing buffers to the hardware during flush
The commit "ath9k: fix possible hang on flush" changed the receive code
to always link rx descriptors of processed frames, even when flushing.
In some cases, this leads to flushed rx buffers being passed to the
hardware while rx is already stopped.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:08:10 -04:00
Zefir Kurtisi 3f3c09f38b ath9k: simplify DFS pulse interval debug printing
Make DFS pulse interval calculation independent
from CONFIG_ATH9K_DEBUGFS.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:08:10 -04:00
Kees Cook d6755bd4fb rsi: avoid format string leak to thread name
Since the rsi_create_kthread interface does not include any format
string arguments, make sure that the resulting thread name can never
accidentally process the name as a format string.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29 13:08:10 -04:00
John W. Linville a5eb1aeb25 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Conflicts:
	drivers/bluetooth/btusb.c
2014-05-29 13:03:47 -04:00
John W. Linville 737be10d8c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next 2014-05-29 12:55:38 -04:00
Shannon Nelson 7e612411e7 i40e: relax the firmware API version check
As long as the Firmware isn't reporting a higher API major version number
than what the driver knows about, the driver does not need to worry as
much about greater minor numbers.  The API changes minor numbers when
things get added to the API, but no existing structs or calls are changed.
The driver has the option of warning that the minor numbers don't match.

This will allow a little more flexibility in handling newer NICs and NVMs
in the field.

Change-ID: I5302acd2d147a2992328991ee7223b2ff39c8741
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-05-29 05:55:44 -07:00
Mitch Williams 0efe124008 i40evf: don't use RESETTING state during reinit
The RESETTING state means that a Catastrophic Hardware Bad Thing is
happening and the driver need to tiptoe around and not use the admin
queue or registers or anything like that.

On the other hand, a reinit is no big deal and we can use the admin
queue, and we should. So don't set the state to RESETTING here.

This fixes a Tx hang and FW crash that happens after setting the MTU on
a VF.

Change-ID: I3e6191edbd6a93958a1f1bd1d41a5c2d17474d41
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-05-29 04:53:10 -07:00
Vasu Dev 566bb85db7 i40: disable FCoE for MFP modes
Currently FCoE is not supported with MFP modes, so this patch
makes sure it is disabled.

It is disabled by overriding HW FCoE capability, so that later
it can be re-enabled by just the SW upgrade.

Change-ID: I1c0bae5c099b209f56b88bda360031a8565e43e8
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-By: Jack Morgan <jack.morgan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-05-29 04:46:14 -07:00
Shannon Nelson c9b9b0aeac i40e: add clear_pxe AdminQ request
Add the clear_pxe AdminQ API call.

Change-ID: Ia770ff3404971bb3889b53a39c3a7bfaf3f4d399
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-05-29 04:38:45 -07:00
Akeem G Abodunrin b556540030 i40e: Clear recovery pending, if reset failed
If pf_reset failed, it becomes necessary to clear recovery pending bit, instead
of falling through the setup process.

Change-ID: Ic1611e6a32741fe3a2782ec7be173cb65e7492ed
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-05-29 04:30:45 -07:00
Greg Rose 10bc478a2a i40e/i40evf: Change type to u32 to avoid sparse error
tx_lpi_status and rx_lpi_status are declared as bool but then used in sizeof
operations in the CORE driver code.  Make them u32 to make sparse be quiet.

Change-ID: Iad6daeb1c7149e61ece242acd18c64b320c246a3
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-05-29 04:22:56 -07:00