Johannes Berg [Wed, 13 Apr 2016 12:24:22 +0000 (14:24 +0200)]
iwlwifi: mvm: use firmware station PM notification for AP_LINK_PS
When using RSS on 9000 series devices, we can't rely on processing the
received frames for station powersave handling, since they could be
processed on different CPUs and out of order.
In order to still manage the powersave of stations, the firmware sends
a notification on sleep->wake, wake->sleep and - for U-APSD - frames
received with PM while already sleeping (with the TID.)
With this, the driver can set AP_LINK_PS, which is required for real
parallel RX. In addition, this requires checking for PS-Poll frames
and calling ieee80211_sta_pspoll() appropriately.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Liad Kaufman [Tue, 27 Sep 2016 13:01:10 +0000 (16:01 +0300)]
iwlwifi: mvm: fix dqa deferred frames marking
When a STA has deferred traffic to TX, an appropriate bit
is turned on in %deferred_tx_frames to indicate deferred
traffic. This marking is never turned off, resulting in
iterating over TIDs with no deferred traffic.
Although this didn't cause any failures/errors/bugs, there
is still no point of iterating over these TIDs when not
needed.
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Liad Kaufman [Tue, 27 Sep 2016 12:17:29 +0000 (15:17 +0300)]
iwlwifi: mvm: support MONITOR vif in DQA mode
In DQA mode the TXQs are allocated on demand, so make
sure the sniffer STA tfd_queue_msk isn't set.
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Liad Kaufman [Thu, 22 Sep 2016 12:14:08 +0000 (15:14 +0300)]
iwlwifi: mvm: fix reserved txq freeing
If a TXQ's marking as a reserved queue is removed,
when removing the STA the driver might try to access
out of bounds memory. Make sure the reserved queue
is freed only if it is still reserved.
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Liad Kaufman [Sun, 18 Sep 2016 11:51:59 +0000 (14:51 +0300)]
iwlwifi: mvm: update txq metadata to current owner
When a TXQ's owner is changed, the FW is indeed notified, but
the driver doesn't update the current metadata to reflect the
owner change. Fix that.
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Kalle Valo [Wed, 28 Sep 2016 13:37:33 +0000 (16:37 +0300)]
Merge ath-next from git://git./linux/kernel/git/kvalo/ath.git
ath.git patches for 4.9. Major changes:
ath9k
* disable RNG by default
Jouni Malinen [Tue, 27 Sep 2016 15:42:58 +0000 (18:42 +0300)]
MAINTAINERS: hostap: Mark the Host AP driver obsolete
This is old code for old hardware and it is not really accurate to claim
this to be maintained anymore. Change the status to "Obsolete" to make
it clearer that minor cleanup and other unnecessary changes from
automated tools is not necessarily beneficial and has larger risk of
breaking something without being quickly noticed due to lack of testing.
In addition, remove the old mailing list that does not work anymore and
point the web-page to a more accurate URL.
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Chaehyun Lim [Sun, 18 Sep 2016 06:30:24 +0000 (15:30 +0900)]
ath6kl: fix return value in ath6kl_wmi_set_pvb_cmd
When building with W=1, we got one warning as belows:
drivers/net/wireless/ath/ath6kl/wmi.c:3509:6: warning: variable ‘ret’
set but not used [-Wunused-but-set-variable]
At the end of ath6kl_wmi_set_pvb_cmd, it is returned by 0 regardless of
return value of ath6kl_wmi_cmd_send.
This patch fixes return value from 0 to ret that has result of
ath6kl_wmi_cmd_send execution.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Miaoqing Pan [Tue, 9 Aug 2016 07:02:27 +0000 (15:02 +0800)]
ath9k: disable RNG by default
ath9k RNG will dominates all the noise sources from the real HW
RNG, disable it by default. But we strongly recommand to enable
it if the system without HW RNG, especially on embedded systems.
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Acked-by: Stephan Mueller <smueller@chronox.de>
Acked-by: Stephan Mueller <smueller@chronox.de>
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Rajkumar Manoharan [Wed, 21 Sep 2016 10:58:06 +0000 (16:28 +0530)]
ath10k: fix copy engine 5 destination ring stuck
Firmware is running watchdog timer for tracking copy engine ring index
and write index. Whenever both indices are stuck at same location for
given duration, watchdog will be trigger to assert target. While
updating copy engine destination ring write index, driver ensures that
write index will not be same as read index by finding delta between these
two indices (CE_RING_DELTA).
HTT target to host copy engine (CE5) is special case where ring buffers
will be reused and delta check is not applied while updating write index.
In rare scenario, whenever CE5 ring is full, both indices will be referring
same location and this is causing CE ring stuck issue as explained
above. This issue is originally reported on IPQ4019 during long hour stress
testing and during veriwave max clients testsuites. The same issue is
also observed in other chips as well. Fix this by ensuring that write
index is one less than read index which means that full ring is
available for receiving data.
Cc: stable@vger.kernel.org
Tested-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Mohammed Shafi Shajakhan [Tue, 20 Sep 2016 08:22:07 +0000 (13:52 +0530)]
ath10k: Ignore SWBA event for a vif if its marked for no beacon
Ignore processing further in SWBA event scheduled for a vif, if mac80211
has marked the particular vif for stop beaconing and brought the vdev
down in 'ath10k_control_beaconing'. This should potentially avoid ath10k
warning/error messages while running continuous wifi down/up with max
number of vaps configured. Found this change during code walk through
and going through other beacon configuration related functions in ath10k
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Wei Yongjun [Fri, 16 Sep 2016 13:05:35 +0000 (13:05 +0000)]
ath10k: fix error return code in ahb
Fix to return a negative error code from the error handling case
instead of 0, as done elsewhere in function ath10k_ahb_probe() or
ath10k_ahb_resource_init().
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Rafał Miłecki [Tue, 27 Sep 2016 12:11:04 +0000 (14:11 +0200)]
brcmfmac: use correct skb freeing helper when deleting flowring
Flowrings contain skbs waiting for transmission that were passed to us
by netif. It means we checked every one of them looking for 802.1x
Ethernet type. When deleting flowring we have to use freeing function
that will check for 802.1x type as well.
Freeing skbs without a proper check was leading to counter not being
properly decreased. This was triggering a WARNING every time
brcmf_netdev_wait_pend8021x was called.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Arend van Spriel <arend@broadcom.com>
Cc: stable@vger.kernel.org # 4.5+
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rafał Miłecki [Tue, 27 Sep 2016 10:12:24 +0000 (12:12 +0200)]
brcmfmac: replace WARNING on timeout with a simple error message
Even with timeout increased to 950 ms we get WARNINGs from time to time.
It mostly happens on A-MPDU stalls (e.g. when station goes out of
range). It may take up to 5-10 secods for the firmware to recover and
for that time it doesn't process packets.
It's still useful to have a message on time out as it may indicate some
firmware problem and incorrect key update. Raising a WARNING however
wasn't really that necessary, it doesn't point to any driver bug anymore
and backtrace wasn't much useful.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Larry Finger [Sat, 24 Sep 2016 16:57:19 +0000 (11:57 -0500)]
rtlwifi: Add explicit values to hw_variables enum
The entries in this enum may be referenced in debug output. Adding explicit
values simplifies the lookup.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Larry Finger [Sat, 24 Sep 2016 16:57:18 +0000 (11:57 -0500)]
rtlwifi: Add HAL_DEF_WOWLAN case to *_get_hw() routines
Only rtl8821ae implements WOWLAN; however, the other drivers may receive
a call requesting information about this mode. The other drivers need to
ignore the request rather than logging that the default branch of the
switch statement has been reached.
Reported by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Joe Perches [Fri, 23 Sep 2016 18:27:19 +0000 (11:27 -0700)]
rtlwifi: Add switch variable to 'switch case not processed' messages
Help along debugging by showing what switch/case variable is not
being processed in these messages.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kalle Valo [Tue, 27 Sep 2016 15:32:24 +0000 (18:32 +0300)]
Merge tag 'iwlwifi-next-for-kalle-2015-09-26' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next
* Some new HW IDs;
* Small fix in CTDP error handling;
* Remove support for older firmwares;
* Clean-ups and a few simple fixes here and there.
Ben Greear [Mon, 26 Sep 2016 18:56:26 +0000 (21:56 +0300)]
ath10k: support up to 64 vdevs
The (1 << x) - 1 trick won't work when you
are trying to fill up all 64 bits, so add special
case for that.
Signed-off-by: Ben Greear <greearb@candelatech.com>
[kvalo@qca.qualcomm.com: remove the sentence about moving limits]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Ben Greear [Mon, 26 Sep 2016 18:56:26 +0000 (21:56 +0300)]
ath10k: document cycle count related counters
They are not necessarily named in an intuitive manner,
so at least add some comments to help the next person.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Ben Greear [Mon, 26 Sep 2016 18:56:25 +0000 (21:56 +0300)]
ath10k: fix typo in logging message
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Vasanthakumar Thiagarajan [Mon, 26 Sep 2016 18:56:24 +0000 (21:56 +0300)]
ath10k: fix rfc1042 header retrieval in QCA4019 with eth decap mode
Chipset from QCA99X0 onwards (QCA99X0, QCA9984, QCA4019 & future)
rx_hdr_status is not padded to align in 4-byte boundary. Define a
new hw_params field to handle different alignment behaviour between
different hw. This patch fixes improper retrieval of rfc1042 header
with QCA4019. This patch along with "ath10k: Properly remove padding
from the start of rx payload" will fix traffic failure in ethernet
decap mode for QCA4019.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Masahiro Yamada [Mon, 26 Sep 2016 18:56:24 +0000 (21:56 +0300)]
ath10k: do not check if reset is NULL
Since reset_control_get() never returns NULL, we can use IS_ERR()
instead of IS_ERR_OR_NULL(). The return statements can be simpler
as well.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Masahiro Yamada [Mon, 26 Sep 2016 18:56:23 +0000 (21:56 +0300)]
ath10k: use devm_reset_control_get() instead of reset_control_get()
Use the managed variant of reset_control_get() to simplify the
failure path and the .remove callback.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Masahiro Yamada [Mon, 26 Sep 2016 18:56:22 +0000 (21:56 +0300)]
ath10k: use devm_clk_get() instead of clk_get()
Use the managed variant of clk_get() to simplify the failure path
and the .remove callback.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Joe Perches [Mon, 26 Sep 2016 18:56:21 +0000 (21:56 +0300)]
ath10k: spelling and miscellaneous neatening
Correct some trivial comment typos.
Remove unnecessary parentheses in a long line.
Signed-off-by: Joe Perches <joe@perches.com>
[kvalo@qca.qualcomm.com: drop the change for return]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Emmanuel Grumbach [Tue, 20 Sep 2016 10:40:33 +0000 (13:40 +0300)]
iwlwifi: mvm: initialise ADD_STA before sending it to the firmware
When we unshare a queue, the ADD_STA was not properly
initialised.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Thu, 8 Sep 2016 07:44:38 +0000 (10:44 +0300)]
iwlwifi: allow error table address new range
The firmware has a new smart linker, and this table can now be
in ICCM or in SMEM. It is not hardcoded, but depends on code
size. Allow the full range.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Emmanuel Grumbach [Tue, 13 Sep 2016 19:59:27 +0000 (22:59 +0300)]
iwlwifi: mvm: fix typo in TC_CMD_SEC_KEY_FROM_TABLE
This define should really be TX_CMD_SEC_KEY_FROM_TABLE
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Luca Coelho [Mon, 12 Sep 2016 13:03:30 +0000 (16:03 +0300)]
iwlwifi: remove support for fw older than -17 and -22
FW versions older than -17 for 3160 and 7260 and older than -22 for
newer NICs are not supported anymore. Don't load these versions
and remove code that handles them.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Rafał Miłecki [Fri, 23 Sep 2016 13:27:46 +0000 (15:27 +0200)]
brcmfmac: drop unused fields from struct brcmf_pub
They seem to be there from the first day. We calculate these values but
never use them.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rafał Miłecki [Wed, 21 Sep 2016 06:23:24 +0000 (08:23 +0200)]
brcmfmac: fix memory leak in brcmf_fill_bss_param
This function is called from get_station callback which means that every
time user space was getting/dumping station(s) we were leaking 2 KiB.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Fixes: 1f0dc59a6de ("brcmfmac: rework .get_station() callback")
Cc: stable@vger.kernel.org # 4.2+
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Larry Finger [Wed, 21 Sep 2016 01:19:29 +0000 (21:19 -0400)]
rtl8xxxu: Stop log spam from each successful interrupt
As soon as debugging is turned on, the logs are filled with messages
reporting the interrupt status. As this quantity is usually zero, this
output is not needed. In fact, there will be a report if the status is
not zero, thus the debug line in question could probably be deleted.
Rather than taking that action, I have changed it to only be printed
when the newly added RTL8XXXU_DEBUG_INTERRUPT bit is set in the debug
mask.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Wed, 21 Sep 2016 01:19:28 +0000 (21:19 -0400)]
rtl8xxxu: Use a struct rtl8xxxu_fileops * in rtl8xxxu_init_device()
This saves some 217, or about, derefences of priv->fops.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Wed, 21 Sep 2016 01:19:27 +0000 (21:19 -0400)]
rtl8xxxu: Clean up llt_init() API
Remove last_tx_page argument from the llt_init() function. The
rtl8xxxu_fileops structure contains the correct TX_TOTAL_PAGE_NUM
value for the device, and rtl8xxxu_auto_llt_table() doesn't need to
know the value in the first place.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Wed, 21 Sep 2016 01:19:26 +0000 (21:19 -0400)]
rtl8xxxu: Fix off by one error calculating pubq
This was detected tracing the 8188eu driver, but doesn't seem to make
any difference when using it.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Tue, 20 Sep 2016 15:19:04 +0000 (20:49 +0530)]
mwifiex: code rearrangement in mwifiex_usb_host_to_card()
This patch helps get rid of goto statement and improves readability.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Cathy Luo [Tue, 20 Sep 2016 15:19:03 +0000 (20:49 +0530)]
mwifiex: fix race condition causing tx timeout
It's been observed that in a corner case mwifiex_usb_tx_complete()
gets called before we exit from mwifiex_usb_host_to_card() after
submitting the urb. 'data_sent' flag remains set in this case. It
blocks further Tx packets and triggers watchdog timeout.
The problem is fixed by setting data_sent and port_block flag at
correct place.
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Shengzhen Li <szli@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Cathy Luo [Tue, 20 Sep 2016 15:19:02 +0000 (20:49 +0530)]
mwifiex: fix kernel crash for USB chipsets
Following crash issue is observed during TCP traffic stress
test
[ 2253.625439] NMI watchdog: BUG: soft lockup - CPU#3 stuck for 22s!
[kworker/u17:1:5191]
[ 2253.625520] Call Trace:
[ 2253.625527] [<
ffffffffc0b47030>] ? moal_spin_lock+0x30/0x30
[usb8xxx]
[ 2253.625533] [<
ffffffffc0ac3ceb>] ? wlan_wmm_lists_empty+0xb/0xf0
[mlan]
[ 2253.625537] [<
ffffffffc0ab0ea3>] mlan_main_process+0x1b3/0x720
[mlan]
[ 2253.625540] [<
ffffffffc0b337f5>] woal_main_work_queue+0x45/0x80
[usb8xxx]
[ 2253.625543] [<
ffffffff8108aaf0>] process_one_work+0x150/0x3f0
[ 2253.625545] [<
ffffffff8108b1e1>] worker_thread+0x121/0x520
[ 2253.625547] [<
ffffffff8108b0c0>] ? rescuer_thread+0x330/0x330
[ 2253.625549] [<
ffffffff81090222>] kthread+0xd2/0xf0
[ 2253.625551] [<
ffffffff81090150>] ?
kthread_create_on_node+0x1c0/0x1c0
[ 2253.625553] [<
ffffffff8179423c>] ret_from_fork+0x7c/0xb0
[ 2253.625555] [<
ffffffff81090150>] ?
kthread_create_on_node+0x1c0/0x1c0
In mwifiex_usb_tx_complete(), we are updating port->block_status first
and then freeing the skb attached to that URB. We may end up attaching
new skb to URB in a corner case and same will be freed. This results in
the kernel crash. The problem is solved by changing the sequence.
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Shengzhen Li <szli@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Mon, 19 Sep 2016 11:09:59 +0000 (12:09 +0100)]
brcmfmac: simplify mapping of auth type
The 802.11 standard only has four valid auth type configurations of which
our firmware only supports two, ie. Open System and Shared Key. Simplify
the mapping falling back to automatic for other types specified by
user-space.
Reviewed-by: Arend Van Spriel <arend.vanspriel@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Signed-off-by: Hante Meuleman <hante.meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Mon, 19 Sep 2016 11:09:58 +0000 (12:09 +0100)]
brcmfmac: fix out of bound access on clearing wowl wake indicator
Clearing the wowl wakeindicator happens with a rather odd
construction where the string "clear" is used to set the iovar
wowl_wakeind. This was implemented incorrectly as it caused an
out of bound access. Use an intermediate variable of correct
length and copy string in that. Problem was found using coverity.
Reviewed-by: Arend Van Spriel <arend.vanspriel@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Signed-off-by: Hante Meuleman <hante.meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Mon, 19 Sep 2016 11:09:57 +0000 (12:09 +0100)]
brcmfmac: fix clearing entry IPv6 address
When IPv6 address is to be cleared there is a possible out of
bound access. But also the clearing of the last entry and the
adjustment of total number of stored IPv6 addresses is not
updated. This patch fixes that bug. Bug was found using coverity.
Reviewed-by: Arend Van Spriel <arend.vanspriel@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Signed-off-by: Hante Meuleman <hante.meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Mon, 19 Sep 2016 11:09:56 +0000 (12:09 +0100)]
brcmfmac: remove unnecessary null pointer check
in the function brcmf_bus_start() in the exception handling a
check is made to dermine whether ifp is null, though this is not
possible. Removing the unnessary check.
Reviewed-by: Arend Van Spriel <arend.vanspriel@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Signed-off-by: Hante Meuleman <hante.meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Arend Van Spriel [Mon, 19 Sep 2016 11:09:55 +0000 (12:09 +0100)]
brcmfmac: remove worker from .ndo_set_mac_address() callback
As it turns out there is no need to use a worker for the callback
because it is not called from atomic context.
Reported-by: Dan Williams <dcbw@redhat.com>
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Arend Van Spriel [Mon, 19 Sep 2016 11:09:54 +0000 (12:09 +0100)]
brcmfmac: initialize variable in brcmf_sdiod_regrl()
In case of an error the variable returned is uninitialized. The caller
will probably check the error code before using it, but better assure
it is set to zero.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Arend Van Spriel [Mon, 19 Sep 2016 11:09:53 +0000 (12:09 +0100)]
brcmfmac: fix memory leak in brcmf_flowring_add_tdls_peer()
In the error paths in brcmf_flowring_add_tdls_peer() the allocated
resource should be freed.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Arend Van Spriel [Mon, 19 Sep 2016 11:09:52 +0000 (12:09 +0100)]
brcmfmac: rework pointer trickery in brcmf_proto_bcdc_query_dcmd()
The variable info is assigned to point to bcdc->msg[1], which is the
same as pointing to bcdc->buf. As that is what we want to access
make it clear by fixing the assignment. This also avoid out-of-bounds
errors from static analyzers are bcdc->msg[1] is not in the structure
definition.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Mon, 19 Sep 2016 11:09:51 +0000 (12:09 +0100)]
brcmfmac: ignore 11d configuration errors
802.11d is not always supported by firmware anymore. Currently the
AP configuration of 11d will cause an abort if the ioctl set is
failing. This behavior is not correct and the error should be
ignored.
Reviewed-by: Arend Van Spriel <arend.vanspriel@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Signed-off-by: Hante Meuleman <hante.meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Ganapathi Bhat [Tue, 20 Sep 2016 13:16:23 +0000 (18:46 +0530)]
mwifiex: cfg80211 set_default_mgmt_key handler
Previously device used to start using IGTK key as Tx key as soon as it
gets downloaded in add_key(). This patch implements set_default_mgmt_key
handler. We will update Tx key ID in set_default_mgmt_key().
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Tony Lindgren [Sat, 17 Sep 2016 16:06:33 +0000 (09:06 -0700)]
wlcore: wl18xx: Use chip specific configuration firmware
Use the wl18xx specific config firmware we now have available.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Tony Lindgren [Sat, 17 Sep 2016 16:06:32 +0000 (09:06 -0700)]
wlcore: Fix config firmware loading issues
Booting multiple wl12xx and wl18xx devices using the same rootfs is
a pain. You currently have to symlink the right nvs file depending
on the wl12xx type.
For example, with wl1271-nvs.bin being a symlink to wl127x-nvs.bin
by default and trying to bring up a wl128x based device:
wlcore: ERROR nvs size is not as expected: 1113 != 912
wlcore: ERROR NVS file is needed during boot
wlcore: ERROR NVS file is needed during boot
wlcore: ERROR firmware boot failed despite 3 retries
Note that wl18xx uses a separate config firmware wl18xx-conf.bin
that can be generated with tools using the following two git repos:
git.ti.com/wilink8-wlan/18xx-ti-utils
git.ti.com/wilink8-wlan/wl18xx_fw
So let's not configure the nvs file for wl18xx as it's not needed
AFAIK. If it turns out that we also need the nvs file for wl18xx,
we can just add it to the config firmware data for wl18xx.
Let's fix the issue by using the chip specific config firmware
data, and make sure we produce understandable warnings if something
is missing.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Tony Lindgren [Sat, 17 Sep 2016 16:06:31 +0000 (09:06 -0700)]
wlcore: spi: Populate config firmware data
Configure the config firmware names and make it available
in platform data.
Let's also fix the order of the struct wilink_family_data
while at it.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Tony Lindgren [Sat, 17 Sep 2016 16:06:30 +0000 (09:06 -0700)]
wlcore: sdio: Populate config firmware data
Configure the config firmware names and make it available
in platform data.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Tony Lindgren [Sat, 17 Sep 2016 16:06:29 +0000 (09:06 -0700)]
wlcore: Prepare family to fix nvs file handling
Move struct wilink_family_data to be available for all TI WLAN
variants. And fix familiy typo, it should be just family.
Looks like wl12xx use two different nvs.bin files and wl18xx
uses a different conf.bin file.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kalle Valo [Mon, 26 Sep 2016 11:10:31 +0000 (14:10 +0300)]
Merge tag 'iwlwifi-next-for-kalle-2016-09-19-2' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next
* added support for MU-MIMO sniffer
* added support for RRM by scan
* added support for packet injection
* migrate to devm memory allocation handling
* some fixes, mostly in DQA and new HW support
* other generic cleanups
Johannes Berg [Wed, 14 Sep 2016 08:20:10 +0000 (10:20 +0200)]
iwlwifi: mvm: correct rate_idx bounds-check
The upper bound IWL_RATE_COUNT_LEGACY should be used
with a >= check, rejecting the value itself; fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Luca Coelho [Wed, 14 Sep 2016 08:54:36 +0000 (11:54 +0300)]
iwlwifi: mvm: bail out if CTDP start operation fails
We were assigning the return value of iwl_mvm_ctdp_command() to a
variable, but never checking it. If this command fails, we should not
allow the interface up process to proceed, since it is potentially
dangerous to ignore thermal management requirements.
Fixes: commit 5c89e7bc557e ("iwlwifi: mvm: add registration to cooling device")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Johannes Berg [Fri, 9 Sep 2016 07:34:46 +0000 (09:34 +0200)]
iwlwifi: pcie: avoid variable shadowing in TFD helpers
The various TFD/TB helpers have two code paths depending on the
type of TFD supported, with variable shadowing due to the new if
branches. Move the fall-through code into else branches to avoid
variable shadowing. While doing so, rename some of the variables
and do some other cleanups (like removing void * casts of void *
pointers.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Oren Givon [Thu, 8 Sep 2016 10:45:54 +0000 (13:45 +0300)]
iwlwifi: add two new 9560 series PCI IDs
Add two new PCI IDs for the 9560 series.
Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Wed, 31 Aug 2016 11:13:53 +0000 (14:13 +0300)]
iwlwifi: mvm: cleanup usage of init_dbg parameter
Move the init_dbg check to earlier in the function to simplify the
code.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Wed, 31 Aug 2016 09:37:55 +0000 (12:37 +0300)]
iwlwifi: mvm: cleanup redundant no_power_up_nic_in_init config
This is never really used anymore.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Johannes Berg [Wed, 31 Aug 2016 20:16:11 +0000 (22:16 +0200)]
iwlwifi: pcie: use LIST_HEAD() macro
There's no need to declare a list and then init it manually,
just use the LIST_HEAD() macro.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Johannes Berg [Wed, 31 Aug 2016 20:16:11 +0000 (22:16 +0200)]
iwlwifi: mvm: use LIST_HEAD() macro
There's no need to declare a list and then init it manually,
just use the LIST_HEAD() macro.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Wed, 31 Aug 2016 16:03:01 +0000 (19:03 +0300)]
iwlwifi: mvm: set HCMD_NAME for PHY_DB as well
Currently it is logged as UNKNOWN.
Also, 0x6c seems to be the permanent ID for this command, remove
incorrect comment and uncomment the command from the commands
list.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Ido Yariv [Tue, 23 Aug 2016 18:44:59 +0000 (14:44 -0400)]
iwlwifi: mvm: Add mem debugfs entry
In order to access cached/paged memory, there are a couple of firmware
commands (one for UMAC and one for LMAC) that let the host access memory
and registers indirectly. Since this is done by the firmware on behalf
of the host, even if memory is paged out or cached, the host will
retrieve the memory as the firmware sees it (paged out memory will get
paged in).
Export this mechanism via a debugfs entry for both read and write
access.
WARNING: This mechanism has no protections at all. Invalid addresses may
crash or hang the firmware. Writing to arbitrary memory also comes with
no guarantees.
Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Johannes Berg [Wed, 24 Aug 2016 08:05:40 +0000 (10:05 +0200)]
iwlwifi: mvm: move AP-specific code to right function
There's no need for the common MAC context function to have an
if on AP mode, the values can be overridden in the AP-specific
function later. Clean that up by adding the full command as a
new parameter to the AP-specific function, and doing it there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Oren Givon [Thu, 25 Aug 2016 10:15:24 +0000 (13:15 +0300)]
iwlwifi: add new 8265 series PCI ID
Add a new PCI ID for the 8265 series.
Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Roee Zamir [Tue, 2 Aug 2016 10:55:13 +0000 (13:55 +0300)]
iwlwifi: mvm: Add debugfs function for clocks diff
New function, reveals the diff between gp2 and host time.
Signed-off-by: Roee Zamir <roee.zamir@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sharon Dvir [Wed, 10 Aug 2016 06:05:48 +0000 (09:05 +0300)]
iwlwifi: migrate to devm_* API
Change PCIE and trans resource allocations to managed resources.
Signed-off-by: Sharon Dvir <sharon.dvir@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Thu, 18 Aug 2016 17:14:38 +0000 (20:14 +0300)]
iwlwifi: mvm: disable P2P queue on mac context release
AP queue is properly released, but P2P queue isn't.
Fixes: commit 4c965139a3cd ("iwlwifi: mvm: support p2p device frames tx on dqa queue #2")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Emmanuel Grumbach [Mon, 22 Aug 2016 20:24:40 +0000 (23:24 +0300)]
iwlwifi: don't export trace points that are used in iwlwifi only
This can save a few bytes
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Johannes Berg [Thu, 18 Aug 2016 12:18:40 +0000 (14:18 +0200)]
iwlwifi: mvm: document passing unexpected Block Ack Request frames
When we get an unexpected Block Ack Request frame, the BAID from
the hardware will be invalid, and we'll pass it to mac80211 for
further handling (sending a delBA action frame.)
Add a comment explaining that, in case anyone looks in the future.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Mon, 15 Aug 2016 14:36:47 +0000 (17:36 +0300)]
iwlwifi: move to wide ID for all commands
Due to firmware design considerations, move to wide ID for
all commands.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Johannes Berg [Thu, 18 Aug 2016 08:32:58 +0000 (10:32 +0200)]
iwlwifi: mvm: make iwl_mvm_update_sta() an inline
There's no point in making this an out-of-line function
since it just calls a single other function with a few
changed parameters.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Mon, 15 Aug 2016 14:13:27 +0000 (17:13 +0300)]
iwlwifi: pcie: log full command sequence
Log group as well. Remove 0x prefix to match TX logging.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Arik Nemtsov [Sun, 7 Aug 2016 15:58:29 +0000 (18:58 +0300)]
iwlwifi: move BIOS MCC retrieval to common code
This will be used by more than MVM, so move it to iwlwifi
While at it, rename WRD_METHOD to the more appropriate
WRDD_METHOD and add some documentation.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Tue, 9 Aug 2016 17:03:52 +0000 (20:03 +0300)]
iwlwifi: mvm: support packet injection
For automatic testing packet injection can be useful.
Support injection through debugfs.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Avrahams Stern [Tue, 19 Jul 2016 08:15:09 +0000 (11:15 +0300)]
iwlwifi: mvm: Add support for RRM by scan
Implement support for RRM by adding an option to configure the scan
dwell time and reporting scan start time and BSS detection time, and
Advertise support for these features.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Mon, 8 Aug 2016 10:07:01 +0000 (13:07 +0300)]
iwlwifi: mvm: support BAR in reorder buffer
On default queue we will not receive frame release notification,
but the BAR itself.
Upon receiving the BAR driver should look at the NSSN and adjust
window accordingly.
Fixes: b915c10174fb ("iwlwifi: mvm: add reorder buffer per queue")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Mon, 8 Aug 2016 08:51:24 +0000 (11:51 +0300)]
iwlwifi: mvm: fix DQA AP mode station assumption
There was recently a Full AP mode feature added where hostap adds
the station at auth stage, and not assoc.
However, when running with legacy hostapd, we get the auth response
before station was added, and tx_skb_non_sta fails to allocate
a queue, resulting in a complete failure of association.
Take care of this situation as well.
Add a warning when no valid queue is returned at all and make mvm
drop the packet instead of passing it on.
Refactor the function a bit while at it.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Haim Dreyfuss [Tue, 2 Aug 2016 12:28:23 +0000 (15:28 +0300)]
iwlwifi: check for valid ethernet address provided by OEM
In 9000 family products we added an option to let the OEM fuse the
mac address via registers. If these registers are zeroed we use the OTP
address instead. Make sure that the address provided by the OEM is valid
and, if not, fall back to the OTP address as well.
Fixes: commit 17c867bfe89b ("iwlwifi: add support for getting HW address from CSR")
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Aviya Erenfeld [Sun, 27 Mar 2016 11:53:49 +0000 (14:53 +0300)]
iwlwifi: mvm: add support for MU-MIMO air sniffer
enable MU-MIMO air sniffer if it's supported by the NIC
Signed-off-by: Aviya Erenfeld <aviya.erenfeld@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Johannes Berg [Thu, 4 Aug 2016 06:57:59 +0000 (08:57 +0200)]
iwlwifi: mvm: compare full command ID
When comparing command IDs, the group should be taken
into account so the same command/notification from a
different group doesn't trigger anything unexpected.
Fix this by comparing to the wide ID.
Fixes: commit 1738d60b31d7 ("iwlwifi: mvm: handle RX MPDUs separately")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Wed, 3 Aug 2016 11:08:00 +0000 (14:08 +0300)]
iwlwifi: mvm: cleanup skb queue functions use
Use skb_queue_empty() and not skb_peek_tail() to check for
empty list.
Avoid a redundant check as well - loop will take care of it.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Sara Sharon [Thu, 4 Aug 2016 07:56:53 +0000 (10:56 +0300)]
iwlwifi: pcie: fix typo in struct name for a000 devices
commit
3cd1980b0cdf ("iwlwifi: pcie: introduce new tfd and tb formats")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Liad Kaufman [Wed, 3 Aug 2016 15:41:27 +0000 (18:41 +0300)]
iwlwifi: mvm: remove variable shadowing
Variable "ac" defined twice. Fix that.
Fixes: commit 93f436e2c7fe ("iwlwifi: mvm: set sta_id in SCD_QUEUE_CONFIG cmd")
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Colin Ian King [Fri, 16 Sep 2016 09:37:31 +0000 (10:37 +0100)]
mwifiex: fix null pointer deference when adapter is null
If adapter is null the error exit path in mwifiex_shutdown_sw is
to down the semaphore sem and print some debug via mwifiex_dbg.
However, passing a NULL adapter to mwifiex_dbg causes a null
pointer deference when accessing adapter->dev. This fix checks
for a null adapter at the start of the function and to exit
without the need to up the semaphore and we also skip the debug
to avoid the null pointer dereference.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Bob Copeland [Wed, 14 Sep 2016 12:42:36 +0000 (08:42 -0400)]
mwifiex: fix error handling in mwifiex_create_custom_regdomain
smatch reports:
sta_cmdresp.c:1053 mwifiex_create_custom_regdomain() warn: possible memory leak of 'regd'
Indeed, mwifiex_create_custom_regdomain() returns NULL in the
case that channel is missing in the TLV without freeing regd.
Moreover, some other error paths in this function return ERR_PTR
values which are assigned without checking to the regd field in
the mwifiex_adapter struct. The latter is only null-checked where
used.
Fix by freeing regd in the error path, and only update
priv->adapter->regd if the returned pointer is valid.
Cc: Amitkumar Karwar <akarwar@marvell.com>
Cc: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Tue, 13 Sep 2016 19:03:15 +0000 (15:03 -0400)]
rtl8xxxu: Implement 8192e specific power down sequence
This powers down the 8192e correctly, or at least to the point where
the firmware will load again, when reloading the driver module.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kalle Valo [Sat, 17 Sep 2016 15:10:33 +0000 (18:10 +0300)]
Merge tag 'iwlwifi-next-for-kalle-2016-09-15-2' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next
* work for new hardware support continues
* dynamic queue allocation stabilization
* improvements in the MSIx code
* multiqueue support work continues
* new firmware version support
* general cleanups and improvements
David S. Miller [Sat, 17 Sep 2016 14:13:16 +0000 (10:13 -0400)]
Merge branch 'ip_tunnel-collect_md'
Alexei Starovoitov says:
====================
ip_tunnel: add collect_md mode to IPv4/IPv6 tunnels
Similar to geneve, vxlan, gre tunnels implement 'collect metadata' mode
in ipip, ipip6, ip6ip6 tunnels.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexei Starovoitov [Thu, 15 Sep 2016 20:00:32 +0000 (13:00 -0700)]
samples/bpf: add comprehensive ipip, ipip6, ip6ip6 test
the test creates 3 namespaces with veth connected via bridge.
First two namespaces simulate two different hosts with the same
IPv4 and IPv6 addresses configured on the tunnel interface and they
communicate with outside world via standard tunnels.
Third namespace creates collect_md tunnel that is driven by BPF
program which selects different remote host (either first or
second namespace) based on tcp dest port number while tcp dst
ip is the same.
This scenario is rough approximation of load balancer use case.
The tests check both traditional tunnel configuration and collect_md mode.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexei Starovoitov [Thu, 15 Sep 2016 20:00:31 +0000 (13:00 -0700)]
samples/bpf: extend test_tunnel_bpf.sh with IPIP test
extend existing tests for vxlan, geneve, gre to include IPIP tunnel.
It tests both traditional tunnel configuration and
dynamic via bpf helpers.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexei Starovoitov [Thu, 15 Sep 2016 20:00:30 +0000 (13:00 -0700)]
ip6_tunnel: add collect_md mode to IPv6 tunnels
Similar to gre, vxlan, geneve tunnels allow IPIP6 and IP6IP6 tunnels
to operate in 'collect metadata' mode.
Unlike ipv4 code here it's possible to reuse ip6_tnl_xmit() function
for both collect_md and traditional tunnels.
bpf_skb_[gs]et_tunnel_key() helpers and ovs (in the future) are the users.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexei Starovoitov [Thu, 15 Sep 2016 20:00:29 +0000 (13:00 -0700)]
ip_tunnel: add collect_md mode to IPIP tunnel
Similar to gre, vxlan, geneve tunnels allow IPIP tunnels to
operate in 'collect metadata' mode.
bpf_skb_[gs]et_tunnel_key() helpers can make use of it right away.
ovs can use it as well in the future (once appropriate ovs-vport
abstractions and user apis are added).
Note that just like in other tunnels we cannot cache the dst,
since tunnel_info metadata can be different for every packet.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Julia Lawall [Thu, 15 Sep 2016 20:23:26 +0000 (22:23 +0200)]
l2tp: constify net_device_ops structures
Check for net_device_ops structures that are only stored in the netdev_ops
field of a net_device structure. This field is declared const, so
net_device_ops structures that have this property can be declared as const
also.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct net_device_ops i@p = { ... };
@ok@
identifier r.i;
struct net_device e;
position p;
@@
e.netdev_ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct net_device_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct net_device_ops i = { ... };
// </smpl>
The result of size on this file before the change is:
text data bss dec hex filename
3401 931 44 4376 1118 net/l2tp/l2tp_eth.o
and after the change it is:
text data bss dec hex filename
3993 347 44 4384 1120 net/l2tp/l2tp_eth.o
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Julia Lawall [Thu, 15 Sep 2016 20:23:25 +0000 (22:23 +0200)]
dwc_eth_qos: constify net_device_ops structures
Check for net_device_ops structures that are only stored in the netdev_ops
field of a net_device structure. This field is declared const, so
net_device_ops structures that have this property can be declared as const
also.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct net_device_ops i@p = { ... };
@ok@
identifier r.i;
struct net_device e;
position p;
@@
e.netdev_ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct net_device_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct net_device_ops i = { ... };
// </smpl>
The result of size on this file before the change is:
text data bss dec hex filename
21623 1316 40 22979 59c3
drivers/net/ethernet/synopsys/dwc_eth_qos.o
and after the change it is:
text data bss dec hex filename
22199 724 40 22963 59b3
drivers/net/ethernet/synopsys/dwc_eth_qos.o
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Julia Lawall [Thu, 15 Sep 2016 20:23:24 +0000 (22:23 +0200)]
hisilicon: constify net_device_ops structures
Check for net_device_ops structures that are only stored in the netdev_ops
field of a net_device structure. This field is declared const, so
net_device_ops structures that have this property can be declared as const
also.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct net_device_ops i@p = { ... };
@ok@
identifier r.i;
struct net_device e;
position p;
@@
e.netdev_ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct net_device_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct net_device_ops i = { ... };
// </smpl>
The result of size on this file before the change is:
text data bss dec hex filename
7995 848 8 8851 2293
drivers/net/ethernet/hisilicon/hip04_eth.o
and after the change it is:
text data bss dec hex filename
8571 256 8 8835 2283
drivers/net/ethernet/hisilicon/hip04_eth.o
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alan Cox [Thu, 15 Sep 2016 17:51:25 +0000 (18:51 +0100)]
llc: switch type to bool as the timeout is only tested versus 0
(As asked by Dave in Februrary)
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David Ahern [Thu, 15 Sep 2016 17:18:45 +0000 (10:18 -0700)]
net: l3mdev: Remove netif_index_is_l3_master
No longer used after
e0d56fdd73422 ("net: l3mdev: remove redundant calls")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>