1
0
Fork 0
Commit Graph

84223 Commits (f4ec7fdf7f83701dd980d6cd60c81f79dab85133)

Author SHA1 Message Date
Ryder Lee f4ec7fdf7f mt76: mt7615: enable support for mesh
Enable NL80211_IFTYPE_MESH_POINT and update its path.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
YueHaibing d3edd108e5 mt76: Remove set but not used variables 'pid' and 'final_mpdu'
Fixes gcc '-Wunused-but-set-variable' warnings:

drivers/net/wireless/mediatek/mt76/mt7603/mac.c: In function mt7603_fill_txs:
drivers/net/wireless/mediatek/mt76/mt7603/mac.c:969:5: warning: variable pid set but not used [-Wunused-but-set-variable]
drivers/net/wireless/mediatek/mt76/mt7603/mac.c:961:7: warning: variable final_mpdu set but not used [-Wunused-but-set-variable]
drivers/net/wireless/mediatek/mt76/mt7615/mac.c: In function mt7615_fill_txs:
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:555:5: warning: variable pid set but not used [-Wunused-but-set-variable]
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:552:19: warning: variable final_mpdu set but not used [-Wunused-but-set-variable]

They are never used, so can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Lorenzo Bianconi d2679d65fe mt76: move mt76_get_rate in mt76-module
Move mt7603_get_rate in mac80211.c and rename it to mt76_get_rate
since it is shared between mt7603 and mt7615 drivers

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Lorenzo Bianconi 892fe32b9c mt76: mt7615: rearrange locking in mt7615_config
Since all the routines in mt7615_config grub mt76.mutex moves
mutex_lock/mutex_unlock at the beginning/end of mt7615_config

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Lorenzo Bianconi 2fccf4f026 mt76: mt7615: init get_txpower mac80211 callback
Initialize get_txpower mac80211 callback to mt76_get_txpower
in order to report the configured tx power to mac80211

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Lorenzo Bianconi 61d368247e mt76: mt7615: add the capability to configure tx power
Introduce mt7615_mcu_set_tx_power routine in order to cap tx power
according to the value configured by the user

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Lorenzo Bianconi c19b0ca503 mt76: generalize mt76_get_txpower for 4x4:4 devices
Genralize mt76_get_txpower routine for 4x4:4 capable devices
in order to be reused in mt7615 driver

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Lorenzo Bianconi c988a77f1d mt76: mt7615: select wifi band according to eeprom
Select supported band according to the value read from
eeprom mtd/otp partition

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Lorenzo Bianconi f9461a6879 mt76: mt7615: add support for mtd eeprom parsing
Calibration data are often available on a specific mtd partition on
embedded devices. Take into account eeprom calibration data if
available.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Lorenzo Bianconi eadfd98f40 mt76: move mt76_insert_ccmp_hdr in mt76-module
Move mt7615_insert_ccmp_hdr in mac80211.c and rename it in
mt76_insert_ccmp_hdr since it is shared between mt7603 and mt7615
drivers

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Felix Fietkau 5c280ae767 mt76: mt76x02: fix tx reordering on rate control probing without a-mpdu
To avoid aggregating rate control probing packets with other traffic, and to
ensure that the probing rate gets used, probing packets get assigned a different
internal queueing priority.
This causes packets to be transmitted in a different order, which is compensated
by the receiver side reordering.
However, if A-MPDU is disabled, this reordering can become visible to upper
layers on the receiver side. Disable the priority change if A-MPDU is disabled.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Felix Fietkau 8548c6eb23 mt76: mt76x02: fix tx status reporting issues
When the hardware falls back to lower rates for a transmit attempt, only the
first status report will show the number of retries correctly. The frames
that follow will report the correct final rate, but number of retries set to 0.
This can cause the rate control module to vastly underestimate the number of
retransmissions per rate.

To fix this, we need to keep track of the initial requested tx rate per packet
and pass it to the status information.
For frames with tx status requested, this is simple: use the rate configured
in info->control.rates[0] as reference.
For no-skb tx status information, we have to encode the requested tx rate in
the packet id (and make it possible to distinguish it from real packet ids).

To do that, reduce the packet id field size by one bit, and use that bit to
indicate packet id vs rate.

This change also improves reporting by filling the status rate array with
rates from first rate to final rate, taking the same steps as the hardware
fallback table. This matters in corner cases like MCS8 on HT, where the
fallback target is MCS0, not MCS7.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Felix Fietkau 0995257242 mt76: fix setting chan->max_power
When setting chan->max_power after registering the wiphy, chan->max_reg_power
needs to be used as a limit

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:58:13 +02:00
Felix Fietkau b0297b6738 mt76: mt7603: fix reading target tx power from eeprom
For the external PA (TSSI OFF) case, the target power needs to be read
from a different location in EEPROM

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27 12:56:04 +02:00
Lorenzo Bianconi 2dcb79cde6 mt76: mt7615: do not process rx packets if the device is not initialized
Fix following crash that occurs when the driver is processing rx packets
while the device is not initialized yet

$ rmmod mt7615e
[   67.210261] mt7615e 0000:01:00.0: Message -239 (seq 2) timeout
$ modprobe mt7615e
[   72.406937] bus=0x1, slot = 0x0, irq=0x16
[   72.436590] CPU 0 Unable to handle kernel paging request at virtual address 00000004, epc == 8eec4240, ra == 8eec41e0
[   72.450291] mt7615e 0000:01:00.0: Firmware is not ready for download
[   72.457724] Oops[#1]:
[   72.470494] mt7615e: probe of 0000:01:00.0 failed with error -5
[   72.474829] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.114 #0
[   72.498702] task: 805769e0 task.stack: 80564000
[   72.507709] $ 0   : 00000000 00000001 00000000 00000001
[   72.518106] $ 4   : 8f704dbc 00000000 00000000 8f7046c0
[   72.528500] $ 8   : 00000024 8045e98c 81210008 11000000
[   72.538895] $12   : 8fc09f60 00000008 00000019 00000033
[   72.549289] $16   : 8f704d80 e00000ff 8f0c7800 3c182406
[   72.559684] $20   : 00000006 8ee615a0 4e000108 00000000
[   72.570078] $24   : 0000004c 8000cf94
[   72.580474] $28   : 80564000 8fc09e38 00000001 8eec41e0
[   72.590869] Hi    : 00000001
[   72.596582] Lo    : 00000000
[   72.602319] epc   : 8eec4240 mt7615_mac_fill_rx+0xac/0x494 [mt7615e]
[   72.614953] ra    : 8eec41e0 mt7615_mac_fill_rx+0x4c/0x494 [mt7615e]
[   72.627580] Status: 11008403 KERNEL EXL IE
[   72.635899] Cause : 40800008 (ExcCode 02)
[   72.643860] BadVA : 00000004
[   72.649573] PrId  : 0001992f (MIPS 1004Kc)
[   72.657704] Modules linked in: mt7615e pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt76x2_common mt76x02_lib mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_mu]
[   72.792717] Process swapper/0 (pid: 0, threadinfo=80564000, task=805769e0, tls=00000000)
[   72.808799] Stack : 8f0c7800 00000800 8f0c7800 8032b874 00000000 40000000 8f704d80 8ee615a0
[   72.825428]         8dc88010 00000001 8ee615e0 8eec09b0 8dc88010 8032b914 8f3aee80 80567d20
[   72.842055]         00000000 8ee615e0 40000000 8f0c7800 00000108 8eec9944 00000000 00000000
[   72.858682]         80508f10 80510000 00000001 80567d20 8ee615a0 00000000 00000000 8ee61c00
[   72.875308]         8ee61c40 00000040 80610000 80580000 00000000 8ee615dc 8ee61a68 00000001
[   72.891936]         ...
[   72.896793] Call Trace:
[   72.901649] [<8eec4240>] mt7615_mac_fill_rx+0xac/0x494 [mt7615e]
[   72.913602] [<8eec09b0>] mt7615_queue_rx_skb+0xe4/0x12c [mt7615e]
[   72.925734] [<8eec9944>] mt76_dma_cleanup+0x390/0x42c [mt76]
[   72.936988] Code: ae020018  8ea20004  24030001 <94420004> a602002a  8ea20004  90420000  14430003  a2020034
[   72.956390]
[   72.959676] ---[ end trace f176967739edb19f ]---

Fixes: 04b8e65922 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:27 +02:00
Lorenzo Bianconi 4a8c99c737 mt76: mt76x02: fix edcca file permission
Use 0600 as edcca file permission in mt76x02 debugfs

Fixes: 643749d4a8 ("mt76: mt76x02: disable ED/CCA by default")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:27 +02:00
Lorenzo Bianconi 984d885437 mt76: mt7603: add debugfs knob to enable/disable edcca
Introduce a knob in mt7603 debugfs in order to enable/disable
energy detection based on CCA thresholds

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:27 +02:00
Lorenzo Bianconi 8aac454dbb mt76: mt76x02: run mt76x02_edcca_init atomically in mt76_edcca_set
Run mt76x02_edcca_init atomically in mt76_edcca_set since it runs
concurrently with calibration work and mt76x2_set_channel.
Moreover perform phy calibration atomically

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:27 +02:00
Lorenzo Bianconi 6e4caaea99 mt76: mt76x2: move mutex_lock inside mt76x2_set_channel
This is a preliminary patch to run mt76x02_edcca_init atomically

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:27 +02:00
Lorenzo Bianconi 8424814342 mt76: mt76x2u: remove mt76x02_edcca_init in mt76x2u_set_channel
Remove mt76x02_edcca_init in mt76x2u_set_channel since it is already
run by mt76x2u_phy_channel_calibrate performing channel calibration

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:27 +02:00
Lorenzo Bianconi a78f15471c mt76: mt76x02: remove enable from mt76x02_edcca_init signature
Remove enable parameter from mt76x02_edcca_init routine signature since
it is always true

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:27 +02:00
Lorenzo Bianconi f9e5b885fa mt76: mt7615: add static qualifier to mt7615_rx_poll_complete
Make mt7615_rx_poll_complete static since it is used just in pci.c
to initialize rx_poll_complete function pointer

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:27 +02:00
Lorenzo Bianconi 132191a8b8 mt76: mt7615: rearrange cleanup operations in mt7615_unregister_device
Cleanup tx/rx napi before releasing pending idrs.
Moreover unmap txwi_cache running mt76_free_device routine

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:27 +02:00
Lorenzo Bianconi c38cbba4ca mt76: mt7603: stop mac80211 queues before setting the channel
Suspend data transmission during channel switch

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:27 +02:00
Lorenzo Bianconi b28248ec91 mt7615: mcu: run __mt76_mcu_send_msg in mt7615_mcu_send_firmware
Run __mt76_mcu_send_msg instead of __mt7615_mcu_msg_send and remove
duplicated code.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi 5d15f2ea16 mt7615: mcu: init mcu_restart function pointer
Use common function wrapper in mt7615_mcu_exit since the code is shared
with m7603 driver

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi a3a2c2e79c mt7615: initialize mt76_mcu_ops data structure
Use __mt76_mcu_send_msg wrapper instead of mt7615_mcu_msg_send.
This is a preliminary patch for mt7615-mt7603 mcu code unification

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi 516c3e3805 mt7615: mcu: use standard signature for mt7615_mcu_msg_send
Use mt76 common signature for mt7615_mcu_msg_send. Move skb allocation
in mt7615_mcu_msg_send and remove duplicated code. Remove
__mt7615_mcu_set_wtbl and __mt7615_mcu_set_sta_rec since now are used
just to send mcu msgs.  This is a preliminary patch for mt7615-mt7603 mcu
code unification

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi eb2024b087 mt7615: mcu: remove unused structure in mcu.h
Remove following struct no longer used:
- dev_info
- bss_info
- bss_info_tag_handler

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi 1ca8089a55 mt7615: mcu: do not use function pointers whenever possible
Remove function pointers in mt7615_mcu_set_bss_info and run function
directly. Moreover remove __mt7615_mcu_set_bss_info since it is run just
by mt7615_mcu_set_bss_info and remove duplicated istructions

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi fddc827ffc mt7615: mcu: unify __mt7615_mcu_set_dev_info and mt7615_mcu_set_dev_info
Unify mt7615_mcu_set_dev_info and __mt7615_mcu_set_dev_info since the
latter is run just by mt7615_mcu_set_dev_info

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi 893369b769 mt7615: mcu: remove skb_ret from mt7615_mcu_msg_send
Remove skb_ret parameter from mt7615_mcu_msg_send signature since it is
actually used just by mt7615_mcu_patch_sem_ctrl. This is a prelimanry
patch to use mt76 common mcu API

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi 33d9ed728e mt7615: remove dest from mt7615_mcu_msg_send signature
Remove dest parameter from mt7615_mcu_msg_send/__mt7615_mcu_msg_send
routine signature since it can is always set to MCU_S2D_H2N

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi 27da3bfd31 mt7615: remove query from mt7615_mcu_msg_send signature
Remove query parameter from mt7615_mcu_msg_send routine signature since
it can be obtained from cmd value

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi b1722925d2 mt7615: mcu: remove unused parameter in mt7615_mcu_del_wtbl
Remove unused vif parameter in mt7615_mcu_del_wtbl signature

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi 598a44344f mt7615: mcu: unify mt7615_mcu_add_wtbl_bmc and mt7615_mcu_del_wtbl_bmc
Remove duplicated code in mt7615_bss_info_changed

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi d7228bcf7b mt7615: mcu: use proper msg size in mt7615_mcu_add_wtbl
Use proper mcu message size in mt7615_mcu_add_wtbl and do not
allocate a huge buffer. Moreover use stack memory instead of heap one

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi 77eaa281c2 mt7615: mcu: use proper msg size in mt7615_mcu_add_wtbl_bmc
Use proper mcu message size in mt7615_mcu_add_wtbl_bmc and do not
allocate a huge buffer. Moreover use stack memory instead of heap one

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:26 +02:00
Lorenzo Bianconi b876457c6a mt7615: mcu: remove bss_info_convert_vif_type routine
Remove bss_info_convert_vif_type routine since it is run just in
mt7615_mcu_set_bss_info and the switch over vif->type is already there.
Simplify mt7615_mcu_set_bss_info routine

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
Lorenzo Bianconi 0467448d2e mt7615: mcu: simplify __mt7615_mcu_set_sta_rec
Do not loop over cmd payload in __mt7615_mcu_set_sta_rec since it is
already done in before running __mt7615_mcu_set_sta_rec (e.g.
mt7615_mcu_set_sta_rec)

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
Lorenzo Bianconi 8e309f7dc7 mt7615: mcu: simplify __mt7615_mcu_set_wtbl
Do not loop over cmd payload in __mt7615_mcu_set_wtbl since it is
already done in before running __mt7615_mcu_set_wtbl (e.g.
mt7615_mcu_set_wtbl_key)

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
YueHaibing fd5f65c552 mt76: mt7615: Make mt7615_irq_handler static
Fix sparse warning:

drivers/net/wireless/mediatek/mt76/mt7615/pci.c:37:13:
 warning: symbol 'mt7615_irq_handler' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
Dan Carpenter 9db1aec0c2 mt76: mt7615: Use after free in mt7615_mcu_set_bcn()
We dereference "skb" when we assign:

	req.pkt_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
                                                ^^^^^^^^
So this patch just moves the dev_kfree_skb() down a bit to avoid the
use after free.

Fixes: 04b8e65922 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
Dan Carpenter b1571a0e77 mt76: Fix a signedness bug in mt7615_add_interface()
The problem is that "mvif->omac_idx" is a u8 so it can't be negative
and the error handling won't work.  The get_omac_idx() function returns
-1 on error.

Fixes: 04b8e65922 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
Lorenzo Bianconi 4875e34679 mt76: move netif_napi_del in mt76_dma_cleanup
Move netif_napi_del in mt76_dma_cleanup routine since it is done
by all drivers

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
Lorenzo Bianconi 8357f0dcd8 mt76: mt7615: use napi polling for tx cleanup
This allows tx scheduling and tx cleanup to run concurrently

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
Lorenzo Bianconi 9e63f5e76b mt76: mt7603: use napi polling for tx cleanup
This allows tx scheduling and tx cleanup to run concurrently

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
Lorenzo Bianconi 8402650aa7 mt76: move tx_napi in mt76_dev
Move tx_napi in mt76_dev data structure in order to implement
concurrency between tx scheduling and tx cleanup in mt7603 and mt7615
drivers

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
Lorenzo Bianconi c15b0f7cd0 mt76: mt76x02: remove useless return in mt76x02_resync_beacon_timer
Remove useless return statment in mt76x02_resync_beacon_timer routine

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25 12:55:25 +02:00
Ard Biesheuvel e5db0ad756 airo: switch to skcipher interface
The AIRO driver applies a ctr(aes) on a buffer of considerable size
(2400 bytes), and instead of invoking the crypto API to handle this
in its entirety, it open codes the counter manipulation and invokes
the AES block cipher directly.

Let's fix this, by switching to the sync skcipher API instead.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-06-25 08:12:20 +03:00