summaryrefslogtreecommitdiff
path: root/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-01staging: rtlwifi: delete the staging driverGreg Kroah-Hartman1-4465/+0
A "real" driver for this hardware is now in the wireless-drivers-next tree, to be merged in the next major kernel release, so this staging driver can now be deleted as it is not needed anymore. Note, 2 .h files remain for this driver, as they are referenced in a separate staging driver. That mess will be cleaned up in a follow-on patch. Cc: Ping-Ke Shih <pkshih@realtek.com> Cc: Tzu-En Huang <tehuang@realtek.com> Cc: Yan-Hsuan Chuang <yhchuang@realtek.com> Cc: Stanislaw Gruszka <sgruszka@redhat.com> Cc: Brian Norris <briannorris@chromium.org> Cc: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-21staging: rtlwifi: Use proper enum for return in halmac_parse_psd_data_88xxNathan Chancellor1-1/+1
Clang warns: drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c:2472:11: warning: implicit conversion from enumeration type 'enum halmac_cmd_process_status' to different enumeration type 'enum halmac_ret_status' [-Wenum-conversion] return HALMAC_CMD_PROCESS_ERROR; ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Fix this by using the proper enum for allocation failures, HALMAC_RET_MALLOC_FAIL, which is used in the rest of this file. Fixes: e4b08e16b7d9 ("staging: r8822be: check kzalloc return or bail") Link: https://github.com/ClangBuiltLinux/linux/issues/375 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: r8822be: check kzalloc return or bailNicholas Mc Guire1-1/+4
The kzalloc() in halmac_parse_psd_data_88xx() can fail and return NULL so check the psd_set->data after allocation and if allocation failed return HALMAC_CMD_PROCESS_ERROR. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-drive") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-07staging: rtlwifi: Replace license boilerplate with SPDX identifiersNathan Chancellor1-12/+1
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>
2017-10-09Merge 4.14-rc4 into staging-nextGreg Kroah-Hartman1-6/+7
We want the staging/iio fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03staging: rtlwifi: pr_err() strings should end with newlinesArvind Yadav1-3/+3
pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-22Staging: rtlwifi: halmac: Remove unnecessary 'out of memory' messagesGeorgiana Chelu1-33/+11
Remove unnecessary messages because OOM (Out Of Memory Manager) reports memory allocation fail messages. The return value is clear regarding the problem, so there is no need for the 'out of memory' comments. Also, delete braces {} for single if statement blocks to improve the coding style. Fix issues found by by checkpatch.pl. WARNING: Possible unnecessary 'out of memory' message. WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Georgiana Chelu <georgiana.chelu93@example.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18staging: r8822be: fix null pointer dereferences with a null driver_adapterColin Ian King1-6/+7
The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null pointer deference on a null driver_adapter. Fix this by assigning driver_adapter earlier to halmac_adapter->driver_adapter before the tracing call so that a non-null driver_adapter is passed instead. I should have spotted these with an earlier patch I sent, but I overlooked these in the rather large CoverityScan logs. Detected by CoverityScan, CID#1454550, CID#1454554, CID#1454565, CID#1454591, CID#1454598 ("Explicit null dereferenced") Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-27staging: r8822be: remove unnecessary call to memsetHimanshu Jha1-5/+0
call to memset to assign 0 value immediately after allocating memory with kzalloc is unnecesaary as kzalloc allocates the memory filled with 0 value. Build and tested it. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-23staging: r8822be: fix a couple of spelling mistakesColin Ian King1-8/+8
Trivial fixes to spelling mistake in pr_err error messages: errorr -> error mismactch -> mismatch Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-20staging: r8822be: Add code for halmac sub-driverPing-Ke Shih1-0/+4499
The RTL8822BE, an 802.11ac wireless network card, is now appearing in new computers. Its driver is being placed in staging to reduce the time that users of this new card will have access to in-kernel drivers. New Realtek devices implement a common sub-driver to control the MAC layer. The RTL8822BE is the first of these devices, thus its introduction involves some extra code. In the wireless tree, this will be a separate module; however, it is compiled into the 8822be driver here. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Yan-Hsuan Chuang <yhchuang@realtek.com> Cc: Birming Chiu <birming@realtek.com> Cc: Shaofu <shaofu@realtek.com> Cc: Steven Ting <steventing@realtek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>