summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtlwifi
AgeCommit message (Collapse)AuthorFilesLines
2019-04-26rtlwifi: rtl8192cu: remove set but not used variable 'turbo_scanoff'YueHaibing1-3/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c: In function 'rtl92cu_phy_rf6052_set_cck_txpower': drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c:45:7: warning: variable 'turbo_scanoff' set but not used [-Wunused-but-set-variable] It is not used any more since commit e9b0784bb9de ("rtlwifi: rtl8192cu: Fix some code in RF handling") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-25rtlwifi: rtl8723ae: Fix missing break in switch statementGustavo A. R. Silva1-0/+1
Add missing break statement in order to prevent the code from falling through to case 0x1025, and erroneously setting rtlhal->oem_id to RT_CID_819X_ACER when rtlefuse->eeprom_svid is equal to 0x10EC and none of the cases in switch (rtlefuse->eeprom_smid) match. This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough. Fixes: 238ad2ddf34b ("rtlwifi: rtl8723ae: Clean up the hardware info routine") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-18rtlwifi: rtl8188ee: Remove extraneous fileLarry Finger1-10/+0
Somehow file drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c.rej was incorporated into the sources. Obviously, it can be removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: Andrew Morton <akpm@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-13rtlwifi: rtl8723ae: Make rtl8723e_dm_refresh_rate_adaptive_mask staticYueHaibing1-1/+1
Fix sparse warning: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c:666:6: warning: symbol 'rtl8723e_dm_refresh_rate_adaptive_mask' was not declared. Should it be static? Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-13rtlwifi: Convert the wake_match variable to localLarry Finger6-28/+39
In five of the drivers, the contents of bits 29-31 of one of the RX descriptors is used to set bits in a variable that is used to save the wakeup condition for output in a debugging statement. The resulting variable is not used anywhere else even though it is stored in a struct and could be available in other routines. This variable is changed to be local. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-13rtlwifi: Fix duplicate tests of one of the RX descriptorsLarry Finger3-3/+3
In drivers rtl8188ee, rtl8821ae, rtl8723be, and rtl8192ee, the reason for a wake-up is returned in the fourth RX descriptor in bits 29-31. Due to typographical errors, all but rtl8821ae test bit 31 twice and fail to test bit 29. This error causes no problems as the tests are only used to set bits in the output of an optional debugging statement. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-04rtlwifi: move spin_lock_bh to spin_lock in taskletJeff Xie1-3/+3
It is unnecessary to call spin_lock_bh in a tasklet. Signed-off-by: Jeff Xie <chongguiguzi@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-04rtlwifi: fix potential NULL pointer dereferencePing-Ke Shih6-0/+14
In case dev_alloc_skb fails, the fix safely returns to avoid potential NULL pointer dereference. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-04rtlwifi: fix a potential NULL pointer dereferenceKangjie Lu1-0/+5
In case alloc_workqueue fails, the fix reports the error and returns to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: rtl8192se: Remove set but not used variable 'seg_ptr'YueHaibing1-4/+2
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c: In function '_rtl92s_firmware_downloadcode': drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c:139:17: warning: variable 'seg_ptr' set but not used [-Wunused-but-set-variable] It's not used after commit 59ae1d127ac0 ("networking: introduce and use skb_put_data()") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: rtl8723ae: Remove set but not used variable 'bt_retry_cnt'YueHaibing1-2/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c: In function '_rtl8723e_dm_bt_coexist_2_ant': drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c:1408:5: warning: variable 'bt_retry_cnt' set but not used [-Wunused-but-set-variable] It's never used and can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: rtl8723be: Remove set but not used variable 'b_last_is_cur_rdlstate'YueHaibing1-3/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c: In function 'rtl8723be_dm_check_edca_turbo': drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:998:7: warning: variable 'b_last_is_cur_rdlstate' set but not used [-Wunused-but-set-variable] It's never used and can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: rtl8192com: Fix blank line problemsLarry Finger4-8/+5
The following types of blank line problems are reported: WARNING: Missing a blank line after declarations CHECK: Please don't use multiple blank lines There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: rtl8192cu: Fix problems with blank linesLarry Finger6-11/+22
The following problems were found: WARNING: Missing a blank line after declarations CHECK: Please don't use multiple blank lines CHECK: Please use a blank line after function/struct/union/enum declarations There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: rtl8192ce: Fix missing blank linesLarry Finger4-2/+15
The problems filed include the following: WARNING: Missing a blank line after declarations CHECK: Please don't use multiple blank lines There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: Fix all blank line irregularities in main code filesLarry Finger7-6/+24
The types of problems fixed are as follows: WARNING: Missing a blank line after declarations CHECK: Please use a blank line after function/struct/union/enum declarations CHECK: Please don't use multiple blank lines There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: Fix blank line errors in main header filesLarry Finger2-7/+2
The errors consist of multiple blank lines, and a missing blank line after the declarations. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: Fix alignment errors in wifi.hLarry Finger1-42/+42
The instances where statement continuations are improperly aligned have been fixed. There are no changes to generated code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: Fix problems with block comments in wifi.hLarry Finger1-43/+50
Checkpatch.pl reports a number of problems with block comments. These changes do not affect the generated code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-28rtlwifi: Fix errors in spacing in wifi.hLarry Finger1-85/+85
Checkpatch.pl report problems in wifi.h where spaces are missing, as well as extraneous spaces. There are no changes in the generated code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-20rtlwifi: rtl8192ce: fix typo, "PairwiseENcAlgorithm" -> "PairwiseEncAlgorithm"Colin Ian King1-1/+1
There is an uppercase 'N' that should be a lowercase 'n', fix this. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8821ae: Remove CamelCase variablesLarry Finger7-350/+350
If a macro is in CamelCase, it it converted to upper case. Variables and routine names are converted to lower case. The following checkpatch exceptions are also fixed: WARNING: line over 80 characters #316: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c:1751: + SET_8821AE_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_EXT_MEM(u1rsvdpageloc2, GTKEXT_PG); CHECK: spaces preferred around that '+' (ctx:VxV) #357: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c:2591: + (eeaddr+1), hwinfo[eeaddr+1]); ^ CHECK: spaces preferred around that '+' (ctx:VxV) #357: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c:2591: + (eeaddr+1), hwinfo[eeaddr+1]); ^ CHECK: spaces preferred around that '+' (ctx:VxV) #358: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c:2592: + if (0xFF == hwinfo[eeaddr+1]) /*YJ,add,120316*/ ^ WARNING: Comparisons should place the constant on the right side of the test #358: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c:2592: + if (0xFF == hwinfo[eeaddr+1]) /*YJ,add,120316*/ CHECK: spaces preferred around that '&' (ctx:VxV) #501: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c:2666: + pwrinfo24g->bw40_diff[rfpath][txcount] = (hwinfo[eeaddr]&0xf0) >> 4; ^ Note that not all checkpatch exceptions are addressed. Those will be handled in later patches. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8723{be,ae}: Remove CamelCase variablesLarry Finger7-24/+24
If a macro is in CamelCase, it it converted to upper case. Variables and routine names are converted to lower case. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8192se: Remove CamelCase variablesLarry Finger6-63/+63
If a macro is in CamelCase, it it converted to upper case. Variables and routine names are converted to lower case. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8188de: Remove CamelCase variablesLarry Finger6-102/+102
If a macro is in CamelCase, it it converted to upper case. Variables and routine names are converted to lower case. The following checkpatch exceptions are also fixed: CHECK: No space is necessary after a cast #211: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:109: + (u8 *) (&rfstate)); CHECK: No space is necessary after a cast #241: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:277: + ptmp_byte = (u8 *) (&regtoset) + index; Note that not all checkpatch exceptions are addressed. Those will be handled in later patches. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8192{c,u}: Remove CamelCase variablesLarry Finger19-391/+390
This patch affects modules rtl8192ce, rtl8192cu, and rtl8192com. The following checkpatch exceptions are also fixed: CHECK: No space is necessary after a cast #237: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:90: + (u8 *) (&rfstate)); CHECK: No space is necessary after a cast #744: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rf.c:329: + pwr_val[i] = (u8) ((writeval & (0x7f << CHECK: No space is necessary after a cast #784: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rf.c:365: + (u8) writeval); CHECK: spaces preferred around that '/' (ctx:VxV) #963: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c:513: + txqpageunit = txqpagenum/outepnum; ^ CHECK: Unnecessary parentheses around 'outepnum > 1' #975: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c:521: + if ((outepnum > 1) && (txqremaininpage)) CHECK: Alignment should match open parenthesis #1059: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c:617: +static void _rtl92cu_init_chipn_two_out_ep_priority(struct ieee80211_hw *hw, bool wmm_enable, ERROR: "foo * bar" should be "foo *bar" #1940: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c:591: +void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 *pdesc, Note that not all checkpatch exceptions are addressed. Those will be handled in later patches. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8188ee: Remove CamelCase variableLarry Finger1-3/+0
This driver contains one instance of a CamelCase variable, namely IS_81xxC_VENDOR_UMC_A_CUT. This macro is never used, thus it is deleted. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: btcoexist: Remove CamelCase variableLarry Finger1-2/+0
File halbt_precomp.h contains the only CamelCase value, namely GetDefaultAdapter, but that macro is never used, thus it is deleted. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: Remove CamelCase variables from base codeLarry Finger16-60/+60
There are a number of CamelCase variables remaining in the source files of modules rtl_pci, rtl_usb, and rtlwifi. The following checkpatch excettions are also fixed: for_kalle1/0001-rtlwifi-Remove-CamelCase-variables-from-base-code.patch ----------------------------------------------------------------------- CHECK: Unnecessary parentheses around 'rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i] != rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i]' #68: FILE: drivers/net/wireless/realtek/rtlwifi/efuse.c:377: + if ((rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i] != + rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i]) || + (rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i + 1] != + rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i + 1])) { CHECK: Unnecessary parentheses around 'rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i + 1] != rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i + 1]' #68: FILE: drivers/net/wireless/realtek/rtlwifi/efuse.c:377: + if ((rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i] != + rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i]) || + (rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i + 1] != + rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i + 1])) { WARNING: line over 80 characters #70: FILE: drivers/net/wireless/realtek/rtlwifi/efuse.c:379: + (rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i + 1] != CHECK: No space is necessary after a cast #186: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c:396: + status->rx_is40mhzpacket = (bool) GET_RX_DESC_BW(pdesc); CHECK: No space is necessary after a cast #208: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c:335: + stats->rx_is40mhzpacket = (bool) GET_RX_DESC_BW(pdesc); CHECK: No space is necessary after a cast #243: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c:301: + stats->rx_is40mhzpacket = (bool) GET_RX_DESC_BW(pdesc); CHECK: No space is necessary after a cast #252: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c:368: + stats.rx_is40mhzpacket = (bool) GET_RX_DESC_BW(rxdesc); CHECK: No space is necessary after a cast #265: FILE: drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c:475: + stats->rx_is40mhzpacket = (bool) GET_RX_DESC_BW(pdesc); WARNING: Unnecessary space before function pointer arguments #455: FILE: drivers/net/wireless/realtek/rtlwifi/wifi.h:1462: + void (*writen_sync) (struct rtl_priv *rtlpriv, u32 addr, void *buf, WARNING: Unnecessary space before function pointer arguments #483: FILE: drivers/net/wireless/realtek/rtlwifi/wifi.h:2257: + void (*fill_fake_txdesc) (struct ieee80211_hw *hw, u8 *pdesc, Note that not all checkpatch exceptions are addressed. Those will be handled in later patches. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8821ae: Replace old-style license informationLarry Finger22-531/+45
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8723_common: Replace old-style license informationLarry Finger7-168/+14
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8723be: Replace old-style license informationLarry Finger22-528/+44
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8723ae: Replace old-style license informationLarry Finger27-648/+55
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8192se: Replace old-style license informationLarry Finger20-472/+51
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8192ee: Replace old-style license informationLarry Finger22-531/+44
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8192de: Replace old-style license informationLarry Finger20-482/+40
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8192cu: Replace old-style license informationLarry Finger20-476/+40
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8192ce: Replace old-style license informationLarry Finger18-436/+36
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8192com: Replace old-style license informationLarry Finger7-168/+14
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: rtl8188ee: Replace old-style license informationLarry Finger22-531/+44
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: btcoex: Replace old-style license informationLarry Finger17-395/+42
The old-style license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-19rtlwifi: Replace old-style license informationLarry Finger24-570/+51
The traditional license information is replaced by the SPDX form. There are no code changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-08rtlwifi: remove set but not used variable 'cmd_seq'YueHaibing1-2/+1
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/base.c: In function 'rtl_c2h_content_parsing': drivers/net/wireless/realtek/rtlwifi/base.c:2313:13: warning: variable 'cmd_seq' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-01rtlwifi: no need to check return value of debugfs_create functionsGreg Kroah-Hartman1-11/+3
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Ping-Ke Shih <pkshih@realtek.com> Cc: Kalle Valo <kvalo@codeaurora.org> Cc: linux-wireless@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-01wireless: remove unneeded semicolonYueHaibing1-3/+3
remove unneeded semicolon Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Acked-by: Steve deRosier <derosier@cal-sierra.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-01rtlwifi: Don't clear num_rx_inperiod too earlyBernd Edlinger1-2/+2
This patch moves the clearing of rtlpriv->link_info.num_rx_inperiod in rtl_watchdog_wq_callback a few lines down. This is necessary since it is still used in the "AP off" detection code block. Moved clearing of rtlpriv->link_info.num_rx_inperiod as well for consistency. Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-01rtl8723ae: Re-introduce the adaptive rate controlBernd Edlinger1-2/+85
This re-introduces the function rtl8723e_dm_refresh_rate_adaptive_mask. This function was present in a previous version of the code base, it works just fine for me -- as long as it is not using stale data. Unlike the original version of this function it avoids using dm.undec_sm_pwdb when no beacon was received. Fixed a style nit in rtl8723e_dm_init_rate_adaptive_mask. Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-01rtl8723ae: Dont use old data for input gain controlBernd Edlinger2-0/+10
When no beacon was received, the value in dm.undec_sm_pwdb is most likely out of date and should not be used to adjust the input path. Assume instead that the signal level is low. Fix the state machine in rtl8723e_dm_cck_packet_detection_thresh which did not clear pre_cck_fa_state when changing cur_cck_pd_state from CCK_PD_STAGE_LOWRSSI/CCK_FA_STAGE_LOW to CCK_PD_STAGE_HIGHRSSI and back again to CCK_PD_STAGE_LOWRSSI/CCK_FA_STAGE_LOW, the register RCCK0_CCA not written to 0x83 on the second change. Explicitly initialize pre_cck_fa_state/cur_cck_fa_state in rtl_dm_diginit. Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-01rtl8723ae: Take the FW LPS mode handling outBernd Edlinger1-4/+4
This appears to trigger a firmware bug and causes severe problems with rtl8723ae PCI devices. When the power save mode is activated for longer periods of time the firmware stops to receive any packets. This problem was exposed by commit 873ffe154ae0 ("rtlwifi: Fix logic error in enter/exit power-save mode"). Previously the power save mode was only active rarely and only for a short time so that the problem was not noticeable. Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-12-21Merge tag 'wireless-drivers-next-for-davem-2018-12-20' of ↵David S. Miller1-2/+0
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.21 Last set of patches for 4.21. mt76 is still in very active development and having some refactoring as well as new features. But also other drivers got few new features and fixes. Major changes: ath10k * add amsdu support for QCA6174 monitor mode * report tx rate using the new ieee80211_tx_rate_update() API * wcn3990 support is not experimental anymore iwlwifi * support for FW version 43 for 9000 and 22000 series brcmfmac * add support for CYW43012 SDIO chipset * add the raw 4354 PCIe device ID for unprogrammed Cypress boards mwifiex * add NL80211_STA_INFO_RX_BITRATE support mt76 * use the same firmware for mt76x2e and mt76x2u * mt76x0e survey support * more unification between mt76x2 and mt76x0 * mt76x0e AP mode support * mt76x0e DFS support * rework and fix tx status handling for mt76x0 and mt76x2 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>