09 Aug, 2018
12 commits
-
Replace the ssb printk wrappers by standard print helpers.
Also remove SSB_SILENT. Nobody should use it anyway.Originally submitted by Joe Perches .
Modified to add dev_... based printks.Signed-off-by: Michael Buesch
Tested-by: Michael Buesch
Cc: Joe Perches
Signed-off-by: Kalle Valo -
strncpy might not NUL-terminate the string, if the name equals the buffer size.
Use strlcpy instead.Signed-off-by: Michael Buesch
Cc: stable@vger.kernel.org
Signed-off-by: Kalle Valo -
strncpy might not NUL-terminate the string, if the name equals the buffer size.
Use strlcpy instead.Signed-off-by: Michael Buesch
Cc: stable@vger.kernel.org
Signed-off-by: Kalle Valo -
Return statements in functions returning bool should use true or false
instead of an integer value.This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
Reviewed-by: Michael Buesch
Signed-off-by: Kalle Valo -
Fix following coccinelle warning:
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2952:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2961:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3011:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3020:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3439:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3448:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3339:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3348:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3074:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3083:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3192:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3201:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3267:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3276:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3124:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3133:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2821:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2830:2-4: WARNING: possible condition with no effect (if == else)Signed-off-by: YueHaibing
Acked-by: Ping-Ke Shih
Signed-off-by: Kalle Valo -
fix spelling mistake in rx stats text
Signed-off-by: Colin Ian King
Acked-by: Stanislaw Gruszka
Signed-off-by: Kalle Valo -
Variables bss, wh and temp_flash_content are being assigned but are
never used hence they are redundant and can be removed.Cleans up clang warnings:
warning: variable 'bss' set but not used [-Wunused-but-set-variable]
warning: variable 'wh' set but not used [-Wunused-but-set-variable]
warning: variable 'temp_flash_content' set but not used
[-Wunused-but-set-variable]Signed-off-by: Colin Ian King
Signed-off-by: Kalle Valo -
The mt76x0 driver requires the mt76 core driver to actually function.
So add a 'select' to avoid embarrassing 'symbol unknown' errors
when attempting to modprobe it in a module tree that doesn't
include mt76.koSigned-off-by: Valdis Kletnieks
Signed-off-by: Kalle Valo -
Even with "const" variables, the compiler will generate warnings about
VLA usage. In the quest to remove all VLAs from the kernel[1], this uses
a #define instead of a const to do the array sizing.[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com
Fixes: e87b5039511a ("mt76x0: eeprom files")
Signed-off-by: Kees Cook
Acked-by: Stanislaw Gruszka
Signed-off-by: Kalle Valo -
Remove return added accidentally in mt76x0_mac_set_ampdu_factor.
Reported-by: Dan Carpenter
Fixes: a77443498137 ("mt76x0: mac files")
Signed-off-by: Stanislaw Gruszka
Signed-off-by: Kalle Valo -
Change type to u8 to allow sanity check agaist 0xff;
Reported-by: Dan Carpenter
Fixes: e87b5039511a ("mt76x0: eeprom files")
Signed-off-by: Stanislaw Gruszka
Signed-off-by: Kalle Valo -
The kernel BUG happens when wowl is enabled from firmware. In
brcmf_wiphy_wowl_params(), cfg is a NULL pointer because it is
drvr->config returned from wiphy_to_cfg(), and drvr->config is not set
yet. To fix it, set drvr->config before brcmf_setup_wiphy() which
calls brcmf_wiphy_wowl_params().Fixes: 856d5a011c86 ("brcmfmac: allocate struct brcmf_pub instance using wiphy_new()")
Signed-off-by: Winnie Chang
Signed-off-by: Chi-Hsien Lin
Signed-off-by: Kalle Valo
06 Aug, 2018
28 commits
-
ath.git patches for 4.19. Major changes:
ath10k
* add debugfs file warm_hw_reset
wil6210
* add debugfs files tx_latency, link_stats and link_stats_global
* add 3-MSI support
* allow scan on AP interface
* support max aggregation window size 64
-
Match patterns for some skbedit tests contain duplicate whitespace that is
not present in actual tc output. This causes tests to fail because they
can't match required action, even when it was successfully created.Signed-off-by: Vlad Buslov
Acked-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
Match patterns for some connmark tests contain duplicate whitespace that is
not present in actual tc output. This causes tests to fail because they
can't match required action, even when it was successfully created.Fixes: 1dad0f9ffff7 ("tc-testing: add connmark action tests")
Signed-off-by: Vlad Buslov
Acked-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
Test 6fb4 creates one mirred and one pipe action, but only flushes mirred
on teardown. Leaking pipe action causes failures in other tests.Add additional teardown command to also flush gact actions.
Signed-off-by: Vlad Buslov
Acked-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
Fix expected ip address to actually match configured ip address.
Fix test to expect single matched filter.Signed-off-by: Vlad Buslov
Acked-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
…ub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says:
====================
wireless-drivers-next patches for 4.19This time a bigger pull request as we have two new Mediatek drivers
MT76x2u (CONFIG_MT76x2U) and MT76x0U (CONFIG_MT76x0U). Also iwlwifi got
support for the new IEEE 802.11ax standard, the successor for
802.11ac. And naturally smaller new features and bugfixes all over.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
iwlwifi
* implement 802.11ax D2.0
* support for the new 22560 device family
* new PCI IDs for 22000 and 22560
qtnfmac
* implement cfg80211 power management callback
* enable multiple SSIDs scan support
* qtnfmac: implement basic WoWLAN support
mt7601u
* fall back to software encryption for hw unsupported ciphers
* enable 802.11 Management Frame Protection (MFP)
mt76
* support setting RTS threshold
* add USB support
* add support for MT76x2u devices
* add support for MT76x0U devices
mwifiex
* allow user space to set all other IEs except WMM IE
rsi
* add firmware support for AP+BT dual mode
====================Signed-off-by: David S. Miller <davem@davemloft.net>
-
…etooth/bluetooth-next
Johan Hedberg says:
====================
pull request: bluetooth-next 2018-08-05Here's the main bluetooth-next pull request for the 4.19 kernel.
- Added support for Bluetooth Advertising Extensions
- Added vendor driver support to hci_h5 HCI driver
- Added serdev support to hci_h5 driver
- Added support for Qualcomm wcn3990 controller
- Added support for RTL8723BS and RTL8723DS controllers
- btusb: Added new ID for Realtek 8723DE
- Several other smaller fixes & cleanupsPlease let me know if there are any issues pulling. Thanks.
====================Signed-off-by: David S. Miller <davem@davemloft.net>
-
Ido Schimmel says:
====================
mlxsw: Enable MC-aware mode for mlxsw portsPetr says:
Due to an issue in Spectrum chips, when unicast traffic shares the same
queue as BUM traffic, and there is a congestion, the BUM traffic is
admitted to the queue anyway, thus pushing out all UC traffic. In order
to give unicast traffic precedence over BUM traffic, configure
multicast-aware mode on all ports.Under multicast-aware regime, when assigning traffic class to a packet,
the switch doesn't merely take the value prescribed by the QTCT
register. For BUM traffic, it instead assigns that value plus 8. That
limits the number of available TCs, but since mlxsw currently only uses
the lower eight anyway, it is no real loss.The two TCs (UC and MC one) are then mapped to the same subgroup and
strictly prioritized so that UC traffic is preferred in case of
congestion.In patch #1, introduce a new register, QTCTM, which enables the
multicast-aware mode.In patch #2, fix a typo in related code.
In patch #3, set up TCs and QTCTM to enable multicast-aware mode.
====================Signed-off-by: David S. Miller
-
In order to give unicast traffic precedence over BUM traffic, configure
multicast-aware mode on all ports.Under multicast-aware regime, when assigning traffic class to a packet,
the switch doesn't merely take the value prescribed by the QTCT
register. For BUM traffic, it instead assigns that value plus 8.ETS elements for TCs 8..15 thus need to be configured as well. Extend
mlxsw_sp_port_ets_init() so that it maps each of them to the same
subgroup as their corresponding TC from the range 0..7, such that TCs X
and X+8 map to the same subgroup.The existing code configures TCs with strict priority. So far this was
immaterial, because each TC had its own subgroup. Now that two TCs share
a subgroup it becomes important. TCs are prioritized in order of 7, 6,
..., 0, 15, 14, ..., 8: the higher TCs used for BUM traffic end up being
deprioritized. Since that's what's needed, keep that configuration as it
is, and configure the new TCs likewise.Finally in mlxsw_sp_port_create(), invoke configuration of QTCTM to
enable MC-aware mode on each port.Signed-off-by: Petr Machata
Signed-off-by: Ido Schimmel
Signed-off-by: David S. Miller -
Signed-off-by: Petr Machata
Signed-off-by: Ido Schimmel
Signed-off-by: David S. Miller -
This register configures if the Switch Priority to Traffic Class mapping
is based on Multicast packet indication. If so, then multicast packets
will get a Traffic Class that is plus (cap_max_tclass_data/2) the value
configured by QTCT.Signed-off-by: Petr Machata
Signed-off-by: Ido Schimmel
Signed-off-by: David S. Miller -
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.Addresses-Coverity-ID: 1402059 ("Missing break in switch")
Addresses-Coverity-ID: 1402060 ("Missing break in switch")
Addresses-Coverity-ID: 1402061 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva
Signed-off-by: David S. Miller -
We forgot to set the error code on this path, so we return NULL instead
of an error pointer. In the current code kzalloc() won't fail for small
allocations so this doesn't really affect runtime.Fixes: b95ec7eb3b4d ("net: sched: cls_flower: implement chain templates")
Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller -
dev_set_mtu_ext is able to fail with a valid mtu value, at that
condition, extack._msg is not set and random since it is in stack,
then kernel will crash when print it.Fixes: 7a4c53bee3324a ("net: report invalid mtu value via netlink extack")
Signed-off-by: Zhang Yu
Signed-off-by: Li RongQing
Signed-off-by: David S. Miller -
don't bother with pathological cases, they only waste cycles.
IPv6 requires a minimum MTU of 1280 so we should never see fragments
smaller than this (except last frag).v3: don't use awkward "-offset + len"
v2: drop IPv4 part, which added same check w. IPV4_MIN_MTU (68).
There were concerns that there could be even smaller frags
generated by intermediate nodes, e.g. on radio networks.Cc: Peter Oskolkov
Cc: Eric Dumazet
Signed-off-by: Florian Westphal
Signed-off-by: David S. Miller -
Peter Oskolkov says:
====================
ip: Use rb trees for IP frag queue.This patchset
* changes IPv4 defrag behavior to match that of IPv6: overlapping
fragments now cause the whole IP datagram to be discarded (suggested
by David Miller): there are no legitimate use cases for overlapping
fragments;
* changes IPv4 defrag queue from a list to a rb tree (suggested
by Eric Dumazet): this change removes a potential attach vector.Upcoming patches will contain similar changes for IPv6 frag queue,
as well as a comprehensive IP defrag self-test (temporarily delayed).
====================Signed-off-by: David S. Miller
-
Similar to TCP OOO RX queue, it makes sense to use rb trees to store
IP fragments, so that OOO fragments are inserted faster.Tested:
- a follow-up patch contains a rather comprehensive ip defrag
self-test (functional)
- ran neper `udp_stream -c -H -F 100 -l 300 -T 20`:
netstat --statistics
Ip:
282078937 total packets received
0 forwarded
0 incoming packets discarded
946760 incoming packets delivered
18743456 requests sent out
101 fragments dropped after timeout
282077129 reassemblies required
944952 packets reassembled ok
262734239 packet reassembles failed
(The numbers/stats above are somewhat better re:
reassemblies vs a kernel without this patchset. More
comprehensive performance testing TBD).Reported-by: Jann Horn
Reported-by: Juha-Matti Tilli
Suggested-by: Eric Dumazet
Signed-off-by: Peter Oskolkov
Signed-off-by: Eric Dumazet
Cc: Florian Westphal
Signed-off-by: David S. Miller -
Tested: see the next patch is the series.
Suggested-by: Eric Dumazet
Signed-off-by: Peter Oskolkov
Signed-off-by: Eric Dumazet
Cc: Florian Westphal
Signed-off-by: David S. Miller -
This behavior is required in IPv6, and there is little need
to tolerate overlapping fragments in IPv4. This change
simplifies the code and eliminates potential DDoS attack vectors.Tested: ran ip_defrag selftest (not yet available uptream).
Suggested-by: David S. Miller
Signed-off-by: Peter Oskolkov
Signed-off-by: Eric Dumazet
Cc: Florian Westphal
Acked-by: Stephen Hemminger
Signed-off-by: David S. Miller -
Function zerocopy_from_iter() unmarks the 'end' in input sgtable while
adding new entries in it. The last entry in sgtable remained unmarked.
This results in KASAN error report on using apis like sg_nents(). Before
returning, the function needs to mark the 'end' in the last entry it
adds.Signed-off-by: Vakul Garg
Acked-by: Dave Watson
Signed-off-by: David S. Miller -
When a ICMPV6_PKT_TOOBIG is received from a link local address the pmtu will
be updated on a route with an arbitrary interface index. Subsequent packets
sent back to the same link local address may therefore end up not
considering the updated pmtu.Current behavior breaks TAHI v6LC4.1.4 Reduce PMTU On-link. Referring to RFC
1981: Section 3: "Note that Path MTU Discovery must be performed even in
cases where a node "thinks" a destination is attached to the same link as
itself. In a situation such as when a neighboring router acts as proxy [ND]
for some destination, the destination can to appear to be directly
connected but is in fact more than one hop away."Using the interface index from the incoming ICMPV6_PKT_TOOBIG when updating
the pmtu.Signed-off-by: Georg Kohmann
Signed-off-by: David S. Miller -
This patch is to support automatic configuration for ptp timer.
If required ptp dts properties are not provided, driver could
try to calculate a set of default configurations to initialize
the ptp timer. This makes the driver work for many boards which
don't have the required ptp dts properties in current kernel.
Also the users could set dts properties by themselves according
to their requirement.Signed-off-by: Yangbo Lu
Signed-off-by: David S. Miller -
This patch is to add clocks property for fman ptp timer node.
Signed-off-by: Yangbo Lu
Signed-off-by: David S. Miller -
This patch is to add clocks property for fman ptp timer node.
Signed-off-by: Yangbo Lu
Signed-off-by: David S. Miller -
Michael Chan says:
====================
bnxt_en: Updates for net-next.This series includes the usual firmware spec update. The driver has
added external phy loopback test and phy setup retry logic that is
needed during hotplug. In the SRIOV space, the driver has added a
new VF resource allocation mode that requires the VF driver to
reserve resources during IFUP. IF state changes are now propagated
to firmware so that firmware can release some resources during IFDOWN.ethtool method to get firmware core dump and hwmon temperature reading
have been added. DSCP to user priority support has been added to
the driver's DCBNL interface, and the CoS queue logic has been refined
to make sure that the special RDMA Congestion Notification hardware CoS
queue will not be used for networking traffic.
====================Signed-off-by: David S. Miller
-
The CNP CoS queue is reserved for internal RDMA Congestion Notification
Packets (CNP) and should not be used for a TC. Modify the CoS queue
discovery code to skip over the CNP CoS queue and to reduce
bp->max_tc accordingly. However, if RDMA is disabled in NVRAM, the
the CNP CoS queue can be used for a TC.Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
Expand the .ieee_setapp() and ieee_delapp() DCBNL methods to support
DSCP. This allows DSCP values to user priority mappings instead
of using VLAN priorities. Each DSCP mapping is added or deleted one
entry at a time using the firmware API. The firmware call can only be
made from a PF.Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
Export temperature sensor reading via hwmon sysfs.
Signed-off-by: Vasundhara Volam
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller