summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192e/rtllib_rx.c
AgeCommit message (Collapse)AuthorFilesLines
2023-06-19staging: rtl8192e: Rename variable LeisurePSLeaveYogesh Hegde1-1/+1
Rename variable LeisurePSLeave to leisure_ps_leave to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com> Link: https://lore.kernel.org/r/3c63f4d750b7365f233c35c676325c5e4ca54a4c.1687183827.git.yogi.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19staging: rtl8192e: Rename RTLLIB_LINKED to MAC80211_LINKEDPhilipp Hortmann1-6/+6
Rename RTLLIB_LINKED to MAC80211_LINKED to align with rtlwifi driver. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/532bd98301657b2a8329e95eccb993540ae9ba3f.1687007788.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19staging: rtl8192e: Rename RTLLIB_NOLINK to MAC80211_NOLINKPhilipp Hortmann1-1/+1
Rename RTLLIB_NOLINK to MAC80211_NOLINK to align with rtlwifi driver. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/74feefdf800304deaf918efbc04344865f7aa01d.1687007788.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19staging: rtl8192e: Rename state to link_statePhilipp Hortmann1-7/+7
Rename state to link_state to align with rtlwifi driver and to increase readability as state is to general. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/9cf4d0b01c6a84a11939099b628754d4c6d54839.1687007788.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19staging: rtl8192e: Rename constant IEEE_x to WIRELESS_MODE_xPhilipp Hortmann1-6/+6
Rename constant IEEE_B to WIRELESS_MODE_B, IEEE_G -> WIRELESS_MODE_G and IEEE_N_24G -> WIRELESS_MODE_N_24G to align with rtlwifi driver as requested in TODO. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/37d81ab3cbb0231868d75b11eaa2f65a0e6a9379.1687007788.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19staging: rtl8192e: Remove unsupported modes IEEE_N_5G and IEEE_APhilipp Hortmann1-3/+1
Remove unsupported modes IEEE_N_5G and IEEE_A as those are not supported by hardware and are not offered by user software. Remove resulting dead code and unused defines. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/40c5b21654376348144280dbe45203140c6e6807.1687007788.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19staging: rtl8192e: Remove variable stats->freq as it is constantPhilipp Hortmann1-14/+5
stats->freq is initialized with 1 and then unchanged. All evaluations will result accordingly. Remove resulting dead code and unused defines. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/4d8801d37889e6af4f43dff10d1426fc7918f562.1687007788.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-15staging: rtl8192e: Add cfg80211.h and remove defined variablesPhilipp Hortmann1-12/+0
Add cfg80211 and remove defined variables rfc1042_header and bridge_tunnel_header as they are then already defined. Usage of cfg80211 is required to merge driver into wireless subsystem. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Message-ID: <20230603085251.GA20230@matrix-ESPRIMO-P710> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-08staging: rtl8192e: add missing braces {}Stephan Snyman1-5/+9
Add missing braces to if/else statements to adhere to the Linux kernel coding-style guidelines. These issues were reported by checkpatch.pl "CHECK: braces {} should be used on all arms of this statement" Signed-off-by: Stephan Snyman <rooiratel@tinyglitch.net> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20230420133209.4661-1-rooiratel@tinyglitch.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-25staging: rtl8192e: remove blank lines after '{'Khadija Kamran1-4/+0
Remove unnecessary blank lines after an open brace to adhere to the Linux kernel coding-style guidelines. These issues are reported by checkpatch.pl "CHECK: Blank lines aren't necessary after an open brace '{'" Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/e7cd8152e6986d361f81289868040889224bd1bf.1679696777.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-25staging: rtl8192e: add spaces around binary operatorsKhadija Kamran1-27/+27
Use spaces around binary operators as suggested by Linux kernel coding style guidelines. Issues reported by checkpatch.pl for the following binary operators: + , - , * , | , << Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/44a545cf8e99ebfdbfc3f5bb314f3828abe98558.1679696777.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-25staging: rtl8192e: add blank lines after declarationsKhadija Kamran1-0/+2
Add blank lines after declarations to adhere to the Linux kernel coding-style guidelines. These issues are reported by checkpatch.pl "CHECK: Please use a blank line after function/struct/union/enum declarations" Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/d8a5e738046ffdc1b257e1935eacb8e16af34d5e.1679696777.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-25staging: rtl8192e: remove extra blank linesKhadija Kamran1-13/+0
Remove the extra blank line in accordance with the Linux kernel coding-style regulations. These issues were reported by checkpatch.pl "CHECK: Please don't use multiple blank lines" Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/6d7388f944e8296227269c7472a462ea7c94149c.1679696777.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-08staging: rtl8192e: Remove checks of pointer to LeisureP.. and start_se..Philipp Hortmann1-2/+1
Function pointers of LeisurePSLeave and start_send_beacons is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/cd828bb1c8dfbb6d2a85d770c82afbb9889e0ea2.1677345331.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-08staging: rtl8192e: Remove checks of pointer to handle_a.. and handle_b..Philipp Hortmann1-3/+1
Function pointers of handle_assoc_response and handle_beacon is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/5c0fd114c24616bc03271ccb0a72a6bc68e45d61.1677345331.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-12-08staging: rtl8192e: Fix spelling mistake "ContryIE" -> "CountryIE"Colin Ian King1-1/+1
There is a spelling mistake in a netdev_info message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20221207093331.2280355-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-12-05staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor()YueHaibing1-1/+1
The skb is delivered to netif_rx() in rtllib_monitor_rx(), which may free it, after calling this, dereferencing skb may trigger use-after-free. Found by Smatch. Fixes: 94a799425eee ("From: wlanfae <wlanfae@realtek.com> [PATCH 1/8] rtl8192e: Import new version of driver from realtek") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20221123081253.22296-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-17staging: rtl8192e: Rename pHTInfoPhilipp Hortmann1-6/+6
Rename variable pHTInfo to ht_info to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/88cdc0ef393c92cb2102a66893c5320e8c8606df.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-17staging: rtl8192e: Rename bFilterSour.., CCKPresentAt.. and ResetProg..Philipp Hortmann1-1/+1
Rename variable bFilterSourceStationFrame to fltr_src_sta_frame, CCKPresentAttentuation to cck_present_attn and ResetProgress to rst_progress to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/25ab52350a4a3249a1f76b28eea10c44e2f9552d.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-17staging: rtl8192e: Rename bNetPromisc.., IntelPromiscu.. and bPromiscu..Philipp Hortmann1-4/+4
Rename variable bNetPromiscuousMode to net_promiscuous_md, IntelPromiscuousModeInfo to intel_promiscuous_md_info and bPromiscuousOn to promiscuous_on to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/69d9998a30ce2286c3ae6cb4510174e1255b3f9e.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-17staging: rtl8192e: Rename LinkDetectInfoPhilipp Hortmann1-7/+7
Rename variable LinkDetectInfo to link_detect_info to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/48d043893fa755490e810af204e5b7ad2ba606de.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename RxRe...WinSize, RxReorder... and RxReorderDr...Philipp Hortmann1-3/+3
Rename variable RxReorderWinSize to rx_reorder_win_size, RxReorderPendingTime to rx_reorder_pending_time and RxReorderDropCounter to rx_reorder_drop_counter to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/e09ef6e2edc88e32782202589a9230204b547a9c.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename szRT2RTAggBuffer, bRegRxRe... and bCurRxReo...Philipp Hortmann1-2/+2
Rename variable szRT2RTAggBuffer to sz_rt2rt_agg_buf, bRegRxReorderEnable to reg_rx_reorder_enable and bCurRxReorderEnable to cur_rx_reorder_enable to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/af445e0a80dc8e153a1ba81df99309f19a69d6cb.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20staging: rtl8192e: Remove space after castSolomon Tan1-10/+10
This patch addresses the checkpatch.pl flag that there should not be a space after a cast. Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220419124318.8028-1-wjsota@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging/rtl8192e,ieee80211: replace ps tasklet with workDavidlohr Bueso1-1/+1
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. rtllib_sta_ps() and ieee80211_sta_ps() will now run in process context and have further concurrency (tasklets being serialized among themselves), but this is done holding the ieee->lock, so it should be fine. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-7-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-16staging: rtl8192e: Fix spelling mistake "RESQUEST" -> "REQUEST"Colin Ian King1-1/+1
There is a spelling mistake in a netdev_dbg message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220315224037.2962063-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-10staging: rtl8192e: Avoid field-overflowing memcpy()Kees Cook1-40/+17
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Split the 3 addr memcpy() into 3 memcpy() calls so the compiler doesn't think an overflowing memcpy() happens against the addr1 field (the neighbors are intended to be copied as well). rtllib_read_qos_param_element() copies a struct rtllib_info_element into a struct rtllib_qos_information_element, but is actually wanting to copy into the larger struct rtllib_qos_parameter_info (the contents of ac_params_record[] is later examined). Refactor the routine to perform centralized checks, and copy the entire contents directly (since the id and len members match the elementID and length members): struct rtllib_info_element { u8 id; u8 len; u8 data[]; } __packed; struct rtllib_qos_information_element { u8 elementID; u8 length; u8 qui[QOS_OUI_LEN]; u8 qui_type; u8 qui_subtype; u8 version; u8 ac_info; } __packed; struct rtllib_qos_parameter_info { struct rtllib_qos_information_element info_element; u8 reserved; struct rtllib_qos_ac_parameter ac_params_record[QOS_QUEUE_NUM]; } __packed; Cc: Darshan D V <darshandv10@gmail.com> Cc: Aditya Srivastava <yashsri421@gmail.com> Cc: devel@driverdev.osuosl.org Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20210806201106.2871169-1-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: rtl8192e: Avoid multiple line dereferenceOjaswin Mujoo1-2/+1
Avoid multiple line dereference to make the code more readable, as suggested by checkpatch.pl This patch fixes the following checkpatch.pl warning: - WARNING: Avoid multiple line dereference prefer 'priv->rtllib->swcamtable[4].key_buf[0]' FILE: ./rtl8192e/rtl8192e/rtl_cam.c:189 - WARNING: Avoid multiple line dereference prefer 'priv->rtllib->swcamtable[4].key_buf[0]' FILE: ./rtl8192e/rtl8192e/rtl_cam.c:195 - WARNING: Avoid multiple line dereference prefer 'priv->rtllib->swcamtable[4].key_buf[0]' FILE: ./rtl8192e/rtl8192e/rtl_cam.c:204 - WARNING: Avoid multiple line dereference prefer 'priv->rtllib->swcamtable[4].key_buf[0]' FILE: ./rtl8192e/rtl8192e/rtl_cam.c:209 - WARNING: Avoid multiple line dereference prefer 'info_element->data[info_element->len]' FILE: ./rtl8192e/rtllib_rx.c:2287 Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com> Link: https://lore.kernel.org/r/435b60bd8874f8105b4af6e7eb9ee5bdbfe3112f.1620642396.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-05Merge 5.12-rc6 into staging-nextGreg Kroah-Hartman1-1/+1
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-23staging: rtl8192e: Fix incorrect source in memcpy()Atul Gopinathan1-1/+1
The variable "info_element" is of the following type: struct rtllib_info_element *info_element defined in drivers/staging/rtl8192e/rtllib.h: struct rtllib_info_element { u8 id; u8 len; u8 data[]; } __packed; The "len" field defines the size of the "data[]" array. The code is supposed to check if "info_element->len" is greater than 4 and later equal to 6. If this is satisfied then, the last two bytes (the 4th and 5th element of u8 "data[]" array) are copied into "network->CcxRmState". Right now the code uses "memcpy()" with the source as "&info_element[4]" which would copy in wrong and unintended information. The struct "rtllib_info_element" has a size of 2 bytes for "id" and "len", therefore indexing will be done in interval of 2 bytes. So, "info_element[4]" would point to data which is beyond the memory allocated for this pointer (that is, at x+8, while "info_element" has been allocated only from x to x+7 (2 + 6 => 8 bytes)). This patch rectifies this error by using "&info_element->data[4]" which correctly copies the last two bytes of "data[]". NOTE: The faulty line of code came from the following commit: commit ecdfa44610fa ("Staging: add Realtek 8192 PCI wireless driver") The above commit created the file `rtl8192e/ieee80211/ieee80211_rx.c` which had the faulty line of code. This file has been deleted (or possibly renamed) with the contents copied in to a new file `rtl8192e/rtllib_rx.c` along with additional code in the commit 94a799425eee (tagged in Fixes). Fixes: 94a799425eee ("From: wlanfae <wlanfae@realtek.com> [PATCH 1/8] rtl8192e: Import new version of driver from realtek") Cc: stable@vger.kernel.org Signed-off-by: Atul Gopinathan <atulgopinathan@gmail.com> Link: https://lore.kernel.org/r/20210323113413.29179-1-atulgopinathan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename RxLastFragNum to rx_last_frag_num in rx_ts_record ↵William Durand1-2/+2
struct Rename RxLastFragNum to rx_last_frag_num to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210301215335.767-9-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename RxLastSeqNum to rx_last_seq_num in rx_ts_record structWilliam Durand1-2/+2
Rename RxLastSeqNum to rx_last_seq_num to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210301215335.767-8-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename RxPktPendingTimer to rx_pkt_pending_timer in ↵William Durand1-4/+4
rx_ts_record struct Rename RxPktPendingTimer to rx_pkt_pending_timer to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210301215335.767-6-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename RxPendingPktList to rx_pending_pkt_list in ↵William Durand1-6/+6
rx_ts_record struct Rename RxPendingPktList to rx_pending_pkt_list to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210301215335.767-5-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename RxTimeoutIndicateSeq to rx_timeout_indicate_seq in ↵William Durand1-3/+3
rx_ts_record struct Rename RxTimeoutIndicateSeq to rx_timeout_indicate_seq to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210301215335.767-4-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename RxIndicateSeq to rx_indicate_seq in rx_ts_record ↵William Durand1-21/+21
struct Rename RxIndicateSeq to rx_indicate_seq to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210301215335.767-3-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename bdHT1R to bd_ht_1r in bss_ht structWilliam Durand1-4/+4
Rename bdHT1R to bd_ht_1r to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-13-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename RT2RT_HT_Mode to rt2rt_ht_mode in bss_ht structWilliam Durand1-2/+2
Rename RT2RT_HT_Mode to rt2rt_ht_mode to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-12-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename bdRT2RTLongSlotTime to bd_rt2rt_long_slot_time in ↵William Durand1-2/+2
bss_ht struct Rename bdRT2RTLongSlotTime to bd_rt2rt_long_slot_time to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-11-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename bdRT2RTAggregation to bd_rt2rt_aggregation in ↵William Durand1-3/+3
bss_ht struct Rename bdRT2RTAggregation to bd_rt2rt_aggregation to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-10-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename bdBandWidth to bd_bandwidth in bss_ht structWilliam Durand1-2/+2
Rename bdBandWidth to bd_bandwidth to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-9-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename bdHTSpecVer to bd_ht_spec_ver in bss_ht structWilliam Durand1-5/+5
Rename bdHTSpecVer to bd_ht_spec_ver to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-8-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename bdHTInfoLen to bd_ht_info_len in bss_ht structWilliam Durand1-7/+7
Rename bdHTInfoLen to bd_ht_info_len to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-7-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename bdHTInfoBuf to bd_ht_info_buf in bss_ht structWilliam Durand1-6/+7
Rename bdHTInfoBuf to bd_ht_info_buf to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-6-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename bdHTCapLen to bd_ht_cap_len in bss_ht structWilliam Durand1-6/+6
Rename bdHTCapLen to bd_ht_cap_len to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-5-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename bdHTCapBuf to bd_ht_cap_buf in bss_ht structWilliam Durand1-8/+9
Rename bdHTCapBuf to bd_ht_cap_buf to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-4-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: rtl8192e: rename bdSupportHT to bd_support_ht in bss_ht structWilliam Durand1-7/+7
Rename bdSupportHT to bd_support_ht to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: William Durand <will+git@drnd.me> Link: https://lore.kernel.org/r/20210220172909.15812-3-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-28staging: rtl8192e: fix bool comparison in expressionsAditya Srivastava1-3/+2
There are certain conditional expressions in rtl8192e, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK: BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false E.g. in drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c, "if (Type == true)" can be replaced with: "if (Type)" Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava <yashsri421@gmail.com> Link: https://lore.kernel.org/r/20201220194224.12835-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12staging: rtl8192e: Use scnprintf() for avoiding potential buffer overflowTakashi Iwai1-2/+2
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200311092451.23933-3-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25staging: rtl8192e: remove set but not used variable 'payload 'YueHaibing1-2/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8192e/rtllib_rx.c: In function rtllib_rx_InfraAdhoc: drivers/staging/rtl8192e/rtllib_rx.c:1303:6: warning: variable payload set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190717143551.29200-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>