summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek/rtw88/main.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-02rtw88: Make RA_MASK macros ULLNathan Chancellor1-6/+6
Clang warns about the definitions of these macros (full warnings trimmed for brevity): drivers/net/wireless/realtek/rtw88/main.c:524:15: warning: signed shift result (0x3FF00000000) requires 43 bits to represent, but 'int' only has 32 bits [-Wshift-overflow] ra_mask &= RA_MASK_VHT_RATES | RA_MASK_OFDM_IN_VHT; ^~~~~~~~~~~~~~~~~ drivers/net/wireless/realtek/rtw88/main.c:527:15: warning: signed shift result (0xFF0000000) requires 37 bits to represent, but 'int' only has 32 bits [-Wshift-overflow] ra_mask &= RA_MASK_HT_RATES | RA_MASK_OFDM_IN_HT_5G; ^~~~~~~~~~~~~~~~ Given that these are all used with ra_mask, which is of type u64, we can just declare the macros to be ULL as well. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Link: https://github.com/ClangBuiltLinux/linux/issues/467 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-05-02rtw88: fix shift of more than 32 bits of a integerColin Ian King1-3/+3
Currently the shift of an integer value more than 32 bits can occur when nss is more than 32. Fix this by making the integer constants unsigned long longs before shifting and bit-wise or'ing with the u64 ra_mask to avoid the undefined shift behaviour. Addresses-Coverity: ("Bad shift operation") Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-30rtw88: new Realtek 802.11ac driverYan-Hsuan Chuang1-0/+1211
This is a new mac80211 driver for Realtek 802.11ac wireless network chips. rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode functionalities. The firmware for both can be found at linux-firmware. https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git For RTL8822BE: rtw88/rtw8822b_fw.bin For RTL8822CE: rtw88/rtw8822c_fw.bin And for now, only PCI buses (RTL8xxxE) are supported. We will add support for USB and SDIO in the future. The bus interface abstraction can be seen in this driver such as hci.h. Most of the hardware setting are the same except for some TRX path or probing setup should be separated. Supported: * Basic STA/AP/ADHOC mode, and TDLS (STA is well tested) Missing feature: * WOW/PNO * USB & SDIO bus (such as RTL8xxxU/RTL8xxxS) * BT coexistence (8822B/8822C are combo ICs) * Multiple interfaces (for now single STA is better supported) * Dynamic hardware calibrations (to improve/stabilize performance) Potential problems: * static calibration spends too much time, and it is painful for driver to leave IDLE state. And slows down associate process. But reload function are under development, will be added soon! * TRX statictics misleading, as we are not reporting status correctly, or say, not reporting for "every" packet. The next patch set should have BT coexistence code since RTL8822B/C are combo ICs, and the driver for BT can be found after Linux Kernel v4.20. So it is better to add it first to make WiFi + BT work concurrently. Although now rtw88 is simple but we are developing more features for it. Even we want to add support for more chips such as RTL8821C/RTL8814B. Finally, rtw88 has many authors, listed alphabetically: Ping-Ke Shih <pkshih@realtek.com> Tzu-En Huang <tehuang@realtek.com> Yan-Hsuan Chuang <yhchuang@realtek.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Tested-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>