On 4/2/21 4:04 PM, Greg Kroah-Hartman wrote:
On Sun, Mar 28, 2021 at 07:33:25PM +0300, Ivan Safonov wrote:
on_action_spct() do nothing, because rtw_get_stainfo() has no side
effects. Other action handlers are trivial.
Signed-off-by: Ivan Safonov
Same here, wrong driver name :(
Driver
The switch is easier to read and refactor.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 57 ---
.../staging/rtl8188eu/include/rtw_mlme_ext.h | 6 --
2 files changed, 37 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/rtl8188eu
on_action_spct() do nothing, because rtw_get_stainfo() has no side
effects. Other action handlers are trivial.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 95 ---
1 file changed, 95 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core
wifi.h contains unnecessary definitions. Some of them are not used
at all, some can be replaced with native definitions.
Ivan Safonov (4):
staging:r8188eu: replace get_(d|s)a with ieee80211_get_(D|S)A
staging:r8188eu: remove unused definitions from wifi.h
staging:r8188eu: replace cap_
get_da()/get_sa() duplicate native ieee80211_get_(D|S)A functions.
Remove get_(d|s)a, use ieee80211_get_(D|S)A instead.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 6 +--
drivers/staging/rtl8188eu/core/rtw_recv.c | 4 +-
.../staging/rtl8188eu/hal
IsFrameTypeCtrl() duplicate ieee80211_is_ctl().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 8 +---
drivers/staging/rtl8188eu/include/wifi.h| 8
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/rtl8188eu
cap_* definitions duplicate WLAN_CAPABILITY_*. Remove cap_* definitions,
improve code consistency.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 6 +++---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 6 +++---
drivers/staging/rtl8188eu/include/wifi.h
These definitions are not used and will not be useful in the future.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/wifi.h | 92
1 file changed, 92 deletions(-)
diff --git a/drivers/staging/rtl8188eu/include/wifi.h
b/drivers/staging/rtl8188eu
cap_* definitions duplicate WLAN_CAPABILITY_*. Remove cap_* definitions,
improve code consistency.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8712/ieee80211.c | 6 +++---
drivers/staging/rtl8712/wifi.h | 7 ---
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a
get_da()/get_sa() duplicate native ieee80211_get_(D|S)A functions.
Remove get_(d|s)a, use ieee80211_get_(D|S)A instead.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8712/rtl871x_recv.c | 4 +--
drivers/staging/rtl8712/wifi.h | 45 --
2 files changed, 2
These definitions are not used and will not be useful in the future.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8712/wifi.h | 74 --
1 file changed, 74 deletions(-)
diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h
index
_TO_DS_, _FROM_DS_, _MORE_FRAG_, _RETRY_, _PWRMGT_, _MORE_DATA_,
_PRIVACY_, _ORDER_ definitions are duplicate IEEE80211_FCTL_*
kernel definitions.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8712/wifi.h | 52 ++
1 file changed, 22 insertions(+), 30
wifi.h contains unnecessary definitions. Some of them are not used
at all, some can be replaced with native definitions.
Ivan Safonov (4):
staging:rtl8712: replace get_(d|s)a with ieee80211_get_(D|S)A
staging:rtl8712: remove unused definitions from wifi.h
staging:rtl8712: use
ctl(struct net_device *dev,
goto bail;
}
- msgbuf = memdup_user(req->data, req->len);
+ msgbuf = memdup_user((void __user *)req->data, req->len);
if (IS_ERR(msgbuf)) {
result = PTR_ERR(msgbuf);
goto bail;
Reviewed-by: Ivan Safonov
memdup_user() is shorter and safer equivalent
of kmalloc/copy_from_user pair.
Signed-off-by: Ivan Safonov
---
drivers/staging/wlan-ng/p80211netdev.c | 28 --
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/wlan-ng/p80211netdev.c
b/drivers
_TO_DS_, _FROM_DS_, _MORE_FRAG_, _RETRY_, _PWRMGT_, _MORE_DATA_,
_PRIVACY_, _ORDER_ definitions are duplicate IEEE80211_FCTL_*
kernel definitions.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/wifi.h | 51 ++--
1 file changed, 21 insertions(+), 30
Driver and kernel definitions are equal.
Avoid code duplication, improve readability.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 44 +--
drivers/staging/rtl8188eu/include/wifi.h | 14 --
2 files changed, 22 insertions(+), 36
Improve readability.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8712/wifi.h | 14 --
1 file changed, 14 deletions(-)
diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h
index 601d4ff607bc..1b32b3510093 100644
--- a/drivers/staging/rtl8712/wifi.h
The rtw_init_netdev_name() is a small function
that is used once and does not encapsulate any logic.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/osdep_intf.h | 1 -
drivers/staging/rtl8188eu/os_dep/os_intfs.c| 9 -
drivers/staging/rtl8188eu/os_dep/usb_intf.c
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
---
.../staging/rtl8723bs/core/rtw_wlan_util.c| 6 +-
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 50
IE code definitions have been replaced with native ones
to avoid code duplication.
The unobvious substitutions are:
_SSN_IE_1_ -> WLAN_EID_VENDOR_SPECIFIC;
_WPA_IE_ID_ -> WLAN_EID_VENDOR_SPECIFIC;
_WPA2_IE_ID_ -> WLAN_EID_RSN.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl81
Reduce line length, simplify refactoring.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_ap.c | 10 +-
drivers/staging/rtl8188eu/core/rtw_cmd.c | 4 ++--
drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +-
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
WIFI_REASON_CODE is duplication of enum ieee80211_reasoncode.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 4 +--
drivers/staging/rtl8188eu/include/wifi.h | 31 ---
2 files changed, 2 insertions(+), 33 deletions(-)
diff --git a/drivers
swap_u32() duplicate native swap(), so replace swap_u32() with swap().
Signed-off-by: Ivan Safonov
---
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 15 +++
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
b/drivers/net
Enum rtw_ieee80211_spectrum_mgmt_actioncode is a duplication
of ieee80211_spectrum_mgmt_actioncode from include/linux/ieee80211.h.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 10 +-
drivers/staging/rtl8188eu/include/ieee80211.h | 10 --
2
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
---
drivers/staging/rtl8188eu/core/rtw_debug.c| 8 +-
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 2 +-
.../staging
The function guarantees type checking of arguments and return value.
Result of rtw_netdev_priv macro can be assigned to pointer
with incompatible type without warning. The function allow compiler
to perform this check.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8723bs/include
The function guarantees type checking of arguments and return value.
Result of rtw_netdev_priv macro can be assigned to pointer
with incompatible type without warning. The function allow compiler
to perform this check.
Signed-off-by: Ivan Safonov
---
Changes in v2:
- add blank line after
The function guarantees type checking of arguments and return value.
Result of rtw_netdev_priv macro can be assigned to pointer
with incompatible type without warning. The function allow compiler
to perform this check.
Signed-off-by: Ivan Safonov
---
Changes in v2:
- add blank line after
On 8/1/20 12:51 PM, Greg Kroah-Hartman wrote:
On Sat, Aug 01, 2020 at 12:47:07PM +0300, Ivan Safonov wrote:
The function guarantees type checking of arguments and return value.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/osdep_service.h | 6 --
1 file changed, 4
The function guarantees type checking of arguments and return value.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/osdep_service.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h
b/drivers/staging
: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/rtl8188eu/core/rtw_recv.c | 6 +--
drivers/staging/rtl8188eu/core/rtw_security.c | 50 +--
drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 +--
.../staging/rtl8188eu/include
On 7/13/20 5:23 PM, Dan Carpenter wrote:
On Mon, Jul 13, 2020 at 04:16:07PM +0300, Dan Carpenter wrote:
On Sun, Jul 12, 2020 at 03:38:21PM +0300, Ivan Safonov wrote:
Remove unused members of struct xmit_buf: alloc_sz, ff_hwaddr,
dma_transfer_addr, bpending and last.
Signed-off-by: Ivan
On 7/12/20 8:55 PM, Larry Finger wrote:
On 7/12/20 7:38 AM, Ivan Safonov wrote:
Remove unused members of struct xmit_buf: alloc_sz, ff_hwaddr,
dma_transfer_addr, bpending and last.
Signed-off-by: Ivan Safonov
---
Have you tested this change? Previously with this driver, an unused
quantity
Remove unused members of struct xmit_buf: alloc_sz, ff_hwaddr,
dma_transfer_addr, bpending and last.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/rtw_xmit.h | 5 -
drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 1 -
2 files changed, 6 deletions(-)
diff --git a
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
---
Changes in v2:
- in_interrupt() removal has been described.
drivers/staging/rtl8723bs/include
On 5/31/20 8:36 PM, Joe Perches wrote:
On Sun, 2020-05-31 at 20:28 +0300, Ivan Safonov wrote:
On 5/31/20 7:15 PM, Joe Perches wrote:
On Sun, 2020-05-31 at 19:08 +0300, Ivan Safonov wrote:
Wrappers around skb_clone() do not simplify the driver code.
[]
-inline struct sk_buff *_rtw_skb_clone
On 5/31/20 7:15 PM, Joe Perches wrote:
On Sun, 2020-05-31 at 19:08 +0300, Ivan Safonov wrote:
Wrappers around skb_clone() do not simplify the driver code.
[]
-inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb)
-{
- return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL
Wrappers around skb_clone() do not simplify the driver code.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8723bs/include/osdep_service.h | 3 ---
drivers/staging/rtl8723bs/os_dep/osdep_service.c | 5 -
drivers/staging/rtl8723bs/os_dep/recv_linux.c | 2 +-
3 files changed, 1
The skb allocated when out of memory is likely to be discarded
during subsequent processing.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8712/rtl8712_recv.c | 29 ++
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/rtl8712
The skb allocated when out of memory
is likely to be discarded during subsequent processing.
Signed-off-by: Ivan Safonov
---
.../staging/rtl8723bs/hal/rtl8723bs_recv.c| 44 ++-
drivers/staging/rtl8723bs/os_dep/recv_linux.c | 19 +++-
2 files changed, 19 insertions(+), 44
This patch is for Linux 4.19 with a RT patch.
The second 'if' block does not check notify for NULL,
this leads to a system crash.
Most likely, there is a typo here.
With old_notify system works as expected.
Signed-off-by: Ivan Safonov
---
kernel/irq/manage.c | 2 +-
1 file
On 9/10/19 2:59 PM, Dan Carpenter wrote:
On Sun, Sep 08, 2019 at 12:00:26PM +0300, Ivan Safonov wrote >> rtw_malloc
prevents the use of kmemdup/kzalloc and others.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_ap.c| 4 ++--
drivers/staging/rtl8188e
list_(allocate|free).
Signed-off-by: Ivan Safonov
---
kernel/cgroup/cgroup-v1.c | 27 ---
1 file changed, 4 insertions(+), 23 deletions(-)
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
index 88006be40ea3..1f25f35af2c4 100644
--- a/kernel/cgroup/cgroup-v1.c
rtw_malloc prevents the use of kmemdup/kzalloc and others.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_ap.c| 4 ++--
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +-
.../staging/rtl8188eu/include/osdep_service.h | 3 ---
drivers/staging/rtl8188eu/os_dep
skb_put_data is shorter and clear.
Signed-off-by: Ivan Safonov
---
Changes in v2:
- add "staging: " in message subject;
- all code lines now have no breaks in the middle of a sentence.
drivers/staging/rtl8188eu/core/rtw_recv.c| 6 +-
drivers/staging/rtl818
On 8/27/19 1:31 PM, Dan Carpenter wrote:
On Sun, Aug 25, 2019 at 11:48:58PM +0300, Ivan Safonov wrote:
skb_put_data is shorter and clear.
Please don't start the commit message in the middle of a sentence. It
often gets split from the start of the sentence. See how it looks here.
skb_put_data is shorter and clear.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_recv.c| 6 +-
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 3 +--
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c
b
Local variables pfhdr and prframe always have a same value,
so one of them is unnecessary.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c
b
The sequence
skb_put(skb);
skb_pull(skb);
leads to the same result as
skb_reserve(skb);
but second is a little shorter and clearer.
Signed-off-by: Ivan Safonov
---
drivers/staging/netlogic/xlr_net.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers
On 1/2/19 4:06 AM, Larry Finger wrote:
On 1/1/19 1:31 PM, Michael Straube wrote:
I've tested your patch and it solved the issue. No freezes and dmesg
looks good.
I noticed that try_then_request_module() is also used in
rtw_wep_encrypt() and
rtw_wep_decrypt(). I guess that also could cause
On 1/2/19 12:38 AM, Larry Finger wrote:
On 1/1/19 3:02 AM, Ivan Safonov wrote:
I suggested a patch for loading modules from interruptible mode, but
this patch remained unclaimed (
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-August/124851.html
).
For some reason I
I suggested a patch for loading modules from interruptible mode, but
this patch remained unclaimed (
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-August/124851.html
).
For some reason I thought that this patch had been removed and did not
track the fate of this code
Preloading lib80211_crypt_* modules from an ioctl handlers
prevents the module loading from a tasklet.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_ap.c | 4 +-
drivers/staging/rtl8188eu/core/rtw_cmd.c | 8 +-
drivers/staging/rtl8188eu/core
tx frames")
interacting with commit
69a1d98c831e ("Revert "staging:r8188eu: Use lib80211 to support TKIP"")
from the staging.current tree.
I just reverted the staging.current commit ...
All commits using lib8022 in r8188eu cause the system to crash. I will
revert 5 commits in the near future (2 for decryption and 3 for
encryption) in one patch, it will be bit easier.
I apologize for such an unpleasant situation.
Ivan Safonov.
Put data to skb, decrypt with lib80211_crypt_tkip, and place back to tx buffer.
MIC calculation will be replaced later.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_security.c | 419 +-
1 file changed, 77 insertions(+), 342 deletions(-)
diff --git
Put data to skb, decrypt with lib80211_crypt_ccmp, and place back to tx buffer.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_security.c | 778 +++---
1 file changed, 72 insertions(+), 706 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core
Put data to skb, decrypt with lib80211_crypt_wep, and place back to tx buffer.
Signed-off-by: Ivan Safonov
---
v2:
- refactor error handling,
v3:
- fix commit message.
drivers/staging/rtl8188eu/core/rtw_security.c | 82 +++
1 file changed, 47 insertions(+), 35
Put data to skb, decrypt with lib80211_crypt_wep, and place back to tx buffer.
---
v2:
- refactor error handling.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_security.c | 82 +++
1 file changed, 47 insertions(+), 35 deletions(-)
diff --git a
On 05/28/2018 04:53 PM, Dan Carpenter wrote:
On Mon, May 28, 2018 at 09:18:21AM +0300, Ivan Safonov wrote:
Put data to skb, decrypt with lib80211_crypt_wep, and place back to tx buffer.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_security.c | 72
Put data to skb, decrypt with lib80211_crypt_wep, and place back to tx buffer.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_security.c | 72 ---
1 file changed, 43 insertions(+), 29 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core
Rx handler (assigned with netdev_rx_handler_register,
called from __netif_receive_skb()) uses value of dev->rx_handler_data.
The driver has no rx handler and does not need it, so remove rx_handler_data
read.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/TODO
Custom TKIP decryption replaced with lib80211 implementation.
MIC check use lib80211 too.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/Kconfig | 1 +
drivers/staging/rtl8188eu/core/rtw_recv.c | 161 --
drivers/staging/rtl8188eu/core
On 02/26/2018 10:56 AM, Dan Carpenter wrote:
On Fri, Feb 23, 2018 at 05:57:42PM +0300, Ivan Safonov wrote:
Custom AES decrypt implementation replaced with lib80211 library.
Signed-off-by: Ivan Safonov
The new code looks like original RTL code (really bad) so I'm guessing
you copy and p
Custom AES decrypt implementation replaced with lib80211 library.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/Kconfig | 1 +
drivers/staging/rtl8188eu/core/rtw_security.c | 266 +-
2 files changed, 51 insertions(+), 216 deletions(-)
diff
Use native lib80211 WEP decrypt instead of custom implementation.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/Kconfig| 2 +
drivers/staging/rtl8188eu/core/rtw_recv.c| 2 +-
drivers/staging/rtl8188eu/core/rtw_security.c| 80
Struct pkt_file is a base to simple wrapper for skb_copy_bits().
Use skb_copy_bits() without wrappers.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_xmit.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/drivers/staging
Struct pkt_file is a base to simple wrapper for skb_copy_bits().
Do not use struct pkt_file in update_attrib().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_xmit.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/staging
Struct pkt_file is a base to simple wrapper for skb_copy_bits().
Eliminate struct pkt_file usage in rtw_xmitframe_coalesce().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_xmit.c | 17 +
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers
Struct pkt_file is unused now, so remove it and correponding functions.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/xmit_osdep.h | 13 -
drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 37 --
2 files changed, 50 deletions(-)
diff --git a
Return value of request_module() does not handled,
so it is possible to use shorter try_then_request_module().
Signed-off-by: Ivan Safonov
---
.../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 27 +++---
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 15
2
Create mon_recv_decrypted_recv() to change rtl88eu_mon_recv_hook()
without affect to rtl88eu_mon_xmit_hook().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/os_dep/mon.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/staging
ieee80211_get_hdrlen is unused, remove it and all corresponding code.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 27 --
drivers/staging/rtl8188eu/include/ieee80211.h | 13 -
2 files changed, 40 deletions(-)
diff --git a
Remove unused RTW_IEEE80211_FCTL_*, RTW_IEEE80211_FTYPE_*,
RTW_IEEE80211_STYPE_*, IEEE80211_STATMASK_*, IEEE80211_DEFAULT_*,
BEACON_PROBE_SSID_ID_POSITION, MFIE_TYPE_*, IEEE80211_DTIM_*
and IEEE80211_PS_*.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/ieee80211.h | 91
IV/ICV should be trimmed immediately after decoding
(this is a decryptor job).
Trim IV/ICV inside decrypt() for SW decrypted frames,
for HW decrypted - before rtl88eu_mon_recv_hook().
Adopt frames receive process to work without IV/ICV fields.
Signed-off-by: Ivan Safonov
---
drivers/staging
It is useful to remove IV/ICV from rtl88eu_mon_recv_hook().
Also unprotect_frame() will be very short without skb_(pull|trim).
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/os_dep/mon.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers
ieee80211_is_empty_essid() is unused, remove it.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 17 -
drivers/staging/rtl8188eu/include/ieee80211.h | 3 ---
2 files changed, 20 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core
Length of IV/ICV fields calculated here, so trim these field here too.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 17 ++---
drivers/staging/rtl8188eu/os_dep/mon.c| 19 ---
2 files changed, 14 insertions(+), 22 deletions(-)
diff
Value of this variable has no changes, and used once.
Replace software_decrypt with its value.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/drv_types.h | 1 -
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +--
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git
Value of this variable does not changed after initialization.
Replace software_encrypt with its default value.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/drv_types.h | 1 -
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +--
2 files changed, 1 insertion(+), 3 deletions
rtw_software_decrypt used only once and does not changed.
Replace it with 0.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
b/drivers/staging/rtl8188eu
sw_decrypt always is 0, so replace it with 0.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_recv.c| 4 ++--
drivers/staging/rtl8188eu/include/rtw_security.h | 1 -
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 1 -
3 files changed, 2 insertions(+), 4 deletions
sw_encrypt always is 0. Replace sw_encrypt with 0.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_xmit.c| 10 --
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 3 +--
drivers/staging/rtl8188eu/include/rtw_security.h | 1 -
drivers/staging/rtl8188eu
rtw_software_encrypt used only once and does not changed.
Replace it with 0.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
b/drivers/staging
DIV_ROUND_UP is bit useful than series of "/" and "%" operations.
Replace "/%" sequence with DIV_ROUND_UP macro.
Signed-off-by: Ivan Safonov
---
Changes in v2:
- little style fix
drivers/usb/musb/cppi_dma.c | 11 +--
1 file changed, 5 insertions(+)
If this frame contains IV/ICV fields, ether_type field located a little farther.
This bug already fixed here:
https://github.com/lwfinger/rtl8188eu/blob/master/core/rtw_recv.c#L569 .
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +-
1 file changed, 1 insertion
DIV_ROUND_UP is bit useful than series of "/" and "%" operations.
Replace "/%" sequence with DIV_ROUND_UP macro.
Signed-off-by: Ivan Safonov
---
drivers/usb/musb/cppi_dma.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/usb
DIV_ROUND_UP macro is shorter and look better than if-else construction.
DIV_ROUND_UP used in rtw_signal_stat_timer_hdl().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/staging
MCS_rate_2R[] does not used. Remove it.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 1 -
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 1 -
drivers/staging/rtl8188eu/include/rtw_mlme.h | 1 -
3 files changed, 3 deletions(-)
diff --git a/drivers/staging
rtw_hal_get_hwreg() does not used with HW_VAR_RF_TYPE parameter.
Remove HW_VAR_RF_TYPE switch case in rtw_hal_get_hwreg and definition.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 ---
drivers/staging/rtl8188eu/include/hal_intf.h | 1 -
2 files changed, 4
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value.
Replace the function call with RF_1T1R value and refactor rtw_update_ht_cap().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value.
Replace the function call with RF_1T1R value
and refactor rtw_get_cur_max_rate().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value.
Replace the function call with RF_1T1R value
and refactor rtw_check_beacon_data().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_ap.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value.
Replace the function call with RF_1T1R value and refactor add_RATid().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_ap.c | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value.
Replace the function call with RF_1T1R value and refactor issue_assocreq().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 24
1 file changed, 4 insertions(+), 20
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value.
Replace the function call with RF_1T1R value and refactor HT_caps_handler().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions
rtw_ieee80211_bar structure definition does not used. Remove it.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/wifi.h | 15 ---
1 file changed, 15 deletions(-)
diff --git a/drivers/staging/rtl8188eu/include/wifi.h
b/drivers/staging/rtl8188eu/include/wifi.h
rx_end is duplication of pkt->end pointer.
pkt->end is preferred, because it is native skb field
supported by skb_*() functions.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/rtw_recv.h | 3 +--
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 1 -
2 files chan
l_tail)().
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c| 52 +++---
drivers/staging/rtl8188eu/core/rtw_recv.c| 92
drivers/staging/rtl8188eu/core/rtw_security.c| 12 ++--
drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
Original driver code uses rx_* members to store skb (pkt) fields
(instead of pkt->* members), pkt->* updated only after data
completely formed, not in process.
Update pkt->* after data buffer changed (with rx_*).
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/include/rtw_r
1 - 100 of 389 matches
Mail list logo