linux-2.6-microblaze.git
4 years agobrcmsmac: remove Comparison to bool in brcms_b_txstatus()
Jason Yan [Mon, 4 May 2020 11:33:57 +0000 (19:33 +0800)]
brcmsmac: remove Comparison to bool in brcms_b_txstatus()

Fix the following coccicheck warning:

drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:1060:6-12:
WARNING: Comparison to bool

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504113357.41422-1-yanaijie@huawei.com
4 years agobrcmfmac: Add P2P Action Frame retry delay to fix GAS Comeback Response failure issue
Justin Li [Mon, 4 May 2020 06:07:33 +0000 (01:07 -0500)]
brcmfmac: Add P2P Action Frame retry delay to fix GAS Comeback Response failure issue

It was observed that P2P Cert. 5.1.19: DEVUT responds to Service
Discovery request failed due to DUT did not send GAS Comeback Response
after receiving request from test bed P2P peer. To fix this issue,
we need to add P2P Action Frame retry delay to enhance P2P connection
under VSDB and noisy environment, since the peer can be in other
channels under VSDB.

Signed-off-by: Justin Li <Justin.Li@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1588572453-194663-4-git-send-email-wright.feng@cypress.com
4 years agobrcmfmac: Fix P2P Group Formation failure via Go-neg method
Joseph Chuang [Mon, 4 May 2020 06:07:32 +0000 (01:07 -0500)]
brcmfmac: Fix P2P Group Formation failure via Go-neg method

P2P group formation fails since either peer is not able to send go-neg
confirm or dut is not able to send go-neg response. To fix this, retry
limit should be increased and dwell time check should be added.

Signed-off-by: Joseph Chuang <joseph.chuang@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1588572453-194663-3-git-send-email-wright.feng@cypress.com
4 years agobrcmfmac: support the second p2p connection
Wright Feng [Mon, 4 May 2020 06:07:31 +0000 (01:07 -0500)]
brcmfmac: support the second p2p connection

With RSDB feature, firmware is able to support two P2P-AGO or two
P2P-GC at the same time. So we add the second p2p connection type
to map to the second P2P connection bsscfg.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1588572453-194663-2-git-send-email-wright.feng@cypress.com
4 years agortw88: fix an issue about leak system resources
Dejin Zheng [Mon, 4 May 2020 08:34:42 +0000 (16:34 +0800)]
rtw88: fix an issue about leak system resources

the related system resources were not released when pci_iomap() return
error in the rtw_pci_io_mapping() function. add pci_release_regions() to
fix it.

Fixes: e3037485c68ec1a ("rtw88: new Realtek 802.11ac driver")
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Acked-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504083442.3033-1-zhengdejin5@gmail.com
4 years agortw88: 8723d: add interface configurations table
Ping-Ke Shih [Mon, 4 May 2020 10:50:10 +0000 (18:50 +0800)]
rtw88: 8723d: add interface configurations table

Interface configuration table is used to configure PCI PHY that are
normally decided by design or bootstrap pin, and driver can do additional
settings by this table.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504105010.10780-9-yhchuang@realtek.com
4 years agortw88: 8723d: Set IG register for CCK rate
Ping-Ke Shih [Mon, 4 May 2020 10:50:09 +0000 (18:50 +0800)]
rtw88: 8723d: Set IG register for CCK rate

DIG sets only one IG register for most chips, but 8723D need to set
additional register for CCK rate.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504105010.10780-8-yhchuang@realtek.com
4 years agortw88: 8723d: Add chip_ops::false_alarm_statistics
Ping-Ke Shih [Mon, 4 May 2020 10:50:08 +0000 (18:50 +0800)]
rtw88: 8723d: Add chip_ops::false_alarm_statistics

This ops is used to do statistics of false alarm periodically, and then
fine tune RX initial gain to adaptive different circumstance.

There are three steps, hold/get/reset counter, to retrieve false alarm
counters that consist of CCK and OFDM. In addition to false alarm
counters, it also collects CRC ok/error counters of CCK, OFDM and HT.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504105010.10780-7-yhchuang@realtek.com
4 years agortw88: 8723d: some chips don't support LDPC
Ping-Ke Shih [Mon, 4 May 2020 10:50:07 +0000 (18:50 +0800)]
rtw88: 8723d: some chips don't support LDPC

Some chips are not able to receive LDPC packets. Add an attribute
to rtw_chip_info to determine if the LDPC capability in [ht/vht]_cap
should be advertised or not.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504105010.10780-6-yhchuang@realtek.com
4 years agortw88: handle C2H_CCX_TX_RPT to know if packet TX'ed successfully
Ping-Ke Shih [Mon, 4 May 2020 10:50:06 +0000 (18:50 +0800)]
rtw88: handle C2H_CCX_TX_RPT to know if packet TX'ed successfully

TX status report of 8723D differs from 8822B/8822C, it uses
C2H_CCX_TX_RPT (0x03) with different format. With sequence number
and TX status, driver can know if certain packet was transmitted
successfully.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504105010.10780-5-yhchuang@realtek.com
4 years agortw88: 8723d: Add set_channel
Ping-Ke Shih [Mon, 4 May 2020 10:50:05 +0000 (18:50 +0800)]
rtw88: 8723d: Add set_channel

Set MAC/BB/RF register according to specified channel. The function
rtw_set_channel_mac() is used to set MAC registers, but 8723D only need
some of them.

For channel 14, we need to set different CCK DFIR values, so restore the
values when channel 1 to 13 is selected.

Spur calibration is needed in channel 13 and 14, and we do notch if spur
is over threshold.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504105010.10780-4-yhchuang@realtek.com
4 years agortw88: 8723d: Add query_rx_desc
Ping-Ke Shih [Mon, 4 May 2020 10:50:04 +0000 (18:50 +0800)]
rtw88: 8723d: Add query_rx_desc

This ops is used to parse RX descriptor to know the length of received
packet and containing PHY status. If PHY status is existing, the order is
RX descriptor, PHY status and then packet.

There are two types of PHY status, named CCK and OFDM. Their size are the
same, but formats are different.

struct ieee80211_rx_status is also filled depends on above information.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504105010.10780-3-yhchuang@realtek.com
4 years agortw88: 8723d: Add DIG parameter
Ping-Ke Shih [Mon, 4 May 2020 10:50:03 +0000 (18:50 +0800)]
rtw88: 8723d: Add DIG parameter

To improve user experience in field, we need DIG to adjust RX initial gain
depends on field situation. Since each chip has its own register address,
this commit defines 8723d specific address.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200504105010.10780-2-yhchuang@realtek.com
4 years agoray_cs: use true,false for bool variable
Jason Yan [Sun, 26 Apr 2020 10:37:09 +0000 (18:37 +0800)]
ray_cs: use true,false for bool variable

Fix the following coccicheck warning:

drivers/net/wireless/ray_cs.c:2797:5-14: WARNING: Comparison of 0/1 to
bool variable
drivers/net/wireless/ray_cs.c:2798:2-11: WARNING: Assignment of 0/1 to
bool variable

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200426103709.6730-1-yanaijie@huawei.com
4 years agortlwifi: use true,false for bool variable in rtl_init_rfkill()
Jason Yan [Sun, 26 Apr 2020 09:41:15 +0000 (17:41 +0800)]
rtlwifi: use true,false for bool variable in rtl_init_rfkill()

The 'blocked' is a bool variable, and '==' expression itself is bool
too. So no need to convert it to 0/1.

This fixes the following coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/base.c:508:13-41: WARNING:
Comparison of 0/1 to bool variable

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200426094115.23294-1-yanaijie@huawei.com
4 years agoipw2x00: Remove a memory allocation failure log message
Christophe JAILLET [Fri, 24 Apr 2020 15:45:27 +0000 (17:45 +0200)]
ipw2x00: Remove a memory allocation failure log message

Axe a memory allocation failure log message. This message is useless and
incorrect (vmalloc is not used here for the memory allocation)

This has been like that since the very beginning of this driver in
commit 43f66a6ce8da ("Add ipw2200 wireless driver.")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200424154527.27309-1-christophe.jaillet@wanadoo.fr
4 years agortw88: Use udelay instead of usleep in atomic context
Kai-Heng Feng [Thu, 23 Apr 2020 07:30:07 +0000 (15:30 +0800)]
rtw88: Use udelay instead of usleep in atomic context

It's incorrect to use usleep in atomic context.

Switch to a macro which uses udelay instead of usleep to prevent the issue.

Fixes: 6343a6d4b213 ("rtw88: Add delay on polling h2c command status bit")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200423073007.3566-1-kai.heng.feng@canonical.com
4 years agoiopoll: Introduce read_poll_timeout_atomic macro
Kai-Heng Feng [Fri, 24 Apr 2020 18:49:14 +0000 (02:49 +0800)]
iopoll: Introduce read_poll_timeout_atomic macro

Like read_poll_timeout, an atomic variant for multiple parameter read
function can be useful.

Will be used by a later patch.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200424184918.30360-1-kai.heng.feng@canonical.com
4 years agobrcmfmac: no need to check return value of debugfs_create functions
Greg Kroah-Hartman [Wed, 29 Apr 2020 10:15:26 +0000 (12:15 +0200)]
brcmfmac: no need to check return value of debugfs_create functions

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.

In doing this, make brcmf_debugfs_add_entry() return void as no one was
even paying attention to the return value.

Cc: Arend van Spriel <arend.vanspriel@broadcom.com>
Cc: Franky Lin <franky.lin@broadcom.com>
Cc: Hante Meuleman <hante.meuleman@broadcom.com>
Cc: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Cc: Wright Feng <wright.feng@cypress.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafał Miłecki" <rafal@milecki.pl>
Cc: linux-wireless@vger.kernel.org
Cc: brcm80211-dev-list.pdl@broadcom.com
Cc: brcm80211-dev-list@cypress.com
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200429101526.GA2094124@kroah.com
4 years agobrcmfmac: remove comparison to bool in brcmf_fws_attach()
Jason Yan [Sun, 26 Apr 2020 09:40:53 +0000 (17:40 +0800)]
brcmfmac: remove comparison to bool in brcmf_fws_attach()

Fix the following coccicheck warning:

drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:2359:6-40:
WARNING: Comparison to bool

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200426094053.23132-1-yanaijie@huawei.com
4 years agobrcmfmac: add vendor ie for association responses
Ryohei Kondo [Mon, 27 Apr 2020 07:00:03 +0000 (02:00 -0500)]
brcmfmac: add vendor ie for association responses

Miracast Certification clause 6.1.2 may fail if there is no WFD IE in
p2p assoc response. This change allows WFD IE to be added to p2p assoc
response.

Related WFA certification:
6.1.2 P-SnUT operating as a Group Owner accepts a WFD Session with a
Reference Source

Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Ryohei Kondo <ryohei.kondo@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1587970803-77700-6-git-send-email-chi-hsien.lin@cypress.com
4 years agobrcmfmac: only generate random p2p address when needed
Chi-Hsien Lin [Mon, 27 Apr 2020 07:00:02 +0000 (02:00 -0500)]
brcmfmac: only generate random p2p address when needed

P2p spec mentioned that the p2p device address should be the globally
administered address with locally administered bit set. Therefore,
follow this guideline by default.

When the primary interface is set to a locally administered address, the
locally administered bit cannot be set again. Generate a random locally
administered address for this case.

Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1587970803-77700-5-git-send-email-chi-hsien.lin@cypress.com
4 years agobrcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request
Madhan Mohan R [Mon, 27 Apr 2020 07:00:01 +0000 (02:00 -0500)]
brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request

Send p2p presence response from the p2p interface address instead
of the p2p device address. This is needed for p2p cert 6.1.9 to pass.

Signed-off-by: Madhan Mohan R <MadhanMohan.R@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1587970803-77700-4-git-send-email-chi-hsien.lin@cypress.com
4 years agobrcmfmac: remove arp_hostip_clear from brcmf_netdev_stop
Wright Feng [Mon, 27 Apr 2020 07:00:00 +0000 (02:00 -0500)]
brcmfmac: remove arp_hostip_clear from brcmf_netdev_stop

The firmware does not respond ARP request and causes ping failure with
following steps:

1. Bring up interface
   ifconfig wlan0 up or start wpa_supplicant
2. Set the IP address
   ifconfig wlan0 192.168.100.10
3. Bring down interface or
   ifconfig wlan0 down or kill wpa_supplicant
4. Bring up interface again and set the same IP address
5. Connect to AP(192.168.100.1) and ping to AP will be failed.

FMAC clears arp_hostip when bringing down the interface, but not set it
back if setting the same IP address. We are able to see the IP address
in interface info(inconfig wlan0) but the ping still cannot work because
the firmware ARP offload does not respond the ARP request.
Because of that, we remove "arp_hostip_clear" from function
"brcmf_netdev_stop"

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1587970803-77700-3-git-send-email-chi-hsien.lin@cypress.com
4 years agobrcmfmac: keep apsta enabled when AP starts with MCHAN feature
Wright Feng [Mon, 27 Apr 2020 06:59:59 +0000 (01:59 -0500)]
brcmfmac: keep apsta enabled when AP starts with MCHAN feature

When starting station mode on wlan0 and AP mode on wlan1, the apsta will
be disabled and cause data stall on wlan0(station). The apsta feature
with MCHAN(Multi-Channel Concurrent) or RSDB(Real Simultaneous
Dual-Band) can make STA+AP work on two bands concurrently.
Because of that, we keep apsta enabled if firmware supports MCHAN or
RSDB features

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1587970803-77700-2-git-send-email-chi-hsien.lin@cypress.com
4 years agortw88: fix spelling mistake "fimrware" -> "firmware"
Colin Ian King [Fri, 24 Apr 2020 08:47:33 +0000 (09:47 +0100)]
rtw88: fix spelling mistake "fimrware" -> "firmware"

There are spelling mistakes in two rtw_err error messages. Fix them.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200424084733.7716-1-colin.king@canonical.com
4 years agortw88: 8822c: update phy parameter tables to v50
Yan-Hsuan Chuang [Fri, 24 Apr 2020 07:38:12 +0000 (15:38 +0800)]
rtw88: 8822c: update phy parameter tables to v50

Update RTL8822C devices' phy tables to v50.

The new parameters introduces new RFE type 5 for some new modules.
Also added a new regulatory CN for power limit.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200424073812.26896-1-yhchuang@realtek.com
4 years agoMerge tag 'iwlwifi-next-for-kalle-2020-04-24-2' of git://git.kernel.org/pub/scm/linux...
Kalle Valo [Mon, 4 May 2020 08:45:47 +0000 (11:45 +0300)]
Merge tag 'iwlwifi-next-for-kalle-2020-04-24-2' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

First set of iwlwifi patches intended for v5.8

* TX queue debugfs improvements;
* Support for a few new FW API versions;
* Remove deprecated scan FW API version;
* New hw configs and other related changes;
* Support for NPK buffers in debugging;
* More debugging fetures;
* Some other small fixes and clean-ups;

# gpg: Signature made Fri 24 Apr 2020 04:39:43 PM EEST using RSA key ID 1A3CC5FA
# gpg: Good signature from "Luciano Roth Coelho (Luca) <luca@coelho.fi>"
# gpg:                 aka "Luciano Roth Coelho (Intel) <luciano.coelho@intel.com>"

4 years agossb: scan: fix block comments coding style issues
John Oldman [Sat, 25 Apr 2020 15:52:33 +0000 (16:52 +0100)]
ssb: scan: fix block comments coding style issues

Fixed coding style issues

Signed-off-by: John Oldman <john.oldman@polehill.co.uk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200425155233.19624-1-john.oldman@polehill.co.uk
4 years agossb: sprom: fix block comments coding style issues
John Oldman [Fri, 24 Apr 2020 17:50:43 +0000 (18:50 +0100)]
ssb: sprom: fix block comments coding style issues

Fixed coding style issues

Signed-off-by: John Oldman <john.oldman@polehill.co.uk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200424175043.16261-1-john.oldman@polehill.co.uk
4 years agortw88: fix sparse warnings for download firmware routine
Yan-Hsuan Chuang [Fri, 24 Apr 2020 10:12:55 +0000 (18:12 +0800)]
rtw88: fix sparse warnings for download firmware routine

sparse warnings: (new ones prefixed by >>)

>> drivers/net/wireless/realtek/rtw88/mac.c:653:5: sparse: sparse:
symbol '__rtw_download_firmware' was not declared. Should it be static?
>> drivers/net/wireless/realtek/rtw88/mac.c:817:5: sparse: sparse:
symbol '__rtw_download_firmware_legacy' was not declared. Should it be
static?

Fixes: 15d2fcc6b2de ("rtw88: add legacy firmware download for 8723D devices")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200424101255.28239-1-yhchuang@realtek.com
4 years agoiwlwifi: debug: set NPK buffer in context info
Gil Adam [Sat, 18 Apr 2020 08:08:57 +0000 (11:08 +0300)]
iwlwifi: debug: set NPK buffer in context info

When buffer destination for ini debug is configured
to NPK (TB22DTF) set the appropriate bit in the context
info struct.

Signed-off-by: Gil Adam <gil.adam@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.3c9f0fa6033f.Id1d6c191f85efe0d6cf35434bfb186ffd46ff64c@changeid
4 years agoiwlwifi: pcie: add new structs for So devices with long latency
Luca Coelho [Sat, 18 Apr 2020 08:08:56 +0000 (11:08 +0300)]
iwlwifi: pcie: add new structs for So devices with long latency

Some So devices have a longer wake latency.  To support this properly,
add new cfg structs for them so the driver will inform the FW about
the need to use another xtal and use a higher wait value during state
transitions.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.daf515618f57.I80e60006b108e1586e3c56669635c670597fe08d@changeid
4 years agoiwlwifi: pcie: add new structure for Qu devices with medium latency
Luca Coelho [Sat, 18 Apr 2020 08:08:55 +0000 (11:08 +0300)]
iwlwifi: pcie: add new structure for Qu devices with medium latency

Some Qu devices require an intermediate amount of time to wake up and
for LTR notifications, so add a new structure with the correct values
for them and change the corresponding devices to use it.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.d6df2bcee78f.Ie008b0c8f03340a466c1ef981bfd25359c9de90d@changeid
4 years agoiwlwifi: mvm: tell firmware about required LTR delay
Johannes Berg [Sat, 18 Apr 2020 08:08:54 +0000 (11:08 +0300)]
iwlwifi: mvm: tell firmware about required LTR delay

Some (integrated) devices need a longer LTR delay than the firmware
would typically apply, tell it about that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.24276ae2ad61.I8831a538f75893d5cee47b4a81f4b9b7fd0e8bea@changeid
4 years agoiwlwifi: update few product names in AX family
Ihab Zhaika [Sat, 18 Apr 2020 08:08:53 +0000 (11:08 +0300)]
iwlwifi: update few product names in AX family

update the product names of few structs in AX family.

Signed-off-by: Ihab Zhaika <ihab.zhaika@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.738dabad8732.I5673eaf8a016b8aa27ab8bab02121108fa723783@changeid
4 years agoiwlwifi: pcie: add cfgs for SoCs with device ID 0x4FD0
Luca Coelho [Sat, 18 Apr 2020 08:08:52 +0000 (11:08 +0300)]
iwlwifi: pcie: add cfgs for SoCs with device ID 0x4FD0

A new device ID needs to be added to the list to support new SoCs.
Add it and support all subsystem IDs that other Qu devices support.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.5e5ce668ff8b.I20a9c8b3470aaabaa54361a5641637e5a14d8321@changeid
4 years agoiwlwifi: add new cards for AX family
Ihab Zhaika [Sat, 18 Apr 2020 08:08:51 +0000 (11:08 +0300)]
iwlwifi: add new cards for AX family

add few PCI ID'S for AX family.

Signed-off-by: Ihab Zhaika <ihab.zhaika@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.5eae2261b70c.I0369619a562c4e4008e2f0a3afb9ed5d4c9b49d4@changeid
4 years agoiwlwifi: acpi: read TAS table from ACPI and send it to the FW
Mordechay Goodstein [Sat, 18 Apr 2020 08:08:50 +0000 (11:08 +0300)]
iwlwifi: acpi: read TAS table from ACPI and send it to the FW

Read the Time Averaged SAR (TAS) table from ACPI and if TAS
feature is enabled in the FW send the black list countries
which TAS is disabled in to the FW

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.40a327d32cfd.I7203f3afc8186cca34c48a1a116baac1df5eff4e@changeid
4 years agoiwlwifi: remove fw_monitor module parameter
Emmanuel Grumbach [Sat, 18 Apr 2020 08:08:49 +0000 (11:08 +0300)]
iwlwifi: remove fw_monitor module parameter

This module parameter is no longer useful now that other debug
infrastructure was added to iwlwifi.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.03bd49c3432b.Ie62047d3b364b19c8c3584ea37790220466f2a8d@changeid
4 years agoiwlwifi: remove deprecated and unused iwl_mvm_keyinfo struct
Luca Coelho [Sat, 18 Apr 2020 08:08:48 +0000 (11:08 +0300)]
iwlwifi: remove deprecated and unused iwl_mvm_keyinfo struct

This struct hasn't been used in years and is just a remnant of an API
support removal that missed this structured.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.93860da2d12a.Ifeca3b3313e3f14330317bc3e3d62f7d991ec955@changeid
4 years agoiwlwifi: mvm: add framework for specific phy configuration
Gil Adam [Sat, 18 Apr 2020 08:08:47 +0000 (11:08 +0300)]
iwlwifi: mvm: add framework for specific phy configuration

Add framework for supporting specific PHY filter configuration,
which allows for application of various FW defined PHY filters
(one per antenna). Change phy_cfg_cmd to the new API (ver3).
Reading of configuration from platform's ACPI tables to be added
later when tables are defined.

Signed-off-by: Gil Adam <gil.adam@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.242a8f979592.I13c77a8a8dbf1a169b5052c7af1f8401ff3991ad@changeid
4 years agoiwlwifi: pcie: move iwl_pcie_ctxt_info_alloc_dma() to user
Johannes Berg [Sat, 18 Apr 2020 08:08:46 +0000 (11:08 +0300)]
iwlwifi: pcie: move iwl_pcie_ctxt_info_alloc_dma() to user

There's no need for this to be an inline in the header file,
only the context-info.c file ever uses it. Move it there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.818a06457888.Ib4f55280cd14d7edab37f2992b381c9b6ca4cd7a@changeid
4 years agoiwlwifi: yoyo: support IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT time point
Shahar S Matityahu [Fri, 17 Apr 2020 10:21:42 +0000 (13:21 +0300)]
iwlwifi: yoyo: support IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT time point

Allow the driver to perform dump collection in case of alive notification
timeout in yoyo mode.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200417131727.bd46e6240590.Ibda6d9d330a1ae49670152cede34629b280f6cf9@changeid
4 years agoiwlwifi: mvm: add DCM flag to rate pretty-print
Johannes Berg [Fri, 17 Apr 2020 10:21:41 +0000 (13:21 +0300)]
iwlwifi: mvm: add DCM flag to rate pretty-print

It's useful to know if DCM was enabled, add this flag
to the rate pretty-printer.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200417131727.891bb9741eca.Ia66448f7e00be9e4c9ea7147b90d4fcd5f1d3845@changeid
4 years agoiwlwifi: pcie: gen2: minor code cleanups in byte table update
Johannes Berg [Fri, 17 Apr 2020 10:21:40 +0000 (13:21 +0300)]
iwlwifi: pcie: gen2: minor code cleanups in byte table update

One line should be indented less, otherwise it looks like it
belongs into the parentheses, which clearly it doesn't; also
some variables can move into their respective if branches.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200417131727.a4858aa0441b.I0e70e4a5493fe6b8db6390f9349ff0e7888ab240@changeid
4 years agoiwlwifi: pcie: add n_window/ampdu to tx_queue debugfs
Johannes Berg [Fri, 17 Apr 2020 10:21:39 +0000 (13:21 +0300)]
iwlwifi: pcie: add n_window/ampdu to tx_queue debugfs

Add the n_window and ampdu parameters so we can see them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200417131727.a2cc1f36008f.Iea23802bb64a08de410223e9af4431dfcadf121b@changeid
4 years agoiwlwifi: pcie: use seq_file for tx_queue debugfs file
Johannes Berg [Fri, 17 Apr 2020 10:21:38 +0000 (13:21 +0300)]
iwlwifi: pcie: use seq_file for tx_queue debugfs file

On newer hardware, the tx_queue debugfs file would need to
allocate 37.5kib data since there are 512 queues, which is
too much. Rather than resorting to kludges like kvmalloc(),
use the seq_file API to print out the data.

While at it, also fix a NULL pointer dereference here, the
txq pointer from trans_pcie->txqs[] may be NULL if that
queue hasn't been allocated.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200417131727.491cf8224c49.I7f154d81e5becef3b5ff22d7c6e36170bde0d7d5@changeid
4 years agoiwlwifi: support version 9 of WOWLAN_GET_STATUS notification
Mordechay Goodstein [Fri, 17 Apr 2020 10:21:37 +0000 (13:21 +0300)]
iwlwifi: support version 9 of WOWLAN_GET_STATUS notification

Add support for the new WOWLAN_GET_STATUS notification that contains a
new element that informs the driver of TIDs whose BA sessions were
closed during suspend.

Note that the new functionality of handling these closed sessions is not
implemented in this patch it.  It only aligns to the new API version.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200417131727.b02153b94c1d.Ieb6291586d60f372d5a505604b18227ef97e7202@changeid
4 years agoiwlwifi: dbg: support multiple dumps in legacy dump flow
Shahar S Matityahu [Fri, 17 Apr 2020 10:21:36 +0000 (13:21 +0300)]
iwlwifi: dbg: support multiple dumps in legacy dump flow

Support multiple debug data collection triggers in legacy flow.
Utilize the already existing Yoyo infra so the change is rather simple.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200417131727.5be6a1923cbe.I10701236b03f66328041f2a38f5f0f22a26fd40b@changeid
4 years agoiwlwifi: move API version lookup to common code
Mordechay Goodstein [Tue, 21 Apr 2020 10:33:47 +0000 (13:33 +0300)]
iwlwifi: move API version lookup to common code

The API version lookup is parsed from a TLV and should be in shared code
make make it reusable across all opmodes.

Also change the function names from mvm to fw, since this is not
mvm-specific anymore.

Additionally, since this function is not just a single line of code, it
shouldn't be inline.  Convert them to actual functions.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200421133326.cf94672dfcdb.I5ede9cc25ee8de7b8d2b5c574f917a18971da734@changeid
4 years agoiwlwifi: nvm: use iwl_nl80211_band_from_channel_idx
Tova Mussai [Fri, 17 Apr 2020 10:21:35 +0000 (13:21 +0300)]
iwlwifi: nvm: use iwl_nl80211_band_from_channel_idx

Use iwl_nl80211_band_from_channel_idx in iwl_parse_nvm_mcc_info

Signed-off-by: Tova Mussai <tova.mussai@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200417131727.a64a018f244e.Ie75ac5bb0f0f524d26944800138855ef2228339a@changeid
4 years agoiwlwifi: scan: remove support for fw scan api v13
Tova Mussai [Fri, 17 Apr 2020 10:21:33 +0000 (13:21 +0300)]
iwlwifi: scan: remove support for fw scan api v13

The fw already supports scan api v14 and the firmware version that
supports only v13 was not published, so we can remove support for v13 in
the driver.

Signed-off-by: Tova Mussai <tova.mussai@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200417131727.11883315579a.I4f59100e457c1079c5e4c90e4930d1fa62b7ddd7@changeid
4 years agortw88: 8723d: initialize mac/bb/rf basic functions
Ping-Ke Shih [Wed, 22 Apr 2020 03:46:07 +0000 (11:46 +0800)]
rtw88: 8723d: initialize mac/bb/rf basic functions

Implement rtw_chip_ops::phy_set_param and ::mac_init to initialize
mac/bb/rf, and they are used during interface up. The procedure contains
power on sequence registers, download firmware, load predefined parameters,
mac/bb/rf specific register and etc.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200422034607.28747-9-yhchuang@realtek.com
4 years agortw88: 8723d: Organize chip TX/RX FIFO
Ping-Ke Shih [Wed, 22 Apr 2020 03:46:06 +0000 (11:46 +0800)]
rtw88: 8723d: Organize chip TX/RX FIFO

TX FIFO size is 32k and it was divided into 256 pages with 128 bytes.
A boundary is used to split pages into two parts, head part is used to
store TX packets coming from host, and tail part is reserved for special
purposes, such as beacon packet, null data packet and so on.

The TX packets coming from host have many categories, such as VO, VI, BE,
BK, MG and etc. When going into head part of TX FIFO, they are classified
to four priority queue named low, normal, high and extra priority queues.
Each priority queue occupies predefined number of page, if a certain
priority queue is full, TX packet will store into PUB priority queue.

Similarly, RX FIFO is 16k and split into two parts, head part is used to
store RX packets, and tail part is 128 bytes and used to store report.
Thus, we fill this boundary to register as well.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200422034607.28747-8-yhchuang@realtek.com
4 years agortw88: 8723d: implement set_tx_power_index ops
Ping-Ke Shih [Wed, 22 Apr 2020 03:46:05 +0000 (11:46 +0800)]
rtw88: 8723d: implement set_tx_power_index ops

The txagc table is used to map rate_id and txagc register address and
mask, and ops set_tx_power_index uses this table to write TX power to
corresponding registers. Since 8723D is a 1x1 2.4G 11n chip, only CCK, OFDM
and HT_MCS 0-7 are listed in the table.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200422034607.28747-7-yhchuang@realtek.com
4 years agortw88: 8723d: 11N chips don't support H2C queue
Ping-Ke Shih [Wed, 22 Apr 2020 03:46:04 +0000 (11:46 +0800)]
rtw88: 8723d: 11N chips don't support H2C queue

H2C queue is used to send command to firmware. Since 8723D doesn't support
this queue, this commit check wlan_cpu flag to avoid to set H2C related
registers.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200422034607.28747-6-yhchuang@realtek.com
4 years agortw88: decompose while(1) loop of power sequence polling command
Ping-Ke Shih [Wed, 22 Apr 2020 03:46:03 +0000 (11:46 +0800)]
rtw88: decompose while(1) loop of power sequence polling command

The power polling command is one kind of power sequence commands. It's used
to check hardware situation, and subsequent comamnds will be executed if
hardware is ready. A special case is PCIE must toggle BIT_PFM_WOWL and try
again if first try is failed.

In order to reduce indentation to understand the code easier, move polling
part to a separate function. Then, the 'while (1)...loop' is replaced by
two statements to do first try and retry.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200422034607.28747-5-yhchuang@realtek.com
4 years agortw88: 8723d: Add mac power-on/-off function
Ping-Ke Shih [Wed, 22 Apr 2020 03:46:02 +0000 (11:46 +0800)]
rtw88: 8723d: Add mac power-on/-off function

The mac power-on flow consists of three steps:
1. pre_sys_cfg  (Before switching power state)
2. power_switch (Switching power state)
3. init_sys_cfg (Settings after swtiching power state)

When switching power state, driver will load and parse the power sequence
tables. For 8723D devices, the logics for parsing are most same except for
the polling function. 8723D devices need to toggle BIT_PFM_WOWL twice.

The settings after power state is switched for 8723D devices are quite
different with other devices, extract a legacy function for them.

For power-off flow, 8723D devices have the same logic with existing chips.
But warning printed if we run power-off sequence in power-off state:

   rtw_pci 0000:03:00.0: failed to poll offset=0x5f8 mask=0xff value=0x0

The scenario is user do 'ifconfig up' that will run power-on sequence to
bring up and then run power-off sequence to enter idle
(IEEE80211_CONF_IDLE). Then, user do 'ifconfig down' that will run
power-off sequence again, and the warning is shown. Original code check
power-on state to avoid to run power-on sequence twice, and this commit
extends to check both power-on and power-off states.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200422034607.28747-4-yhchuang@realtek.com
4 years agortw88: no need to send additional information to legacy firmware
Ping-Ke Shih [Wed, 22 Apr 2020 03:46:01 +0000 (11:46 +0800)]
rtw88: no need to send additional information to legacy firmware

The firmware of 11AC devices need more information to support more offload
functions, such as IQK. And 11N devices such as 8723D does not support
offload these function in firmware, there is no need to send these additional
information to firmware when it comes to 11N devices.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200422034607.28747-3-yhchuang@realtek.com
4 years agortw88: add legacy firmware download for 8723D devices
Ping-Ke Shih [Wed, 22 Apr 2020 03:46:00 +0000 (11:46 +0800)]
rtw88: add legacy firmware download for 8723D devices

The WLAN CPU of 8723D device is different from others, add legacy
firmware download function for it. A new variable wlan_cpu is used to
decide which firmware download function we should use.

Legacy firmware file contains 32 bytes header including version and
subversion. When downloading to wlan cpu, header is excluded.

Firmware is downloaded via beacon queue to reserved page that is a part of
TX buffer. Since 11N WLAN CPU uses different control registers, this patch
introduces related control registers.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200422034607.28747-2-yhchuang@realtek.com
4 years agowlcore: Adding suppoprt for IGTK key in wlcore driver
Raz Bouganim [Tue, 21 Apr 2020 12:28:05 +0000 (15:28 +0300)]
wlcore: Adding suppoprt for IGTK key in wlcore driver

This patch adding support for new cipher suite - AES-CMAC in wlcore driver.
This patch is required for support PMF/WPA3 connection to install IGTK key.

Signed-off-by: Raz Bouganim <r-bouganim@ti.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1587472085-755-1-git-send-email-r-bouganim@ti.com
4 years agortw88: set power trim according to efuse PG values
Tzu-En Huang [Mon, 20 Apr 2020 10:52:07 +0000 (18:52 +0800)]
rtw88: set power trim according to efuse PG values

8822C devices have power trim, thermal and PA bias values
programmed in efuse. Driver should configure the RF components
according to the values.

If the power trim is not configured, then the devices might have
distortion on the output tx power.

Signed-off-by: Tzu-En Huang <tehuang@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420105207.31899-1-yhchuang@realtek.com
4 years agortw88: 8723d: Add read_efuse to recognize efuse info from map
Ping-Ke Shih [Mon, 20 Apr 2020 05:50:54 +0000 (13:50 +0800)]
rtw88: 8723d: Add read_efuse to recognize efuse info from map

The logical efuse map is decoded from physical map by parsing the
header format of the physical map. And each different type of chips
has different logical efuse layout. So add the logical map's layout
for parsing the efuse contents.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420055054.14592-9-yhchuang@realtek.com
4 years agortw88: 8723d: Add new chip op efuse_grant() to control efuse access
Ping-Ke Shih [Mon, 20 Apr 2020 05:50:53 +0000 (13:50 +0800)]
rtw88: 8723d: Add new chip op efuse_grant() to control efuse access

8723D devices need to grant efuse access before dumping physical efuse
map, other chips don't need it, so keep this ops as blank.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420055054.14592-8-yhchuang@realtek.com
4 years agortw88: 8723d: Add cfg_ldo25 to control LDO25
Ping-Ke Shih [Mon, 20 Apr 2020 05:50:52 +0000 (13:50 +0800)]
rtw88: 8723d: Add cfg_ldo25 to control LDO25

Implement rtw_chip_ops::cfg_ldo25 to enable/disable LDO25 with proper
voltage.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420055054.14592-7-yhchuang@realtek.com
4 years agortw88: 8723d: Add mac/bb/rf/agc/power_limit tables
Ping-Ke Shih [Mon, 20 Apr 2020 05:50:51 +0000 (13:50 +0800)]
rtw88: 8723d: Add mac/bb/rf/agc/power_limit tables

Add corresponding parameter tables for 8723D devices.
Since 8723D devices currently have only one RFE type, there is
only one entry in rtw8723d_rfe_defs.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420055054.14592-6-yhchuang@realtek.com
4 years agortw88: 8723d: Add RF read/write ops
Ping-Ke Shih [Mon, 20 Apr 2020 05:50:50 +0000 (13:50 +0800)]
rtw88: 8723d: Add RF read/write ops

8723D use SIPI to indirectly read RF register instead of directly read,
so introduce a new struct rtw_rf_sipi_addr and new function
rtw_phy_read_rf_sipi(). Since other chips don't use the new function,
only 8723D needs to fill struct rtw_rf_sipi_addr in rtw_chip_info.

Because there are two kinds of functions for reading RF registers now,
change rtw_phy_read_rf() to chip->ops->read_rf() in
rtw_phy_write_rf_reg_sipi() so that we can switch tp proper RF read
functions depends on the type of the chip.

Though 8723D is an 1x1 chip, it has two RF PHY and we can switch to
one of them, and that should be configured properly. Hence, add a
fix_rf_phy_num to struct rtw_chip_info to allow driver to set one of
the PHY's registers for 8723D, even it is only 1x1. Another variable
rf_phy_num is introduced to keep the constraint number of RF path we
can access, and its value is:
rf_phy_num = (fix_rf_phy_num ? fix_rf_phy_num : rf_path_num)

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420055054.14592-5-yhchuang@realtek.com
4 years agortw88: 8723d: Add power sequence
Ping-Ke Shih [Mon, 20 Apr 2020 05:50:49 +0000 (13:50 +0800)]
rtw88: 8723d: Add power sequence

Add corresponding power sequence for 8723D devices

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420055054.14592-4-yhchuang@realtek.com
4 years agortw88: 8723d: add beamform wrapper functions
Ping-Ke Shih [Mon, 20 Apr 2020 05:50:48 +0000 (13:50 +0800)]
rtw88: 8723d: add beamform wrapper functions

8723D doesn't support beamform because rtw88 only supports VHT beamform
but 8723d doesn't have VHT capability. Though 8723d doesn't support
beamform, BSS_CHANGED_MU_GROUPS is still marked as changed when doing
disassociation. So, add wrapper functions for all beamform ops to make
sure they aren't NULL before calling.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420055054.14592-3-yhchuang@realtek.com
4 years agortw88: 8723d: Add basic chip capabilities
Ping-Ke Shih [Mon, 20 Apr 2020 05:50:47 +0000 (13:50 +0800)]
rtw88: 8723d: Add basic chip capabilities

RTL8723DE is an 11n 1x1 2.4G single band chip with the
following capabilities:

 - TX/RX BD size: 16/8
 - TX/RX desc size: 40/24
 - physical/logical/protected efuse size: 512/512/96
 - TX gain index factor: 1
 - max TX power index: 0x3F
 - band: 2G
 - HT: support
 - VHT: Not support

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420055054.14592-2-yhchuang@realtek.com
4 years agortlwifi: rtl8723ae: fix warning comparison to bool
Jason Yan [Mon, 20 Apr 2020 04:26:58 +0000 (12:26 +0800)]
rtlwifi: rtl8723ae: fix warning comparison to bool

Fix the following coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c:617:14-20: WARNING:
Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c:622:13-19: WARNING:
Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c:627:14-20: WARNING:
Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c:632:13-19: WARNING:
Comparison to bool
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c:937:5-13: WARNING:
Comparison to bool

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200420042658.18733-1-yanaijie@huawei.com
4 years agortlwifi: rtl8821ae: use true,false for bool variables
Jason Yan [Sat, 18 Apr 2020 07:02:36 +0000 (15:02 +0800)]
rtlwifi: rtl8821ae: use true,false for bool variables

Fix the following coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c:79:1-34: WARNING:
Assignment of 0/1 to bool variable
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c:81:1-34: WARNING:
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200418070236.9620-6-yanaijie@huawei.com
4 years agortlwifi: rtl8723be: use true,false for bool variables
Jason Yan [Sat, 18 Apr 2020 07:02:35 +0000 (15:02 +0800)]
rtlwifi: rtl8723be: use true,false for bool variables

Fix the following coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c:77:1-34: WARNING:
Assignment of 0/1 to bool variable
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c:79:1-34: WARNING:
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200418070236.9620-5-yanaijie@huawei.com
4 years agortlwifi: rtl8192ee: use true,false for bool variables
Jason Yan [Sat, 18 Apr 2020 07:02:34 +0000 (15:02 +0800)]
rtlwifi: rtl8192ee: use true,false for bool variables

Fix the following coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c:78:1-34: WARNING:
Assignment of 0/1 to bool variable
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c:80:1-34: WARNING:
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200418070236.9620-4-yanaijie@huawei.com
4 years agortlwifi: rtl8723ae: use true,false for bool variables
Jason Yan [Sat, 18 Apr 2020 07:02:33 +0000 (15:02 +0800)]
rtlwifi: rtl8723ae: use true,false for bool variables

Fix the following coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c:81:1-34: WARNING:
Assignment of 0/1 to bool variable
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c:83:1-34: WARNING:
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200418070236.9620-3-yanaijie@huawei.com
4 years agortlwifi: rtl8188ee: use true,false for bool variables
Jason Yan [Sat, 18 Apr 2020 07:02:32 +0000 (15:02 +0800)]
rtlwifi: rtl8188ee: use true,false for bool variables

Fix the following coccicheck warning:

drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c:70:1-34: WARNING:
Assignment of 0/1 to bool variable
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c:72:1-34: WARNING:
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200418070236.9620-2-yanaijie@huawei.com
4 years agobrcmfmac: remove leading space
Nils ANDRÉ-CHANG [Sun, 12 Apr 2020 17:19:00 +0000 (18:19 +0100)]
brcmfmac: remove leading space

Signed-off-by: Nils ANDRÉ-CHANG <nils@nilsand.re>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200412171900.xzedxhzd56gox5kf@nixos
4 years agoipw2x00: make ipw_setup_deferred_work() void
Jason Yan [Tue, 14 Apr 2020 12:02:51 +0000 (20:02 +0800)]
ipw2x00: make ipw_setup_deferred_work() void

This function actually needs no return value. So remove the unneeded
variable 'ret' and make it void.

This also fixes the following coccicheck warning:

drivers/net/wireless/intel/ipw2x00/ipw2200.c:10648:5-8: Unneeded
variable: "ret". Return "0" on line 10684

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200414120251.35869-1-yanaijie@huawei.com
4 years agobrcmsmac: make brcms_c_stf_ss_update() void
Jason Yan [Mon, 13 Apr 2020 08:21:26 +0000 (16:21 +0800)]
brcmsmac: make brcms_c_stf_ss_update() void

Fix the following coccicheck warning:

drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c:309:5-13:
Unneeded variable: "ret_code". Return "0" on line 328

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200413082126.22572-1-yanaijie@huawei.com
4 years agoorinoco: remove useless variable 'err' in spectrum_cs_suspend()
Jason Yan [Mon, 13 Apr 2020 08:20:43 +0000 (16:20 +0800)]
orinoco: remove useless variable 'err' in spectrum_cs_suspend()

Fix the following coccicheck warning:

drivers/net/wireless/intersil/orinoco/spectrum_cs.c:281:5-8: Unneeded
variable: "err". Return "0" on line 286

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200413082043.22468-1-yanaijie@huawei.com
4 years agolibertas: make lbs_process_event() void
Jason Yan [Mon, 13 Apr 2020 08:20:22 +0000 (16:20 +0800)]
libertas: make lbs_process_event() void

Fix the following coccicheck warning:

drivers/net/wireless/marvell/libertas/cmdresp.c:225:5-8: Unneeded
variable: "ret". Return "0" on line 355

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200413082022.22380-1-yanaijie@huawei.com
4 years agobrcmsmac: Add missing annotation for brcms_down()
Jules Irenge [Sat, 11 Apr 2020 00:19:29 +0000 (01:19 +0100)]
brcmsmac: Add missing annotation for brcms_down()

Sparse reports a warning at brcms_down()

warning: context imbalance in brcms_down()
- unexpected unlock
The root cause is the missing annotation at brcms_down()
Add the missing __must_hold(&wl->lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200411001933.10072-6-jbi.octave@gmail.com
4 years agobrcmsmac: Add missing annotation for brcms_rfkill_set_hw_state()
Jules Irenge [Sat, 11 Apr 2020 00:19:28 +0000 (01:19 +0100)]
brcmsmac: Add missing annotation for brcms_rfkill_set_hw_state()

Sparse reports a warning at brcms_rfkill_set_hw_state()

warning: context imbalance in brcms_rfkill_set_hw_state()
- unexpected unlock
The root cause is the missing annotation at brcms_rfkill_set_hw_state()
Add the missing __must_hold(&wl->lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200411001933.10072-5-jbi.octave@gmail.com
4 years agohostap: Add missing annotations for prism2_bss_list_proc_start() and prism2_bss_list_...
Jules Irenge [Sat, 11 Apr 2020 00:19:27 +0000 (01:19 +0100)]
hostap: Add missing annotations for prism2_bss_list_proc_start() and prism2_bss_list_proc_stop

Sparse reports warnings at prism2_bss_list_proc_start() and prism2_bss_list_proc_stop()

warning: context imbalance in prism2_wds_proc_stop() - unexpected unlock
warning: context imbalance in prism2_bss_list_proc_start() - wrong count at exit

The root cause is the missing annotations at prism2_bss_list_proc_start()

Add the missing __acquires(&local->lock) annotation
Add the missing __releases(&local->lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200411001933.10072-4-jbi.octave@gmail.com
4 years agortw88: add support for set/get antennas
Yan-Hsuan Chuang [Fri, 10 Apr 2020 10:09:50 +0000 (18:09 +0800)]
rtw88: add support for set/get antennas

User space program such as iw can set antenna mask for the device.
So add set antenna support by configure the trx mode.

This is useful for some tests want to see the output of different
antenna configuration (e.g. path A v.s. path B).

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200410100950.3199-3-yhchuang@realtek.com
4 years agortw88: make rtw_chip_ops::set_antenna return int
Yan-Hsuan Chuang [Fri, 10 Apr 2020 10:09:49 +0000 (18:09 +0800)]
rtw88: make rtw_chip_ops::set_antenna return int

To support ieee80211_ops::set_antenna, the driver can decide if the
antenna mask is accepted, otherwise it can return an error code.
Because each chip could have different limitations, let the chip
check the mask and return.

Also the antenna mask for TRX from upper space is 32-bit long.
Change the antenna mask for rtw_chip_ops::set_antenna from u8 to u32.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200410100950.3199-2-yhchuang@realtek.com
4 years agolibertas: make lbs_init_mesh() void
Jason Yan [Fri, 10 Apr 2020 09:09:42 +0000 (17:09 +0800)]
libertas: make lbs_init_mesh() void

Fix the following coccicheck warning:

drivers/net/wireless/marvell/libertas/mesh.c:833:5-8: Unneeded variable:
"ret". Return "0" on line 874

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200410090942.27239-1-yanaijie@huawei.com
4 years agocw1200: make cw1200_spi_irq_unsubscribe() void
Jason Yan [Fri, 10 Apr 2020 09:09:10 +0000 (17:09 +0800)]
cw1200: make cw1200_spi_irq_unsubscribe() void

Fix the following coccicheck warning:

drivers/net/wireless/st/cw1200/cw1200_spi.c:273:5-8: Unneeded variable:
"ret". Return "0" on line 279

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200410090910.27132-1-yanaijie@huawei.com
4 years agoipw2x00: make ipw_qos_association_resp() void
Jason Yan [Fri, 10 Apr 2020 09:08:50 +0000 (17:08 +0800)]
ipw2x00: make ipw_qos_association_resp() void

Fix the following coccicheck warning:

drivers/net/wireless/intel/ipw2x00/ipw2200.c:7048:5-8: Unneeded
variable: "ret". Return "0" on line 7055

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200410090850.27025-1-yanaijie@huawei.com
4 years agobrcmsmac: make brcms_c_set_mac() void
Jason Yan [Fri, 10 Apr 2020 09:08:17 +0000 (17:08 +0800)]
brcmsmac: make brcms_c_set_mac() void

Fix the following coccicheck warning:

drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:3773:5-8:
Unneeded variable: "err". Return "0" on line 3781

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200410090817.26883-1-yanaijie@huawei.com
4 years agoqtnfmac: Simplify code in _attach functions
Christophe JAILLET [Tue, 7 Apr 2020 19:32:33 +0000 (21:32 +0200)]
qtnfmac: Simplify code in _attach functions

There is no need to re-implement 'netdev_alloc_skb_ip_align()' here.
Keep the code simple.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200407193233.9439-1-christophe.jaillet@wanadoo.fr
4 years agob43legacy: Fix case where channel status is corrupted
Larry Finger [Tue, 7 Apr 2020 19:00:43 +0000 (14:00 -0500)]
b43legacy: Fix case where channel status is corrupted

This patch fixes commit 75388acd0cd8 ("add mac80211-based driver for
legacy BCM43xx devices")

In https://bugzilla.kernel.org/show_bug.cgi?id=207093, a defect in
b43legacy is reported. Upon testing, thus problem exists on PPC and
X86 platforms, is present in the oldest kernel tested (3.2), and
has been present in the driver since it was first added to the kernel.

The problem is a corrupted channel status received from the device.
Both the internal card in a PowerBook G4 and the PCMCIA version
(Broadcom BCM4306 with PCI ID 14e4:4320) have the problem. Only Rev, 2
(revision 4 of the 802.11 core) of the chip has been tested. No other
devices using b43legacy are available for testing.

Various sources of the problem were considered. Buffer overrun and
other sources of corruption within the driver were rejected because
the faulty channel status is always the same, not a random value.
It was concluded that the faulty data is coming from the device, probably
due to a firmware bug. As that source is not available, the driver
must take appropriate action to recover.

At present, the driver reports the error, and them continues to process
the bad packet. This is believed that to be a mistake, and the correct
action is to drop the correpted packet.

Fixes: 75388acd0cd8 ("add mac80211-based driver for legacy BCM43xx devices")
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-and-tested by: F. Erhard <erhard_f@mailbox.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200407190043.1686-1-Larry.Finger@lwfinger.net
4 years agortw88: Add delay on polling h2c command status bit
Kai-Heng Feng [Tue, 7 Apr 2020 07:33:31 +0000 (15:33 +0800)]
rtw88: Add delay on polling h2c command status bit

On some systems we can constanly see rtw88 complains:
[39584.721375] rtw_pci 0000:03:00.0: failed to send h2c command

Increase interval of each check to wait the status bit really changed.

Use read_poll_timeout() macro which fits anything we need here.

Suggested-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200407073331.397-1-kai.heng.feng@canonical.com
4 years agop54usb: add AirVasT USB stick device-id
Giuseppe Marco Randazzo [Sun, 5 Apr 2020 22:06:59 +0000 (00:06 +0200)]
p54usb: add AirVasT USB stick device-id

This patch adds the AirVasT USB wireless devices 124a:4026
to the list of supported devices. It's using the ISL3886
usb firmware. Without this modification, the wiki adapter
is not recognized.

Cc: <stable@vger.kernel.org>
Signed-off-by: Giuseppe Marco Randazzo <gmrandazzo@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [formatted, reworded]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200405220659.45621-1-chunkeey@gmail.com
4 years agobrcm80211: remove redundant pointer 'address'
Colin Ian King [Sun, 5 Apr 2020 13:39:06 +0000 (14:39 +0100)]
brcm80211: remove redundant pointer 'address'

Pointer 'address' is being assigned and updated in a few places
by it is never read. Hence the assignments are redundant and can
be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200405133906.381358-1-colin.king@canonical.com
4 years agorsi: fix a typo "throld" -> "threshold"
Qiujun Huang [Thu, 2 Apr 2020 14:17:58 +0000 (22:17 +0800)]
rsi: fix a typo "throld" -> "threshold"

There is a typo in debug message. Fix it.
s/throld/threshold

Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1585837078-6149-1-git-send-email-hqjagain@gmail.com
4 years agortlwifi: rtl8723ae: fix spelling mistake "chang" -> "change"
Qiujun Huang [Thu, 2 Apr 2020 08:19:17 +0000 (16:19 +0800)]
rtlwifi: rtl8723ae: fix spelling mistake "chang" -> "change"

There is a spelling mistake in a trace message. Fix it.

Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1585815557-20212-1-git-send-email-hqjagain@gmail.com
4 years agobrcmfmac: fix wrong location to get firmware feature
Jaehoon Chung [Mon, 30 Mar 2020 05:25:28 +0000 (14:25 +0900)]
brcmfmac: fix wrong location to get firmware feature

sup_wpa feature is getting after setting feature_disable flag.
If firmware is supported sup_wpa feature,  it's always enabled
regardless of feature_disable flag.

Fixes: b8a64f0e96c2 ("brcmfmac: support 4-way handshake offloading for WPA/WPA2-PSK")
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200330052528.10503-1-jh80.chung@samsung.com
4 years agortw88: Make two functions static
YueHaibing [Sat, 28 Mar 2020 03:05:24 +0000 (11:05 +0800)]
rtw88: Make two functions static

Fix sparse warnings:

drivers/net/wireless/realtek/rtw88/fw.c:633:4: warning:
 symbol 'rtw_get_rsvd_page_probe_req_location' was not declared. Should it be static?
drivers/net/wireless/realtek/rtw88/fw.c:650:5: warning:
 symbol 'rtw_get_rsvd_page_probe_req_size' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200328030524.16032-1-yuehaibing@huawei.com