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
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
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
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_
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
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
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
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
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;
Rev
_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
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
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
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
-by: 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
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
skb clones use same data buffer,
so tail of one skb is corrupted by beginning of next skb.
Signed-off-by: Ivan Safonov
---
Changes in v2:
- long line in the commit message is divided into two parts.
drivers/staging/rtl8188eu/core/rtw_recv.c | 19 ++-
1 file changed, 6
On 4/23/20 2:29 PM, Greg Kroah-Hartman wrote:
On Sat, Apr 18, 2020 at 11:41:12AM +0300, Ivan Safonov wrote:
skb clones use same data buffer, so tail of one skb is corrupted by beginning
of next skb.
Please properly wrap your changelog text at the correct column (72).
Also, your subject
skb clones use same data buffer, so tail of one skb is corrupted by beginning
of next skb.
Signed-off-by: Ivan Safonov
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core
On 4/14/20 2:56 PM, Dan Carpenter wrote:
On Sun, Apr 12, 2020 at 04:34:08PM +0300, Ivan Safonov wrote:
Remove function rtw_modular64 as all it does is call do_div.
This is wrong. Macro do_div(x, y) change first argument x, but
rtw_modular64(x, y) preserve it.
+ tsf
memdup_user is shorter and expressively.
Signed-off-by: Ivan Safonov
---
.../staging/rtl8188eu/os_dep/ioctl_linux.c| 22 +--
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
b/drivers/staging/rtl8188eu/os_dep
l8723bs: Remove function
rtw_modular64()' have same bug.
Ivan Safonov.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
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
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.
https
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
a
few seconds later. Subsequent reboots also all lead to scenario 2. Until
I reverted the commit again.
Revert the commit fixes both issues making the laptop usable again.
It is really bad idea to load module in tasklet.
Acked-by: Ivan Safonov
Cc: sta...@vger.kernel.org
Cc: Ivan Safon
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
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_security.c | 72 ---
1 file changed, 43 insertions(+), 29 deletions(-)
diff --git a/drivers/s
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 <insafo...@gmail.com>
---
drivers/staging/rtl81
Custom TKIP decryption replaced with lib80211 implementation.
MIC check use lib80211 too.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/Kconfig | 1 +
drivers/staging/rtl8188eu/core/rtw_recv.c | 161 --
drivers/s
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 <insafo...@gmail.com>
The new code looks like original RTL code (really bad)
Custom AES decrypt implementation replaced with lib80211 library.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/Kconfig | 1 +
drivers/staging/rtl8188eu/core/rtw_security.c | 266 +-
2 files changed, 51 insertions(+
Struct pkt_file is unused now, so remove it and correponding functions.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/include/xmit_osdep.h | 13 -
drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 37 --
2 files chang
Struct pkt_file is a base to simple wrapper for skb_copy_bits().
Use skb_copy_bits() without wrappers.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_xmit.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
diff
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_xmit.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_xmit.c | 17 +
1 file changed, 5 insertions(+), 12 del
Return value of request_module() does not handled,
so it is possible to use shorter try_then_request_module().
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
.../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 27 +++---
drivers/staging/rtl8192u/ieee80211/ieee8021
ieee80211_is_empty_essid() is unused, remove it.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 17 -
drivers/staging/rtl8188eu/include/ieee80211.h | 3 ---
2 files changed, 20 deletions(-)
diff --git a/drivers/s
Create mon_recv_decrypted_recv() to change rtl88eu_mon_recv_hook()
without affect to rtl88eu_mon_xmit_hook().
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/os_dep/mon.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff
Length of IV/ICV fields calculated here, so trim these field here too.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 17 ++---
drivers/staging/rtl8188eu/os_dep/mon.c| 19 ---
2 files changed, 14 insertions(
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/os_dep/mon.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
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 <insafo...@gmail.
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/i
ieee80211_get_hdrlen is unused, remove it and all corresponding code.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 27 --
drivers/staging/rtl8188eu/include/ieee80211.h | 13 -
2 files chang
sw_decrypt always is 0, so replace it with 0.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
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 chan
Value of this variable does not changed after initialization.
Replace software_encrypt with its default value.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/include/drv_types.h | 1 -
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +--
2 files chan
sw_encrypt always is 0. Replace sw_encrypt with 0.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_xmit.c| 10 --
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 3 +--
drivers/staging/rtl8188eu/include/rtw_security.h | 1 -
d
rtw_software_encrypt used only once and does not changed.
Replace it with 0.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
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_intf
rtw_software_decrypt used only once and does not changed.
Replace it with 0.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
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_intf
Value of this variable has no changes, and used once.
Replace software_decrypt with its value.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/include/drv_types.h | 1 -
drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +--
2 files changed, 1 insertion
;%s(%d): %s", __func__, __line__, str));\
- }
+ })
enum oid_type {
QUERY_OID,
Probably, DEBUG_OID macro does not used, so you can remove it.
Ivan Safonov.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxd
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +-
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_ap.c | 13 ++---
1 file changed, 2 insertions(
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 11 ++-
1 file changed, 2 inse
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 24
1 file chan
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_ap.c | 9 ++---
1 file changed, 2 inse
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 4 +---
1 file changed, 1 ins
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 ---
drivers/staging/rtl8188eu/include/hal_intf
MCS_rate_2R[] does not used. Remove it.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
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
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 10 ++
1 file changed, 2 insertions(+), 8 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 HT_caps_handler().
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 11 ++-
1 file changed, 2 inse
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 <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/include/rtw_recv.h | 3 +--
drivers/staging/rtl8188eu/os_dep/usb_ops
l_tail)().
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
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/r
rtw_ieee80211_bar structure definition does not used. Remove it.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/include/wifi.h | 15 ---
1 file changed, 15 deletions(-)
diff --git a/drivers/staging/rtl8188eu/include/wifi.h
b/drivers/s
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 <insafo...@gmail.com>
---
drivers/st
On 01/14/2017 10:40 PM, Greg KH wrote:
On Sun, Jan 15, 2017 at 12:44:41AM +0530, Kartikey singh wrote:
Even better yet, remove it and rebuild the driver and see if it
breaks :)
Only if the code is not between #ifn?def / #endif...
___
devel mailing
Value of rx_head member of struct recv_frame does not used. Remove it.
Signed-off-by: Ivan Safonov <insafo...@gmail.com>
---
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/d
1 - 100 of 478 matches
Mail list logo