platform/kernel/linux-rpi.git
6 years agomt76x2: move utility routines in mt76x2.h
Lorenzo Bianconi [Tue, 31 Jul 2018 08:09:04 +0000 (10:09 +0200)]
mt76x2: move utility routines in mt76x2.h

In order to reuse them supporting mt76x2u based devices, move
mt76x2_wait_for_mac, wait_for_wpdma and mt76x2_channel_silent in
mt76x2.h

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agomt76x2: move mt76x2_fw_header and mt76x2_patch_header definitions in mcu.h
Lorenzo Bianconi [Tue, 31 Jul 2018 08:09:03 +0000 (10:09 +0200)]
mt76x2: move mt76x2_fw_header and mt76x2_patch_header definitions in mcu.h

move mt76x2_fw_header and mt76x2_patch_header definitions in mcu.h in
order to reuse them in mt76x2u mcu related code

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agomt76: move MT_TXD_INFO, MT_MCU_MSG and MT_RX_FCE_INFO defs in dma.h
Lorenzo Bianconi [Tue, 31 Jul 2018 08:09:02 +0000 (10:09 +0200)]
mt76: move MT_TXD_INFO, MT_MCU_MSG and MT_RX_FCE_INFO defs in dma.h

Since MT_TXD_INFO, MT_MCU_MSG and MT_RX_FCE_INFO definitions are in
common between mt76x2u, mt76x2 and mt76x0u move them in dma.h in order
to reuse usb code supporting mt76x2u and mt76x0u based devices

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoMerge tag 'iwlwifi-next-for-kalle-2018-08-02' of git://git.kernel.org/pub/scm/linux...
Kalle Valo [Thu, 2 Aug 2018 18:40:25 +0000 (21:40 +0300)]
Merge tag 'iwlwifi-next-for-kalle-2018-08-02' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

More iwlwifi patches for 4.19

* New PCI IDs for 22000 and 22560;
* Some fixes and an improvement in debug dumps and recording;
* Remove some old dead code;
* Fix compilation when only IPv6 is not enabled;
* Continued work on 22560 devices;

6 years agoiwlwifi: pcie: split tx to amsdu and non amsdu
Sara Sharon [Wed, 14 Mar 2018 09:27:36 +0000 (11:27 +0200)]
iwlwifi: pcie: split tx to amsdu and non amsdu

The code is different enough to justify a split.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: move some msix and rx functions to a common place
Golan Ben Ami [Sun, 18 Feb 2018 16:20:09 +0000 (18:20 +0200)]
iwlwifi: move some msix and rx functions to a common place

We would like to allow other utlities to init msix and rx.
Put their declarations in a place accessible to other utilities.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: pcie: include tcp.h implicitly
Luca Coelho [Wed, 14 Mar 2018 14:02:01 +0000 (16:02 +0200)]
iwlwifi: pcie: include tcp.h implicitly

If CONFIG_IPV6 is not enabled in the kernel, tcp.h is not included
implicitly from other header files, causing compilation errors.  To
solve that, explicitly include it in tx-gen2.c.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: mvm: remove dead gscan code
Luca Coelho [Fri, 27 Jul 2018 11:53:07 +0000 (14:53 +0300)]
iwlwifi: mvm: remove dead gscan code

There was a bunch of code to support gscan which has never been used.
Remove it all to cleanup and get rid of a lot of dead code.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: hard code power save mode to CAM for 22560 devices
Golan Ben Ami [Tue, 6 Mar 2018 12:29:11 +0000 (14:29 +0200)]
iwlwifi: hard code power save mode to CAM for 22560 devices

Balanced power save mode isn't supported in the fw for 22560 devices
yet.  Configure the power save mode to CAM until it gets implemented.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoRevert "iwlwifi: implement fseq version mismatch warning"
Sara Sharon [Tue, 13 Mar 2018 11:49:25 +0000 (13:49 +0200)]
Revert "iwlwifi: implement fseq version mismatch warning"

This reverts commit f2e66c8df0d0f10c70ed7f5e14a939714e9ee6a9.

The firmware never implemented this, and they do not plan to.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: pcie: don't access periphery registers when not available
Emmanuel Grumbach [Tue, 13 Mar 2018 12:12:40 +0000 (14:12 +0200)]
iwlwifi: pcie: don't access periphery registers when not available

The periphery can't be accessed before we set the
INIT_DONE bit which initializes the device.

A previous patch added a reconfiguration of the MSI-X
tables upon resume, but at that point in the flow,
INIT_DONE wasn't set. Since the reconfiguration of the
MSI-X tables require periphery access, it failed.

The difference between WoWLAN and without WoWLAN is that
in WoWLAN, iwl_trans_pcie_d3_suspend clears the INIT_DONE
without clearing the STATUS_DEVICE_ENABLED bit in the
software status. Because of that, the resume code thinks
that the device is enabled, but the INIT_DONE bit has been
cleared.

To fix this, don't reconfigure the MSI-X tables in case
WoWLAN is enabled. It will be done in
iwl_trans_pcie_d3_resume anyway.

Fixes: 52848a79b9d2 ("iwlwifi: pcie: reconfigure MSI-X HW on resume")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: mvm: configure multi RX queue
Sara Sharon [Mon, 5 Feb 2018 10:42:44 +0000 (12:42 +0200)]
iwlwifi: mvm: configure multi RX queue

Currently multi-queue is disabled for 22000 devices.

This was since driver isn't supposed to write to prph
registers anymore, and FW needs to configure the RFH.

Now that FW added support for the API - use it and remove
the 22000 multi RX queue disablement.

Bump min API version to avoid compatibility issues.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: d3: disable dbg recording before entering D3
Luca Coelho [Wed, 7 Mar 2018 16:46:01 +0000 (18:46 +0200)]
iwlwifi: d3: disable dbg recording before entering D3

Currently the firmware does not stop recording debugging data when
entering D3 and this causes trouble (e.g. sporadic wake ups).

Fix that by stopping dbg recording when suspending.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: allow masking out memory areas from the fw dump
Shahar S Matityahu [Tue, 20 Feb 2018 15:20:32 +0000 (17:20 +0200)]
iwlwifi: allow masking out memory areas from the fw dump

Reading and dumping memory areas takes time, and sometimes
dumping all of the areas isn't necessary.

Allow choosing the memory areas which should be dumped.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: trans: add a new op for getting DMA data
Sara Sharon [Mon, 5 Feb 2018 10:37:05 +0000 (12:37 +0200)]
iwlwifi: trans: add a new op for getting DMA data

Op mode will need this data in order to feed FW with it.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: pcie: move rxb retrieval to a helper function
Sara Sharon [Sun, 4 Mar 2018 11:22:27 +0000 (13:22 +0200)]
iwlwifi: pcie: move rxb retrieval to a helper function

This makes code less indented and more readable.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: pcie: unionize used bd and completion descriptor
Sara Sharon [Sun, 4 Mar 2018 11:09:01 +0000 (13:09 +0200)]
iwlwifi: pcie: unionize used bd and completion descriptor

This allows less "dummy" declarations and casting.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: support new rx_mpdu_desc api
Golan Ben Ami [Mon, 5 Feb 2018 10:54:36 +0000 (12:54 +0200)]
iwlwifi: support new rx_mpdu_desc api

22560 devices use a new rx_mpdu_desc api.
Update the code to use the new api.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: pcie: support rx structures for 22560 devices
Golan Ben Ami [Mon, 5 Feb 2018 10:01:36 +0000 (12:01 +0200)]
iwlwifi: pcie: support rx structures for 22560 devices

The rfh for 22560 devices has changed so it supports now
the same arch of using used and free lists, but different
structures to support the last.
Use the new structures, hw dependent, to manage the lists.

bd, the free list, uses the iwl_rx_transfer_desc,
in which the vid is stored in the structs' rbid
field, and the page address in the addr field.

used_bd, the used list, uses the iwl_rx_completion_desc
struct, in which the vid is stored in the structs' rbid
field.

rb_stts, the hw "write" pointer of rx is stored in a
__le16 array, in which each entry represents the write
pointer per queue.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: pcie: add a bunch of PCI IDs for 22000 and 22560
Luca Coelho [Thu, 26 Jul 2018 13:10:18 +0000 (16:10 +0300)]
iwlwifi: pcie: add a bunch of PCI IDs for 22000 and 22560

Add some missing PCI IDs for 22000 and 22560 devices.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agort2x00: remove redundant functions rt2x00mac_sta_{add/remove}
YueHaibing [Fri, 27 Jul 2018 13:05:49 +0000 (21:05 +0800)]
rt2x00: remove redundant functions rt2x00mac_sta_{add/remove}

Only rt2800 subdriver of rt2x00 implement sta_add() and sta_remove(),
rt2x00mac_sta_add and rt2x00mac_sta_remove has no callers after
commit 9c87758cf089 ("rt2x00: call sta_add/remove directly in rt2800").
So can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agortl818x: Replace mdelay() with msleep() in rtl8225se_rf_init
Jia-Ju Bai [Fri, 27 Jul 2018 08:50:45 +0000 (16:50 +0800)]
rtl818x: Replace mdelay() with msleep() in rtl8225se_rf_init

rtl8225se_rf_init() is never called in atomic context.
It calls mdelay() to busily wait, which is not necessary.
mdelay() can be replaced with msleep().
This patch only replaces the mdelay() that has >20ms time to wait.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoatmel: Replace mdelay() with msleep() in probe_atmel_card()
Jia-Ju Bai [Fri, 27 Jul 2018 08:45:35 +0000 (16:45 +0800)]
atmel: Replace mdelay() with msleep() in probe_atmel_card()

probe_atmel_card() is never called in atomic context.
It calls mdelay() to busily wait, which is not necessary.
mdelay() can be replaced with msleep().

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agowlcore: Set rx_status boottime_ns field on rx
Loic Poulain [Fri, 27 Jul 2018 16:30:23 +0000 (18:30 +0200)]
wlcore: Set rx_status boottime_ns field on rx

When receiving a beacon or probe response, we should update the
boottime_ns field which is the timestamp the frame was received at.
(cf mac80211.h)

This fixes a scanning issue with Android since it relies on this
timestamp to determine when the AP has been seen for the last time
(via the nl80211 BSS_LAST_SEEN_BOOTTIME parameter).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agowlcore: remove duplicate \n for some warnings
H. Nikolaus Schaller [Wed, 25 Jul 2018 05:55:04 +0000 (07:55 +0200)]
wlcore: remove duplicate \n for some warnings

wl1271_warning() already appends a \n to the format,
so adding one to the warning string gives empty lines in the log.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agobrcmfmac: specify some features per firmware version
Rafał Miłecki [Mon, 9 Jul 2018 04:55:43 +0000 (06:55 +0200)]
brcmfmac: specify some features per firmware version

Some features supported by firmware aren't advertised and there is no
way for a driver to query them. This includes e.g. monitor mode details.

Most firmwares support monitor interface but only the latest ones
/announce/ it with a "monitor" flag in the "cap" iovar. There isn't any
reliable detection method for older firmwares (BRCMF_C_MONITOR was tried
but "it only indicates the core part of the stack supports").

Similarly support for tagging monitor frames and building radiotap
headers can't be reliably detected for all firmwares.

This commit adds table that allows mapping features to firmware version.
It adds mappings for 43602a1 and 4366b1 firmwares from
linux-firmware.git. Both were confirmed to be passing monitor frames.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agohostap: hide unused procfs helpers
YueHaibing [Fri, 13 Jul 2018 07:03:17 +0000 (15:03 +0800)]
hostap: hide unused procfs helpers

When CONFIG_PROC_FS isn't set, gcc warning this:

drivers/net/wireless/intersil/hostap/hostap_hw.c:2901:12: warning: ‘prism2_registers_proc_show’ defined but not used [-Wunused-function]
 static int prism2_registers_proc_show(struct seq_file *m, void *v)

drivers/net/wireless/intersil/hostap/hostap_proc.c:16:12: warning: ‘prism2_debug_proc_show’ defined but not used [-Wunused-function]
 static int prism2_debug_proc_show(struct seq_file *m, void *v)
            ^
drivers/net/wireless/intersil/hostap/hostap_proc.c:49:12: warning: ‘prism2_stats_proc_show’ defined but not used [-Wunused-function]
 static int prism2_stats_proc_show(struct seq_file *m, void *v)
            ^
drivers/net/wireless/intersil/hostap/hostap_proc.c:177:12: warning: ‘prism2_crypt_proc_show’ defined but not used [-Wunused-function]
 static int prism2_crypt_proc_show(struct seq_file *m, void *v)
            ^

fix this by adding #ifdef around them.
hfa384x_read_reg is only used by prism2_registers_proc_show,so move it
into #ifdef.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoatmel: hide unused procfs helpers
YueHaibing [Fri, 13 Jul 2018 06:46:58 +0000 (14:46 +0800)]
atmel: hide unused procfs helpers

When CONFIG_PROC_FS isn't set, gcc warning this:

drivers/net/wireless/atmel/atmel.c:1402:12: warning: ‘atmel_proc_show’ defined but not used [-Wunused-function]
 static int atmel_proc_show(struct seq_file *m, void *v)
            ^
fix this by adding #ifdef around it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoray_cs: remove redundant pointer 'p'
Colin Ian King [Fri, 20 Jul 2018 18:07:40 +0000 (19:07 +0100)]
ray_cs: remove redundant pointer 'p'

Pointer 'p' is being assigned but is never used hence it is
redundant and can be removed. Also re-work if statement to remove
redundant assignment of p.

Cleans up clang warning:
warning: variable 'p' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoiwlegacy: remove several redundant variables
Colin Ian King [Wed, 11 Jul 2018 07:42:53 +0000 (08:42 +0100)]
iwlegacy: remove several redundant variables

Variables id, unicast, write, conf, a_band, accum_tx and ucode are
assigned a value but it is never read, hence they are redundant and
can be removed.

Cleans up clang warnings:
warning: variable 'id' set but not used [-Wunused-but-set-variable]
warning: variable 'unicast' set but not used [-Wunused-but-set-variable]
warning: variable 'write' set but not used [-Wunused-but-set-variable]
warning: variable 'conf' set but not used [-Wunused-but-set-variable]
warning: variable 'a_band' set but not used [-Wunused-but-set-variable]
warning: variable 'tx' set but not used [-Wunused-but-set-variable]
warning: variable 'accum_tx' set but not used [-Wunused-but-set-variable]
warning: variable 'ucode' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoipw2x00: remove redundant variables len, ret, reason and crypt
Colin Ian King [Wed, 11 Jul 2018 07:12:12 +0000 (08:12 +0100)]
ipw2x00: remove redundant variables len, ret, reason and crypt

Variables len, ret, reason and crypt are assigned values that
are never read, hence they are redundant and can be removed.

Note: For the variable ret, a return code is being assigned, but
this is not returned and 0 is currently being returned, I believe
this is OK.

Cleans up clang warnings:
warning: variable 'len' set but not used [-Wunused-but-set-variable]
variable 'ret' set but not used [-Wunused-but-set-variable]
warning: variable 'reason' set but not used [-Wunused-but-set-variable]
warning: variable 'crypt' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoairo: remove unused variables len and dev and clean up formatting
Colin Ian King [Mon, 9 Jul 2018 13:38:43 +0000 (14:38 +0100)]
airo: remove unused variables len and dev and clean up formatting

Variables len and dev assigned values but are never used hence they
are redundant and can be removed.  Also add in white space in for-loop
and remove some { } braces on if statement.

Cleans up clang warnings:
warning: variable 'len' set but not used [-Wunused-but-set-variable]
warning: variable 'dev' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agorsi: move init_done flag to end of rsi_91x_init().
Amol Hanwate [Mon, 16 Jul 2018 13:39:37 +0000 (19:09 +0530)]
rsi: move init_done flag to end of rsi_91x_init().

common->init_done flag should set after basic initialization. Hence,
moving init_done flag at end of rsi_91x_init().

Signed-off-by: Amol Hanwate <amol.hanwate@redpinesignals.com>
Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agorsi: fill rx_params only once.
Amol Hanwate [Mon, 16 Jul 2018 13:39:36 +0000 (19:09 +0530)]
rsi: fill rx_params only once.

rx_params are getting updated two times in driver, which is not required.
Hence, removing duplicate updation of rx_params from rsi_prepare_skb().

Signed-off-by: Amol Hanwate <amol.hanwate@redpinesignals.com>
Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agorsi: Correct RSI_NEEDED_HEADROOM in mac80211_attach.
Amol Hanwate [Mon, 16 Jul 2018 13:39:35 +0000 (19:09 +0530)]
rsi: Correct RSI_NEEDED_HEADROOM in mac80211_attach.

Currently, RSI_NEEDED_HEADROOM is '80' for rsi driver, which is wrong.
As per rsi internal frame format, the RSI_NEEDED_HEADROOM shall be '84',
which is 64(dword_align) + 4(extended_desc) + 16(frame_desc).
Hence, corrected the needed headroom.

Signed-off-by: Amol Hanwate <amol.hanwate@redpinesignals.com>
Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agorsi: add firmware support for AP+BT dual mode
Siva Rebbagondla [Mon, 16 Jul 2018 13:39:34 +0000 (19:09 +0530)]
rsi: add firmware support for AP+BT dual mode

Currently, AP mode will work on only WLAN alone firmware. To give support
for AP and BT dual mode, adding firmware entry in 'struct ta_metadata'.
The firmware entry is based on what coex_mode is used in driver and coex
mode '4' for all AP+BT related functionalities. Hence, added the same.

Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agorsi: remove redundant flash_content variable
Siva Rebbagondla [Mon, 16 Jul 2018 13:39:33 +0000 (19:09 +0530)]
rsi: remove redundant flash_content variable

while cleaning up the driver, observed that flash_content pointer is not
necessary in rsi_load_firmware(). Instead of this, driver can use
'fw_entry->data' directly.Hence, removed redundant flash_content pointer.

Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agorsi: remove redundant device ids
Siva Rebbagondla [Mon, 16 Jul 2018 13:39:32 +0000 (19:09 +0530)]
rsi: remove redundant device ids

Removing redundant device id's from both usb and sdio idtables, as rsi
driver currently supporting only one module(RS9113). Also, replaced ids
with specific defines.

Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agorsi: optimize virtual interfaces
Siva Rebbagondla [Thu, 5 Jul 2018 12:38:22 +0000 (18:08 +0530)]
rsi: optimize virtual interfaces

Due to multiple calls of add interface routine, vif is getting duplicated
and at certain instance, we are out of vifs, causing the driver to behave
abnormal.

Fix: Every vif has a unique mac-id, when we got a vif with same mac-id as
the previous id's, we will override the respective vif.

Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agorsi: fix for WoWLAN wakeup in security mode.
Siva Rebbagondla [Thu, 5 Jul 2018 12:38:21 +0000 (18:08 +0530)]
rsi: fix for WoWLAN wakeup in security mode.

System is unable to wake-up through magic-packet in secured connections.
Because key descriptor is getting corrupted and firmware is unable to
decrypt the magic packet. Fixed the issue by properly preparing it
before sending it to firmware.

Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agorsi: fix for 40MHZ connection issue.
Ganapathi Raju [Thu, 5 Jul 2018 12:38:20 +0000 (18:08 +0530)]
rsi: fix for 40MHZ connection issue.

Radio capabilities packet is not prepared properly for 40MHZ case,
ppe_ack_rate is a two byte variable which is initialized wrongly,
hence we are unable to connect, resolved by assigning it properly.

Signed-off-by: Ganapathi Raju <ganapathi.kondraju@redpinesignals.com>
Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agorsi: fix for low throughput issue
Siva Rebbagondla [Thu, 5 Jul 2018 12:38:19 +0000 (18:08 +0530)]
rsi: fix for low throughput issue

observed low throughput rates during verification. This is because, QoS
enable flag is overridden by sequence number in the data descriptor frame.
Hence, added the fix for same.

Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agomwifiex: Fix skipped vendor specific IEs
Roman Stratiienko [Tue, 24 Jul 2018 11:47:27 +0000 (14:47 +0300)]
mwifiex: Fix skipped vendor specific IEs

Mwifiex firmware inserts only Microsoft information element
Allow other vendor specific IEs to pass from userspace

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agomwifiex: use atomic bitops to represent adapter status variables
Ganapathi Bhat [Fri, 13 Jul 2018 12:26:35 +0000 (17:56 +0530)]
mwifiex: use atomic bitops to represent adapter status variables

Driver is using boolean variables to maintain vairous status
information of adapter. These status variables are accessed by
multiple threads and there is a possibility of a race. To avoid
this, convert these variables to a set of bitops flags, to be
operated atomically.

Below variables of mwifiex_adapter are converted to bitop flags:
surprise_removed
is_cmd_timedout
is_suspended
is_hs_configured
hs_enabling

Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agomwifiex: restructure rx_reorder_tbl_lock usage
Ganapathi Bhat [Wed, 27 Jun 2018 06:13:39 +0000 (11:43 +0530)]
mwifiex: restructure rx_reorder_tbl_lock usage

Driver must ensure that whenever it holds a pointer to the list
entry mwifiex_rx_reorder_tbl, it must protect the same with
rx_reorder_tbl_lock. At present there are many places where
driver does not ensure this. To cover all cases, spinlocks in
below funcions are moved out and made sure that the caller will
hold the spinlock:
mwifiex_11n_dispatch_pkt_until_start_win()
mwifiex_11n_scan_and_dispatch()
mwifiex_del_rx_reorder_entry()
mwifiex_11n_get_rx_reorder_tbl()
mwifiex_11n_find_last_seq_num()

Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agomwifiex: replace rx_pkt_lock by rx_reorder_tbl_lock
Ganapathi Bhat [Wed, 27 Jun 2018 06:13:38 +0000 (11:43 +0530)]
mwifiex: replace rx_pkt_lock by rx_reorder_tbl_lock

At present driver spinlock protects iteration of list
rx_reorder_tbl_ptr with rx_reorder_tbl_lock. To protect the
individual items in this list, it uses rx_pkt_lock. But, we can
use a single rx_reorder_tbl_lock for both purposes. This patch
replaces rx_pkt_lock by rx_reorder_tbl_lock.

Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agomt76x2: fix CCK protection control frame rate
Lorenzo Bianconi [Thu, 12 Jul 2018 08:50:01 +0000 (10:50 +0200)]
mt76x2: fix CCK protection control frame rate

Use 11M as tx rate for CCK protection control frames

Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agomt76x2: add frame protection support
Lorenzo Bianconi [Wed, 11 Jul 2018 20:02:22 +0000 (22:02 +0200)]
mt76x2: add frame protection support

Introduce mac80211 rts threshold handler in order to add frame
protection support to mt76x2 driver

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agomt7601u: expose 802.11w support
Davide Caratti [Mon, 9 Jul 2018 10:20:27 +0000 (12:20 +0200)]
mt7601u: expose 802.11w support

Set MFP_CAPABLE bit in hw flag capabilities exported by the driver

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agomt7601u: use sw encryption for hw unsupported ciphers
Lorenzo Bianconi [Mon, 9 Jul 2018 10:20:26 +0000 (12:20 +0200)]
mt7601u: use sw encryption for hw unsupported ciphers

Fall back to software encryption for hw unsupported ciphers in order
to enable 802.11w

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoqtnfmac: enable multiple SSIDs scan support
Andrey Shevchenko [Thu, 31 May 2018 09:11:00 +0000 (12:11 +0300)]
qtnfmac: enable multiple SSIDs scan support

Enable support for multiple SSIDs scans. Get max number of supported
SSIDs from firmware and report to cfg80211 core.

Signed-off-by: Andrey Shevchenko <ashevchenko@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoqtnfmac: implement cfg80211 power management callback
Sergei Maksimenko [Thu, 31 May 2018 09:10:59 +0000 (12:10 +0300)]
qtnfmac: implement cfg80211 power management callback

Implement set_power_mgmt() callback that forwards power saving
settings to the device firmware.

Signed-off-by: Sergei Maksimenko <smaksimenko@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
6 years agoMerge tag 'iwlwifi-next-for-kalle-2018-07-26' of git://git.kernel.org/pub/scm/linux...
Kalle Valo [Mon, 30 Jul 2018 13:36:13 +0000 (16:36 +0300)]
Merge tag 'iwlwifi-next-for-kalle-2018-07-26' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

First batch of iwlwifi patches for 4.19

* Implement 802.11ax D2.0;
* Changes in the base code to support the new 22560 devices;
* Support for the new 22560 device family;

6 years agoiwlwifi: pcie: support 2k rx buffers
Golan Ben Ami [Sun, 4 Feb 2018 15:41:51 +0000 (17:41 +0200)]
iwlwifi: pcie: support 2k rx buffers

The smallest rb size supported today is 4k rx buffers.
22560 devices use 2k rxb's, so allow using 2k buffers.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: update registers changed for 22560 devices
Golan Ben Ami [Sun, 4 Feb 2018 15:04:31 +0000 (17:04 +0200)]
iwlwifi: update registers changed for 22560 devices

In 22560 devices the firmware will do all the hw configurations,
but that's not ready yet.
Update the correct registers in the driver until the FW is ready
and does it by itself.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: introduce new rx structures used by 22560 RFH
Golan Ben Ami [Sun, 4 Feb 2018 14:38:10 +0000 (16:38 +0200)]
iwlwifi: introduce new rx structures used by 22560 RFH

22560 devices RFH uses different structures, which act similar
to the legacy rxq management lists - free and used list.

The iwl_rx_transfer_desc struct is part of the free list,
and consists of pointers to the empty rb's the driver wants to
pass to the fw.

The iwl_rx_completion_desc struct is part of the used list,
and consists of pointers to the buffer the fw filled up
with new rx, both commands and data, for the host.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: support new tx api
Golan Ben Ami [Sun, 4 Feb 2018 13:46:17 +0000 (15:46 +0200)]
iwlwifi: support new tx api

22560 devices use a new tx cmd api. Update the code to use
the new api.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: support multiple tfd queue max sizes for different devices
Golan Ben Ami [Sun, 4 Feb 2018 10:51:45 +0000 (12:51 +0200)]
iwlwifi: support multiple tfd queue max sizes for different devices

22560 devices tfd queue max size is 2^16. Allow a configurable
max size in the driver for supporting different devices.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: cancel the injective function between hw pointers to tfd entry index
Golan Ben Ami [Sun, 4 Feb 2018 08:50:05 +0000 (10:50 +0200)]
iwlwifi: cancel the injective function between hw pointers to tfd entry index

Nowadays, the tfd queue max size is 2^8, and the reserved size in the
command header sequence field for the tfd entry index is 8 bits,
allowing an injective function from the hw pointers to the tfd entry index
in the sequence field.

In 22560 devices the tfd queue max size is 2^16, meaning that
the hw pointers are 16 bit long (allowing to point to each entry
in the tfd queue). However, the reserved space in the sequence field for
the tfd entry doesn't change, and we are limited to 8 bit.
This requires cancelling the injective function from hw pointer to
tfd entry in the sequence number.

Use iwl_pcie_get_cmd_index to wrap the hw pointer's to the n_window
size, which is maximum 256 in tx queues, and so, keep the injective
function between the window wrapped hw pointers to tfd entry index in
the sequence.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: update gen3 interrupts - sw error and image response
Golan Ben Ami [Thu, 1 Feb 2018 15:54:48 +0000 (17:54 +0200)]
iwlwifi: update gen3 interrupts - sw error and image response

In 22560 devices the ROM sendis an interrupt to the host
once the IML reading is done.
Handle this interrupt, and indicate sw error in case the
value is fail.

Additionally, the cause for sw error in 22560 devices
have been changed, so update the cause list.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: pcie: start early debug for 22560 devices
Golan Ben Ami [Tue, 26 Dec 2017 12:49:30 +0000 (14:49 +0200)]
iwlwifi: pcie: start early debug for 22560 devices

In 22560 devices we can start debug using context info gen3. Configure
the fw to start collecting logs to the dram before init.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: pcie: update bytes in the byte count table
Golan Ben Ami [Tue, 2 Jan 2018 10:08:31 +0000 (12:08 +0200)]
iwlwifi: pcie: update bytes in the byte count table

For devices which use the image loader image, the length of the frame
must be updated in the byte count in bytes, and not dwords as today.
Avoid dividing the input length by 4.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: pcie: support context information for 22560 devices
Golan Ben Ami [Sun, 11 Feb 2018 08:57:18 +0000 (10:57 +0200)]
iwlwifi: pcie: support context information for 22560 devices

Context information structure was added to 22000 devices for
firmware self init.

In the next generation of devices the context information
changes significantly, and the original context information
is divided roughly to three data structures: context information gen3,
prph information and prph scratch.

In addition, the init flow changes so the firmware is loaded
by the IML, and so we must allocate the IML on the DRAM and
give the ROM the IML's address before kicking the firmware's
self init.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: pcie: allocate and free rx cr's and tr's tails
Golan Ben Ami [Sun, 11 Feb 2018 08:48:32 +0000 (10:48 +0200)]
iwlwifi: pcie: allocate and free rx cr's and tr's tails

The hw now refers to two new blocks:
* rx tr tail - The Tail index on the free buffers queue TR,
which is update by the device after reading the free buffer
from the tr.
* rx cr tail - Updated by the driver when completing
processing a new completion descriptor in the cr.

Add these two new struct to the rxq, allocate and free them
when needed.

In addition, the register for rx write pointer had been changed
to HBUS_TARG_WRPTR. The way to differentiate tx from rx is the
queue number. TX range is 0-511, and RX's is 512-527.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: introduce device family 22560
Golan Ben Ami [Wed, 7 Feb 2018 18:08:56 +0000 (20:08 +0200)]
iwlwifi: introduce device family 22560

Device 22560 have many different hw and sw features than 22000 family,
so introduce a new family of devices - 22560.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: allow different csr flags for different device families
Golan Ben Ami [Sun, 22 Oct 2017 12:58:26 +0000 (15:58 +0300)]
iwlwifi: allow different csr flags for different device families

Different device families may have different flag values
for passing a message to the fw (i.e. SW_RESET).
In order to keep the code readable, and avoid conditioning
upon the family, store a value for each flag, which indicates
the bit that needs to be enabled.

Additionally, support 22560 device csr flags and addresses.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: add support for 22560 devices
Luca Coelho [Sun, 24 Jun 2018 08:36:52 +0000 (11:36 +0300)]
iwlwifi: add support for 22560 devices

Add support for the new 22560 family of devices and, while at it,
reorganize the 22000 family so it fits better with the new one.

Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: 22000 devices: restrict to HT A-MPDU size
Johannes Berg [Thu, 28 Sep 2017 12:15:20 +0000 (14:15 +0200)]
iwlwifi: 22000 devices: restrict to HT A-MPDU size

Our current HE devices don't support BlockAck with the large bitmap,
so can't do TX aggregation with 256 frames. Restrict to the lower HT
size.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: mvm: add radiotap data for HE
Luca Coelho [Tue, 26 Jun 2018 07:03:04 +0000 (10:03 +0300)]
iwlwifi: mvm: add radiotap data for HE

Add HE information to the radiotap data.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: add module parameter to disable 802.11ax
Luca Coelho [Sun, 24 Jun 2018 09:07:28 +0000 (12:07 +0300)]
iwlwifi: add module parameter to disable 802.11ax

Add a module parameter to disable 802.11ax features in supported
devices.  This is useful for testing or if there are interoperability
issues with some APs.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: add support for IEEE802.11ax
Luca Coelho [Sun, 24 Jun 2018 08:59:54 +0000 (11:59 +0300)]
iwlwifi: add support for IEEE802.11ax

Add support for the HE in the iwlwifi driver conforming with
P802.11ax_D2.0.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoiwlwifi: fw: add FW APIs for HE
Luca Coelho [Tue, 26 Jun 2018 07:13:20 +0000 (10:13 +0300)]
iwlwifi: fw: add FW APIs for HE

Add the FW API definitions for HE support.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agoMerge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Kalle Valo [Wed, 25 Jul 2018 07:50:54 +0000 (10:50 +0300)]
Merge ath-next from git://git./linux/kernel/git/kvalo/ath.git

ath.git patches for 4.19. Major changes:

wcn36xx

* fix WEP in client mode

wil6210

* add support for Talyn-MB (Talyn ver 2.0) device

* add support for enhanced DMA firmware feature

6 years agonet/sched: add skbprio scheduler
Nishanth Devarajan [Mon, 23 Jul 2018 14:07:41 +0000 (19:37 +0530)]
net/sched: add skbprio scheduler

Skbprio (SKB Priority Queue) is a queueing discipline that prioritizes packets
according to their skb->priority field. Under congestion, already-enqueued lower
priority packets will be dropped to make space available for higher priority
packets. Skbprio was conceived as a solution for denial-of-service defenses that
need to route packets with different priorities as a means to overcome DoS
attacks.

v5
*Do not reference qdisc_dev(sch)->tx_queue_len for setting limit. Instead set
default sch->limit to 64.

v4
*Drop Documentation/networking/sch_skbprio.txt doc file to move it to tc man
page for Skbprio, in iproute2.

v3
*Drop max_limit parameter in struct skbprio_sched_data and instead use
sch->limit.

*Reference qdisc_dev(sch)->tx_queue_len only once, during initialisation for
qdisc (previously being referenced every time qdisc changes).

*Move qdisc's detailed description from in-code to Documentation/networking.

*When qdisc is saturated, enqueue incoming packet first before dequeueing
lowest priority packet in queue - improves usage of call stack registers.

*Introduce and use overlimit stat to keep track of number of dropped packets.

v2
*Use skb->priority field rather than DS field. Rename queueing discipline as
SKB Priority Queue (previously Gatekeeper Priority Queue).

*Queueing discipline is made classful to expose Skbprio's internal priority
queues.

Signed-off-by: Nishanth Devarajan <ndev2021@gmail.com>
Reviewed-by: Sachin Paryani <sachin.paryani@gmail.com>
Reviewed-by: Cody Doucette <doucette@bu.edu>
Reviewed-by: Michel Machado <michel@digirati.com.br>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agonet: phy: add GBit master / slave error detection
Heiner Kallweit [Sat, 21 Jul 2018 13:48:47 +0000 (15:48 +0200)]
net: phy: add GBit master / slave error detection

Certain PHY's have issues when operating in GBit slave mode and can
be forced to master mode. Examples are RTL8211C, also the Micrel PHY
driver has a DT setting to force master mode.
If two such chips are link partners the autonegotiation will fail.
Standard defines a self-clearing on read, latched-high bit to
indicate this error. Check this bit to inform the user.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agoMerge branch 'net-whitespace-cleanups'
David S. Miller [Tue, 24 Jul 2018 21:10:43 +0000 (14:10 -0700)]
Merge branch 'net-whitespace-cleanups'

Stephen Hemminger says:

====================
net whitespace cleanups

Ran script that I use to check for trailing whitespace and
blank lines at end of files across all files in net/ directory.
These are errors that checkpatch reports and git flags.

These are the resulting fixes broken up mostly by subsystem.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agonet: remove blank lines at end of file
Stephen Hemminger [Tue, 24 Jul 2018 19:29:18 +0000 (12:29 -0700)]
net: remove blank lines at end of file

Several files have extra line at end of file.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agol2tp: remove trailing newline
Stephen Hemminger [Tue, 24 Jul 2018 19:29:17 +0000 (12:29 -0700)]
l2tp: remove trailing newline

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agobpfilter: remove trailing newline
Stephen Hemminger [Tue, 24 Jul 2018 19:29:16 +0000 (12:29 -0700)]
bpfilter: remove trailing newline

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agodecnet: whitespace fixes
Stephen Hemminger [Tue, 24 Jul 2018 19:29:14 +0000 (12:29 -0700)]
decnet: whitespace fixes

Remove trailing whitespace and extra lines at EOF

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agox25: remove blank lines at EOF
Stephen Hemminger [Tue, 24 Jul 2018 19:29:13 +0000 (12:29 -0700)]
x25: remove blank lines at EOF

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agoax25: remove blank line at EOF
Stephen Hemminger [Tue, 24 Jul 2018 19:29:12 +0000 (12:29 -0700)]
ax25: remove blank line at EOF

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agoatm: remove blank lines at EOF
Stephen Hemminger [Tue, 24 Jul 2018 19:29:11 +0000 (12:29 -0700)]
atm: remove blank lines at EOF

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agoila: remove blank lines at EOF
Stephen Hemminger [Tue, 24 Jul 2018 19:29:09 +0000 (12:29 -0700)]
ila: remove blank lines at EOF

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agosctp: whitespace fixes
Stephen Hemminger [Tue, 24 Jul 2018 19:29:08 +0000 (12:29 -0700)]
sctp: whitespace fixes

Remove blank line at EOF and trailing whitespace.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agoxfrm: remove blank lines at EOF
Stephen Hemminger [Tue, 24 Jul 2018 19:29:06 +0000 (12:29 -0700)]
xfrm: remove blank lines at EOF

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agompls: remove trailing whitepace
Stephen Hemminger [Tue, 24 Jul 2018 19:29:05 +0000 (12:29 -0700)]
mpls: remove trailing whitepace

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agollc: fix whitespace issues
Stephen Hemminger [Tue, 24 Jul 2018 19:29:04 +0000 (12:29 -0700)]
llc: fix whitespace issues

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agords: remove trailing whitespace and blank lines
Stephen Hemminger [Tue, 24 Jul 2018 19:29:03 +0000 (12:29 -0700)]
rds: remove trailing whitespace and blank lines

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agowimax: remove blank lines at EOF
Stephen Hemminger [Tue, 24 Jul 2018 19:29:02 +0000 (12:29 -0700)]
wimax: remove blank lines at EOF

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agosched: fix trailing whitespace
Stephen Hemminger [Tue, 24 Jul 2018 19:29:01 +0000 (12:29 -0700)]
sched: fix trailing whitespace

Remove trailing whitespace and blank lines at EOF

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agonet: remove redundant input checks in SIOCSIFTXQLEN case of dev_ifsioc
Tariq Toukan [Tue, 24 Jul 2018 10:53:00 +0000 (13:53 +0300)]
net: remove redundant input checks in SIOCSIFTXQLEN case of dev_ifsioc

The cited patch added a call to dev_change_tx_queue_len in
SIOCSIFTXQLEN case.
This obsoletes the new len comparison check done before the function call.
Remove it here.

For the desicion of keep/remove the negative value check, we examine the
range check in dev_change_tx_queue_len.
On 64-bit we will fail with -ERANGE.  The 32-bit int ifr_qlen will be sign
extended to 64-bits when it is passed into dev_change_tx_queue_len(). And
then for negative values this test triggers:

if (new_len != (unsigned int)new_len)
return -ERANGE;

because:
if (0xffffffffWHATEVER != 0x00000000WHATEVER)

On 32-bit the signed value will be accepted, changing behavior.

Therefore, the negative value check is kept.

Fixes: 3f76df198288 ("net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agoMerge branch 'cxgb4-collect-free-Tx-Rx-pages-and-page-pointers'
David S. Miller [Tue, 24 Jul 2018 17:12:22 +0000 (10:12 -0700)]
Merge branch 'cxgb4-collect-free-Tx-Rx-pages-and-page-pointers'

Rahul Lakkireddy says:

====================
cxgb4: collect free Tx/Rx pages and page pointers

Patch 1 collects number of free PSTRUCT page pointers in context
memory.

Patch 2 moves the collection logic for Tx/Rx free pages to common
code, since this information needs to be collected in vmcore device
dump as well.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agocxgb4: move Tx/Rx free pages collection to common code
Rahul Lakkireddy [Tue, 24 Jul 2018 14:47:10 +0000 (20:17 +0530)]
cxgb4: move Tx/Rx free pages collection to common code

This information needs to be collected in vmcore device dump as well.
So, move to common code.

Fixes: fa145d5dfd61 ("cxgb4: display number of rx and tx pages free")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agocxgb4: collect number of free PSTRUCT page pointers
Rahul Lakkireddy [Tue, 24 Jul 2018 14:47:09 +0000 (20:17 +0530)]
cxgb4: collect number of free PSTRUCT page pointers

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agoMerge branch 'mlxsw-Add-extack-messages-for-tc-flower'
David S. Miller [Tue, 24 Jul 2018 17:10:33 +0000 (10:10 -0700)]
Merge branch 'mlxsw-Add-extack-messages-for-tc-flower'

Ido Schimmel says:

====================
mlxsw: Add extack messages for tc flower

Nir says:

This patch set adds extack messages support to tc flower part of mlxsw.
The messages provide clear reasoning to failures, as some of the available
actions and keys are not supported in driver or HW and resources may get
exhausted.

The first patch deals with propagation of the extack pointer among the functions
dealing with key parsing and action sets handling.

Following patches 2-4 add appropriate messages across the different layers of
mlxsw tc flower implementation.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agomlxsw: spectrum_flower: Add extack messages
Nir Dotan [Tue, 24 Jul 2018 14:13:14 +0000 (17:13 +0300)]
mlxsw: spectrum_flower: Add extack messages

Return extack messages in order to explain failures
of unsupported actions, keys and invalid user input.

Signed-off-by: Nir Dotan <nird@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agomlxsw: spectrum_acl: Add extack messages
Nir Dotan [Tue, 24 Jul 2018 14:13:13 +0000 (17:13 +0300)]
mlxsw: spectrum_acl: Add extack messages

Return extack messages for failures in action set creation.
Messages provide reasons for not being able to implement
the action in HW.

Signed-off-by: Nir Dotan <nird@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agomlxsw: core_acl_flex_actions: Add extack messages
Nir Dotan [Tue, 24 Jul 2018 14:13:12 +0000 (17:13 +0300)]
mlxsw: core_acl_flex_actions: Add extack messages

Return extack messages for failures in action set creation.
Errors may occur when action is not currently supported or due
to lack of resources.

Signed-off-by: Nir Dotan <nird@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agomlxsw: spectrum_acl: Propagate extack pointer
Nir Dotan [Tue, 24 Jul 2018 14:13:11 +0000 (17:13 +0300)]
mlxsw: spectrum_acl: Propagate extack pointer

Propagate extack pointer in order to add extack messages for ACL.
In the follow-up patches, appropriate messages will be added
in various points.

Signed-off-by: Nir Dotan <nird@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>