Hante Meuleman [Sun, 25 Jan 2015 19:31:36 +0000 (20:31 +0100)]
brcmfmac: Reopen netdev queue on bus state data.
During suspend the bus state is put in the down state. When data
is being transmitted during this state then the netdev queue will
be close. This patch will wake the queue on state data if the
queue was closed.
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: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Sun, 25 Jan 2015 19:31:35 +0000 (20:31 +0100)]
brcmfmac: SDIO: avoid using bus state for private states.
Each bus driver is maintaing an exported bus state indicating
if upper layers can or cannot send data. SDIO is using this state
also for more private states. This makes handling the states and
state changes complex. This patch minimises the exposed states
and makes SDIO keep track of an internal state where necessary.
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: Kalle Valo <kvalo@codeaurora.org>
Arend van Spriel [Sun, 25 Jan 2015 19:31:34 +0000 (20:31 +0100)]
brcmfmac: wait for driver to go idle during suspend
Before going in suspend state the watchdog thread needs to put the
device in bus sleep state, which assures it can go in deep-sleep
state during D3 state.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@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: Kalle Valo <kvalo@codeaurora.org>
Arend van Spriel [Sun, 25 Jan 2015 19:31:33 +0000 (20:31 +0100)]
brcmfmac: pass DEAUTH/DISASSOC reason code to user-space
The driver always called cfg80211_disconnected() with reason parameter
set to zero, ie. unknown. However, firmware does provide a valid
802.11 reason code in DEAUTH and DISASSOC event message to the driver.
This patch passes the reason code to cfg80211_disconnected().
Reviewed-by: Daniel (Deognyoun) Kim <dekim@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: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Sun, 25 Jan 2015 19:31:32 +0000 (20:31 +0100)]
brcmfmac: use SDIO DPC for control frames.
Control frames are normally handled outside DPC, but sometimes
within DPC. To simplify code always handle control within DPC.
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: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Sun, 25 Jan 2015 19:31:31 +0000 (20:31 +0100)]
brcmfmac: prevent possible deadlock on resuming SDIO device.
When the system is resumed a deadlock can occur when DPC gets
entered before resume is complete. This patch fixes this by
properly checking the suspend state outside the claim_host code
block.
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: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Sun, 25 Jan 2015 19:31:30 +0000 (20:31 +0100)]
brcmfmac: Relax scheduling of msgbuf worker on high throughput.
On every tx the flow worker is triggered. When running high
throughput data this causes an excessive amount of times the worker
gets activated. This patch starts scheduling the worker more relaxed
once outstanding tx has reached a certain depth.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@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: Kalle Valo <kvalo@codeaurora.org>
wil6210: move Rx reorder buffer allocation out of spinlock
This fixes issue reported by Dan Carpenter:
The patch 3277213feb1b: "wil6210: ADDBA/DELBA flows" from Dec 23,
2014, leads to the following static checker warning:
drivers/net/wireless/ath/wil6210/rx_reorder.c:205 wil_tid_ampdu_rx_alloc()
error: scheduling with locks held: 'spin_lock:tid_rx_lock'
332
333 wil_tid_ampdu_rx_free(wil, sta->tid_rx[tid]);
334 sta->tid_rx[tid] = wil_tid_ampdu_rx_alloc(wil, agg_wsize, ssn);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
function called with the lock held.
335
336 spin_unlock_bh(&sta->tid_rx_lock);
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Access point require this API to check peer alive status.
Assume peer is alive when it is connected, because
firmware implements keep alive checks and will disconnect
peer if it is not alive.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Interrupt moderation parameters will never be passed as module
parameters. For product, they will be hard-coded after lab testing,
and for debugging, they can be altered via debugfs.
Signed-off-by: Vladimir Shulman <qca_shulmanv@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Due to HW limitation, inter-packet gap timeout max value is 13 usec.
Update of current thresholds from 15 to 13 usec.
Signed-off-by: Vladimir Shulman <qca_shulmanv@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Vladimir Shulman [Sun, 25 Jan 2015 08:52:46 +0000 (10:52 +0200)]
wil6210: tuning rings size
Tuning rings size for performance optimization.
Increasing Tx ring size, allows buffering more packets for HW, thus
eliminating idle periods which were observed with smaller ring at
high throughput, because HW was fetching packets faster than driver was
filling them into the TX ring. Rx ring was similarly increased to
avoid same problems in Rx.
Signed-off-by: Vladimir Shulman <qca_shulmanv@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Vladimir Shulman [Sun, 25 Jan 2015 08:52:45 +0000 (10:52 +0200)]
wil6210: Add Tx queue len configuration
Tx queue was hard-coded to 1000 in ether_setup. Add wil_dev_setup
function which configures tx queue len to chosen default value
after calling ether_setup.
Signed-off-by: Vladimir Shulman <qca_shulmanv@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Dedy Lansky [Sun, 25 Jan 2015 08:52:44 +0000 (10:52 +0200)]
wil6210: ignore firmware failure to gracefully stop AP
upon cfg80211_stop_ap, a graceful AP shutdown is requested from firmware
followed by firmware reset.
In case graceful request failed, error was returned to cfg80211.
The change is to return success in this scenario, because firmware
reset will anyhow shutdown the AP.
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Dedy Lansky [Sun, 25 Jan 2015 08:52:43 +0000 (10:52 +0200)]
wil6210: fix timing of netif_carrier_on indication
netif_carrier_on indication was too late. In case Rx packet received
before netif_carrier_on indication, upper layers could not send
Tx packet back.
The fix is to indicate netif_carrier_on earlier:
for STA, indicate netif_carrier_on when association starts.
for AP/PCP, indicate netif_carrier_on upon starting AP/PCP.
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Fri, 23 Jan 2015 11:39:19 +0000 (17:09 +0530)]
mwifiex: selectively choose ext_scan support
Some devices do not support extended scan.
This patch adds support to enble ext_scan selectively.
For SD/PCIe interfaces, deefine ext_scan_support as part of
card structure and use it to initialize ext_scan in adapter
during registering device. For USB interfaces, we initialize
ext_scan during register_dev handler.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
SD8801 is Marvell's 1x1 802.11bgn offering.
This patch adds Device IDs for SD8801 and also defines card
structure which has definition for register offsets, buffer sizes etc.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Frank Huang <frankh@marvell.com> Reviewed-by: James Cameron <quozl@laptop.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hong Xu [Sat, 24 Jan 2015 11:34:03 +0000 (03:34 -0800)]
ath9k and ath9k_htc: rename variable "led_blink"
ath9k and ath9k_htc use the variable name "led_blink" to indicate
whether the module parameter "blink" is on. This name is easy to
conflict with other variables, and has caused a compiler error found
by kbuild test bot. The compiler error is as following:
drivers/net/wireless/ath/ath9k/ath9k_htc.o:(.data+0x47c): multiple definition of `led_blink'
drivers/net/wireless/ath/ath9k/ath9k.o:(.bss+0x20): first defined here
Fixes: 3a939a671225 ("ath9k_htc: Add a module parameter to disable blink") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Hong Xu <hong@topbug.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Chun-Yeow Yeoh [Fri, 23 Jan 2015 08:59:24 +0000 (16:59 +0800)]
rtl8192cu: fix the mesh beaconing
Patch "rtlwifi: add support to send beacon frame" allows
the beaconing of rtl8192cu. But mesh beaconing is not
working. Fix this.
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Johannes Berg [Mon, 19 Jan 2015 10:24:36 +0000 (15:54 +0530)]
mwifiex: set netif carrier off in ndo_open
This patch adds fix to set carrier state off during ndo_open.
Carrier should be set to ON when device is ready to send data.
In case of station/adhoc interface device is able to transfer
data after successful association/join operation.
For AP this would be after bss_active event.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rafał Miłecki [Mon, 19 Jan 2015 07:30:30 +0000 (08:30 +0100)]
bcma: use standard bus scanning during early register
Starting with kernel 3.19-rc1 early registration of bcma on MIPS is done
a bit later, with memory allocator available. This allows us to simplify
code by using standard bus scanning method.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rasmus Villemoes [Wed, 21 Jan 2015 11:52:07 +0000 (12:52 +0100)]
atmel: Remove open-coded and wrong strcasecmp
The kernel's string library does in fact have strcasecmp, at least
since ded220bd8f08 ("[STRING]: Move strcasecmp/strncasecmp to
lib/string.c"). Moreover, this open-coded version is in fact wrong: If
the strings only differ in their last character, a and b have already
been incremented to point to the terminating NUL bytes, so they would
wrongly be treated as equal.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
if(!wait_for_completion_interruptible_timeout(...))
only handles the timeout case - this patch adds handling the
signal case the same as timeout.
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
if(!wait_for_completion_interruptible_timeout(...))
only handles the timeout case - this patch adds handling the
signal case the same as timeout.
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
John Linville [Mon, 19 Jan 2015 19:09:15 +0000 (14:09 -0500)]
ath5k: document a fall-through case in ath5k_hw_set_opmode
Coverity: CID 114932
Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rafał Miłecki [Fri, 16 Jan 2015 19:59:39 +0000 (20:59 +0100)]
bcma: clean bus initialization code
This moves main bus init code to the main.c and renames old function to
make its purpose clear.
Thanks to this change we'll also be able to separate scanning from
registration (and support PCIe Gen 2 devices) in the future.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Sabrina Dubroca [Mon, 19 Jan 2015 14:34:32 +0000 (15:34 +0100)]
b43: stop leds during suspend
Call b43_leds_stop during suspend to avoid this WARN:
WARNING: CPU: 1 PID: 0 at net/mac80211/util.c:755 ieee80211_can_queue_work.isra.11+0x35/0x50 [mac80211]()
queueing ieee80211 work while going to suspend
Dan Carpenter [Thu, 15 Jan 2015 11:43:40 +0000 (14:43 +0300)]
wlcore: unlock on error in wl1271_op_suspend()
We recently introduced a new error path which needs an unlock.
Fixes: 6d5a748d4836 ('wlcore: add ability to reduce FW interrupts during suspend') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hong Xu [Sun, 11 Jan 2015 19:45:53 +0000 (11:45 -0800)]
ath9k_htc: Add a module parameter to disable blink
Add an option "blink" to enable or disable the LED blink. The default
value is set to 1 so that existing users would not experience any
unexpected changes.
Signed-off-by: Hong Xu <hong@topbug.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Bob Copeland [Fri, 9 Jan 2015 19:15:52 +0000 (14:15 -0500)]
wcn36xx: initiate TX BA sessions
Currently, wcn36xx only asks for a TX BA session if it has
already established one for RX. Thus, two wcn36xx devices cannot
do a-mpdu between themselves since they both wait for the other
to go first. Fix this by starting a BA session after a few QoS
data frames have been sent to a STA.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Bob Copeland [Fri, 9 Jan 2015 19:15:51 +0000 (14:15 -0500)]
wcn36xx: move set_tx_pdu inside set_tx_data/mgmt
The pdu is part of the buffer descriptor, so it makes
sense that one function would fill both. Also, passing
the whole skb instead of just the header pointer to the
set_tx_data function paves the way for using its fields
for ampdu setup inside set_tx_data().
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Bob Copeland [Fri, 9 Jan 2015 19:15:48 +0000 (14:15 -0500)]
wcn36xx: don't process 'valid' descriptors
The DMA engine will reset the valid bit after a descriptor is
complete; any with the valid bit still set may still be in
use by the hardware, so check that before freeing the descriptor.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Bob Copeland [Fri, 9 Jan 2015 19:15:47 +0000 (14:15 -0500)]
wcn36xx: let device generate qos seq numbers
wcn36xx currently sends an incorrect sequence number into the BA session
setup firmware command: it should be saving or updating the ssn in the
TX_START ampdu_action callback instead of waiting until TX_OPERATIONAL.
However, we can sidestep the issue by letting the hardware generate the
sequence numbers for QoS frames, as is done in prima, so do that.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Bob Copeland [Fri, 9 Jan 2015 19:15:46 +0000 (14:15 -0500)]
wcn36xx: use !! when assigning int as a boolean
bd->tx_comp is a single bit in a bitfield, so assigning
"info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS" only happens
to work because TX_STATUS is defined to BIT(0); if it were
any other bit this assignment would fail.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
mwifiex: check driver status in connect and scan handlers
Ignore scan and connection requests from cfg80211 when driver
unload is in process or previous command has timed out due to
a firmware bug. This patch fixes corner case system crash
issues.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Sujith Manoharan [Fri, 19 Dec 2014 01:03:55 +0000 (06:33 +0530)]
ath9k: Fix no-ack frame status
Check if the frame has been completed without any
error and use IEEE80211_TX_STAT_NOACK_TRANSMITTED to
indicate successful transmission of no-ack frames.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kalle Valo [Fri, 23 Jan 2015 15:51:54 +0000 (17:51 +0200)]
Merge tag 'iwlwifi-next-for-kalle-2015-01-22' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
* more work for new devices (4165 / 8260)
* cleanups / improvemnts in rate control
* fixes for TDLS
* major statistics work from Johannes - more to come
* improvements for the fw error dump infrastructure
* usual amount of small fixes here and there (scan, D0i3 etc...)
Liad Kaufman [Thu, 22 Jan 2015 17:01:35 +0000 (19:01 +0200)]
iwlwifi: mvm: fix rx chains configuration in phy ctxt cmd
In the PHY_CTXT command sent to the FW the TX chains were
indeed configured by the values of both FW TLVs and of NVM,
but the RX chains were left out and configured only by FW
TLV.
This causes problems in 4165 HW, where there are 1x1
antennas, and the wrong configuration denies the driver
from connecting to the AP.
Eran Harary [Tue, 20 Jan 2015 13:37:34 +0000 (15:37 +0200)]
iwlwifi: pcie: support secured boot flow for family 8000 B step
The driver loads the 2 CPU sections, then it needs to let
the firmware know to start the authentication of the
sections. This is done by writing the relevants bits to
FH_UCODE_LOAD_STATUS.
For CPU1, the driver sets the lower 16 bits. For both CPUs,
the driver sets all the 32 bits.
Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Wed, 21 Jan 2015 17:05:04 +0000 (18:05 +0100)]
iwlwifi: mvm: rs: remove stats argument from functions
The stats argument is always only passed as &mvm->drv_rx_stats, so
there's no point in passing it when the mvm pointer is passed.
Remove the argument entirely.
Eyal Shapira [Thu, 15 Jan 2015 18:22:34 +0000 (20:22 +0200)]
iwlwifi: mvm: use a new API for enabling STBC
The new API tells the FW that it's allowed to use STBC
but the FW will decide on its own whether to use STBC
or SISO (and in the future Beamformer).
Keep support for the old API which sets STBC explicitly
in the rates in the LQ table while we still support old
FW revisions.
Eran Harary [Mon, 12 Jan 2015 08:43:58 +0000 (10:43 +0200)]
iwlwifi: mvm: support family 8000 C step
C step functionality in the driver is exactly the same as
B step besides the ucode name that present as iwlwifi-8000C-xx.ucode
instead of iwlwifi-8000B-xx.ucode
Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
John W. Linville [Mon, 12 Jan 2015 21:18:11 +0000 (16:18 -0500)]
iwlwifi: mvm: document switch case fall-through in iwl_mvm_send_sta_key
Add a comment indicating that the WLAN_CIPHER_SUITE_WEP104 case falls
through to the WLAN_CIPHER_SUITE_WEP40 case in iwl_mvm_send_sta_key.
This will document that the lack of a break is intentional.
Eyal Shapira [Mon, 12 Jan 2015 09:53:06 +0000 (11:53 +0200)]
iwlwifi: mvm: rs: use STBC regardless of power save mode
Tx STBC was used only when in CAM mode or if powersave is disabled.
Effectively this meant we never used STBC as these modes aren't
used on most platforms by default. Change that.
Revert "iwlwifi: mvm: drop non VO frames when flushing"
This is now implemented by mac80211 (commit below).
mac80211 will flush/drop the frames on the queues before
suspending / disconnecting.
It will then send the deauth and wait until the queues are
empty.
Merge tag 'tags/mac80211-next-for-davem-2015-01-19' into iwlwifi-next
Some further updates for net-next:
* fix network-manager which was broken by the previous changes
* fix delete-station events, which were broken by me making the
genlmsg_end() mistake
* fix a timer left running during suspend in some race conditions
that would cause an annoying (but harmless) warning
* (less important, but in the tree already) remove 80+80 MHz rate
reporting since the spec doesn't distinguish it from 160 MHz;
as the bitrate they're both 160 MHz bandwidth
Luciano Coelho [Wed, 14 Jan 2015 19:39:34 +0000 (21:39 +0200)]
iwlwifi: mvm: ignore temperature updates in the RX statistics notification
If the firmware sends spontaneous DTS notfications with the
temperature (indicated in a TLV), we can ignore the temperature we get
in the RX statistics notifications. This prevents potentially
handling the same temperature change twice. It also ignores
notifications with temperature equal to 0 that happens from time to
time.
Johannes Berg [Thu, 15 Jan 2015 11:59:26 +0000 (12:59 +0100)]
iwlwifi: mvm: generate statistics debugfs code
There's no need to duplicate the structure field name in the string,
just generate the string in the macro that's there anyway. To keep
the debugfs output the same, rename one (otherwise unused) field.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
When we want to trigger an NMI in the device, we need to set
bit 7 and not bit 0. However, older firmwares don't register
to the interrupt issued by bit 7. Use bit 7 first so that
the correct interrupt will be issued hoping that the firmware
will react. To be on the safe side, set bit 0 in case the
firmware didn't register to the proper interrupt.
Johannes Berg [Fri, 9 Jan 2015 13:15:32 +0000 (14:15 +0100)]
iwlwifi: mvm: add debugfs file for misbehaving U-APSD AP
As this functionality relies on getting a firmware notification
it is difficult to test. Allow accessing the data for it from
debugfs to be able to trigger all kinds of scenarios to test.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
iwlwifi: mvm: let the firmware configure the scheduler
A new host command can be used to configure the scheduler
instead of accessing the scheduler's registers from the
driver. This is easier and less error prone since accessing
the hardware at certain moments can lead to races with the
firmware.
Prefer to use the host command whenever it is available.
Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
David Spinadel [Mon, 29 Dec 2014 13:43:48 +0000 (15:43 +0200)]
iwlwifi: mvm: scan dwell time corrections
Use only basic dwell time (10 ms for active scan and 110 for passive),
regardless of the number of the probes and the band, if it is
supported by the FW. The FW will add 3 ms for each probe sent and 10
ms for low band channels.
Add a TLV flag to indicate such support in FW.
This fix is needed to fix few bugs regarding scans that take too much time.
Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
The driver doesn't support the firmwares that don't have
these capabilities. The code that actually used these
flags has been removed already, but the flags were left
for an unclear reason. Remove them.
Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Haim Dreyfuss [Thu, 18 Dec 2014 10:34:01 +0000 (12:34 +0200)]
iwlwifi: mvm: set max_out_time equal to frag_passive_dwell in fragmented scan
Fragmented scan should be applied for all channels, passive and active.
When scanning on passive channels the firmware uses frag_passive_dwell
to define the maximum continuous scan time before returning to the
operating channel. On active channels max_out_time is the parameter
used by the firmware to define the maximum time allowed out of the
operating channel. Since active channels' scan should also be fragmented
set max_out_time equal to frag_passive_dwell.
In addition:
- Set max_out_time and suspend_time if the firmware doesn't support
fragmented scan to avoid unexpected behavior.
- Adjust max_out_time for second level of scan precedence.
iwlwifi: mvm: allow to collect debug data from non-sleepable context
iwl_mvm_fw_dbg_collect allows to collect debug data from
the firmware. Most of the firmware interaction is done in
non-sleepable context. It makes little sense to force the
caller of iwl_mvm_fw_dbg_collect to sleep.
Defer the actual collection to a worker so that this
function will be able to be called from any context.
Reviewed-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Liad Kaufman [Sun, 4 Jan 2015 09:03:13 +0000 (11:03 +0200)]
iwlwifi: mvm: make sure state isn't in d0i3 when stopping fw monitor
In case platform is in d0i3 - make sure it is awake when
writing the registers to stop the monitor when collecting FW
debug data. Plus, remove unneeded mutex locking currently
done.
iwlwifi: mvm: Add debugfs entry to enable scan offload notification
This option enables scan offload iteration complete notification from
firmware which includes the last iteration's status and the scanned
channels from the current iteration.
Eyal Shapira [Sun, 28 Dec 2014 20:12:38 +0000 (22:12 +0200)]
iwlwifi: mvm: rs: repeat initial legacy rates in LQ table
Repeating the legacy rates avoids degrading quickly to
lower rates due to collisions which is common when doing
TCP Tx traffic in legacy.
This slightly improves TCP Tx throughput while working
in legacy in different scenarios.
mac80211: delete the assoc/auth timer upon suspend
While suspending, we destroy the authentication /
association that might be taking place. While doing so, we
forgot to delete the timer which can be firing after
local->suspended is already set, producing the warning below.
Fix that by deleting the timer.
[66722.825487] WARNING: CPU: 2 PID: 5612 at net/mac80211/util.c:755 ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211]()
[66722.825487] queueing ieee80211 work while going to suspend
[66722.825529] CPU: 2 PID: 5612 Comm: kworker/u16:69 Tainted: G W O 3.16.1+ #24
[66722.825537] Workqueue: events_unbound async_run_entry_fn
[66722.825545] Call Trace:
[66722.825552] <IRQ> [<ffffffff817edbb2>] dump_stack+0x4d/0x66
[66722.825556] [<ffffffff81075cad>] warn_slowpath_common+0x7d/0xa0
[66722.825572] [<ffffffffa06b5b90>] ? ieee80211_sta_bcn_mon_timer+0x50/0x50 [mac80211]
[66722.825573] [<ffffffff81075d1c>] warn_slowpath_fmt+0x4c/0x50
[66722.825586] [<ffffffffa06977a2>] ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211]
[66722.825598] [<ffffffffa06977d5>] ieee80211_queue_work+0x25/0x50 [mac80211]
[66722.825611] [<ffffffffa06b5bac>] ieee80211_sta_timer+0x1c/0x20 [mac80211]
[66722.825614] [<ffffffff8108655a>] call_timer_fn+0x8a/0x300
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Oliver reported that it breaks network-manager, for some reason with
this patch NM decides that the device isn't wireless but "generic"
(ethernet), sees no carrier (as expected with wifi) and fails to do
anything else with it.
Revert this to unbreak userspace.
Reported-by: Oliver Hartkopp <socketcan@hartkopp.net> Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
When we have an active scheduled scan, and the RFKILL
interrupt kicks in, the stack will cancel the scheduled
scan as part of the down flow. But cancelling scheduled
scan usually implies sending a command to the firwmare
which has been killed as part of the RFKILL interrupt
handling.
Because of that, we returned an error to mac80211 when
it asked to stop the scheduled scan and didn't notify the
end of the scheduled scan. Besides a fat warning, this led
to a situation in which cfg80211 would refuse any new scan
request.
To disentangle this, fake that the scheduled scan has been
stopped without sending the command to the firwmare, return
0 after having properly let cfg80211 know that the scan
has been cancelled.
This is basically the same as:
commit 9b520d84957d63348e87c0f2cbd21d86e1e8f2f2
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date: Tue Nov 4 15:54:11 2014 +0200
iwlwifi: mvm: abort scan upon RFKILL
This code existed but not for all the different FW APIs
we support.
Fix this.
Johannes Berg [Fri, 16 Jan 2015 20:05:02 +0000 (21:05 +0100)]
cfg80211: fix checking nl80211_send_station() return value
The return value from nl80211_send_station() is the length of the
skb, or a negative error, so abort sending the message only when
the return value was negative.
This fixes the ibss_rsn wpa_supplicant test case.
Reported-by: Jouni Malinen <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 15 Jan 2015 15:14:02 +0000 (16:14 +0100)]
cfg80211: change bandwidth reporting to explicit field
For some reason, we made the bandwidth separate flags, which
is rather confusing - a single rate cannot have different
bandwidths at the same time.
Change this to no longer be flags but use a separate field
for the bandwidth ('bw') instead.
While at it, add support for 5 and 10 MHz rates - these are
reported as regular legacy rates with their real bitrate,
but tagged as 5/10 now to make it easier to distinguish them.
In the nl80211 API, the flags are preserved, but the code
now can also clearly only set a single one of the flags.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 15 Jan 2015 15:05:21 +0000 (16:05 +0100)]
cfg80211: remove 80+80 MHz rate reporting
These rates are treated the same as 160 MHz in the spec, so
it makes no sense to distinguish them. As no driver uses them
yet, this is also not a problem, just remove them.
In the userspace API the field remains reserved to preserve
API and ABI.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>