History log of /linux-master/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
Revision Date Author Comments
# 2f59ee3f 04-Aug-2023 Yang Yingliang <yangyingliang@huawei.com>

staging: rtl8723bs: use is_broadcast_ether_addr() instead of memcmp()

Use is_broadcast_ether_addr() instead of memcmp to check
if the ethernet address is broadcast address.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230804083841.1321554-2-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6c6ff293 03-Nov-2022 Deepak R Varma <drv@mailo.com>

staging: rtl8723bs: Use min/max macros for variable comparison

Simplify code by using min and max helper macros in place of lengthy
if/else block oriented logical evaluation and value assignment. This
issue is identified by coccicheck using the minmax.cocci file.

Signed-off-by: Deepak R Varma <drv@mailo.com>
Link: https://lore.kernel.org/r/Y2OK6fcIkH3S2/1f@qemulion
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 24e65aac 07-Aug-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove rf type branching (fourth patch)

remove all function calls to rtw_get_hw_reg made to
read HW_VAR_RF_TYPE and get value of rt_type, which
is always 1T1R. Clean up code on removal sites,
keeping 1T1R code unconditionally.

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


# 167fc30e 01-Aug-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unused macros

remove unused macros detected by -Wunused-macros
gcc option.

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


# 76ac3b19 30-Jul-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: fix camel case issue in struct wlan_bssid_ex

fix camel case issue in field Reserved in struct wlan_bssid_ex

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


# 61ba4fae 21-Jul-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: fix camel case in IE structures

fix camel case in IE structures all over the driver.

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


# d7361874 21-Jul-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: fix camel case in struct wlan_bcn_info

fix camel case in struct wlan_bcn_info all over the driver.

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


# 6994aa43 21-Jul-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: fix camel case in struct ndis_802_11_ssid

fix camel case in struct ndis_802_11_ssid all over the driver.

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


# d3fcee1b 21-Jul-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: fix camel case in struct wlan_bssid_ex

fix camel case in struct wlan_bssid_ex.

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


# ef35b7a8 17-Jul-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: fix camel case name in macro IsSupportedTxCCK

fix camel case name in macro IsSupportedTxCCK

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


# 309f3cd3 17-Jul-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: convert IsSupportedHT to snake_case

convert IsSupportedHT to snake case is_supported_ht.

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


# 33137187 22-Jun-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove code related to unsupported channel bandwidth

remove all code related to unsupported channel
bandwidth (i.e. 80, 80+80, 160 Mhz). rtl8723bs NIC
works only on 20 and 40 Mhz channels.

Module parameter rtw_bw_mode can only have two
values: 0 and 1 (20 Mhz and 40Mhz). So modify
the default value setting to zero the 5Ghz nibble.

Comments modified accordingly.

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


# 708180a9 22-Jun-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove all 5Ghz network types

remove all 5Ghz network types. rtl8723bs works on
802.11bgn standards and on 2.4Ghz band.

So remove all code related to 802.11a and 802.11ac
standards, which the device doesn't support.

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


# 85487bd7 24-May-2021 Shreyansh Chouhan <chouhan.shreyansh630@gmail.com>

staging: rtl8723bs: fix suspect indents

Removed extra spaces and indents from core/rtw_wlan_util.c.

Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@gmail.com>
Link: https://lore.kernel.org/r/20210524135105.5550-4-chouhan.shreyansh630@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8f5193f8 24-May-2021 Shreyansh Chouhan <chouhan.shreyansh630@gmail.com>

staging: rtl8723bs: remove unnecessary braces from conditionals

Removed the braces from if else statements in core/rtw_wlan_util.c since
the previous commit (6a257dd6de516573) caused all conditional blocks to
have a single statement in the function check_assoc_AP.

Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@gmail.com>
Link: https://lore.kernel.org/r/20210524135105.5550-3-chouhan.shreyansh630@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3c8c577f 24-May-2021 Shreyansh Chouhan <chouhan.shreyansh630@gmail.com>

staging: rtl8723bs: refactor to reduce indents

Reduce the number of indents in rtw_wlan_util.c file by refactoring the
code.

Moved the part of code that rearranged ac paramaters in the function
WMMOnAssocResp to a separate function named sort_wmm_ac_params. It takes
both the array of ac params and their indexes as arguments and sorts them.
Has return type void.

Moved the part of code that checked IE for realtek vendor in the
function check_assoc_AP to a separate function named
get_realtek_assoc_AP_vender. It takes a struct ndis_80211_var_ie * as an
argument and returns u32 realtek vendor.

Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@gmail.com>
Link: https://lore.kernel.org/r/20210524135105.5550-2-chouhan.shreyansh630@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c337ee00 14-Apr-2021 Lee Jones <lee.jones@linaro.org>

staging: rtl8723bs: core: rtw_wlan_util: Remove unused variable 'start_seq'

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/core/rtw_wlan_util.c: In function ‘process_addba_req’:
drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1774:11: warning: variable ‘start_seq’ set but not used [-Wunused-but-set-variable]
from drivers/staging/rtl8188eu/core/rtw_wlan_util.c:12:

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-20-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 79df841b 14-Apr-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: replace DBG_871X_LEVEL logs with netdev_*()

Replace DBG_871X_LEVEL logs with netdev_*() functions
where possible (i.e. where a pointer to netdev is easily
available).

This is not possible in correspondance of redundant
log in module initialization.

So remove those ones.

DBG_871X_LEVEL macro wraps a raw printk call which is not
recommended in a device driver context, prefer using
netdev_*() log functions.

The remove/replace operation has been done with the
following semantic patch script:

@@
expression list args;
identifier padapter;
identifier func;
symbol _drv_always_, _drv_info_, _drv_warning_;
symbol _drv_err_, _drv_emerg_;
@@

func(..., struct adapter *padapter, ...) {
<...
(
- DBG_871X_LEVEL(_drv_always_, args);
+ netdev_dbg(padapter->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_info_, args);
+ netdev_info(padapter->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_warning_, args);
+ netdev_warn(padapter->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_err_, args);
+ netdev_err(padapter->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_emerg_, args);
+ netdev_emerg(padapter->pnetdev, args);
)
...>
}

@rule@
identifier func, context, padapter;
@@

func(void *context)
{
...
struct adapter *padapter = context;
...
}

@@
expression list args;
identifier rule.padapter;
identifier rule.func, rule.context;
@@

func(void *context)
{
<...
(
- DBG_871X_LEVEL(_drv_always_, args);
+ netdev_dbg(padapter->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_info_, args);
+ netdev_info(padapter->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_warning_, args);
+ netdev_warn(padapter->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_err_, args);
+ netdev_err(padapter->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_emerg_, args);
+ netdev_emerg(padapter->pnetdev, args);
)
...>
}

@@
expression list args;
expression get_dev;
identifier func, dev;
@@

func(...)
{
...
struct net_device *dev = get_dev;
<...
(
- DBG_871X_LEVEL(_drv_always_, args);
+ netdev_dbg(dev, args);
|
- DBG_871X_LEVEL(_drv_info_, args);
+ netdev_info(dev, args);
|
- DBG_871X_LEVEL(_drv_warning_, args);
+ netdev_warn(dev, args);
|
- DBG_871X_LEVEL(_drv_err_, args);
+ netdev_err(dev, args);
|
- DBG_871X_LEVEL(_drv_emerg_, args);
+ netdev_emerg(dev, args);
)
...>
}

@@
expression list args;
identifier func, dev;
@@

func(struct net_device *dev)
{
<...
(
- DBG_871X_LEVEL(_drv_always_, args);
+ netdev_dbg(dev, args);
|
- DBG_871X_LEVEL(_drv_info_, args);
+ netdev_info(dev, args);
|
- DBG_871X_LEVEL(_drv_warning_, args);
+ netdev_warn(dev, args);
|
- DBG_871X_LEVEL(_drv_err_, args);
+ netdev_err(dev, args);
|
- DBG_871X_LEVEL(_drv_emerg_, args);
+ netdev_emerg(dev, args);
)
...>
}

@@
expression list args;
identifier func, dvobj;
@@

func(struct dvobj_priv *dvobj)
{
<...
(
- DBG_871X_LEVEL(_drv_always_, args);
+ netdev_dbg(dvobj->if1->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_info_, args);
+ netdev_info(dvobj->if1->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_warning_, args);
+ netdev_warn(dvobj->if1->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_err_, args);
+ netdev_err(dvobj->if1->pnetdev, args);
|
- DBG_871X_LEVEL(_drv_emerg_, args);
+ netdev_emerg(dvobj->if1->pnetdev, args);
)
...>
}

@@
@@

- DBG_871X_LEVEL(...);

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


# 334ef6ab 10-Apr-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove all commented out DBG_8192C logs

remove all commented out DBG_8192C logs.

Macro DBG_8192C belongs to a family of verbose
private tracing macros.

The default behaviour is _do nothing_, to activate
it one should define DEBUG symbol by hand.

So just remove it

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


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

staging: rtl8723bs: split long lines

fix following post-commit checkpatch hooks:

WARNING: line length of 110 exceeds 100 columns
266: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:623:
+ pmlmepriv->cur_network.join_res) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
--
WARNING: line length of 102 exceeds 100 columns
468: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5234:
+ if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == link_count_limit)
--
WARNING: line length of 124 exceeds 100 columns
543: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:335:
+ if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && !(padapter->securitypriv.binstallGrpkey))
--
WARNING: line length of 112 exceeds 100 columns
828: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1061:
+ if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_TX_STBC(pIE->data))
--
WARNING: line length of 113 exceeds 100 columns
836: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1067:
+ if (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_LDPC_CAP(pIE->data))
--
WARNING: line length of 112 exceeds 100 columns
844: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1073:
+ if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_RX_STBC(pIE->data))
--
WARNING: line length of 125 exceeds 100 columns
883: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1282:
+ rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_HT_OPERATION, &len, bssid->IELength - _FIXED_IE_LENGTH_);
--
WARNING: line length of 101 exceeds 100 columns
904: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1305:
+ if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) /* not hidden ssid */
--
WARNING: line length of 129 exceeds 100 columns
953: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1345:
+ if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher)
--
WARNING: line length of 113 exceeds 100 columns
1712: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2651:

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


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

staging: rtl8723bs: add spaces around operators

fix the following post-commit checkpatch issues:

CHECK: spaces preferred around that '|' (ctx:VxV)
187: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:1659:
+ if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
--
CHECK: spaces preferred around that '|' (ctx:VxV)
373: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3023:
+ == (sta_bssrate[j]|IEEE80211_BASIC_RATE_MASK))
--
CHECK: spaces preferred around that '-' (ctx:VxV)
456: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4098:
+ if (len > (NDIS_802_11_LENGTH_RATES_EX-i))
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '-' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '-' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '-' (ctx:VxV)
1001: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1849:
+ if (i > (NUM_STA-1))
--
CHECK: spaces preferred around that '&' (ctx:VxV)
1647: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:211:
+ if (mcs_rate&0x8000) /* MCS15 */

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


# 709c8e49 07-Apr-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites

remove unnecessary bracks on DBG_871X removal sites

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


# 21e161c3 07-Apr-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove all if-else empty blocks left by DBG_871X removal

remove all if-else empty {} blocks left by spatch application.

removed unused variables and an unused static function definition
after if-else blocks removal, to suppress compiler warnings.

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


# 68e79909 07-Apr-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove commented out DBG_871X logs

remove all commented out DBG_871X logs unmatched by
semantic patch.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/125e216e3bb5bc938e06b15dadfbbf51d9517dde.1617802415.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>


# 3cebd895 04-Apr-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove all RT_TRACE logs in core/rtw_wlan_util.c

Remove all of the RT_TRACE logs in the core/rtw_wlan_util.c file 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.

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


# 0e377e48 23-Mar-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: delete extern declarations in core/rtw_wlan_util.c

fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
28: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:28:
+extern unsigned char RTW_WPA_OUI[];
--
WARNING: externs should be avoided in .c files
29: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:29:
+extern unsigned char WPA_TKIP_CIPHER[4];

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


# df2d8943 18-Mar-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unnecessary logging in core/rtw_wlan_util.c

fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1140: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1140:
+ DBG_871X("%s\n", __func__);

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


# b4f0c92b 16-Mar-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_UPDATE_INDICATE_SEQ_WHILE_PROCESS_ADDBA_REQ

remove conditional code blocks checked by unused
CONFIG_UPDATE_INDICATE_SEQ_WHILE_PROCESS_ADDBA_REQ

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

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


# 48e237ab 16-Mar-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_DISABLE_MCS13TO15

remove conditional code blocks checked by unused
CONFIG_DISABLE_MCS13TO15

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

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


# 78619cac 16-Mar-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_GPIO_API

remove conditional code blocks checked by unused
CONFIG_GPIO_API

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Changes in v2:
rebase of conflicting code in public staging-testing

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/20210316142714.GA3368@agape.jhs
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# dc365d2c 16-Mar-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_AP_WOWLAN

remove conditional code blocks checked by unused CONFIG_AP_WOWLAN

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Changes in v2:
rebase of conflicting code with public tree

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/20210316140359.GA2858@agape.jhs
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8b2a95ee 16-Mar-2021 Shreya Ajith <shreya.ajithchb@gmail.com>

staging:rtl8723bs:core:rtw_wlan_util:fixed indentation coding style issue

Fixed the indentation of the else part of the conditional statement.

Signed-off-by: Shreya Ajith <shreya.ajithchb@gmail.com>
Link: https://lore.kernel.org/r/20210316123118.GA2312@shreya-VirtualBox
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ada3334f 14-Mar-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_WOWLAN

remove conditional code blocks checked by unused CONFIG_WOWLAN

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

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


# 0bb8ece4 14-Mar-2021 Fabio Aiuto <fabioaiuto83@gmail.com>

staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_PNO_SUPPORT

Remove conditional code blocks checked by unused CONFIG_PNO_SUPPORT

Cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

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


# c1abfd8c 19-Feb-2021 Kurt Manucredo <fuzzybritches@protonmail.com>

staging: rtl8723bs: fix code style comparison warning

checkpatch gives the following WARNING:
WARNING: Comparisons should place the constant on the right side of the test
this patch fixes the coding style warning.

Signed-off-by: Kurt Manucredo <fuzzybritches@protonmail.com>
Link: https://lore.kernel.org/r/20210219182331.8-1-fuzzybritches@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 00f0b682 07-Dec-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: replace _EXT_SUPPORTEDRATES_IE_

Replace unique _EXT_SUPPORTEDRATES_IE_ macro with kernel provided
WLAN_EID_EXT_SUPP_RATES from linux/ieee80211.h.

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


# 7bd332ec 07-Dec-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: replace _ERPINFO_IE_

Replace unique _ERPINFO_IE_ macro with kernel provided WLAN_EID_ERP_INFO
from linux/ieee80211.h.

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


# 8f6a9446 07-Dec-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: replace _DSSET_IE_

Replace unique _DSSET_IE_ macro with kernel provdied WLAN_EID_DS_PARAMS
from linux/ieee80211.h.

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


# c34c45ed 07-Dec-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: replace _SUPPORTEDRATES_IE_

Replace unique _SUPPORTEDRATES_IE_ macro with kernel provided
WLAN_EID_SUPP_RATES from linux/ieee80211.h.

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


# 3f15277b 07-Dec-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: replace _SSID_IE_

Replace unique _SSID_IE_ macro with kernel provided WLAN_EID_SSID from
linux/ieee80211.h.

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


# 332ec9db 07-Dec-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: use WLAN_EID_HT_OPERATION

Replace unique _HT_EXTRA_INFO_IE_ and _HT_ADD_INFO_IE_ macros with kernel
provided WLAN_EID_HT_OPERATION from linux/ieee80211.h.

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


# 3359e292 07-Dec-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: use WLAN_EID_RSN

Replace unique _WPA2_IE_ID_, EID_WPA2, and _RSN_IE_2_ with kernel provided
WLAN_EID_RSN from linux/ieee80211.h.

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


# b05cc3a9 07-Dec-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: use WLAN_EID_VENDOR_SPECIFIC

Replace unique WLAN_EID_GENERIC, _WPA_IE_ID_, _SSN_IE_1_, and
_VENDOR_SPECIFIC_IE_ macros with kernel provided WLAN_EID_VENDOR_SPECIFIC
from linux/ieee80211.h.

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


# fc6a6528 07-Dec-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: use WLAN_EID_HT_CAPABILITY

Replace unique WLAN_EID_HT_CAP, _HT_CAPABILITY_IE_, and EID_HTCapability
with kernel provided WLAN_EID_HT_CAPABILITY from linux/ieee80211.h.

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


# 2811861b 19-Nov-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

staging: rtl8723bs: core: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of just
letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/cd07e3ebc11b44a3fe016341438e24cf950994a3.1605896059.git.gustavoars@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


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

staging: rtl8723bs: clean up logical continuations

Move operators to fix coding style issues and clear checkpatch checks.

CHECK: Logical continuations should be on the previous line

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


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

staging: rtl8723bs: clean up space before tabs

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

WARNING: please, no space before tabs

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


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

staging: rtl8723bs: clean up braces

Add or remove braces or remove lines to fix coding style issues and
clear checkpatch.

WARNING: braces {} are not necessary for single statement blocks
WARNING: braces {} are not necessary for any arm of this statement
CHECK: Unbalanced braces around else statement
CHECK: braces {} should be used on all arms of this statement
CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: Blank lines aren't necessary after an open brace '{'

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


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

staging: rtl8723bs: clean up line spacing

Add or remove lines to fix coding style issues and clear checkpatch.

WARNING: Missing a blank line after declarations
CHECK: Please use a blank line after function/struct/union/enum declarations
CHECK: Please don't use multiple blank lines

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


# c25d8a7d 04-Nov-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: replace rtw_ieee80211_ht_cap

Replace the unique rtw_ieee80211_ht_cap struct with the provided standard
ieee80211_ht_cap.

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


# d0cc39cd 04-Nov-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: remove ADPT_FMT macro

Remove unnecessary macro for %s and call it directly.

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


# bbda3ac4 04-Nov-2020 Ross Schmidt <ross.schm.dev@gmail.com>

staging: rtl8723bs: remove MAC_FMT macro

Remove unnecessary macro for %pM and call it directly.

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


# 42a18f09 11-Oct-2020 Ivan Safonov <insafonov@gmail.com>

staging: rtl8723bs: remove unnecessary type cast of rtw_netdev_priv() result

The type cast
padapter = (struct adapter *)rtw_netdev_priv(dev);
do nothing because type of rtw_netdev_priv() result
is (struct adapter *).

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


# 4aca9e65 13-Sep-2020 Michael Straube <straube.linux@gmail.com>

staging: rtl8723bs: remove 5 GHz code

Acoording to the TODO code valid only for 5 GHz should be removed.

- find and remove remaining code valid only for 5 GHz. Most of the obvious
ones have been removed, but things like channel > 14 still exist.

Remove code path only valid for channels > 14.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200913162206.19477-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7d955952 13-Sep-2020 Michael Straube <straube.linux@gmail.com>

staging: rtl8723bs: remove cckrates{only}_included()

In rtw_ieee80211.c there are rtw_is_cckrates_included() and
rtw_is_cckratesonly_included() which have the same functionality as
cckrates_included() and cckrates_only_included() defined in
rtw_wlan_util.c. Remove the functions from rtw_wlan_util.c and use
those from rtw_ieee80211.c. Remove the now unused variable ratelen.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200913162206.19477-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# afa096c6 13-Aug-2020 Michael Straube <straube.linux@gmail.com>

staging: rtl8723bs: remove 5 GHz code

According to the TODO 5 GHz code should be removed.

- find and remove remaining code valid only for 5 GHz. Most of the obvious
ones have been removed, but things like channel > 14 still exist.

Remove code for channels > 14 from rtw_get_center_ch().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200813065053.13883-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b65a2d8c 03-Jun-2020 Dan Carpenter <dan.carpenter@oracle.com>

Staging: rtl8723bs: prevent buffer overflow in update_sta_support_rate()

The "ie_len" variable is in the 0-255 range and it comes from the
network. If it's over NDIS_802_11_LENGTH_RATES_EX (16) then that will
lead to memory corruption.

Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200603101958.GA1845750@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 37073089 21-Apr-2020 Denis Straghkov <d.straghkov@ispras.ru>

Staging: rtl8723bs: rtw_wlan_util: Add size check of SSID IE

Add size check of SSID information element in incoming 802.11
frames, to prevent memcpy() of IE in array bssid->Ssid.Ssid, with
size more than 32 bytes.

Signed-off-by: Denis Straghkov <d.straghkov@ispras.ru>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200421212525.24962-1-d.straghkov@ispras.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 858ea450 26-Mar-2020 R Veera Kumar <vkor@vkten.in>

staging: rtl8723bs: core: Correct typos in comments

Correct typos in comments.
Misspellings found using checkpatch.pl.

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


# 038341dc 11-Mar-2020 Takashi Iwai <tiwai@suse.de>

staging: rtl8723bs: Use scnprintf() for avoiding potential buffer overflow

Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit. Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200311092451.23933-4-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2dac96b3 08-Oct-2019 Nachammai Karuppiah <nachukannan@gmail.com>

staging: rtl8723bs: core: Remove typecast in call to kfree

Remove typecast in the call to kfree as it is not needed.
Issue found using the below coccinelle script with options -I and
--recursive-includes,

@@
type t1;
expression *e;
@@

-kfree((t1 *)e);
+kfree(e);

Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Link: https://lore.kernel.org/r/1570565858-91737-1-git-send-email-nachukannan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c47be36d 26-Sep-2019 Michael Straube <straube.linux@gmail.com>

staging: rtl8723bs: remove unused function write_cam_from_cache

Function write_cam_from_cache in rtw_wlan_util.c is never used,
so remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20190926175933.44967-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 87a966d8 14-Sep-2019 Michael Straube <straube.linux@gmail.com>

staging: rtl8723bs: remove return statements from void functions

Remove unnecessary return statements from void functions reported by
checkpatch.

WARNING: void function return statements are not generally useful

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20190914115634.67874-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8b160b18 12-Sep-2019 Rasmus Villemoes <linux@rasmusvillemoes.dk>

staging: rtl8723bs: replace __inline by inline

Currently, __inline is #defined as inline in compiler_types.h, so this
should not change functionality. It is preparation for removing said
#define.

While at it, change some "inline static" to the customary "static
inline" order.

Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>


# 4a397521 30-Aug-2019 Rasmus Villemoes <linux@rasmusvillemoes.dk>

staging: rtl8723bs: replace __inline by inline

Currently, __inline is #defined as inline in compiler_types.h, so this
should not change functionality. It is preparation for removing said
#define.

While at it, change some "inline static" to the customary "static
inline" order.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20190830231527.22304-2-linux@rasmusvillemoes.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d40e29d7 24-Jul-2019 Nishka Dasgupta <nishkadg.linux@gmail.com>

staging: rtl8723bs: Replace function beacon_timing_control()

Remove function beacon_timing_control as it does nothing except call
rtw_hal_bcn_related_reg_setting.
Rename rtw_hal_bcn_related_reg_setting to beacon_timing_control to
maintain compatibility with call site.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190725052645.2372-6-nishkadg.linux@gmail.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>


# 183eb53d 12-Jun-2019 Nishka Dasgupta <nishkadg.linux@gmail.com>

staging: rtl8723bs: core: Remove function enable_rate_adaptive()

Remove function enable_rate_adaptive as all it does is call
Update_RA_Entry.
Modify the single callsite of enable_rate_adaptive to call
Update_RA_Entry directly instead.
Issue found with Coccinelle.

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


# eb569cc0 12-Jun-2019 Nishka Dasgupta <nishkadg.linux@gmail.com>

staging: rtl8723bs: core: Replace function Set_MSR()

Remove function Set_NETYPE0_MSR as it only has one line and it is only
called by one other function, Set_MSR.
Replace contents of Set_MSR with the contents of Set_NETYPE0_MSR as
Set_MSR does nothing except call Set_NETYPE0_MSR.
Issue found with Coccinelle.

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


# 63a9c3ed 17-May-2019 Jeeeun Evans <jeeeunevans@gmail.com>

staging: rtl8723bs: Fix boolinit.cocci warnings

This patch removes unnecessary comparisons to bool.

Issue found by coccinelle:
drivers/staging/rtl8723bs/core/rtw_ap.c:2159:5-11: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_cmd.c:1741:7-17: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:360:5-15: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:360:28-39: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_mlme.c:1675:6-10: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:6766:8-21: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:181:5-40: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_wlan_util.c:748:14-42: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_xmit.c:2429:15-47: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_xmit.c:2458:7-17: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_xmit.c:2524:8-18: WARNING: Comparison to bool
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1653:13-36: WARNING: Comparison to bool

Signed-off-by: Jeeeun Evans <jeeeunevans@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 41604797 29-Mar-2019 Vatsala Narang <vatsalanarang@gmail.com>

staging: rtl8723bs: core: Remove unnecessary parentheses

Removes unnecessary parentheses while returning an expression.Issue
found using coccinelle.
Semantic patch used to solve the problem is as follows:

@@
expression e;
@@

return
-(
e
-)
;

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cb9a242c 12-Dec-2018 Hardik Singh Rathore <hardiksingh.k@gmail.com>

Staging: rtl8723bs: Fix code style issue in rtl8723bs driver

Add space between 'else' and '{' to solve code style issue
in all the files for rtl8723bs driver.

Signed-off-by: Hardik Singh Rathore <hardiksingh.k@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f0de833a 11-Jul-2018 Michael Straube <straube.linux@gmail.com>

staging: rtl8723bs: simplify ratetbl_val_2wifirate()

Simplify ratetbl_val_2wifirate() by not using extra variable
for the return value.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c9d19e68 11-Jul-2018 Michael Straube <straube.linux@gmail.com>

staging: rtl8723bs: fix comparsions to NULL

Fix comparsions to NULL to follow kernel coding style.
x == NULL -> !x
x != NULL -> x

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 525cc4f9 11-Jul-2018 Michael Straube <straube.linux@gmail.com>

staging: rtl8723bs: remove blank lines

Remove unrequired blank lines as reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a35115f3 11-Jul-2018 Michael Straube <straube.linux@gmail.com>

staging: rtl8723bs: fix lines over 80 characters

Fix lines over 80 characters by adding appropriate line breaks.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6efc7e57 11-Jul-2018 Michael Straube <straube.linux@gmail.com>

staging: rtl8723bs: add spaces around '|'

Add spaces around '|' to follow kernel coding style.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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>


# 2646633f 07-Oct-2017 Aastha Gupta <aastha.gupta4104@gmail.com>

staging: rtl8723bs: rename camelcase bAcceptAddbaReq

bAcceptAddbaReq uses camelcase which is not according to Linux kernel
coding style.
There is a 'bAcceptAddbaReq' field both in struct mlme_ext_info and
in struct registry_priv.Rename both of them.

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
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>


# 130cf72f 08-Apr-2017 Larry Finger <Larry.Finger@lwfinger.net>

staging: rtl8723bs: Fix some indenting problems and a potential data overrun

Smatch reports the following:

CHECK drivers/staging/rtl8723bs/core/rtw_wlan_util.c
drivers/staging/rtl8723bs/core/rtw_wlan_util.c:67 cckrates_included() warn: if statement not indented
drivers/staging/rtl8723bs/core/rtw_wlan_util.c:81 cckratesonly_included() warn: if statement not indented
drivers/staging/rtl8723bs/core/rtw_wlan_util.c:815 rtw_camid_alloc() warn: should '1 << (cam_id)' be a 64 bit type?

The first two are fixed with white-space changes. The third is fixed by
restricting cam_id to be less than 32.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
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>