17 Dec, 2018
1 commit
-
[ Upstream commit c3e43d8b958bd6849817393483e805d8638a8ab7 ]
We return 0 unconditionally in 'rtw_wx_read32()'.
However, 'ret' is set to some error codes in several error handling paths.Return 'ret' instead to propagate the error code.
Fixes: 554c0a3abf216 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Christophe JAILLET
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Sasha Levin
13 Dec, 2018
1 commit
-
…y-one mistake in core/rtw_mlme_ext.c"
commit 87e4a5405f087427fbf8b437d2796283dce2b38f upstream.
pstapriv->max_num_sta is always <= NUM_STA, since max_num_sta is either
set in _rtw_init_sta_priv() or rtw_set_beacon().Fixes: ef9209b642f1 ("staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c")
Signed-off-by: Young Xiao <YangX92@hotmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
06 Dec, 2018
1 commit
-
commit 8561fb31a1f9594e2807681f5c0721894e367f19 upstream.
With Androidx86 8.1, wificond returns "failed to get
nl80211_sta_info_tx_failed" and wificondControl returns "Invalid signal
poll result from wificond". The fix is to OR sinfo->filled with
BIT_ULL(NL80211_STA_INFO_TX_FAILED).This missing bit is apparently not needed with NetworkManager, but it
does no harm in that case.Reported-and-Tested-by: youling257
Cc: linux-wireless@vger.kernel.org
Cc: youling257
Signed-off-by: Larry Finger
Cc: stable
Signed-off-by: Greg Kroah-Hartman
17 Jul, 2018
1 commit
-
commit 920c92448839bd4f8eb87a92b08cad56d449caff upstream.
Dan Carpenter reported an integer underflow issue in the rtl8188eu driver.
This is also needed for the length (signed integer) in rtl8723bs, as it is
later converted to an unsigned integer and used in a memcpy operation.Original issue is at https://patchwork.kernel.org/patch/9796371/
Reported-by: Dan Carpenter
Signed-off-by: Murray McAllister
Cc: stable
Signed-off-by: Greg Kroah-Hartman
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
22 Sep, 2017
2 commits
-
There is a check to see if pmlmepriv is null before vfree'ing
pmlmepriv->free_bss_buf hence implying pmlmepriv could potenially be
null. However, a previous call to rtw_free_mlme_priv_ie_data
can also dereference pmlmepriv, so move this call so that it is only
called if pmlmepriv non-null.Detected by CoverityScan, CID#1077739 ("Dereference before null check")
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Colin Ian King
Signed-off-by: Greg Kroah-Hartman -
The value of the u8 id needs to be upper bounds checked to ensure
the cam_cache array on the adapter dvobj is not indexed outside
of the allowed range of 0..TOTAL_CAM_ENTRY-1. This can currently
occur if id is >= TOTAL_CAM_ENTRY when calling write_cam_from_cache.
Fix this by adding an upper range check.Detected by CoverityScan, CID#1428464 ("Use of untrusted scalar value")
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Colin Ian King
Signed-off-by: Greg Kroah-Hartman
29 Aug, 2017
3 commits
-
casting to void pointer from any pointer type and vice-versa is done
implicitly and therefore casting is not needed in such a case.Signed-off-by: Himanshu Jha
Signed-off-by: Greg Kroah-Hartman -
casting to void pointer from any pointer type and vice-versa is done
implicitly and therefore casting is not needed in such a case.Signed-off-by: Himanshu Jha
Signed-off-by: Greg Kroah-Hartman -
casting to void pointer from any pointer type and vice-versa is done
implicitly and therefore casting is not needed in such a case.Signed-off-by: Himanshu Jha
Signed-off-by: Greg Kroah-Hartman
28 Aug, 2017
2 commits
-
calling memcpy immediately after memset with the same region of memory
makes memset redundant.Build successfully.
Signed-off-by: Himanshu Jha
Signed-off-by: Greg Kroah-Hartman -
Kfree on NULL pointer is a no-op and therefore checking is redundant.
Signed-off-by: Himanshu Jha
Acked-by: Larry Finger
Signed-off-by: Greg Kroah-Hartman
19 Aug, 2017
3 commits
-
Fix checkpatch issues:
ERROR: that open brace { should be on the previous line.
WARNING: braces {} are not necessary for single statement blocks.Signed-off-by: Teo Dacquet
Signed-off-by: Greg Kroah-Hartman -
WARNING: line over 80 characters
WARNING: static const char * array should probably be static const char * const
CHECK: Unnecessary parentheses around hal_data->odmprivSigned-off-by: Tom Gardi
Signed-off-by: Greg Kroah-Hartman -
According to the coding-style documentation, spaces are required
around most binary and ternary operators. Spaces were added to
fix mulitple coding-style errors.Signed-off-by: Christoffer Kjoelbaek
Signed-off-by: Greg Kroah-Hartman
30 Jul, 2017
3 commits
-
Do not initialise static to 0.
Static variables by default initialise to 0.This patch fixes the errors found by checkpatch.
Signed-off-by: Shreeya Patel
Signed-off-by: Greg Kroah-Hartman -
Defining DEBUG_RTL871X in rtw_debug.h causes the following compile error:
CC [M] drivers/staging/rtl8723bs/core/rtw_mlme.o
In file included from drivers/staging/rtl8723bs/core/rtw_mlme.c:18:0:
drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_restruct_sec_ie’:
drivers/staging/rtl8723bs/core/rtw_mlme.c:2502:19: error: ‘ndissecuritytype’ undeclared (first use in thisfunction)Remove the no longer existing parameter.
Signed-off-by: Stefan Assmann
Signed-off-by: Greg Kroah-Hartman -
Fix a comment misspell
Signed-off-by: Xaralampos Mainas
Signed-off-by: Greg Kroah-Hartman
16 Jul, 2017
1 commit
-
Move constant to the right of a relational operator.
This coding style is more common for the kernel code.Problem found by checkpatch.
Signed-off-by: Shreeya Patel
Signed-off-by: Greg Kroah-Hartman
06 Jul, 2017
1 commit
-
Pull networking updates from David Miller:
"Reasonably busy this cycle, but perhaps not as busy as in the 4.12
merge window:1) Several optimizations for UDP processing under high load from
Paolo Abeni.2) Support pacing internally in TCP when using the sch_fq packet
scheduler for this is not practical. From Eric Dumazet.3) Support mutliple filter chains per qdisc, from Jiri Pirko.
4) Move to 1ms TCP timestamp clock, from Eric Dumazet.
5) Add batch dequeueing to vhost_net, from Jason Wang.
6) Flesh out more completely SCTP checksum offload support, from
Davide Caratti.7) More plumbing of extended netlink ACKs, from David Ahern, Pablo
Neira Ayuso, and Matthias Schiffer.8) Add devlink support to nfp driver, from Simon Horman.
9) Add RTM_F_FIB_MATCH flag to RTM_GETROUTE queries, from Roopa
Prabhu.10) Add stack depth tracking to BPF verifier and use this information
in the various eBPF JITs. From Alexei Starovoitov.11) Support XDP on qed device VFs, from Yuval Mintz.
12) Introduce BPF PROG ID for better introspection of installed BPF
programs. From Martin KaFai Lau.13) Add bpf_set_hash helper for TC bpf programs, from Daniel Borkmann.
14) For loads, allow narrower accesses in bpf verifier checking, from
Yonghong Song.15) Support MIPS in the BPF selftests and samples infrastructure, the
MIPS eBPF JIT will be merged in via the MIPS GIT tree. From David
Daney.16) Support kernel based TLS, from Dave Watson and others.
17) Remove completely DST garbage collection, from Wei Wang.
18) Allow installing TCP MD5 rules using prefixes, from Ivan
Delalande.19) Add XDP support to Intel i40e driver, from Björn Töpel
20) Add support for TC flower offload in nfp driver, from Simon
Horman, Pieter Jansen van Vuuren, Benjamin LaHaise, Jakub
Kicinski, and Bert van Leeuwen.21) IPSEC offloading support in mlx5, from Ilan Tayari.
22) Add HW PTP support to macb driver, from Rafal Ozieblo.
23) Networking refcount_t conversions, From Elena Reshetova.
24) Add sock_ops support to BPF, from Lawrence Brako. This is useful
for tuning the TCP sockopt settings of a group of applications,
currently via CGROUPs"* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1899 commits)
net: phy: dp83867: add workaround for incorrect RX_CTRL pin strap
dt-bindings: phy: dp83867: provide a workaround for incorrect RX_CTRL pin strap
cxgb4: Support for get_ts_info ethtool method
cxgb4: Add PTP Hardware Clock (PHC) support
cxgb4: time stamping interface for PTP
nfp: default to chained metadata prepend format
nfp: remove legacy MAC address lookup
nfp: improve order of interfaces in breakout mode
net: macb: remove extraneous return when MACB_EXT_DESC is defined
bpf: add missing break in for the TCP_BPF_SNDCWND_CLAMP case
bpf: fix return in load_bpf_file
mpls: fix rtm policy in mpls_getroute
net, ax25: convert ax25_cb.refcount from atomic_t to refcount_t
net, ax25: convert ax25_route.refcount from atomic_t to refcount_t
net, ax25: convert ax25_uid_assoc.refcount from atomic_t to refcount_t
net, sctp: convert sctp_ep_common.refcnt from atomic_t to refcount_t
net, sctp: convert sctp_transport.refcnt from atomic_t to refcount_t
net, sctp: convert sctp_chunk.refcnt from atomic_t to refcount_t
net, sctp: convert sctp_datamsg.refcnt from atomic_t to refcount_t
net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t
...
25 Jun, 2017
1 commit
-
Fixed checkpatch warnings "Use #include instead of "
Found using checkpatchSigned-off-by: Derek Robson
Signed-off-by: Greg Kroah-Hartman
24 Jun, 2017
2 commits
-
Remove unnecassary casts in the argument to kfree.
Found using Coccinelle. The semantic patch used to find this is as
follows://
@@
type T;
expression *f;
@@- kfree((T *)(f));
+ kfree(f);
//Signed-off-by: Amitoj Kaur Chawla
Signed-off-by: Greg Kroah-Hartman -
This patch assigns (true/false) to boolean EDCCA_State instead of (1/0).
And, there is no need of comparing EDCCA_State explicitly with constant
1.Signed-off-by: simran singhal
Signed-off-by: Greg Kroah-Hartman
22 Jun, 2017
1 commit
-
Two entries being added at the same time to the IFLA
policy table, whilst parallel bug fixes to decnet
routing dst handling overlapping with the dst gc removal
in net-next.Signed-off-by: David S. Miller
21 Jun, 2017
1 commit
-
Signed-off-by: yuan linyu
Signed-off-by: David S. Miller
20 Jun, 2017
1 commit
-
We want the staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman
18 Jun, 2017
1 commit
-
Pull staging and IIO fixes from Greg KH:
"Here are some small staging and IIO driver fixes for 4.12-rc6.Nothing huge, just a few small driver fixes for reported issues. All
have been in linux-next with no reported issues"* tag 'staging-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
Staging: rtl8723bs: fix an error code in isFileReadable()
iio: buffer-dmaengine: Add missing header buffer_impl.h
iio: buffer-dma: Add missing header buffer_impl.h
iio: adc: meson-saradc: fix potential crash in meson_sar_adc_clear_fifo
iio: adc: mxs-lradc: Fix return value check in mxs_lradc_adc_probe()
iio: imu: inv_mpu6050: add accel lpf setting for chip >= MPU6500
staging: iio: ad7152: Fix deadlock in ad7152_write_raw_samp_freq()
16 Jun, 2017
1 commit
-
A common pattern with skb_put() is to just want to memcpy()
some data into the new space, introduce skb_put_data() for
this.An spatch similar to the one for skb_put_zero() converts many
of the places using it:@@
identifier p, p2;
expression len, skb, data;
type t, t2;
@@
(
-p = skb_put(skb, len);
+p = skb_put_data(skb, data, len);
|
-p = (t)skb_put(skb, len);
+p = skb_put_data(skb, data, len);
)
(
p2 = (t2)p;
-memcpy(p2, data, len);
|
-memcpy(p, data, len);
)@@
type t, t2;
identifier p, p2;
expression skb, data;
@@
t *p;
...
(
-p = skb_put(skb, sizeof(t));
+p = skb_put_data(skb, data, sizeof(t));
|
-p = (t *)skb_put(skb, sizeof(t));
+p = skb_put_data(skb, data, sizeof(t));
)
(
p2 = (t2)p;
-memcpy(p2, data, sizeof(*p));
|
-memcpy(p, data, sizeof(*p));
)@@
expression skb, len, data;
@@
-memcpy(skb_put(skb, len), data, len);
+skb_put_data(skb, data, len);(again, manually post-processed to retain some comments)
Reviewed-by: Stephen Hemminger
Signed-off-by: Johannes Berg
Signed-off-by: David S. Miller
14 Jun, 2017
6 commits
-
The caller only cares about zero vs non-zero so this code actually works
fine but we should be returning a negative error code instead of a valid
pointer casted to int.Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
This patch inserts a missing blank line after variable declarations.
Signed-off-by: Fabian Wolff
Signed-off-by: Mate Horvath
Signed-off-by: Greg Kroah-Hartman -
This patch adjusts the alignment of several lines to match their
respective opening parenthesis.Signed-off-by: Fabian Wolff
Signed-off-by: Mate Horvath
Signed-off-by: Greg Kroah-Hartman -
This patch implements the suggestions of checkpatch.pl to remove
unnecessary spaces before function pointer arguments as well as in
statements of the form "foo * bar" (which should be "foo *bar").Signed-off-by: Fabian Wolff
Signed-off-by: Mate Horvath
Signed-off-by: Greg Kroah-Hartman -
This patch improves the formatting of block comments and removes one
commented-out line of code entirely (keeping it would be redundant
thanks to version control).Signed-off-by: Fabian Wolff
Signed-off-by: Mate Horvath
Signed-off-by: Greg Kroah-Hartman -
This patch adds spaces around the binary operators '-' and '+'.
Signed-off-by: Fabian Wolff
Signed-off-by: Mate Horvath
Signed-off-by: Greg Kroah-Hartman
13 Jun, 2017
3 commits
-
This patch removes unnecessary braces in an if/else-construct, thereby
fixing both a checkpatch.pl warning about superfluous braces and an
error about an ill-placed closing brace preceding the "else" keyword.Signed-off-by: Fabian Wolff
Signed-off-by: Mate Horvath
Signed-off-by: Greg Kroah-Hartman -
This patch fixes the checkpatch.pl warning 'Statements should start on
a tabstop' by reformatting the affected lines.Signed-off-by: Fabian Wolff
Signed-off-by: Mate Horvath
Signed-off-by: Greg Kroah-Hartman -
Convert the uses of MAC_FMT, MAC_ARG and IP_FMT, IP_ARG to the
kernel extensions.This could eventually be improved with an in-place substitution.
This reduces object code size a bit too.
$ size drivers/staging/rtl8723bs/r8723bs.o*
text data bss dec hex filename
672812 27040 24232 724084 b0c74 drivers/staging/rtl8723bs/r8723bs.o.allyesconfig.new
676299 27040 24232 727571 b1a13 drivers/staging/rtl8723bs/r8723bs.o.allyesconfig.old
430398 27040 21528 478966 74ef6 drivers/staging/rtl8723bs/r8723bs.o.defconfig.new
431581 27040 21528 480149 75395 drivers/staging/rtl8723bs/r8723bs.o.defconfig.oldSigned-off-by: Joe Perches
Signed-off-by: Greg Kroah-Hartman
08 Jun, 2017
1 commit
-
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_add_monitor_if’:
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2670:10: error: ‘struct net_device’ has no member named ‘destructor’
mon_ndev->destructor = rtw_ndev_destructor;
^Signed-off-by: David S. Miller
06 Jun, 2017
1 commit
-
Replace cant with cannot, argumetns with arguments and
add line break to overly long DBG_871X statement.Signed-off-by: Colin Ian King
Signed-off-by: Greg Kroah-Hartman
04 Jun, 2017
1 commit
-
I found one more spelling mistake in a DBG_8192C debug message,
replace "avaliable" with "available", add some spacing between
text and a number and split overly long lineSigned-off-by: Colin Ian King
Signed-off-by: Greg Kroah-Hartman