summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs/hal
Commit message (Collapse)AuthorAgeFilesLines
* Staging: rtl8723bs: Fix code style issue in rtl8723bs driverHardik Singh Rathore2018-12-171-2/+2
| | | | | | | | Add space between 'else' and '{' to solve code style issue in all the files for rtl8723bs driver. Signed-off-by: Hardik Singh Rathore <hardiksingh.k@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: change semaphores to completionsArnd Bergmann2018-12-123-16/+12Star
| | | | | | | | | | | | | This driver uses many semaphores, most of them are equivalent to completions. The other copies of this driver got moved over to completions a while ago, so do the same here. In this usage scenario, the two are equivalent, so the behavior should not change. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.20-rc5 into staging-nextGreg Kroah-Hartman2018-12-031-2/+2
|\ | | | | | | | | | | We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: rtl8723bs: Fix incorrect sense of ether_addr_equalLarry Finger2018-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit b37f9e1c3801 ("staging: rtl8723bs: Fix lines too long in update_recvframe_attrib()."), the refactoring involved replacing two memcmp() calls with ether_addr_equal() calls. What the author missed is that memcmp() returns false when the two strings are equal, whereas ether_addr_equal() returns true when the two addresses are equal. One side effect of this error is that the strength of an unassociated AP was much stronger than the same AP after association. This bug is reported at bko#201611. Fixes: b37f9e1c3801 ("staging: rtl8723bs: Fix lines too long in update_recvframe_attrib().") Cc: Stable <stable@vger.kernel.org> Cc: youling257 <youling257@gmail.com> Cc: u.srikant.patnaik@gmail.com Reported-and-tested-by: youling257 <youling257@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8723bs: Correct errors from checkpatchJosenivaldo Benito Jr2018-11-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Correct following errors reported by checkpath.pl: ERROR: space required before the open parenthesis '(' #265: FILE: drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c:265: +                       if(!precvframe) ')' Also similar errors on line 274 and 283. Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | drivers: staging: rtl*: fix spelling mistake "Orginial" -> "Original"Colin Ian King2018-11-071-4/+4
|/ | | | | | | Trivial fix to common spelling mistakes in some rtl* drivers Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: fix spelling mistake "Abnrormal" -> "Abnormal"Colin Ian King2018-10-141-2/+2
| | | | | | | Trivial fix to spelling mistake in message text Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove unnecessary parentheses and dead commented codeNathan Chancellor2018-10-091-1/+1
| | | | | | | | | | | | | | | Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3351:20: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] The commented code is pointless since _HW_STATE_AP_ is handled right below this block. Link: https://github.com/ClangBuiltLinux/linux/issues/168 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: clean up clang warning on extraneous parenthesesColin Ian King2018-10-021-1/+1
| | | | | | | | | | | There are extraneous parantheses that are causing clang to produce a warning so remove these. Clean up 3 clang warnings: equality comparison with extraneous parentheses [-Wparentheses-equality] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: fix spelling mistake "unvalid" -> "invalid"Colin Ian King2018-09-251-2/+2
| | | | | | | Trivial fix to spelling mistake in DBG_871X debug messages. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: check for i out of range before accessing szLine[i]Colin Ian King2018-09-101-3/+4
| | | | | | | | | | Currently szLine[i] is being accessed before the index i is being ranged checked. Fix this by checking the range first. Also, evaluate the length of the string szLine just once rather than multiple times and move the loop variable i to an inner scope and make it an int. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu/rtl8723bs: fix character encodingArnd Bergmann2018-07-241-1/+1
| | | | | | | | | | | | | | | drivers/staging/rtl8188eu/include/odm.h uses an incorrect encoding for the '...' character in two comments, which makes it one of the few non-UTF-8 source files. This removes the odd characters and uses the same ASCII representation that we have in the regular rtlwifi driver. The second instance of drivers/staging/rtl8723bs/hal/odm.h is garbled in a different way, so I change it to be the same as well even though it is already plain ASCII. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Add missing curly braces on else statement.Quytelda Kahja2018-06-281-1/+2
| | | | | | | | Fix 'braces {} should be used on all arms of this statement' coding style problem in 'phy_get_tx_pwr_lmt()'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Merge workaround conditionals into single else-if.Quytelda Kahja2018-06-281-6/+3Star
| | | | | | | | | The if conditionals used to work around wrong TX power limit indices can be condensed into a single if/else-if statement for more concise expression. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Merge conditionals with similar bodies.Quytelda Kahja2018-06-281-6/+2Star
| | | | | | | | Two conditionals that set 'channel' based on 'band_type' in 'phy_get_tx_pwr_lmt()' can be simplified into one single-line conditional. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix spelling mistake in comment.Quytelda Kahja2018-06-281-1/+1
| | | | | Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Move bandwidth index lookup to new function.Quytelda Kahja2018-06-281-9/+17
| | | | | | | | | Factoring out the conditional lookup of bandwidth index into the power limit table into it's own function simplifies the logic of 'phy_get_tx_pwr_lmt()'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Move rate section index lookup to new function.Quytelda Kahja2018-06-281-62/+47Star
| | | | | | | | | The rate section lookup is a large switch statement in the middle of 'phy_get_tx_pwr_lmt()'; refactor this statement into it's own function for increased readability. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Remove empty else-if conditional.Quytelda Kahja2018-06-281-3/+0Star
| | | | | | | This else-if conditional block does nothing; remove it. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Combine if statements with equivalent body.Quytelda Kahja2018-06-281-5/+1Star
| | | | | | | | Two if statements that carry out the same operation can be combined with a logical OR. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix camel-case names in phy_get_tx_pwr_lmt().Quytelda Kahja2018-06-281-95/+105
| | | | | | | | Change camel-case names to snake-case names; to avoid variable name conflicts, rename table index variables to idx_*. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Rename PHY_GetTxPowerLimit().Quytelda Kahja2018-06-282-4/+4
| | | | | | | Rename camel-case 'PHY_GetTxPowerLimit()' to 'phy_get_tx_pwr_lmt()'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Clean up whitespace in 'PHY_GetTxPowerLimit()'.Quytelda Kahja2018-06-281-51/+59
| | | | | | | | Wrap lines longer than 80 characters where possible, delete double newlines, and fix alignment per the kernel coding style guidelines. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: drop testJulia Lawall2018-06-171-3/+2Star
| | | | | | | | | | | | | | | | | | | | | The test selects between two identical values, so it doesn't look useful. It turns out that the tested expression can only be true anyway, so drop the test, the corresponding parameter, and the corresponding argument at the only call site. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e,e1; @@ * e ? e1 : e1 // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix camel-case in 'struct rt_firmware_hdr'.Quytelda Kahja2018-05-251-7/+7
| | | | | | | | 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 camel-case in 'struct rt_firmware'.Quytelda Kahja2018-05-251-8/+8
| | | | | | | | 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: Rename 'Hal8723BPwrSeq.{c, h}' to 'hal_pwr_seq.*'.Quytelda Kahja2018-05-251-1/+1
| | | | | | | | | 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: Replace license boilerplate with SPDX identifiersNathan Chancellor2018-05-1165-585/+65Star
| | | | | | | | 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-071-1/+1
| | | | | | | | | | 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: Remove unecessary newlines from 'odm.h'.Quytelda Kahja2018-03-291-27/+0Star
| | | | | | | 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-295-78/+84
| | | | | | | | | | | | | | | | | | | | | | | | | 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/+0Star
| | | | | | | | 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/+5Star
| | | | | | | | 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 semicolon.Arushi Singhal2018-03-061-1/+1
| | | | | | | | 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: use kmemdup for allocation and copyDafna Hirschfeld2018-03-011-2/+1Star
| | | | | | | | 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 a couple of redundant initializationsColin Ian King2018-01-261-1/+1
| | | | | | | | | | | | | | | | | The initialization of PwrCfgCmd is redundant as the value is never read and it is being re-assigned to PwrSeqCmd[AryIdx] inside a loop, hence it can be removed. Also, the initialization of ie_ptr is redundant as the value is never read and it is being re-assigned in either path of an if statement, hence it can be removed too. Cleans up clang warnings: drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c:53:15: warning: Value stored to 'PwrCfgCmd' during its initialization is never read drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:374:7: warning: Value stored to 'ie_ptr' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723bs: Use !x instead of NULL comparisonShreeya Patel2018-01-251-8/+8
| | | | | | | | If "x" is compared to NULL, use "!x" instead of it, so as to follow the kernel coding style. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723bs: Remove dead codeShreeya Patel2018-01-251-15/+0Star
| | | | | | | | | | "oldmem==NULL;" The above bug under the ifdef code would have caused a GCC warning if it were ever compiled. Hence, remove the dead ifdefed code from the file. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723bs: Change names to conform to the kernel codeShreeya Patel2018-01-251-357/+357
| | | | | | | | | | Change names of some variables and functions to conform to the kernel coding style. The changes include some removal of CamelCase warnings and renaming the variable and field names that encode their type (eg the pointers seem to start with p). Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: hal_com_phycfg: Remove unneeded semicolonsChristopher Díaz Riveros2018-01-221-9/+7Star
| | | | | | | | | Trivial fix removes unneeded semicolons after switch blocks. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix trailing semicolonLuis de Bethencourt2018-01-101-1/+1
| | | | | | | | The trailing semicolon is an empty statement that does nothing. Removing it since it has no purpose. Signed-off-by: Luis de Bethencourt <luisbg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: Fix trailing semicolonLuis de Bethencourt2018-01-101-1/+1
| | | | | | | | The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt <luisbg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>