History log of /linux-master/drivers/staging/rtl8723bs/os_dep/osdep_service.c
Revision Date Author Comments
# b1e2d1a2 02-Sep-2022 Nam Cao <namcaov@gmail.com>

staging: rtl8723bs: remove rtw_change_ifname

Delete function rtw_change_ifname because it is not used.

Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/975cd771e5b6573b84b31690895d140cbdaeb5e2.1662111798.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6ed178cb 19-Oct-2021 Jakub Kicinski <kuba@kernel.org>

staging: use eth_hw_addr_set()

Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.

Convert staging drivers from memcpy(... ETH_ADDR) to eth_hw_addr_set():

@@
expression dev, np;
@@
- memcpy(dev->dev_addr, np, ETH_ALEN)
+ eth_hw_addr_set(dev, np)
@@
- memcpy(dev->dev_addr, np, 6)
+ eth_hw_addr_set(dev, np)

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20211019171243.1412240-2-kuba@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0d197f20 29-Sep-2021 Gustavo A. R. Silva <gustavoars@kernel.org>

staging: rtl8723bs: Replace zero-length array with flexible-array member

One-element and zero-length arrays are deprecated and should be
replaced with flexible-array members[1].

Replace zero-length array with flexible-array member and make use
of the struct_size() helper.

[1] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/78
Link: https://github.com/KSPP/linux/issues/160
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20210929194118.GA340431@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 147dbb19 30-Aug-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unused _rtw_init_queue() function

remove _rtw_init_queue() left unused by previous commit
in this series.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/3c03fcfbe799195c84608b05fc54efe921bef4de.1630307025.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 43a0faff 24-Apr-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unused debug macros tied to os_dep/osdep_service.c debug

remove unused debug macros tied to
os_dep/osdep_service.c debug.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c6e1367c0cc08a06e4eefe60f1aadd25d46675c3.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 968b15ad 07-Apr-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove all DBG_871X logs

Remove all of the DBG_871X logs as they
currently do nothing as they require the code to be modified by
hand in order to be turned on. This obviously has not happened
since the code was merged, so just remove them as they are unused.

applied the following semantic patch script:

@@
expression a, b, c, d, e, f, g, h, i, j, k;
constant B, C, D, E;
@@

(
- DBG_871X(a);
|
- DBG_871X(a, b);
|
- DBG_871X(a, B);
|
- DBG_871X(a, b, c);
|
- DBG_871X(a, B, c);
|
- DBG_871X(a, b, C);
|
- DBG_871X(a, B, C);
|
- DBG_871X(a, b, c, d);
|
- DBG_871X(a, B, c, d);
|
- DBG_871X(a, b, C, d);
|
- DBG_871X(a, b, c, D);
|
- DBG_871X(a, B, C, d);
|
- DBG_871X(a, B, c, D);
|
- DBG_871X(a, b, C, D);
|
- DBG_871X(a, B, C, D);
|
- DBG_871X(a, b, c, d, e);
|
- DBG_871X(a, B, c, d, e);
|
- DBG_871X(a, b, C, d, e);
|
- DBG_871X(a, b, c, D, e);
|
- DBG_871X(a, b, c, d, E);
|
- DBG_871X(a, B, C, d, e);
|
- DBG_871X(a, B, c, D, e);
|
- DBG_871X(a, B, c, d, E);
|
- DBG_871X(a, b, C, D, e);
|
- DBG_871X(a, b, C, d, E);
|
- DBG_871X(a, b, c, D, E);
|
- DBG_871X(a, B, C, D, e);
|
- DBG_871X(a, B, C, d, E);
|
- DBG_871X(a, B, c, D, E);
|
- DBG_871X(a, b, C, D, E);
|
- DBG_871X(a, B, C, D, E);
|
- DBG_871X(a, b, c, d, e, f);
|
- DBG_871X(a, b, c, d, e, f, g);
|
- DBG_871X(a, b, c, d, e, f, g, h);
|
- DBG_871X(a, b, c, d, e, f, g, h, i);
|
- DBG_871X(a, b, c, d, e, f, g, h, i, j);
|
- DBG_871X(a, b, c, d, e, f, g, h, i, j, k);
)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/89a39f551107ba73b44dd2422765cf8ce371501a.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0b0029ed 05-Apr-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unnecessary bracks after RT_TRACE deletion

Remove all unnecessary bracks in if blocks, after RT_TRACE macro
deletion

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/19fda6f0a2b381399623f5a5def39b07be0d995f.1617640221.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c1314fe4 05-Apr-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove all RT_TRACE logs in hal/ and os_dep/

Remove all of the RT_TRACE logs in hal/ and os_dep/ files as they
currently do nothing as they require the code to be modified by
hand in order to be turned on. This obviously has not happened
since the code was merged. Moreover it relies on an unneeded
private log level tracing which overrides the in-kernel public one,
so just remove them as they are unused.

This bulk remove has been done with the following semantic
patch:

@@
expression a, b, c;
@@

- RT_TRACE(a, b, (c));

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/f5c6f61461ad957ecd5998019ac1ee1215dde097.1617640221.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c35ddab3 15-Mar-2021 Marco Cesati <marcocesati@gmail.com>

Staging: rtl8723bs: fix spaces in osdep_service.c

This commit fixes the following checkpatch.pl error:

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#50: FILE: ./os_dep/osdep_service.c:50:
+inline int _rtw_netif_rx(struct net_device * ndev, struct sk_buff *skb)

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marco Cesati <marcocesati@gmail.com>
Link: https://lore.kernel.org/r/20210315170618.2566-57-marcocesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 00d5865c 12-Mar-2021 Marco Cesati <marcocesati@gmail.com>

staging: rtl8723bs: remove typedefs in osdep_service_linux.h

This commit fixes the following checkpatch.pl warnings:

WARNING: do not add new typedefs
#43: FILE: include/osdep_service_linux.h:43:
+ typedef spinlock_t _lock;

WARNING: do not add new typedefs
#44: FILE: include/osdep_service_linux.h:44:
+ typedef struct mutex _mutex;

WARNING: do not add new typedefs
#45: FILE: include/osdep_service_linux.h:45:
+ typedef struct timer_list _timer;

WARNING: do not add new typedefs
#52: FILE: include/osdep_service_linux.h:52:
+ typedef struct sk_buff _pkt;

WARNING: do not add new typedefs
#53: FILE: include/osdep_service_linux.h:53:
+ typedef unsigned char _buffer;

WARNING: do not add new typedefs
#55: FILE: include/osdep_service_linux.h:55:
+ typedef int _OS_STATUS;

WARNING: do not add new typedefs
#57: FILE: include/osdep_service_linux.h:57:
+ typedef unsigned long _irqL;

WARNING: do not add new typedefs
#58: FILE: include/osdep_service_linux.h:58:
+ typedef struct net_device * _nic_hdl;

WARNING: do not add new typedefs
#62: FILE: include/osdep_service_linux.h:62:
+ typedef void timer_hdl_return;

WARNING: do not add new typedefs
#63: FILE: include/osdep_service_linux.h:63:
+ typedef void* timer_hdl_context;

WARNING: do not add new typedefs
#65: FILE: include/osdep_service_linux.h:65:
+ typedef struct work_struct _workitem;

Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-29-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 39439d71 09-Nov-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: clean up leading space

Convert spaces to tabs to fix coding style issues and clear checkpatch
warnings.

WARNING: please, no spaces at the start of a line

Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
Link: https://lore.kernel.org/r/20201110041008.15847-10-ross.schm.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 100a149f 29-Jul-2020 Colin Ian King <colin.king@canonical.com>

staging: rtl8723bs: remove redundant assignment to variable ret

The variable ret is being assigned an error return value that is never
read, the control passes to a return statement and ret is never referenced.
Remove the redundant assignment. Also remove an empty line.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200729100525.573500-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 21b1f2b3 31-May-2020 Ivan Safonov <insafonov@gmail.com>

staging:r8723bs: remove wrappers around skb_clone() and remove unnecessary in_interrupt() call

Wrappers around skb_clone() do not simplify the driver code.

The skb_clone() is always called from an interrupt handler,
so use GFP_ATOMIC allocation only.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20200531181751.41830-1-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3fce0276 19-Mar-2020 R Veera Kumar <vkor@vkten.in>

staging: rtl8723bs: os_dep: Correct typo in comments

Correct typo in two comments.
Misspelling found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/1ea4ff5dedf35b51afc53866c303b62a66caff7d.1584633953.git.vkor@vkten.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 38c077d7 09-Oct-2019 Hans de Goede <hdegoede@redhat.com>

staging: rtl8723bs: Remove File operation APIs

rtl8723bs had 2 private file operation helpers:

rtw_is_file_readable()
rtw_retrive_from_file()

These were only used by the removed phy_Config*WithParaFile() functions,
so they can be removed now.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20191009123223.163241-5-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 149726d3 26-Jul-2019 YueHaibing <yuehaibing@huawei.com>

staging: rtl8723bs: os_dep: remove two set but not used variables

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/rtl8723bs//os_dep/osdep_service.c: In function 'rtw_buf_free':
drivers/staging/rtl8723bs//os_dep/osdep_service.c:321:6: warning:
variable 'ori_len' set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs//os_dep/ioctl_linux.c: In function 'rtw_ioctl_wext_private':
drivers/staging/rtl8723bs//os_dep/ioctl_linux.c:4915:6: warning:
variable 'num_priv' set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190726140959.15008-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9b1fd9b0 01-Jul-2019 Nishka Dasgupta <nishkadg.linux@gmail.com>

staging: rtl8723bs: Remove function rtw_modular64()

Remove function rtw_modular64 as all it does is call do_div.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a89ba681 10-Jun-2019 Hariprasad Kelam <hariprasad.kelam@gmail.com>

staging: rtl8723bs: fix spaces required around unary operator

this patch fixes below issues reported by checkpatch

ERROR: spaces required around that '=' (ctx:WxV)
ERROR: spaces required around that '=' (ctx:WxV)
ERROR: spaces required around that '<' (ctx:VxV)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fdd1b243 09-Mar-2019 Guilherme Tadashi Maeoka <gui.maeoka@gmail.com>

staging: rtl8723bs: os_dep: Fix space in pointer definition

Pointer definition "foo * bar" should be "foo *bar".

Signed-off-by: Guilherme Tadashi Maeoka <gui.maeoka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cbc570a7 09-Mar-2019 Guilherme Tadashi Maeoka <gui.maeoka@gmail.com>

staging: rtl8723bs: os_dep: Fix assignment in if condition

Fix an assignment in if condition.

Signed-off-by: Guilherme Tadashi Maeoka <gui.maeoka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 74a6565f 01-Mar-2019 Jann Horn <jannh@google.com>

staging: rtl8723bs: use kernel_read() instead of open-coded version

Replace the manual call to f_op->read() under KERNEL_DS with kernel_read().
This also reduces the number of users of the legacy alias get_ds() for
KERNEL_DS.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 736706be 04-Mar-2019 Linus Torvalds <torvalds@linux-foundation.org>

get rid of legacy 'get_ds()' function

Every in-kernel use of this function defined it to KERNEL_DS (either as
an actual define, or as an inline function). It's an entirely
historical artifact, and long long long ago used to actually read the
segment selector valueof '%ds' on x86.

Which in the kernel is always KERNEL_DS.

Inspired by a patch from Jann Horn that just did this for a very small
subset of users (the ones in fs/), along with Al who suggested a script.
I then just took it to the logical extreme and removed all the remaining
gunk.

Roughly scripted with

git grep -l '(get_ds())' -- :^tools/ | xargs sed -i 's/(get_ds())/(KERNEL_DS)/'
git grep -lw 'get_ds' -- :^tools/ | xargs sed -i '/^#define get_ds()/d'

plus manual fixups to remove a few unusual usage patterns, the couple of
inline function cases and to fix up a comment that had become stale.

The 'get_ds()' function remains in an x86 kvm selftest, since in user
space it actually does something relevant.

Inspired-by: Jann Horn <jannh@google.com>
Inspired-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 58391efd 08-May-2018 Nathan Chancellor <nathan@kernel.org>

staging: rtl8723bs: Replace license boilerplate with SPDX identifiers

This satisfies a checkpatch.pl warning and is the preferred method for
notating the license due to its lack of ambiguity.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e8b1844a 24-Oct-2017 Kees Cook <keescook@chromium.org>

staging: rtl8723bs: Convert timers to use timer_setup()

In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly. This performs some refactoring to
remove needless wrapper functions, and adds a pointer back to the desired
adapter.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Shreeya Patel <shreeya.patel23498@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Himanshu Jha <himanshujha199640@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Derek Robson <robsonde@gmail.com>
Cc: Harsha Sharma <harshasharmaiitr@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2ef2b7c2 09-Sep-2017 Joe Perches <joe@perches.com>

staging: rtl8723bs: Remove unnecessary rtw_z?malloc casts

These functions now return void * and no longer need casts.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 35628c4a 09-Sep-2017 Joe Perches <joe@perches.com>

staging: rtl8723bs: convert private allocation functions to return void *

Using char * for a return from allocation functions means the
code has to cast generic allocations to specific types.

Allow the compiler to not need casts on the allocations.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 67e3e07e 28-Aug-2017 Himanshu Jha <himanshujha199640@gmail.com>

staging: rtl8723bs: os_dep: remove cast to void pointer

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 <himanshujha199640@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ed6456af 13-Jun-2017 Dan Carpenter <dan.carpenter@oracle.com>

Staging: rtl8723bs: fix an error code in isFileReadable()

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 <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 554c0a3a 29-Mar-2017 Hans de Goede <hdegoede@redhat.com>

staging: Add rtl8723bs sdio wifi driver

The rtl8723bs is found on quite a few systems used by Linux users,
such as on Atom systems (Intel Computestick and various other
Atom based devices) and on many (budget) ARM boards such as
the CHIP.

The plan moving forward with this is for the new clean,
written from scratch, rtl8xxxu driver to eventually gain
support for sdio devices. But there is no clear timeline
for that, so lets add this driver included in staging for now.

Cc: Bastien Nocera <hadess@hadess.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <jes.sorensen@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>