summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Use array_size() in vzalloc()Kees Cook2018-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vzalloc() function has no 2-factor argument form, so multiplication factors need to be wrapped in array_size(). This patch replaces cases of: vzalloc(a * b) with: vzalloc(array_size(a, b)) as well as handling cases of: vzalloc(a * b * c) with: vzalloc(array3_size(a, b, c)) This does, however, attempt to ignore constant size factors like: vzalloc(4 * 1024) though any constants defined via macros get caught up in the conversion. Any factors with a sizeof() of "unsigned char", "char", and "u8" were dropped, since they're redundant. The Coccinelle script used for this was: // Fix redundant parens around sizeof(). @@ type TYPE; expression THING, E; @@ ( vzalloc( - (sizeof(TYPE)) * E + sizeof(TYPE) * E , ...) | vzalloc( - (sizeof(THING)) * E + sizeof(THING) * E , ...) ) // Drop single-byte sizes and redundant parens. @@ expression COUNT; typedef u8; typedef __u8; @@ ( vzalloc( - sizeof(u8) * (COUNT) + COUNT , ...) | vzalloc( - sizeof(__u8) * (COUNT) + COUNT , ...) | vzalloc( - sizeof(char) * (COUNT) + COUNT , ...) | vzalloc( - sizeof(unsigned char) * (COUNT) + COUNT , ...) | vzalloc( - sizeof(u8) * COUNT + COUNT , ...) | vzalloc( - sizeof(__u8) * COUNT + COUNT , ...) | vzalloc( - sizeof(char) * COUNT + COUNT , ...) | vzalloc( - sizeof(unsigned char) * COUNT + COUNT , ...) ) // 2-factor product with sizeof(type/expression) and identifier or constant. @@ type TYPE; expression THING; identifier COUNT_ID; constant COUNT_CONST; @@ ( vzalloc( - sizeof(TYPE) * (COUNT_ID) + array_size(COUNT_ID, sizeof(TYPE)) , ...) | vzalloc( - sizeof(TYPE) * COUNT_ID + array_size(COUNT_ID, sizeof(TYPE)) , ...) | vzalloc( - sizeof(TYPE) * (COUNT_CONST) + array_size(COUNT_CONST, sizeof(TYPE)) , ...) | vzalloc( - sizeof(TYPE) * COUNT_CONST + array_size(COUNT_CONST, sizeof(TYPE)) , ...) | vzalloc( - sizeof(THING) * (COUNT_ID) + array_size(COUNT_ID, sizeof(THING)) , ...) | vzalloc( - sizeof(THING) * COUNT_ID + array_size(COUNT_ID, sizeof(THING)) , ...) | vzalloc( - sizeof(THING) * (COUNT_CONST) + array_size(COUNT_CONST, sizeof(THING)) , ...) | vzalloc( - sizeof(THING) * COUNT_CONST + array_size(COUNT_CONST, sizeof(THING)) , ...) ) // 2-factor product, only identifiers. @@ identifier SIZE, COUNT; @@ vzalloc( - SIZE * COUNT + array_size(COUNT, SIZE) , ...) // 3-factor product with 1 sizeof(type) or sizeof(expression), with // redundant parens removed. @@ expression THING; identifier STRIDE, COUNT; type TYPE; @@ ( vzalloc( - sizeof(TYPE) * (COUNT) * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | vzalloc( - sizeof(TYPE) * (COUNT) * STRIDE + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | vzalloc( - sizeof(TYPE) * COUNT * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | vzalloc( - sizeof(TYPE) * COUNT * STRIDE + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | vzalloc( - sizeof(THING) * (COUNT) * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | vzalloc( - sizeof(THING) * (COUNT) * STRIDE + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | vzalloc( - sizeof(THING) * COUNT * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | vzalloc( - sizeof(THING) * COUNT * STRIDE + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) ) // 3-factor product with 2 sizeof(variable), with redundant parens removed. @@ expression THING1, THING2; identifier COUNT; type TYPE1, TYPE2; @@ ( vzalloc( - sizeof(TYPE1) * sizeof(TYPE2) * COUNT + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2)) , ...) | vzalloc( - sizeof(TYPE1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2)) , ...) | vzalloc( - sizeof(THING1) * sizeof(THING2) * COUNT + array3_size(COUNT, sizeof(THING1), sizeof(THING2)) , ...) | vzalloc( - sizeof(THING1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(THING1), sizeof(THING2)) , ...) | vzalloc( - sizeof(TYPE1) * sizeof(THING2) * COUNT + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2)) , ...) | vzalloc( - sizeof(TYPE1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2)) , ...) ) // 3-factor product, only identifiers, with redundant parens removed. @@ identifier STRIDE, SIZE, COUNT; @@ ( vzalloc( - (COUNT) * STRIDE * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | vzalloc( - COUNT * (STRIDE) * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | vzalloc( - COUNT * STRIDE * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | vzalloc( - (COUNT) * (STRIDE) * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | vzalloc( - COUNT * (STRIDE) * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | vzalloc( - (COUNT) * STRIDE * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | vzalloc( - (COUNT) * (STRIDE) * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | vzalloc( - COUNT * STRIDE * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) ) // Any remaining multi-factor products, first at least 3-factor products // when they're not all constants... @@ expression E1, E2, E3; constant C1, C2, C3; @@ ( vzalloc(C1 * C2 * C3, ...) | vzalloc( - E1 * E2 * E3 + array3_size(E1, E2, E3) , ...) ) // And then all remaining 2 factors products when they're not all constants. @@ expression E1, E2; constant C1, C2; @@ ( vzalloc(C1 * C2, ...) | vzalloc( - E1 * E2 + array_size(E1, E2) , ...) ) Signed-off-by: Kees Cook <keescook@chromium.org>
* staging: rtl8723bs: Fix grammar error in comment.Quytelda Kahja2018-05-251-1/+1
| | | | | | | | Fix a grammatical error in the comment describing 'struct rt_firmware_hdr'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix camel-case in 'struct rt_firmware_hdr'.Quytelda Kahja2018-05-252-23/+23
| | | | | | | | Replace camel-case member names with snake-case names per the linux kernel coding style guidelines. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix spelling/grammar errors in comment.Quytelda Kahja2018-05-251-2/+2
| | | | | | | | Fix the spelling/grammar errors in the comment block describing the 'Function' member of 'struct rt_firmware_hdr'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix camel-case in 'struct rt_firmware'.Quytelda Kahja2018-05-252-10/+10
| | | | | | | | Change the members of 'struct rt_firmware' to be snake case instead of camel-case, per the kernel coding style guide. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix camel-case in IS_FW_HEADER_EXIST_8723B().Quytelda Kahja2018-05-251-2/+2
| | | | | | | | Change the parameter of the macro to the snake case 'fw_hdr' instead of '_pFwHdr'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Clean up whitespace in 'rtl8723_hal.h'.Quytelda Kahja2018-05-251-117/+144
| | | | | | | | Make alignment and whitespace more consistent within the file 'rtl8723_hal.h' and with the kernel coding style guidelines. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Rename 'Hal8723BPhyCfg.h' using snake case.Quytelda Kahja2018-05-252-1/+1
| | | | | | | | Camel-case is discouraged in the linux kernel coding style. Rename this header file using snake case instead. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Rename 'Hal8723bPhyReg.h' using snake case.Quytelda Kahja2018-05-252-1/+1
| | | | | | | | Camel-case is discouraged in the linux kernel coding style. Rename this header using snake case instead. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Rename 'Hal8723BPwrSeq.{c, h}' to 'hal_pwr_seq.*'.Quytelda Kahja2018-05-254-3/+3
| | | | | | | | | Camel-case naming is discouraged int the linux kernel coding style. Rename these files using snake case, and update the makefile to use the new names. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix checkpatch.pl errorsSidong Yang2018-05-151-13/+12
| | | | | | | | Move open brace to same line with enum. Remove prohibited space before ','. Signed-off-by: Sidong Yang <realwakka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Replace license boilerplate with SPDX identifiersNathan Chancellor2018-05-11167-1494/+167
| | | | | | | | This satisfies a checkpatch.pl warning and is the preferred method for notating the license due to its lack of ambiguity. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: fix spelling mistakes: "dismatch" and "Inviation"Colin Ian King2018-05-062-7/+7
| | | | | | | | | | Trivial fix to spelling mistakes in message text and comments "dismatch" -> "mismatch" "Inviation" -> "Invitation" Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: fix rtw_cfg80211_monitor_if_xmit_entry()'s return typeLuc Van Oostenryck2018-04-251-1/+1
| | | | | | | | | | | | The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove yield call, replace with cond_resched()Thomas Avery2018-03-291-1/+1
| | | | | | | | Remove yield() call. Yield does not guarantee progress, cond_resched() is a safer alternative Signed-off-by: Thomas Avery <tavery321@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Replace yield() call with cond_resched()Thomas Avery2018-03-291-1/+1
| | | | | | | | Remove yield call(). yield does not guarantee progress, and should not be used. cond_resched() is a safe alternative. Signed-off-by: Thomas Avery <tavery321@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove unecessary newlines from 'odm.h'.Quytelda Kahja2018-03-291-27/+0
| | | | | | | Remove duplicate newlines and newlines before closing braces. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Rework 'struct _ODM_Phy_Status_Info_' coding style.Quytelda Kahja2018-03-297-84/+90
| | | | | | | | | | | | | | | | | | | | | | | | | Change the typedef'd 'struct _ODM_Phy_Status_Info_' into 'struct odm_phy_info' and change the members to snake case in order to meet the coding style guidelines. Members: * u8 RxPWDBAll -> rx_pwd_ba11 * u8 SignalQuality -> signal_quality * s8 RxMIMOSignalQuality -> rx_mimo_signal_quality * u8 RxMIMOEVMdbm -> rx_mimo_evm_dbm * u8 RxMIMOSignalStrength -> rx_mimo_signal_strength * u16 Cfo_short -> cfo_short * u16 Cfo_tail -> cfo_tail * s8 RxPower -> rx_power * s8 RecvSignalPower -> recv_signal_power * u8 BTRxRSSIPercentage -> bt_rx_rssi_percentage * u8 SignalStrength -> signal_strength * s8 RxPwr -> rx_pwr * u8 RxSNR -> rx_snr * u8 BandWidth => band_width * u8 btCoexPwrAdjust -> bt_coex_pwr_adjust Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Rework 'struct _ODM_Per_Pkt_Info_' coding style.Quytelda Kahja2018-03-295-42/+43
| | | | | | | | | | | | | | | | Change the typedef'd 'struct _ODM_Per_Pkt_Info_' into 'struct odm_packet_info' and change the members to snake case in order to meet the coding style guidelines. Members: * u8 DataRate -> data_rate * u8 StationID -> station_id * bool bPacketMatchBSSID -> bssid_match * bool bPacketToSelf -> to_self * bool bPacketBeacon -> is_beacon * bool bToSelf -> (removed because it isn't used) Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Replace NULL pointer comparison with '!'.Quytelda Kahja2018-03-291-1/+1
| | | | | | | Replace the comparison of 'precvbuf' to 'NULL' with '!precvbuf'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Factor out rtl8723bs_recv_tasklet() sections.Quytelda Kahja2018-03-291-26/+69
| | | | | | | | Factor out code from rtl8723bs_recv_tasklet() into helper methods to unindent lines over 80 characters. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix function signature that goes over 80 characters.Quytelda Kahja2018-03-291-1/+2
| | | | | | | | Wrap the function parameters for rtl8723bs_c2h_packet_handler() so the function signature doesn't exceed 80 characters. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix lines too long in update_recvframe_attrib().Quytelda Kahja2018-03-291-8/+22
| | | | | | | Fix lines over the 80 character limit in update_recvframe_attrib(). Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove unnecessary blank lines in 'rtl8723bs_recv.c'.Quytelda Kahja2018-03-291-7/+0
| | | | | | | | Condense multiple blank lines to one, and remove blank lines before braces. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Change camel case to snake case in 'rtl8723bs_recv.c'.Quytelda Kahja2018-03-291-16/+16
| | | | | | | | Linux kernel coding style dictates the use of snake case for variable naming. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Add missing braces in else statement.Quytelda Kahja2018-03-291-1/+2
| | | | | | | | The style rule to leave out braces in single line conditional statements doesn't apply when one branch is multiple lines. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Add spaces around ternary operators.Quytelda Kahja2018-03-291-1/+1
| | | | | | | | The Linux kernel coding style calls for spaces around binary and ternary operators. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix lines with trailing open parentheses.Quytelda Kahja2018-03-291-6/+5
| | | | | | | | Realign the arguments for update_recvframe_attrib() and update_recvframe_phyinfo() so there is no trailing open parenthesis. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove unnecessary length #define's.Quytelda Kahja2018-03-292-19/+3
| | | | | | | | | | This driver statically defines constants representing the size of certain structs using literal integers as values. Replace those constants with the sizeof() macro. Other length constants are already defined in 'linux/ieee80211.h'; remove those #define's. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix IEEE80211 authentication algorithm constants.Quytelda Kahja2018-03-292-12/+8
| | | | | | | | | | This driver's local ieee80211 include file defines the constants AUTH_ALG_* to represent authenication algorithm options. However, these constants are defined in 'linux/ieee80211.h' as WLAN_AUTH_*, and have the correct values. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix alignment in rtw_wx_set_auth().Quytelda Kahja2018-03-291-3/+3
| | | | | | | | Realign the function parameters and comment blocks to match the kernel coding style. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove braces from single statement conditionals.Quytelda Kahja2018-03-291-9/+9
| | | | | | | | | | Several conditionals in rtw_wx_set_auth() contain a comment then a single statement. Move the comments to the top of the conditionals so that braces can be removed from the statements, which saves space and makes the code more readable. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove unecessary braces from switch statement.Quytelda Kahja2018-03-291-27/+23
| | | | | | | | The switch statement in rtw_wx_set_auth() wraps individual cases in braces for no reason. Remove those braces and unindent the code. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix newlines in rtw_wx_set_auth().Quytelda Kahja2018-03-291-9/+1
| | | | | | | | There are a lot of extra newlines in this function that waste space. Remove those newlines, but add one newline before the return statement. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Replace RTW_IEEE80211_STYPE_* with IEEE80211_STYPE_*.Quytelda Kahja2018-03-293-45/+2
| | | | | | | | | This driver defines the constants RTW_IEEE80211_STYPE_*, but all these values are already defined in 'linux/ieee80211.h' as IEEE80211_STYPE_*. Remove the locally defined constants, and substitute the kernel constants. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Replace RTW_IEEE80211_FTYPE_* with IEEE80211_FTYPE_*.Quytelda Kahja2018-03-293-8/+3
| | | | | | | | | This driver defines the constants RTW_IEEE80211_FTYPE_*, but all these values are already defined in 'linux/ieee80211.h' as IEEE80211_FTYPE_*. Remove the locally defined constants, and substitute the kernel constants. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Replace RTW_IEEE80211_FCTL_* with IEEE80211_FCTL_*.Quytelda Kahja2018-03-293-20/+6
| | | | | | | | | | This driver defines the constants RTW_IEEE80211_FCTL_* for frame control constants, but all these values are already defined in 'linux/ieee80211.h' as IEEE80211_FCTL_*. Remove the locally defined constants, and substitute the kernel constants. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove #defines shadowing enums in 'linux/ieee80211.h'Quytelda Kahja2018-03-291-56/+0
| | | | | | | | | The modified file includes 'linux/ieee80211.h', but #define's many constants that shadow enum members in the header. This will create a conflict if the values are ever changed in the kernel. Remove these Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove duplicate #defines.Quytelda Kahja2018-03-281-12/+0
| | | | | | | | | The modified file includes 'linux/ieee80211.h', but redefines many constants that already exist in the header. This will create a conflict if the values are ever changed in the kernel. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging:rtl8723bs:Add blank line after declarationPaul McQuade2018-03-221-0/+1
| | | | | | | | missing a blank line after declaration checkpatch warnings. Issue found by checkpatch.pl Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging:rtl8723bs clean up spacesPaul McQuade2018-03-221-8/+8
| | | | | | | | Used checkpatch.pl to clean up spaces around for statements to make it easier to read Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging:rtl8723bs Remove unnecessary bracesPaul McQuade2018-03-221-3/+3
| | | | | | | Remove unnecessary parentheses highlighted by checkpatch.pl Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging:rtl8723bs static variables are always 0Paul McQuade2018-03-221-1/+1
| | | | | | | | | C standard guarantees that: global and static variables will be implicitly initialized to 0 or NULL if no explicit initializer is given. Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: core: rtw_cmd: remove unnecessary initializationJi-Hun Kim2018-03-141-1/+1
| | | | | | | | Clean up checkpatch error: ERROR: do not initialise globals to 0 Signed-off-by: Ji-Hun Kim <ji_hun.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Replace memset with eth_zero_addrArushi Singhal2018-03-063-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use eth_zero_addr to assign zero address to the given address array instead of memset when the second argument in memset is address of zero. Coccinelle was used to do the replacement and add the header file linux/etherdevice.h if not already present. The Coccinelle semantic patch that makes this change is as follows: @header@ @@ #include <linux/etherdevice.h> @r1@ expression e; @@ -memset(e,0x00,ETH_ALEN); +eth_zero_addr(e); @includeheader depends on r1 && !header@ @@ + #include <linux/etherdevice.h> #include <...> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove unnecessary semicolon.Arushi Singhal2018-03-062-2/+2
| | | | | | | | Remove unnecessary semicolon using semicolon.cocci Coccinelle script. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: fix u8 less than zero checkColin Ian King2018-03-011-1/+1
| | | | | | | | | | The error variable ret is currently a u8 and so two comparisons to see if an error return is less than zero will always be false because ret is unsigned. Fix this by making ret an int. Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: use kmemdup for allocation and copyDafna Hirschfeld2018-03-011-2/+1
| | | | | | | | Use kmemdup instead of kzalloc and memcpy to simplify the code. Issue found with coccicheck. Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove unneeded castChristopher Diaz Riveros2018-02-221-1/+1
| | | | | | | | | | | Fix Coccinelle alert: drivers/staging//rtl8723bs/os_dep/sdio_intf.c:340:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: clean up conditionalsDafna Hirschfeld2018-02-191-17/+7
| | | | | | | | | | | | Move all closing braces and parentheses to the end of the line. Remove braces from 'if' statements with a single 'then' line. Move logical operators to the end of lines in multiline conditional. Remove unnecessary parentheses. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud