aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-18rtlwifi: Support A-MSDU in A-MPDU capabilityPing-Ke Shih1-0/+1
Due to the fact that A-MSDU deaggregation is done in software, we set this flag to support the A-MSDU in A-MPDU Signed-off-by: Steven Ting <steventing@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: btcoex: add rfe_type parameter to btcoexPing-Ke Shih2-0/+12
btcoex configure antenna by rfe_type that is RF type programmed in efuse. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: btcoex: Add common function for qeurying BT informationPing-Ke Shih3-33/+380
This commit implement the common function to sort old features, and add more new features that are get_supported_feature, get_supported_version, get_ant_det_val, ble_scan_type, ble_scan_para, bt_dev_info, forbidden_slot_val, afh_map and etc. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: btcoex: Remove typedef statementsLarry Finger1-67/+31
Each of these typedefs are only referenced in a single location later in this header. Thus, they are easily removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: btcoex: Remove global variables from btcoexPing-Ke Shih6-78/+217
Remove global variables, so btcoexist can support multiple instances simultaneously. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: btcoex: Add power_on_setting routinePing-Ke Shih4-0/+9
After mac power-on sequence, wifi will start to work so notify btcoex the event to configure registers especially related to antenna. This will not only help to assign antenna but also to yield better user experience. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: unlink bss when un-associationTsang-Shian Lin1-0/+18
When AP change bandwidth setting from 20M to 40M, STA may use old 20M AP information to association with AP. Driver unlink bss in the .bss_info_changed of ieee80211_ops to make sure that later scan can get correct AP bandwidth capability. Signed-off-by: Tsang-Shian Lin <thlin@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: fix scan channel 1 fail after IPSPing-Ke Shih1-0/+5
If there is no connection, driver will enter IPS state. Meanwhile, it fails to scan channel 1 by the command 'iw dev wlan0 scan freq 2412', because hardware channel setting lose after IPS. Thus, restore channel setting from hw->conf.channel set by last rtl_op_config(). Signed-off-by: Tim Lee <timlee@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: Use mutex to replace spin_lock to protect IPS and LPSPing-Ke Shih4-27/+14
Enter/leavel IPS and LPS are large critical section, and they can't use sleep function because running in atomic-context, which own a spin_lock. In commit ba9f93f82aba ("rtlwifi: Fix enter/exit power_save"), it moves LPS functions to thread-context, so this commit can simply change LPS's spin lock to mutex. Considering IPS functions, rtl_ips_nic_on() may be called by TX tasklet (softirq-context) that check whether packet is auth frame. Fortunately, current mac80211 will ask driver to leave IPS using op_config with changed flag IEEE80211_CONF_CHANGE_IDLE, before issuing auth frame, so IPS functions can run in thread-context and use mutex to protect critical section, too. Also, this commit removes some useless spin locks. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-16rtlwifi: btcoexist: remove redundant variable fw_ps_stateColin Ian King1-2/+1
Variable fw_ps_state is assigned a value but it is never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:736:2: warning: Value stored to 'fw_ps_state' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rtlwifi: fill FW version and subversionPing-Ke Shih2-0/+4
This commit fills FW version information of RTL8188EE and RTL8723, so the btcoex can cooperate with FW correctly. Also, we can display this version in debugfs. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rtlwifi: btcoex: Use seq_file to dump btcoex statusPing-Ke Shih12-632/+664
We use seq_file to replace RT_TRACE to dump status, then we can use 'cat' to access btcoex's status through debugfs. (i.e. /sys/kernel/debug/rtlwifi/00-11-22-33-44-55-66/btcoex) Other related changes are 1. implement btc_disp_dbg_msg() to access btcoex's common status. 2. remove obsolete field bt_exist Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rtlwifi: Improve debugging by using debugfsPing-Ke Shih9-2/+523
Use debugfs to dump register and btcoex status, and also write registers and h2c. We create topdir in /sys/kernel/debug/rtlwifi/, and use the MAC address as subdirectory with several entries to dump mac_reg, bb_reg, rf_reg etc. An example is /sys/kernel/debug/rtlwifi/00-11-22-33-44-55-66/mac_0 This change permits examination of device registers in a dynamic manner, a feature not available with the current debug mechanism. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rtlwifi: rtl8723: Add error handling to no existing firmwarePing-Ke Shih1-1/+1
Without firmware, driver wastes time to download and wait for MCU bootup, and then kernel core dump finally. If request_firmware fails, the value max_fw_size=0 is set, so we check the value before downloading firmware. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rtlwifi: Remove unnecessary parenthesesFrank A. Cancio Bello4-26/+26
This is merged by Ping-Ke Shih from commit a221cb0911b8 ("staging: rtlwifi: Remove unnecessary parentheses"), and original commit log is reserved below. Remove unnecessary parentheses to comply with preferred coding style for the linux kernel and avoid the following checkpatch's message: 'CHECK: Unnecessary parentheses around'. Credits to checkpatch. Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rtlwifi: mark expected switch fall-through in rtl_make_smps_actionGustavo A. R. Silva1-3/+1
This is merged by Ping-Ke Shih from commit 640019bba419 ("staging: rtlwifi: mark expected switch fall-through in rtl_make_smps_action"), and original commit log is reserved below. In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rtlwifi: Remove unnecessary 'out of memory' messageShreeya Patel1-4/+2
This is merged by Ping-Ke Shih from commit 596e0559d61a ("Staging: rtlwifi: Remove unnecessary 'out of memory' message."), and commit log is reserved below. Logging messages that show some type of "out of memory" error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem. These messages generally increase kernel size without much added value. Problem found by checkpatch. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rtlwifi: use kcalloc instead of multiplyTobin C. Harding1-2/+2
This is merged by Ping-Ke Shih from commit 85d309d53f7a ("staging: rtlwifi: use kcalloc instead of multiply"), and original commit log is reserved below. checkpatch emits multiple warnings of type WARNING:ALLOC_WITH_MULTIPLY: Prefer kcalloc over kzalloc with multiply Replace two calls to kzalloc() with calls to kcalloc(). Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rtlwifi: fix parenthesis alignmentPing-Ke Shih1-1/+1
This is merged by Ping-Ke Shih from commit 688a0206cfb8 ("staging: rtlwifi: fix parenthesis alignment"), and original commit log is reserved below. Checkpatch emits multiple warnings of type CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis Fix parenthesis alignment in line with checkpatch suggestion. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rtlwifi: check for array overflowDan Carpenter1-0/+4
This is merged by Ping-Ke Shih from commit dc33bd4309d2 ("staging: rtlwifi: check for array overflow"), and the original commit log is reserved below. Smatch is distrustful of the "capab" value and marks it as user controlled. I think it actually comes from the firmware? Anyway, I looked at other drivers and they added a bounds check and it seems like a harmless thing to have so I have added it here as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-14rtlwifi: always initialize variables given to RT_TRACE()Nicolas Iooss1-1/+1
In rtl_rx_ampdu_apply(), when rtlpriv->cfg->ops->get_btc_status() returns false, RT_TRACE() is called with the values of variables reject_agg and agg_size, which have not been initialized. Always initialize these variables in order to prevent using uninitialized values. This issue has been found with clang. The compiler reported: drivers/net/wireless/realtek/rtlwifi/base.c:1665:6: error: variable 'agg_size' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (rtlpriv->cfg->ops->get_btc_status()) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/realtek/rtlwifi/base.c:1671:31: note: uninitialized use occurs here reject_agg, ctrl_agg_size, agg_size); ^~~~~~~~ drivers/net/wireless/realtek/rtlwifi/base.c:1665:6: error: variable 'reject_agg' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (rtlpriv->cfg->ops->get_btc_status()) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/realtek/rtlwifi/base.c:1671:4: note: uninitialized use occurs here reject_agg, ctrl_agg_size, agg_size); ^~~~~~~~~~ Fixes: 2635664e6e4a ("rtlwifi: Add rx ampdu cfg for btcoexist.") Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-14rtlwifi: rtl_pci: Fix the bug when inactiveps is enabled.Tsang-Shian Lin1-0/+7
Reset the driver current tx read/write index to zero when inactiveps nic out of sync with HW state. Wrong driver tx read/write index will cause Tx fail. Signed-off-by: Tsang-Shian Lin <thlin@realtek.com> 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: Kalle Valo <kvalo@codeaurora.org>
2017-12-14rtlwifi: rtl_pci: 8822BE puts broadcast and multicast packet to HIQPing-Ke Shih1-0/+8
Making this change to HIQ, which has high priority, improves the response time for transmission after TBTT or beacon. 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: Kalle Valo <kvalo@codeaurora.org>
2017-12-08wireless: use ARRAY_SIZEJérémy Lefaure4-39/+30
Using the ARRAY_SIZE macro improves the readability of the code. Also, it is not always useful to use a variable to store this constant calculated at compile time. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-07rtlwifi: rtl818x: remove redundant check for cck_power > 15Colin Ian King1-4/+1
cck_poweri cannot be greated than 15 as is derived from the bottom 4 bits from riv->channels[channel - 1].hw_value & 0xf. Hence the check for it being greater than 15 is redundant and can be removed. Detected by CoverityScan, CID#744303 ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-07rtlwifi: cleanup the code that check whether TX ring is availablePing-Ke Shih3-54/+6
Remove the duplicate checking of TX ring's available number, and remove the variable to store available number that can be calculated by read/write pointers. Signed-off-by: Steven Ting <steventing@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-07rtlwifi: fix the wrong size to calculate fifo spacePing-Ke Shih2-4/+6
Give correct fifo size to calculate fifo space. Fortunately, the values of RTL_PCI_MAX_RX_COUNT and TX_DESC_NUM_92E are the same in old code, so it still works. Signed-off-by: Steven Ting <steventing@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-07rtlwifi: Reduce IO in RX interrupt to boost throughputPing-Ke Shih1-2/+3
Check remaining count of RX packets cost a lot of CPU time, so only update when the counter decreases to zero. In old flow, the counter was updated once a RX packet is received. Signed-off-by: Steven Ting <steventing@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-07rtlwifi: Convert individual interrupt results to structLarry Finger18-95/+76
With the RTL8822BE and later devices, the number of interrupt vectors has grown from 2 to 4. At this point, saving and passing those vectors in a struct makes more sense than using individual scaler variables. In two of the drivers, code to process the second of the interrupt registers was included, but commented out. This patch removes those useless sections. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: remove redundant initialization to cfg_cmdColin Ian King1-1/+1
cfg_cmd is initialized to zero and this value is never read, instead it is over-written in the start of a do-while loop. Remove the redundant initialization. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/core.c:1750:22: warning: Value stored to 'cfg_cmd' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: remove redundant pointer tid_dataColin Ian King1-2/+0
tid_data is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/base.c:1581:2: warning: Value stored to 'tid_data' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: drop unused ppsc->last_wakeup_timeArnd Bergmann2-7/+0
The calculation of ppsc->last_wakeup_time is not y2038-safe, but the variable is not used at all, so we can simply drop it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: use ktime_get_real_seconds() for suspend timeArnd Bergmann3-9/+6
do_gettimeofday() is deprecated and slower than necessary for the purpose of reading the seconds. This changes rtl_op_suspend/resume to use ktime_get_real_seconds() instead, which is simpler and avoids confusion about whether it is y2038-safe or not. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: fix uninitialized rtlhal->last_suspend_sec timeArnd Bergmann1-0/+1
We set rtlhal->last_suspend_sec to an uninitialized stack variable, but unfortunately gcc never warned about this, I only found it while working on another patch. I opened a gcc bug for this. Presumably the value of rtlhal->last_suspend_sec is not all that important, but it does get used, so we probably want the patch backported to stable kernels. Cc: stable@vger.kernel.org Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839 Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: rtl_pci: Extend recognized interrupt parameters from two to four ISRPing-Ke Shih19-19/+36
8822be checks H2CQ by int_d, so we extend to four ISR. Also, irq_mask is extended to four. 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: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: rtl_pci: Add ID for 8822BEPing-Ke Shih2-0/+6
When the driver for the RTL8822BE is added, it will need an ID for further use. 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: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: rtl_pci: Add fill_tx_special_desc to issue H2C data, and process TXOK in interrupt.Ping-Ke Shih3-0/+16
With the RTL8822BE, an H2C tx queue is added to download FW and special data. This change implements the support code in rtl_pci. 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: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: rtl_pci: Add support for 8822be TX/RX BDPing-Ke Shih2-3/+12
The number of TX/RX BD desc for 8822BE is 512. The TX/RX BD architecture of 8822BE is the same as 8192EE. 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: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: rtl_pci: Simplify some code be eliminating extraneous variablesLarry Finger1-24/+11
In several places, the code assigns a variable inside an "if" or "case" block, but uses it only once. The code is simplified by eliminating the extraneous variable. With this change, one level of indenting is saved. This patch does not cause any functional changes in the binary code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> 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: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: rtl_pci: Fix formatting problems in pci.cLarry Finger1-114/+93
Checkpatch.pl reports a number of formatting problems in this source file. None of the changes cause any functional changes in the driver. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> 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: Kalle Valo <kvalo@codeaurora.org>
2017-11-08rtlwifi: rtl_pci: Fix formatting errors in pci.hLarry Finger1-13/+13
Checkpatch.pl reports a number of formatting problems in this header file. None of the changes cause any functional changes in the driver. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> 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: Kalle Valo <kvalo@codeaurora.org>
2017-11-04Merge tag 'wireless-drivers-next-for-davem-2017-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-nextDavid S. Miller13-72/+36
Kalle Valo says: ==================== wireless-drivers-next patches for 4.15 Mostly fixes this time, but also few new features. Major changes: wil6210 * remove ssid debugfs file rsi * add WOWLAN support for suspend, hibernate and shutdown states ath10k * add support for CCMP-256, GCMP and GCMP-256 ciphers on hardware where it's supported (QCA99x0 and QCA4019) ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller16-0/+16
Files removed in 'net-next' had their license header updated in 'net'. We take the remove from 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman16-0/+16
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-27rtlwifi: Remove seq_number from rtl_tid_dataPing-Ke Shih4-39/+2
Since mac80211 maintains the sequence number for each STA/TID, driver doesn't need to maintain a copy. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-10-27rtlwifi: rtl8821ae: Fix typo in variable nameNik Nyby1-5/+5
In _rtl8821ae_dbi_write(), wrtie_addr should be write_addr. Signed-off-by: Nik Nyby <nikolas@gnu.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-10-27rtlwifi: Convert timers to use timer_setup()Kees Cook9-28/+29
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kalle Valo <kvalo@codeaurora.org> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: Ping-Ke Shih <pkshih@realtek.com> Cc: Arvind Yadav <arvind.yadav.cs@gmail.com> Cc: Souptick Joarder <jrdr.linux@gmail.com> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-10-17rtlwifi: Fix typo in if ... else if ... else constructLarry Finger1-2/+2
The kbuild test robot reports two conditions with no effect (if == else). These are the result of copy and paste typographical errors. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Cc: Yan-Hsuan Chuang <yhchuang@realtek.com> Cc: Birming Chiu <birming@realtek.com> Cc: Shaofu <shaofu@realtek.com> Cc: Steven Ting <steventing@realtek.com> Cc: kbuild-all@01.org Cc: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-10-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo1-1/+1
Mark Brown reported that there are conflicts in iwlwifi between the two trees so fix those now.
2017-10-13rtlwifi: Remove unused cur_rfstate variablesChristos Gkekas4-12/+4
Clean up unused cur_rfstate variables in rtl8188ee, rtl8723ae, rtl8723be and rtl8821ae. Signed-off-by: Christos Gkekas <chris.gekas@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>