Avinash Patil [Fri, 31 Oct 2014 10:38:26 +0000 (16:08 +0530)]
mwifiex: channel statistics support for mwifiex
This patch adds support to record channel statistics during
scan. With extended scan, scan results are returned as events from
FW while channel statistics are part of scan command response.
We store these channel statistics in adapter.
Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Xinmin Hu <huxm@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Loic Poulain [Wed, 8 Oct 2014 14:54:28 +0000 (16:54 +0200)]
Bluetooth: HCI H5 peer reset detection
H5 Specification says:
If a SYNC message is received while in the Active State, it is
assumed that the peer device has reset. The local device should
therefore perform a full reset of the upper stack, and start Link
Establishment again at the Uninitialized State. Upon entering the
Active State, the first packet sent shall have its SEQ and ACK
numbers set to zero.
This patch resets the HCI H5 driver data/state to unitialized and
reports an HCI hardware error event to notify the upper stack that
HCI synchronization has been lost. H5 will be re-synchronized and
upper stack should generate an HCI Reset command.
Signed-off-by: Loic Poulain <loic.poulain@intel.com> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Larry Finger [Thu, 30 Oct 2014 04:17:12 +0000 (23:17 -0500)]
rtlwifi: rtl8821ae: Remove extra semicolons
The kbuild test robot reports that there are extra semicolons in this
driver. All of them are caused by using "};" rather than "}" at the
end of a switch statement. This patch does not change any functionality.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Murilo Opsfelder Araujo <mopsfelder@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 29 Oct 2014 15:02:50 +0000 (16:02 +0100)]
brcmsmac: fix statistic counter update function
The 802.11 core statistics are retrieved from the core registers
but not stored. So the debug code was never triggered to give a
warning message on tx underruns or rx overflows. This patch fixes
this and assures the statistics are stored in the snapshot.
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>
It is possible to configure driver using mtu_max module parameter
by setting it to value in range of 68..7920 inclusive.
This is sub-optimal performance-wise in case packet is larger than 1 page.
mtu_max default value is 2228.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Disconnect flow may be invoked either from upper layer request,
or from event reported by the firmware.
In case of firmware event, driver need to release resources for the station but
not send another disconnect WMI command.
In case of upper layer request, WMI_DISCONNECT_STA_CMDID command need to
be issued for the firmware to perform disconnect on the MAC layer. Eventually,
event is expected to confirm MAC disconnect, but it is better to not wait for
firmware event and release station resources immediately. FW may fail to
report disconnect for various reasons, so one could not rely on event always reported.
Introduce parameter to distinguish 2 cases above to prevent double WMI command
issuing.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
wil6210: do not attempt FW recovery if interface is down
When interface is down, recovery flow should not be attempted.
Next ndo_open() will trigger target reset, that is FW recovery.
Doing recovery while interface is down cause internal "up", leaving
internal driver state in conflict with network stack. Then, when network
stack will call ndo_open(), kernel oops will be triggered.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 28 Oct 2014 13:56:10 +0000 (14:56 +0100)]
brcmfmac: (clean) Remove usb_rdl.h as it is not needed.
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>
Arend van Spriel [Tue, 28 Oct 2014 13:56:09 +0000 (14:56 +0100)]
brcmfmac: do not use firmware error code in driver
Passing the firmware error codes up the driver may be mapped to
linux error numbers which may impact proper fault analysis. So
better pass up a generic failure code, ie. -EBADE and only show
firmware error code in FIL debug message.
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> 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>
Arend van Spriel [Tue, 28 Oct 2014 13:56:08 +0000 (14:56 +0100)]
brcmfmac: remove unused defintion
The define EBRCMF_UNSUPPORTED is not used in the source file so this
patch removes it.
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> 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>
Arend van Spriel [Tue, 28 Oct 2014 13:56:07 +0000 (14:56 +0100)]
brcmfmac: show firmware error as string in debug message
Showing the firmware error allows to quickly give a clue what
went wrong and directly look in the firmware code that gave us
back the error.
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> 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>
Hante Meuleman [Tue, 28 Oct 2014 13:56:06 +0000 (14:56 +0100)]
brcmfmac: Add wowl patterns support.
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, 28 Oct 2014 13:56:04 +0000 (14:56 +0100)]
brcmfmac: Add wowl support for USB devices.
This patch adds wowl support for USB bus devices. This feature
requires FW which has support for wowl built in.
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>
John W. Linville [Thu, 30 Oct 2014 19:22:06 +0000 (15:22 -0400)]
Merge tag 'iwlwifi-next-for-john-2014-10-29' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
Emmanuel Grumbach <egrumbach@gmail.com> says:
"The big new thing here is netdetect which allows the
firmware to wake up the platform when a specific network
is detected. Along with that I have fixes for d3 operation.
The usual amount of rate scaling stuff - we now support STBC.
The other commit that stands out is Johannes's work on
devcoredump. He basically starts to use the standard
infrastructure he built."
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marcel Holtmann [Wed, 29 Oct 2014 22:37:53 +0000 (23:37 +0100)]
Bluetooth: Clear LE white list when resetting controller
The internal representation of the LE white list needs to be cleared
when receiving a successful HCI_Reset command. A reset of the controller
is expected to start with an empty LE white list.
When the LE white list is not cleared on controller reset, the passive
background scanning might skip programming the remote devices. Only
changes to the LE white list are programmed when passive background
is started.
Alexander Aring [Wed, 29 Oct 2014 20:34:44 +0000 (21:34 +0100)]
mac802154: add basic support for monitor
This patch adds basic support for monitor mode. Also change the open
call that we set the transceiver mac setting on an interface up. Futher
patches will add a better handling while interface up an interface.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Wed, 29 Oct 2014 20:34:41 +0000 (21:34 +0100)]
mac802154: rx: monitor receive cleanup
This patch replace the !netif_running(sdata->dev) instead we doing a
!ieee802154_sdata_running(sdata). Also move this in two separate if
branches to compare with mac80211 code.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Wed, 29 Oct 2014 20:34:39 +0000 (21:34 +0100)]
mac802154: rx: use netif_receive_skb
This patch removes netif_rx_ni call. Instead we call netif_receive_skb,
we can do that since commit c5c47e67bcd24638a059b1b5e9ec18c95f8634ca
("mac802154: rx: use tasklet instead workqueue").
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This patch adds a new hardware flag which indicate that the transceiver
doesn't support check for bad checksum via hardware. Also add a handling of
this while receive.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Wed, 29 Oct 2014 20:34:36 +0000 (21:34 +0100)]
mac802154: rx: simplify crc receive handling
This patch change the actual crc handling while receive. Currently the
IEEE802154_HW_RX_OMIT_CKSUM flag is used to filter a frame with a bad crc.
This patch changes the behaviour of IEEE802154_HW_RX_OMIT_CKSUM to add a
crc while receiving for the monitor interface. After monitor receiving
we remove the crc for frame parsing. This affect the driver layer
because all drivers sets IEEE802154_HW_RX_OMIT_CKSUM and deliver without
checksum.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Wed, 29 Oct 2014 20:34:34 +0000 (21:34 +0100)]
mac802154: separate omit tx/rx flags
This patch splits the IEEE802154_HW_OMIT_CKSUM hardware flag into
IEEE802154_HW_TX_OMIT_CKSUM and IEEE802154_HW_RX_OMIT_CKSUM. This is
useful to deliver the received crc from the driver layer to the monitor
interface. At the moment we can't do that without change the xmit
handling.
The received checksum should be visible in monitor mode only.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Wed, 29 Oct 2014 20:34:31 +0000 (21:34 +0100)]
mac802154: add hardware address filter flag
Overdue introduction for address filtering hardware flag. Furthermore we
will check and set address filtering on interface up. This patch
prepares that we can check if an transceiver supports address filtering
option. Currently all mainline driver supports hardware address filtering.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Cc: Alan Ott <alan@signal11.us> Cc: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Wed, 29 Oct 2014 20:34:30 +0000 (21:34 +0100)]
mac802154: add IEEE802154_HW_ARET hw flag
This patch adds a new IEEE802154_HW_ARET hardware flag for indicating
that the transceiver supports ARET handling. Also remove the
IEEE802154_HW_FRAME_RETRIES from IEEE802154_HW_CSMA flag. Frame retries
handling is part of ARET.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Eyal Shapira [Thu, 23 Oct 2014 10:58:38 +0000 (13:58 +0300)]
iwlwifi: mvm: rs: add Tx STBC support
STBC is enabled on HT/VHT SISO rates in case we don't care
about power consumption and it won't hurt BT.
This is done only in case the peer and our chip support STBC
of course.
While at it fixed a bug which was causing bw and ldpc
flags to be set incorrectly in the rate scale table in case
we are switching to a legacy Tx column. This had no real impact.
David Spinadel [Sun, 26 Oct 2014 13:53:27 +0000 (15:53 +0200)]
iwlwifi: mvm: fix scan condition iterator
Scan condition iterator assumes that an interface is associated if
phy_ctxt is assigned, but this isn't the sutuation in P2P device.
OTOH P2P device is never associated so we can simply ignore it.
Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Thu, 9 Oct 2014 15:01:36 +0000 (17:01 +0200)]
iwlwifi: mvm: port to devcoredump framework
iwlwifi features a debug mechanism that allows to dump
binary data which is helpful to debug the firmware.
Until now, this data was made available for the userspace
through debugfs. For this exact purpose, devcoredump was
created. Move to the new infrastructure.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Luciano Coelho [Fri, 10 Oct 2014 07:03:02 +0000 (10:03 +0300)]
iwlwifi: mvm: remove unnecessary includes in tt.c
We used to need to include some headers in order to read the registers
and do all the calculations by ourselves, but this is not done anymore
(i.e. we let the firmware do this for us), so we don't need to include
those headers anymore.
Johannes Berg [Fri, 10 Oct 2014 06:59:27 +0000 (08:59 +0200)]
iwlwifi: mvm: flush queues without mutex held
For WMM-AC we may have to be changing QoS parameters while the
queues are being flushed. This is not relevant in the "drop"
case, but matters when we wait for the device to finish the
transmissions.
To allow this, do the actual waiting without holding the mutex.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Luciano Coelho [Thu, 2 Oct 2014 12:38:04 +0000 (15:38 +0300)]
iwlwifi: mvm: change the iwl_mvm_d3_iface_iterator into a generic function
Getting the BSS station vif is something that may be needed by other
parts of the code. So, instead of having an iterator specifically for
d3, change it into a generic one in utils.c. Additionally, add a
iwl_mvm_get_bss_vif() function to make it easier to retrieving it.
iwlwifi: mvm: add debugfs entry to configure netdetect SSIDs
Before we get all the chain (ie. mac80211, cfg80211, nl80211 and
userspace) changed to support net-detect, we can use this debugfs
entry for easy testing and as a proof of concept.
Luciano Coelho [Wed, 1 Oct 2014 10:22:40 +0000 (13:22 +0300)]
iwlwifi: mvm: spin off a function to start scan offload
The net-detect feature will require a scan offload to be started in
the same way it is done now for scheduled scan. Spin a new function
off of the sched_scan_start op code for reuse. Additionally,
restructure the function a bit for more readability.
iwlwifi: mvm: move the check if associated outside of the iterator for wowlan
Instead of checking if we are associated when suspending with wowlan
enabled in the interface iterator, allow it to return an unassociated
vif and move the check to the main suspend function. This will be
needed by netdetect, since it should also work when we are not
associated but the vif is active.
iwlwifi: mvm: split wowlan handling out of the main suspend function
Take the WoWLAN handling code out of the main suspend function,
dividing it into three parts: get_config (which is used before the
firmware is switched), switch_to_d3 (which handles the rebooting of
the hardware with the D3 firmware) and config (which configures the D3
firmware for WoWLAN operation). This is necessary to prepare for the
net-detect implementation, which will use only the switch_to_d3 part
of this flow.
iwlwifi: mvm: hold the rtnl when resuming from a d3 test
We use ieee80211_iter_keys() which requires the rtnl to be held. If
we don't lock the rtnl, like we do when we suspend during a d3 test,
we get the following splat:
The current TLC isn't optimized for low latency and some devices
have issues with MIMO. This kind of combo creates latency issues.
Allow to temporarily disable MIMO for tests in order to solve
the latency issues without the added complexity of MIMO.
Alexander Aring [Tue, 28 Oct 2014 17:21:29 +0000 (18:21 +0100)]
mac802154: remove channel attributes from sdata
These channel attributes was part of "channel context switch while xmit"
which was removed by commit dc67c6b30f36d57b70b70547a30e7a8432540c6f
("mac802154: tx: remove xmit channel context switch"). This patch
removes these unnecessary variables and use the current_page and
current_channel by wpan_phy struct now.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Tue, 28 Oct 2014 17:21:27 +0000 (18:21 +0100)]
mac802154: add synchronization handling
This patch adds synchronization handling in start and stop driver ops
calls. This patch is mostly grab from mac80211 which was introduced by
commit ea77f12f2cc0f31168f2e0259e65a22202ac4dc2 ("mac80211: remove
tasklet enable/disable"). This is to be sure that we don't run into same
issues.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Tue, 28 Oct 2014 17:21:26 +0000 (18:21 +0100)]
mac802154: move local started handling
This patch removes the current handling of started boolean. This is
actually dead code, because mac802154_netdev_register can't never be
called before ieee802154_register_hw. This means that local->started is
always be true when mac802154_netdev_register is called. Instead we
using this now like mac80211 to indicate that an instance of sdata is
running.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Tue, 28 Oct 2014 17:21:24 +0000 (18:21 +0100)]
mac802154: rework sdata state change to running
This patch reworks the handling for setting the state like mac80211. We
use bit's instead a bool variable. The mutex is not needed because it use
test and set bits which are atomic operations.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Tue, 28 Oct 2014 17:21:23 +0000 (18:21 +0100)]
mac802154: remove driver ops in wpan-phy
This patch removes the driver ops callbacks inside of wpan_phy struct.
It was used to check if a phy supports this driver ops call. We do this
now via hardware flags.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Tue, 28 Oct 2014 17:21:20 +0000 (18:21 +0100)]
mac802154: introduce driver-ops header
This patch introduce a driver-ops header file with function wrappers to
call the driver ops. These wrappers checking on right context
information and warn if optional driver ops are called when these aren't
implemented. This behaviour is like mac80211 driver-ops header file,
just without function tracing calls.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Tue, 28 Oct 2014 17:21:16 +0000 (18:21 +0100)]
mac802154: monitor: merge into iface implementation
This patch removes the monitor implementation file and put all monitor
stuff into iface file. It's now small enough to put all necessary
handling into iface.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Johan Hedberg [Tue, 28 Oct 2014 21:23:27 +0000 (22:23 +0100)]
Bluetooth: Fix check for direct advertising
These days we allow simultaneous LE scanning and advertising. Checking
for whether advertising is enabled or not is therefore not a reliable
way to determine whether directed advertising was used to trigger the
connection creation. The appropriate place to check (instead of the hdev
context) is the connection role that's stored in the hci_conn. This
patch fixes such a check in le_conn_timeout() which could otherwise lead
to incorrect HCI commands being sent.
Johan Hedberg [Tue, 28 Oct 2014 21:23:26 +0000 (22:23 +0100)]
Bluetooth: Fix LE connection timeout deadlock
The le_conn_timeout() may call hci_le_conn_failed() which in turn may
call hci_conn_del(). Trying to use the _sync variant for cancelling the
conn timeout from hci_conn_del() could therefore result in a deadlock.
This patch converts hci_conn_del() to use the non-sync variant so the
deadlock is not possible.
Jukka Rissanen [Tue, 28 Oct 2014 15:16:48 +0000 (17:16 +0200)]
Bluetooth: 6lowpan: Fix lockdep splats
When a device ndo_start_xmit() calls again dev_queue_xmit(),
lockdep can complain because dev_queue_xmit() is re-entered and the
spinlocks protecting tx queues share a common lockdep class.
Same issue was fixed for ieee802154 in commit "20e7c4e80dcd"
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
The reason for the revert is that we cannot have more than one module
initialization function and the SMP one breaks the build with modular
kernels. As the proper fix for this is right now looking non-trivial
it's better to simply revert the problematic patches in order to keep
the upstream tree compilable.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>