- 17 Mar, 2020 17 commits
-
-
Lorenzo Bianconi authored
Introduce mt7615_mcu_ops data structure in order to support multiple mcu ops API. Move mt7615_mcu_set_{tx,rx}_ba to mt7615_mcu_ops differentiating between fw v1 and v2. This is a preliminary patch to properly support mt7663e firmware. Rework utility routines to rely on skb APIs for msg parsing Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce mt7615_mcu_send_message routine in order to allocate mcu skb out of mcu sending routine. This approach is useful when the mcu message is complicated and it is convenient to rely on skb buffer API Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Always initialize to 0 mcu messages since if they are not propely configured they could hang the firmware. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Add mt7615_init_device routine in order to be reused adding support for mt7663 in mt7615 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
In order to reuse mt7615_mcu_send_firmware routine adding support for usb devices, clean fw hw queue just for mmio devices Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce mt7615_mcu_wait_response in order to be reused parsing mt7663u mcu messages Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Introduce mt7615_mcu_fill_msg routine to initialize mcu messages. mt7615_mcu_fill_msg will be reused adding mt7663u support Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Chen Wandun authored
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/mediatek/mt76/mt76x0/phy.c: In function mt76x0_phy_rf_init: drivers/net/wireless/mediatek/mt76/mt76x0/phy.c:1158:5: warning: variable val set but not used [-Wunused-but-set-variable] Fixes: 10de7a8b ("mt76x0: phy files") Signed-off-by: Chen Wandun <chenwandun@huawei.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Dan Carpenter authored
This if statement was supposed to be deleted, but it wasn't. It means that we sometimes don't set the sensitivity correctly. Fixes: 2cad515e ("mt76: mt7615: add missing settings for simultaneous dual-band support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Ensure that MCU commands issued right after hardware reset are not dropped and treated as failed. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
When injecting beacon frames via monitor interface, they must not be sent to the beacon hardware queue, because they don't follow normal hardware beacon tx rules. Fix sending them by adding a flag to mt7615_mac_write_txwi that selects the beacon queue for tx, and use it only from mt7615_mcu_set_bcn. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
In some cases it may be useful for debugging to disable this feature Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
If the minimum power is raised too much, it can make it impossible for weaker clients to connect, and there are some scenarios where the false detects will not go down no matter how much the sensitivity is adjusted. Fixes connectivity issues in some rare cases Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Update wiphy available antenna mask, and fix chainmask setting on 3x3 hardware Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Starting from commit 'a6bfb6d1 ("mt76: usb: use max packet length for m76u_copy")' reg_val does not share memory with usb data buffer. On non-coherent devices this approach can corrupt data pointer since data and reg_val share the same cache-line, resulting in the following crash: [ 371.544901] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 8042fbb0 [ 371.558521] CPU: 0 PID: 11 Comm: kworker/u2:2 Not tainted 4.14.160 #0 [ 371.565204] Workqueue: mt76u mt76u_deinit [mt76_usb] [ 371.570331] task: 83823ac0 task.stack: 8386c000 [ 371.575004] $ 0 : 00000000 80590000 00000000 00000000 [ 371.580407] $ 4 : 82edaad0 00000002 83823ac0 fffffff8 [ 371.585810] $ 8 : fffffffd 0000fc00 8052da00 00000000 [ 371.591212] $12 : 000b2285 ae53a1a9 00108845 89da44c4 [ 371.596615] $16 : 82edaad0 82ed9d20 00001798 832edf00 [ 371.602019] $20 : 00000000 8386dda8 80530000 fffffffe [ 371.607421] $24 : 8051d040 76274d1b [ 371.612824] $28 : 8386c000 8386dd88 82edaad4 830d4d50 [ 371.618228] Hi : 000000f7 [ 371.621203] Lo : 33333371 [ 371.624196] epc : 8042fbb0 __mutex_lock.isra.2+0x134/0x378 [ 371.630043] ra : 830d4d50 mt76u_deinit+0x418/0xa6c [mt76_usb] [ 371.636237] Status: 1000fc03KERNEL EXL IE [ 371.640557] Cause : 0080000c (ExcCode 03) [ 371.644696] BadVA : 00000000 [ 371.647671] PrId : 00019374 (MIPS 24Kc) [ 371.726123] usbcore nls_base usb_common [ 371.730180] Process kworker/u2:2 (pid: 11, threadinfo=8386c000, task=83823ac0, tls=00000000) [ 371.738884] Stack : 833d009c 83210b4c 82ed8bc0 8386ddac 000001ff 8008ac50 8386ddac 83b74b00 [ 371.747519] 82edaad4 00000000 83b74b48 83210c38 82edaad0 82ed9d20 00001798 832edf00 [ 371.756157] 00000000 00000000 80530000 fffffffe 80530000 830d4d50 00000040 8389d850 [ 371.764794] 8052d9d8 8389d850 8386de30 82ed9d20 8386de5f 831c27bc 833d48ec 8052d9d8 [ 371.773431] 83823ac0 83823af0 82edab00 82ed9d20 8386de5f 831c5c30 00000000 8052d9a8 [ 371.782069] ... [ 371.784598] Call Trace: [ 371.787130] [<8042fbb0>] __mutex_lock.isra.2+0x134/0x378 [ 371.792622] [<830d4d50>] mt76u_deinit+0x418/0xa6c [mt76_usb] [ 371.808546] [ 371.810920] ---[ end trace c62f0601f6730eb0 ]--- [ 371.818101] Kernel panic - not syncing: Fatal exception [ 371.824420] Rebooting in 3 seconds.. Fix the issue relying only on data buffer to send/receive usb control messages Fixes: a6bfb6d1 ("mt76: usb: use max packet length for m76u_copy") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Remove usb workqueue if mt76u_set_endpoints fails. Fixes: 284efb47 ("mt76: mt76u: rely on a dedicated stats workqueue") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Loop over all possible hw rx queues in mt76u_rx_tasklet since new devices will report mcu events through mcu hw queue Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
- 16 Mar, 2020 1 commit
-
-
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.gitKalle Valo authored
ath.git patches for v5.7. Major changes: ath10k * support for getting btcoex settings from Device Tree * support QCA9377 SDIO device ath11k * add HE rate accounting * add thermal sensor and cooling devices
-
- 12 Mar, 2020 22 commits
-
-
Takashi Iwai authored
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Takashi Iwai authored
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Takashi Iwai authored
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Takashi Iwai authored
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: b43-dev@lists.infradead.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Takashi Iwai authored
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: b43-dev@lists.infradead.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Takashi Iwai authored
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Sergiu Cuciurean authored
In a recent change to the SPI subsystem [1], a new `delay` struct was added to replace the `delay_usecs`. This change replaces the current `delay_usecs` with `delay` for this driver. The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure that both `delay_usecs` & `delay` are used (in this order to preserve backwards compatibility). [1] commit bebcfd27 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Brian Norris authored
hard_header_len provides limitations for things like AF_PACKET, such that we don't allow transmitting packets smaller than this. needed_headroom provides a suggested minimum headroom for SKBs, so that we can trivally add our headers to the front. The latter is the correct field to use in this case, while the former mostly just prevents sending small AF_PACKET frames. In any case, mwifiex already does its own bounce buffering [1] if we don't have enough headroom, so hints (not hard limits) are all that are needed. This is the essentially the same bug (and fix) that brcmfmac had, fixed in commit cb39288f ("brcmfmac: use ndev->needed_headroom to reserve additional header space"). [1] mwifiex_hard_start_xmit(): if (skb_headroom(skb) < MWIFIEX_MIN_DATA_HEADER_LEN) { [...] /* Insufficient skb headroom - allocate a new skb */ Fixes: 5e6e3a92 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Brian Norris <briannorris@chromium.org> Acked-by: Ganapathi Bhat <ganapathi.gbhat@nxp.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Xu Wang authored
Remove unneeded variable ret used to store return value. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
chenqiwu authored
The simple_strtol() function is deprecated since it does not check for the range overflow. Use kstrtoint() instead. Signed-off-by: chenqiwu <chenqiwu@xiaomi.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Kevin Lo authored
Remove unused fab_version member from struct rtw_hal. Some of the checks being made were nonsense. Signed-off-by: Kevin Lo <kevlo@kevlo.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Dmitry Lebed authored
Firmware supports only STA as primary interface in repeater mode. Since the only meaningful usage of AP + STA interface combination is repeater, reject such combination with AP as primary interface. Signed-off-by: Dmitry Lebed <dlebed@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Sergey Matyukevich authored
Quantenna Pearl device exposes multiple (up to 3) radio interfaces under single PCIe function. So far all the wiphy devices were attached to the same pcie device. As a result, all different wireless network devices were reported under the same sysfs directory for pcie device, e.g.: $ ls /sys/class/net/wlan0/device/net/ wlan0 wlan1 It turns out that such behavior may confuse various users of wireless subsystem. For instance, it turned out to be the case for: - Linux init systems, e.g. for renaming based on parent device - OpenWRT configuration scripts Suggested solution is to add an intermediate virtual platform device for each radio interface. Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Sergey Matyukevich authored
Make sure that edmg field of cfg80211_chan_def structure is properly initialized by zeros. Otherwise cfg80211_chandef_valid may return false if edmg fields contain some garbage. Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Sergey Matyukevich authored
Enable WPA3 OWE support in AP mode. Driver currently supports cards that offload OWE processing to userspace. This patch adds all the required tools for such offloading. Firmware requests OWE processing sending new UPDATE_OWE event to driver, which uses cfg80211_update_owe_info_event to notify userspace software. After OWE processing is completed, userspace sends calculated IEs to firmware using update_owe_info cfg80211 callback. Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Sergey Matyukevich authored
Enable WPA3 SAE support in AP mode. Driver currently supports cards that offload SAE authentication to userspace. So allow userspace software to subscribe and to send AUTH frames. Besides, enable AP mode support in external_auth cfg80211 callback. Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Takashi Iwai authored
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: Jiri Slaby <jirislaby@gmail.com> Cc: Nick Kossifidis <mickflemm@gmail.com> Cc: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Takashi Iwai authored
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: ath11k@lists.infradead.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Yibo Zhao authored
Hardwares tested : QCA9887 Firmwares tested : 10.4-3.9.0.1-00036 Signed-off-by: Yibo Zhao <yiboz@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-
Alex Elder authored
The definitions for the "qcom,smem-states" and "qcom,smem-state-names" properties need to list their "$ref" under an "allOf" keyword. In addition, fix two problems in the example at the end: - Use #include for header files that define needed symbolic values - Terminate the line that includes the "ipa-shared" register space name with a comma rather than a semicolon Finally, update some white space in the example for better alignment. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Davide Caratti authored
the following packetdrill script socket(..., SOCK_STREAM, IPPROTO_MPTCP) = 3 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) > S 0:0(0) <mss 1460,sackOK,TS val 100 ecr 0,nop,wscale 8,mpcapable v1 flags[flag_h] nokey> < S. 0:0(0) ack 1 win 65535 <mss 1460,sackOK,TS val 700 ecr 100,nop,wscale 8,mpcapable v1 flags[flag_h] key[skey=2]> > . 1:1(0) ack 1 win 256 <nop, nop, TS val 100 ecr 700,mpcapable v1 flags[flag_h] key[ckey,skey]> getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 fcntl(3, F_SETFL, O_RDWR) = 0 write(3, ..., 1000) = 1000 doesn't transmit 1KB data packet after a successful three-way-handshake, using mp_capable with data as required by protocol v1, and write() hangs forever: PID: 973 TASK: ffff97dd399cae80 CPU: 1 COMMAND: "packetdrill" #0 [ffffa9b94062fb78] __schedule at ffffffff9c90a000 #1 [ffffa9b94062fc08] schedule at ffffffff9c90a4a0 #2 [ffffa9b94062fc18] schedule_timeout at ffffffff9c90e00d #3 [ffffa9b94062fc90] wait_woken at ffffffff9c120184 #4 [ffffa9b94062fcb0] sk_stream_wait_connect at ffffffff9c75b064 #5 [ffffa9b94062fd20] mptcp_sendmsg at ffffffff9c8e801c #6 [ffffa9b94062fdc0] sock_sendmsg at ffffffff9c747324 #7 [ffffa9b94062fdd8] sock_write_iter at ffffffff9c7473c7 #8 [ffffa9b94062fe48] new_sync_write at ffffffff9c302976 #9 [ffffa9b94062fed0] vfs_write at ffffffff9c305685 #10 [ffffa9b94062ff00] ksys_write at ffffffff9c305985 #11 [ffffa9b94062ff38] do_syscall_64 at ffffffff9c004475 #12 [ffffa9b94062ff50] entry_SYSCALL_64_after_hwframe at ffffffff9ca0008c RIP: 00007f959407eaf7 RSP: 00007ffe9e95a910 RFLAGS: 00000293 RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007f959407eaf7 RDX: 00000000000003e8 RSI: 0000000001785fe0 RDI: 0000000000000008 RBP: 0000000001785fe0 R8: 0000000000000000 R9: 0000000000000003 R10: 0000000000000007 R11: 0000000000000293 R12: 00000000000003e8 R13: 00007ffe9e95ae30 R14: 0000000000000000 R15: 0000000000000000 ORIG_RAX: 0000000000000001 CS: 0033 SS: 002b Fix it ensuring that socket state is TCP_ESTABLISHED on reception of the third ack. Fixes: 1954b860 ("mptcp: Check connection state before attempting send") Suggested-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Colin Ian King authored
There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-