[PATCH 3/7] staging:r8188eu: inline unprotect_frame() in mon_recv_decrypted_recv()

2017-05-02 Thread Ivan Safonov
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

[PATCH 6/7] staging:r8188eu: remove ieee80211_is_empty_essid()

2017-05-02 Thread Ivan Safonov
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

[PATCH 4/7] staging:r8188eu: trim IV/ICV fields in validate_recv_data_frame()

2017-05-02 Thread Ivan Safonov
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

[PATCH 2/6] staging:r8188eu: remove software_decrypt member of registry_priv struct

2017-04-02 Thread Ivan Safonov
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

[PATCH 2/6] staging:r8188eu: remove software_decrypt member of registry_priv struct

2017-04-02 Thread Ivan Safonov
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

[PATCH 5/6] staging:r8188eu: remove software_encrypt member of registry_priv struct

2017-04-02 Thread Ivan Safonov
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

[PATCH 1/6] staging:r8188eu: replace rtw_software_decrypt with its value

2017-04-02 Thread Ivan Safonov
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

[PATCH 3/6] staging:r8188eu: remove sw_decrypt member of security_priv struct

2017-04-02 Thread Ivan Safonov
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

[PATCH 5/6] staging:r8188eu: remove software_encrypt member of registry_priv struct

2017-04-02 Thread Ivan Safonov
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

[PATCH 1/6] staging:r8188eu: replace rtw_software_decrypt with its value

2017-04-02 Thread Ivan Safonov
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

[PATCH 3/6] staging:r8188eu: remove sw_decrypt member of security_priv struct

2017-04-02 Thread Ivan Safonov
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

[PATCH 6/6] staging:r8188eu: remove sw_encrypt member of security_priv struct

2017-04-02 Thread Ivan Safonov
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

[PATCH 4/6] staging:r8188eu: replace rtw_software_encrypt with its default value

2017-04-02 Thread Ivan Safonov
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

[PATCH 6/6] staging:r8188eu: remove sw_encrypt member of security_priv struct

2017-04-02 Thread Ivan Safonov
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

[PATCH 4/6] staging:r8188eu: replace rtw_software_encrypt with its default value

2017-04-02 Thread Ivan Safonov
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

[PATCH v2] usb: musb: cppi_dma.c: use DIV_ROUND_UP macro in cppi_next_(r|t)x_segment()

2017-03-25 Thread Ivan Safonov
DIV_ROUND_UP is bit useful than series of "/" and "%" operations. Replace "/%" sequence with DIV_ROUND_UP macro. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - little style fix drivers/usb/musb/cppi_dma.c | 11 +-- 1 file c

[PATCH v2] usb: musb: cppi_dma.c: use DIV_ROUND_UP macro in cppi_next_(r|t)x_segment()

2017-03-25 Thread Ivan Safonov
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(

[PATCH] staging:r8188eu: add iv length to frame data offset

2017-03-21 Thread Ivan Safonov
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 +-

[PATCH] staging:r8188eu: add iv length to frame data offset

2017-03-21 Thread Ivan Safonov
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

[PATCH] usb: musb: cppi_dma.c: use DIV_ROUND_UP macro in cppi_next_(r|t)x_segment()

2017-02-15 Thread Ivan Safonov
DIV_ROUND_UP is bit useful than series of "/" and "%" operations. Replace "/%" sequence with DIV_ROUND_UP macro. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/usb/musb/cppi_dma.c | 10 -- 1 file changed, 4 insertions(+), 6 deletio

[PATCH] usb: musb: cppi_dma.c: use DIV_ROUND_UP macro in cppi_next_(r|t)x_segment()

2017-02-15 Thread Ivan Safonov
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

[PATCH 1/9] staging:r8188eu: use DIV_ROUND_UP() in rtw_signal_stat_timer_hdl()

2017-02-14 Thread Ivan Safonov
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

[PATCH 1/9] staging:r8188eu: use DIV_ROUND_UP() in rtw_signal_stat_timer_hdl()

2017-02-14 Thread Ivan Safonov
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

[PATCH 9/9] staging:r8188eu: remove unused MCS_rate_2R array

2017-02-14 Thread Ivan Safonov
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

[PATCH 9/9] staging:r8188eu: remove unused MCS_rate_2R array

2017-02-14 Thread Ivan Safonov
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

[PATCH 8/9] staging:r8188eu: remove unused HW_VAR_RF_TYPE parameter of HT_caps_handler

2017-02-14 Thread Ivan Safonov
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

[PATCH 6/9] staging:r8188eu: refactor rtw_update_ht_cap() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 4/9] staging:r8188eu: refactor rtw_get_cur_max_rate() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 8/9] staging:r8188eu: remove unused HW_VAR_RF_TYPE parameter of HT_caps_handler

2017-02-14 Thread Ivan Safonov
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

[PATCH 6/9] staging:r8188eu: refactor rtw_update_ht_cap() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 4/9] staging:r8188eu: refactor rtw_get_cur_max_rate() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 3/9] staging:r8188eu: refactor rtw_check_beacon_data() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 3/9] staging:r8188eu: refactor rtw_check_beacon_data() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 2/9] staging:r8188eu: refactor add_RATid() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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(

[PATCH 2/9] staging:r8188eu: refactor add_RATid() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 5/9] staging:r8188eu: refactor issue_assocreq() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 5/9] staging:r8188eu: refactor issue_assocreq() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 7/9] staging:r8188eu: refactor HT_caps_handler() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 7/9] staging:r8188eu: refactor HT_caps_handler() - remove rtw_hal_get_hwreg() call

2017-02-14 Thread Ivan Safonov
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

[PATCH 2/4] staging:r8188eu: remove unused rtw_ieee80211_bar structure definition

2017-02-06 Thread Ivan Safonov
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

[PATCH 2/4] staging:r8188eu: remove unused rtw_ieee80211_bar structure definition

2017-02-06 Thread Ivan Safonov
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

[PATCH 1/4] staging:r8188eu: replace rx_end member of recv_frame with pkt->end

2017-02-06 Thread Ivan Safonov
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

[PATCH 1/4] staging:r8188eu: replace rx_end member of recv_frame with pkt->end

2017-02-06 Thread Ivan Safonov
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

[PATCH 4/4] staging:r8188eu: replace recv_frame->rx_(data|len|tail) with pkt->(data|len|tail) and remove unused recvframe_(put|pull|pull_tail)()

2017-02-06 Thread Ivan Safonov
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

[PATCH 4/4] staging:r8188eu: replace recv_frame->rx_(data|len|tail) with pkt->(data|len|tail) and remove unused recvframe_(put|pull|pull_tail)()

2017-02-06 Thread Ivan Safonov
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

[PATCH 3/4] staging:r8188eu: update pkt->(data|tail|len) synchronously with rx_(data|tail|len) in recv_frame structure

2017-02-06 Thread Ivan Safonov
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

[PATCH 3/4] staging:r8188eu: update pkt->(data|tail|len) synchronously with rx_(data|tail|len) in recv_frame structure

2017-02-06 Thread Ivan Safonov
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

Re: [PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary do-while removed from macro

2017-01-14 Thread Ivan Safonov
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...

Re: [PATCH] drivers: staging: rtl8188eu: include: wifi: Unnecessary do-while removed from macro

2017-01-14 Thread Ivan Safonov
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...

[PATCH 2/7] staging:r8188eu: remove unused WPA_(GET|PUT)_(BE|LE)_xx macro

2017-01-12 Thread Ivan Safonov
WPA_(GET|PUT)_(BE|LE)_xx macros are unused, remove it. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/rtw_security.h | 29 1 file changed, 29 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h b/d

[PATCH 2/7] staging:r8188eu: remove unused WPA_(GET|PUT)_(BE|LE)_xx macro

2017-01-12 Thread Ivan Safonov
WPA_(GET|PUT)_(BE|LE)_xx macros are unused, remove it. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/rtw_security.h | 29 1 file changed, 29 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h b/drivers/staging/rtl8188eu

[PATCH 7/7] staging:r8188eu: remove unused rx_head member of struct recv_frame

2017-01-12 Thread Ivan Safonov
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

[PATCH 4/7] staging:r8188eu: remove unused get_rxmem()

2017-01-12 Thread Ivan Safonov
get_rxmem() is not unused, remove it. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/rtw_recv.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h

[PATCH 1/7] staging:r8188eu: remove unused (GET|PUT)U32 macros

2017-01-12 Thread Ivan Safonov
(GET|PUT)U32 macros are unused, remove it. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/rtw_security.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h b/drivers/staging/rtl8188eu/i

[PATCH 7/7] staging:r8188eu: remove unused rx_head member of struct recv_frame

2017-01-12 Thread Ivan Safonov
Value of rx_head member of struct recv_frame does not used. Remove it. Signed-off-by: Ivan Safonov --- 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/drivers/staging/rtl8188eu/include

[PATCH 4/7] staging:r8188eu: remove unused get_rxmem()

2017-01-12 Thread Ivan Safonov
get_rxmem() is not unused, remove it. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/rtw_recv.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index e3ab511..74e3a1c

[PATCH 1/7] staging:r8188eu: remove unused (GET|PUT)U32 macros

2017-01-12 Thread Ivan Safonov
(GET|PUT)U32 macros are unused, remove it. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/rtw_security.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h b/drivers/staging/rtl8188eu/include/rtw_security.h index

[PATCH 6/7] staging:r8188eu: remove unnecessary trace output in rtw_recv_indicatepkt()

2017-01-12 Thread Ivan Safonov
Trace output for each received packet in rtw_recv_indicatepkt() is redudant. Remove it. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/

[PATCH 6/7] staging:r8188eu: remove unnecessary trace output in rtw_recv_indicatepkt()

2017-01-12 Thread Ivan Safonov
Trace output for each received packet in rtw_recv_indicatepkt() is redudant. Remove it. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers

[PATCH 5/7] staging:r8188eu: remove unused struct wifidirect_info and all corresponding code

2017-01-12 Thread Ivan Safonov
wifidirect_info structure is unused. Big amount of another definitions used only for wifidirect_info definition. Remove all. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/rtw_mlme.h | 177 --- drivers/staging/rtl8188eu/i

[PATCH 5/7] staging:r8188eu: remove unused struct wifidirect_info and all corresponding code

2017-01-12 Thread Ivan Safonov
wifidirect_info structure is unused. Big amount of another definitions used only for wifidirect_info definition. Remove all. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/rtw_mlme.h | 177 --- drivers/staging/rtl8188eu/include/wifi.h | 84

[PATCH 3/7] staging:r8188eu: remove unused EOR macro

2017-01-12 Thread Ivan Safonov
EOR macro is not unused, remove it. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/rtw_recv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 2

[PATCH 3/7] staging:r8188eu: remove unused EOR macro

2017-01-12 Thread Ivan Safonov
EOR macro is not unused, remove it. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/rtw_recv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 2a92162..e3ab511 100644

[PATCH 5/5] staging:r8188eu: remove unused WIFI_MP_*STATE and WIFI_MP_CTX* definitions

2017-01-04 Thread Ivan Safonov
fw_state member of struct mlme_priv never obtain WIFI_MP_STATE value, so code only for (fw_state == WIFI_MP_STATE) is dead. Remove it, WIFI_MP_*STATE and WIFI_MP_CTX* definitions. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_cmd.c

[PATCH 3/5] staging:r8188eu: remove (NDEV|ADPT)_(FMT|ARG) definitions

2017-01-04 Thread Ivan Safonov
(NDEV|ADPT)_(FMT|ARG) definitions does not used. Remove it. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/osdep_service.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/s

[PATCH 5/5] staging:r8188eu: remove unused WIFI_MP_*STATE and WIFI_MP_CTX* definitions

2017-01-04 Thread Ivan Safonov
fw_state member of struct mlme_priv never obtain WIFI_MP_STATE value, so code only for (fw_state == WIFI_MP_STATE) is dead. Remove it, WIFI_MP_*STATE and WIFI_MP_CTX* definitions. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 3 -- drivers/staging/rtl8188eu

[PATCH 3/5] staging:r8188eu: remove (NDEV|ADPT)_(FMT|ARG) definitions

2017-01-04 Thread Ivan Safonov
(NDEV|ADPT)_(FMT|ARG) definitions does not used. Remove it. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/osdep_service.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include

[PATCH 1/5] staging:r8188eu: remove RTW_STATUS_CODE()

2017-01-04 Thread Ivan Safonov
RTW_STATUS_CODE() does not used. Remove it. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/osdep_service.h | 2 -- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 12 2 files changed, 14 deletions(-) diff --git a/drivers/s

[PATCH 2/5] staging:r8188eu: remove rtw_update_mem_stat definition

2017-01-04 Thread Ivan Safonov
rtw_update_mem_stat definition does not used. Remove it. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/osdep_service.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl

[PATCH 1/5] staging:r8188eu: remove RTW_STATUS_CODE()

2017-01-04 Thread Ivan Safonov
RTW_STATUS_CODE() does not used. Remove it. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/osdep_service.h | 2 -- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 12 2 files changed, 14 deletions(-) diff --git a/drivers/staging/rtl8188eu/include

[PATCH 2/5] staging:r8188eu: remove rtw_update_mem_stat definition

2017-01-04 Thread Ivan Safonov
rtw_update_mem_stat definition does not used. Remove it. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/osdep_service.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h

[PATCH 4/5] staging:r8188eu: eleminate recovery attemp using skb_clone after netdev_alloc_skb fail

2017-01-04 Thread Ivan Safonov
It is wrong to create new skb using skb_clone instead netdev_alloc_skb, because buffer data will be changed later. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 19 +++ 1 file changed, 3 insertions(+), 16 del

[PATCH 4/5] staging:r8188eu: eleminate recovery attemp using skb_clone after netdev_alloc_skb fail

2017-01-04 Thread Ivan Safonov
It is wrong to create new skb using skb_clone instead netdev_alloc_skb, because buffer data will be changed later. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers

Re: [PATCH 01/37] staging:r8188eu: remove get_rxmem function

2016-10-20 Thread Ivan Safonov
On 10/20/2016 04:18 PM, Dan Carpenter wrote: I don't know exactly what the game plan is for the rtl8188eu driver but these patches seem to be on the right path to me. regards, dan carpenter If this driver has no future and will be removed, then what code is better to invest my efforts?

Re: [PATCH 01/37] staging:r8188eu: remove get_rxmem function

2016-10-20 Thread Ivan Safonov
On 10/20/2016 04:18 PM, Dan Carpenter wrote: I don't know exactly what the game plan is for the rtl8188eu driver but these patches seem to be on the right path to me. regards, dan carpenter If this driver has no future and will be removed, then what code is better to invest my efforts?

Re: [PATCH 17/37] staging:r8188eu: update pkt->data synchronously with rx_data

2016-10-20 Thread Ivan Safonov
On 10/20/2016 04:03 PM, Dan Carpenter wrote: On Wed, Oct 19, 2016 at 10:07:45PM +0700, Ivan Safonov wrote: To replace rx_data with pkt->data. Now pkt->data is equal to rx_data. I'm not smart enough to tell on my own... Is this a bugfix? It is not bugfix, only variable repla

Re: [PATCH 17/37] staging:r8188eu: update pkt->data synchronously with rx_data

2016-10-20 Thread Ivan Safonov
On 10/20/2016 04:03 PM, Dan Carpenter wrote: On Wed, Oct 19, 2016 at 10:07:45PM +0700, Ivan Safonov wrote: To replace rx_data with pkt->data. Now pkt->data is equal to rx_data. I'm not smart enough to tell on my own... Is this a bugfix? It is not bugfix, only variable repla

Re: [PATCH 02/37] staging:r8188eu: remove device assignment after netdev_alloc_skb call

2016-10-20 Thread Ivan Safonov
Andy, thank you for reviewing patches and tips. On 10/19/2016 11:59 PM, Andy Shevchenko wrote: On Wed, 2016-10-19 at 19:53 +0300, Andy Shevchenko wrote: On Wed, 2016-10-19 at 22:07 +0700, Ivan Safonov wrote: netdev_alloc_skb function already set dev member of pkt_copy. It might be one line

Re: [PATCH 02/37] staging:r8188eu: remove device assignment after netdev_alloc_skb call

2016-10-20 Thread Ivan Safonov
Andy, thank you for reviewing patches and tips. On 10/19/2016 11:59 PM, Andy Shevchenko wrote: On Wed, 2016-10-19 at 19:53 +0300, Andy Shevchenko wrote: On Wed, 2016-10-19 at 22:07 +0700, Ivan Safonov wrote: netdev_alloc_skb function already set dev member of pkt_copy. It might be one line

[PATCH 22/37] staging:r8188eu: change recvframe_pull_tail type to void

2016-10-19 Thread Ivan Safonov
Return value of this function does not used. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/rtw_recv.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl

[PATCH 09/37] staging:r8188eu: remove is2t argument of phy_lc_calibrate function

2016-10-19 Thread Ivan Safonov
is2t is constant. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/phy.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c index 6

[PATCH 31/37] staging:r8188eu: remove pscanned member of mlme_priv structure

2016-10-19 Thread Ivan Safonov
This member used only as local variable. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 2 -- drivers/staging/rtl8188eu/core/rtw_mlme.c | 11 +-- drivers/staging/rtl8188eu/include/rtw_mlme.h | 1 - drivers/staging/rtl

[PATCH 12/37] staging:r8188eu: remove ieee80211_get_hdrlen function

2016-10-19 Thread Ivan Safonov
This function does not used. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 27 -- drivers/staging/rtl8188eu/include/ieee80211.h | 1 - 2 files changed, 28 deletions(-) diff --git a/drivers/staging/rtl8188e

[PATCH 15/37] staging:r8188eu: remove rx_head member of recv_frame structure

2016-10-19 Thread Ivan Safonov
Value of rx_head used only to produce debug output. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/rtw_recv.h | 1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c| 4 ++-- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 1 - 3 files chan

[PATCH 12/37] staging:r8188eu: remove ieee80211_get_hdrlen function

2016-10-19 Thread Ivan Safonov
This function does not used. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 27 -- drivers/staging/rtl8188eu/include/ieee80211.h | 1 - 2 files changed, 28 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b

[PATCH 22/37] staging:r8188eu: change recvframe_pull_tail type to void

2016-10-19 Thread Ivan Safonov
Return value of this function does not used. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/rtw_recv.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index

[PATCH 09/37] staging:r8188eu: remove is2t argument of phy_lc_calibrate function

2016-10-19 Thread Ivan Safonov
is2t is constant. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/hal/phy.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c index 6b70d09..93dbb395 100644

[PATCH 31/37] staging:r8188eu: remove pscanned member of mlme_priv structure

2016-10-19 Thread Ivan Safonov
This member used only as local variable. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 2 -- drivers/staging/rtl8188eu/core/rtw_mlme.c | 11 +-- drivers/staging/rtl8188eu/include/rtw_mlme.h | 1 - drivers/staging/rtl8188eu/os_dep/ioctl_linux.c

[PATCH 15/37] staging:r8188eu: remove rx_head member of recv_frame structure

2016-10-19 Thread Ivan Safonov
Value of rx_head used only to produce debug output. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/rtw_recv.h | 1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c| 4 ++-- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 1 - 3 files changed, 2 insertions(+), 4

[PATCH 35/37] staging:r8188eu: remove clr_fwstate* functions

2016-10-19 Thread Ivan Safonov
These functions are unused. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/rtw_mlme.h | 19 --- 1 file changed, 19 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h b/drivers/staging/rtl8188eu/include/rtw_

[PATCH 35/37] staging:r8188eu: remove clr_fwstate* functions

2016-10-19 Thread Ivan Safonov
These functions are unused. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/rtw_mlme.h | 19 --- 1 file changed, 19 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h b/drivers/staging/rtl8188eu/include/rtw_mlme.h index 47a3f2d..d27b2ad

[PATCH 28/37] staging:r8188eu: remove recvframe_pull_tail function

2016-10-19 Thread Ivan Safonov
skb_trim used instead. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_recv.c| 8 +--- drivers/staging/rtl8188eu/include/rtw_recv.h | 16 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/drivers/staging/rtl

[PATCH 28/37] staging:r8188eu: remove recvframe_pull_tail function

2016-10-19 Thread Ivan Safonov
skb_trim used instead. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_recv.c| 8 +--- drivers/staging/rtl8188eu/include/rtw_recv.h | 16 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b

[PATCH 23/37] staging:r8188eu: update rx_tail and pkt->tail synchronously

2016-10-19 Thread Ivan Safonov
To replace rx_tail with pkt->tail. Now pkt->tail is equal to rx_tail and pkt->len is equal to len. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/rtw_recv.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff

[PATCH 23/37] staging:r8188eu: update rx_tail and pkt->tail synchronously

2016-10-19 Thread Ivan Safonov
To replace rx_tail with pkt->tail. Now pkt->tail is equal to rx_tail and pkt->len is equal to len. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/rtw_recv.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/

[PATCH 29/37] staging:r8188eu: take out stripping of iv and icv space from wlanhdr_to_ethhdr function

2016-10-19 Thread Ivan Safonov
Prepare to replacing wlanhdr_to_ethhdr by ieee80211_data_to_8023. This stripping procedure placed into new strip_iv_icv function. Also strip_iv_icv used inside unprotect_frame. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_recv.c

[PATCH 08/37] staging:r8188eu: refactor path_adda_on function

2016-10-19 Thread Ivan Safonov
Remove is_path_a_on and is2t arguments. These argument always are constant. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/phy.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/d

[PATCH 29/37] staging:r8188eu: take out stripping of iv and icv space from wlanhdr_to_ethhdr function

2016-10-19 Thread Ivan Safonov
Prepare to replacing wlanhdr_to_ethhdr by ieee80211_data_to_8023. This stripping procedure placed into new strip_iv_icv function. Also strip_iv_icv used inside unprotect_frame. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_recv.c| 27 +++ drivers

[PATCH 08/37] staging:r8188eu: refactor path_adda_on function

2016-10-19 Thread Ivan Safonov
Remove is_path_a_on and is2t arguments. These argument always are constant. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/hal/phy.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu

[PATCH 10/37] staging:r8188eu: remove type cast for first argument of memset

2016-10-19 Thread Ivan Safonov
Typecasting here is unnecessary. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_ap.c| 2 +- drivers/staging/rtl8188eu/core/rtw_efuse.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 10 +- drivers/staging/rtl8188e

<    1   2   3   4   5   6   7   8   >