summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/usb.c
AgeCommit message (Collapse)Author
2020-02-14mt76: mt76u: take into account different queue mapping for 7663Lorenzo Bianconi
7663u devices rely on a different endpoint mapping. Take it into account in mt76u_alloc_tx routine 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>
2020-02-14mt76: mt76u: add {read/write}_extended utility routinesLorenzo Bianconi
Introduce extended utility routines to read/write data o usb bus. New devices (e.g. mt7663u) will rely on both upper and lower part of the register address. Add ext parameter to mt76u_init signature in order to reuse the code 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>
2020-02-14mt76: mt76u: introduce mt76u_alloc_mcu_queue utility routineLorenzo Bianconi
Add mt76u_alloc_mcu_queue utility routine to allocate mcu hw rx queue. This is a preliminary patch to support new devices (e.g. mt7663u) that rely on a hw queue for 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>
2020-02-14mt76: mt76u: resume all rx queue in mt76u_resume_rxLorenzo Bianconi
Resume all possible rx queues after suspend. This is a preliminary patch to support mt7663u devices 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>
2020-02-14mt76: mt76u: add queue parameter to mt76u_rx_urb_allocLorenzo Bianconi
Add mt76_queue parameter to mt76u_rx_urb_alloc signature since this routine will be used to allocate urbs for mcu hw queue used by new chipset generation (e.g. mt7663u). Check sg_max_size in in mt76u_urb_alloc in order to use linear urb for mcu queue 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>
2020-02-14mt76: mt76u: add mt76u_alloc_rx_queue utility routineLorenzo Bianconi
Introduce mt76u_alloc_rx_queue routine to allocate rx hw queue. This is a preliminary patch to support new devices (e.g. mt7663u) that rely on a hw queue for 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>
2020-02-14mt76: mt76u: stop/free all possible rx queuesLorenzo Bianconi
Stop/free all configured rx queues (data/mcu) in mt76u_stop_rx/mt76u_free_rx. This is a preliminary patch to support new devices (e.g. mt7663u) that rely on a hw queue for 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>
2020-02-14mt76: mt76u: introduce mt76u_free_rx_queue utility routineLorenzo Bianconi
Introduce mt76u_free_rx_queue utility routine to free rx hw queue. This is a preliminary patch to support new devices (e.g. mt7663u) that rely on a hw queue for 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>
2020-02-14mt76: mt76u: move mcu buffer allocation in mt76x02u driversLorenzo Bianconi
Move mcu buffer allocation in mt76x2u/mt76x0u drivers since newer chipsets (e.g. mt7663u) does not rely on synchronous mcu communication 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>
2020-02-14mt76: mt76u: add queue id parameter to mt76u_submit_rx_buffersLorenzo Bianconi
Add queue_id parameter to mt76u_submit_rx_buffers in order to reuse it 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>
2020-02-14mt76: mt76u: use mt76_queue as mt76u_complete_rx contextLorenzo Bianconi
In order to reuse mt76u_complete_rx for both data and mcu rx queue, rely on mt76_queue as urb context in mt76u_complete_rx. Moreover set usb rx endoint according to rx queue in mt76u_submit_rx_buf. This is a preliminary patch to add 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>
2020-02-14mt76: mt76u: add mt76_queue to mt76u_refill_rx signatureLorenzo Bianconi
Introduce mt76_queue parameter to mt76u_refill_rx signature in order to reuse it for mcu hw rx queue 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>
2020-02-14mt76: mt76u: add mt76_queue to mt76u_get_next_rx_entry signatureLorenzo Bianconi
Rely on mt76_queue pointer in mt76u_get_next_rx_entry in order to add support for new devices (e.g 7663u) that reports fw events through hw rx mcu queue 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>
2020-02-14mt76: mt76u: add mt76u_process_rx_queue utility routineLorenzo Bianconi
Introduce mt76u_process_rx_queue routine to process rx hw queue. This is a preliminary patch to support new devices (e.g. mt7663u) that rely on a hw queue for 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>
2020-02-14mt76: mt76u: check tx_status_data pointer in mt76u_tx_taskletLorenzo Bianconi
New devices (e.g. mt7663u) do not rely on stats workqueue to load tx statistics but will be reported by the firmware. Check tx_status_data pointer in mt76u_tx_tasklet in order to reuse tx tasklet for new devices 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>
2020-02-14mt76: usb: use max packet length for m76u_copyStanislaw Gruszka
For transferring data over USB the optimal size is endpoint maxpacket. For my hardware maxpaket for control endpoint is 64 bytes and changing to this value from 128 bytes further shorten TBTT work time from 3ms to 1ms. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: speed up usb bulk copyMarkus Theil
Use larger batches for usb copy to speed this operation up. Otherwise it would be too slow for copying new beacons or broadcast frames over usb. Assure, that always a multiple of 4 Bytes is copied, as outlined in 850e8f6fbd "mt76: round up length on mt76_wr_copy" from Felix Fietkau. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: move state from struct mt76_dev to mt76_phyFelix Fietkau
Allows keeping per-wiphy state separate Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: keep a set of software tx queues per phyFelix Fietkau
Allows tracking tx scheduling separately per phy Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: add support for an extra wiphy in the main tx pathFelix Fietkau
This is preparation for supporting multiple wiphys per device to support the concurrent dual-band feature of MT7615D Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-14mt76: move initialization of some struct members to mt76_alloc_deviceFelix Fietkau
Reduces duplication and prepares for further rework Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20mt76: mt76u: rely on a dedicated stats workqueueLorenzo Bianconi
rate controller and throughput are very sensitive to tx status timing. In order to improve performances when the system is heavily loaded, substitute stat_work delayed_work with a regular work_struct and create a mt76u dedicated workqueue for tx status reporting Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20mt76: mt76u: rely on usb_interface instead of usb_devLorenzo Bianconi
usb drivers are supposed to communicate using usb_interface instead mt76x{0,2}u is now registering through usb_device. Fix it by passing usb_intf device to mt76_alloc_device routine. Fixes: 112f980ac8926 ("mt76usb: use usb_dev private data") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Tested-By: Zero_Chaos <sidhayn@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20mt76: usb: add lockdep_assert_held in __mt76u_vendor_requestLorenzo Bianconi
Introduce lockdep_assert_held macro in __mt76u_vendor_request routine and remove comments regarding usb_ctrl_mtx lock Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: fix some checkpatch warningsRyder Lee
This fixes the following checkpatch warnings: CHECK: Alignment should match open parenthesis CHECK: No space is necessary after a cast Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: switch to SPDX tag instead of verbose boilerplate textRyder Lee
No functional change intended. Add SPDX identifiers to all remaining files in /mt76. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: introduce mt76_mmio_read_copy routineLorenzo Bianconi
Add mt76_mmio_read_copy routine and the related function pointer in mt76_bus_ops data structure. mt76_mmio_read_copy will be used to add BIP_CMAC_128 cipher hw support to mt7615 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: usb: remove unneeded {put,get}_unalignedStanislaw Gruszka
Compiler give us guarantees on variables alignment, so use an variable as buffer when read/write registers and remove unneeded {put,get}_unaligned. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: usb: fix endian in mt76u_copyStanislaw Gruszka
In contrast to mt76_wr() which we use to program registers, on mt76_wr_copy() we should not change endian of the data. Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer") Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: mt76u: fix typo in mt76u_fill_rx_sgLorenzo Bianconi
Fix typo setting urb->transfer_buffer_length in mt76u_fill_rx_sg Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer") Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: round up length on mt76_wr_copyFelix Fietkau
When beacon length is not a multiple of 4, the beacon could be sent with the last 1-3 bytes corrupted. The skb data is guaranteed to have enough room for reading beyond the end, because it is always followed by skb_shared_info, so rounding up is safe. All other callers of mt76_wr_copy have multiple-of-4 length already. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-07-08Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Two cases of overlapping changes, nothing fancy. Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-27mt76: usb: fix rx A-MSDU supportLorenzo Bianconi
Commit f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx") breaks A-MSDU support. When A-MSDU is enable the device can receive frames up to q->buf_size but they will be discarded in mt76u_process_rx_entry since there is no enough room for skb_shared_info. Fix the issue reallocating the skb and copying in the linear area the first 128B of the received frames and in the frag_list the remaining part Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-06-27mt76: mt76u: get rid of {out,in}_max_packetLorenzo Bianconi
Remove {out,in}_max_packet from mt76_usb data structure since they just track last usb endpoint and they are not actually used Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt76u: reduce rx memory footprintLorenzo Bianconi
Reduce rx memory footprint allocating just one SG buffer since for the moment we support just 3839B as maximal size of an A-MSDU. Introduce different SG_MAX_SIZE definitions for TX and RX sides. Moreover set q->buf_size to PAGE_SIZE even for SG case. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: usb: use EP max packet aligned buffer sizes for rxStanislaw Gruszka
If buffer size is not usb_endpoint_maxp (512 or 1024 bytes) multiple, usb host driver has to use bounce buffer and copy data. For RX we can avoid that since we alreay allocate q->buf_size (2kB) buffers and mt76usb hardware will not fill more data as rx packet size is limited by network protocol. However add error message if this assumption somehow will be not true. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76usb: fix tx/rx stopStanislaw Gruszka
Disabling tasklets on stopping rx/tx is wrong. If blocked tasklet is scheduled and we remove device we will get 100% cpu usage: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 9 root 20 0 0 0 0 R 93.8 0.0 1:47.19 ksoftirqd/0 by infinite loop in tasklet_action_common() and eventuall crash on next mt76usb module load: [ 2068.591964] RIP: 0010:tasklet_action_common.isra.17+0x66/0x100 [ 2068.591966] Code: 41 89 f5 eb 25 f0 48 0f ba 33 00 0f 83 b1 00 00 00 48 8b 7a 20 48 8b 42 18 e8 56 a3 b5 00 f0 80 23 fd 48 89 ea 48 85 ed 74 53 <48> 8b 2a 48 8d 5a 08 f0 48 0f ba 6a 08 01 72 0b 8b 42 10 85 c0 74 [ 2068.591968] RSP: 0018:ffff98758c34be58 EFLAGS: 00010206 [ 2068.591969] RAX: ffff98758e6966d0 RBX: ffff98756e69aef8 RCX: 0000000000000006 [ 2068.591970] RDX: 01060a053d060305 RSI: 0000000000000006 RDI: ffff98758e6966d0 [ 2068.591971] RBP: 01060a053d060305 R08: 0000000000000000 R09: 00000000000203c0 [ 2068.591971] R10: 000003ff65b34f08 R11: 0000000000000001 R12: ffff98758e6966d0 [ 2068.591972] R13: 0000000000000006 R14: 0000000000000040 R15: 0000000000000006 [ 2068.591974] FS: 0000000000000000(0000) GS:ffff98758e680000(0000) knlGS:0000000000000000 [ 2068.591975] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2068.591975] CR2: 00002c5f73a6cc20 CR3: 00000002f920a001 CR4: 00000000003606e0 [ 2068.591977] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2068.591978] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2068.591978] Call Trace: [ 2068.591985] __do_softirq+0xe3/0x30a [ 2068.591989] ? sort_range+0x20/0x20 [ 2068.591990] run_ksoftirqd+0x26/0x40 [ 2068.591992] smpboot_thread_fn+0xc5/0x160 [ 2068.591995] kthread+0x112/0x130 [ 2068.591997] ? kthread_create_on_node+0x40/0x40 [ 2068.591998] ret_from_fork+0x35/0x40 [ 2068.591999] Modules linked in: ccm arc4 fuse rfcomm cmac bnep sunrpc snd_hda_codec_hdmi snd_soc_skl snd_soc_core snd_soc_acpi_intel_match snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core iTCO_wdt snd_hda_intel intel_rapl iTCO_vendor_support x86_pkg_temp_thermal intel_powerclamp btusb mei_wdt coretemp btrtl snd_hda_codec btbcm btintel intel_cstate snd_hwdep intel_uncore uvcvideo snd_hda_core videobuf2_vmalloc videobuf2_memops intel_rapl_perf wmi_bmof videobuf2_v4l2 intel_wmi_thunderbolt snd_seq bluetooth joydev videobuf2_common snd_seq_device snd_pcm videodev media i2c_i801 snd_timer idma64 ecdh_generic intel_lpss_pci intel_lpss mei_me mei ucsi_acpi typec_ucsi processor_thermal_device intel_soc_dts_iosf intel_pch_thermal typec thinkpad_acpi wmi snd soundcore rfkill int3403_thermal int340x_thermal_zone int3400_thermal acpi_thermal_rel acpi_pad pcc_cpufreq uas usb_storage crc32c_intel i915 i2c_algo_bit nvme serio_raw [ 2068.592033] drm_kms_helper e1000e nvme_core drm video ipv6 [last unloaded: cfg80211] Fortunate thing is that this not happen frequently, as scheduling tasklet on blocked state is very exceptional, though might happen. Due to different RX/TX tasklet processing fix is different for those. For RX we have to assure rx_tasklet do fail to resubmit buffers by poisoning urb's and kill the tasklet. For TX we need to handle all stop cases properly (suspend, module unload, device removal). Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: add skb pointer to mt76_tx_infoLorenzo Bianconi
Pass skb pointer to tx_prepare_skb through mt76_tx_info data structure. This is a preliminary patch to properly support dma error path for new chipsets (e.g. 7615) Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: usb: reduce locking in mt76u_tx_taskletLorenzo Bianconi
Similar to pci counterpart, reduce locking in mt76u_tx_tasklet since q->head is managed just in mt76u_tx_tasklet and q->queued is updated holding q->lock Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: move tx tasklet to struct mt76_devFelix Fietkau
Allows it to be scheduled from core code Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: use mac80211 txq schedulingFelix Fietkau
Performance improvement and preparation for adding airtime fairness support Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76usb: remove queue variable from rx_taskletStanislaw Gruszka
Since now only mt76u_get_next_rx_entry use queue argument move it to this function. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76usb: allocate urb and sg as linear dataStanislaw Gruszka
Alloc sg table at the end of urb structure. This will increase cache usage. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76usb: remove unneded sg_init_tableStanislaw Gruszka
We already allocate with GFP_ZERO and sg marker is set later for both RX and TX. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76usb: resue mt76u_urb_alloc for txStanislaw Gruszka
Add new rx_urb_alloc routine and reuse common urb_alloc for tx allocations. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76usb: remove MT_RXQ_MAIN queue from mt76u_urb_allocStanislaw Gruszka
Get the RX queue inside mt76u_refill_rx. This will allow to reuse mt76u_urb_alloc for TX allocations. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76usb: remove mt76u_buf and use urb directlyStanislaw Gruszka
Put urb pointer in mt76_queue_entry directly instead of mt76u_buf structure. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76usb: move mt76u_buf->done to queue entryStanislaw Gruszka
mt76_queue_entry has alreay one bool variable, adding new one will not increase it's size. Removing ->done filed from mt76u_buf will allow to use urb directly in mt76usb code. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76usb: remove mt76u_buf redundant filedsStanislaw Gruszka
Remove mt76u_buf->{len, buf} fields and operate on corresponding urb fields directly. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76usb: use usb_dev private dataStanislaw Gruszka
Setup usb device private data. This allows to remove mt76u_buf->dev and simplify some routines as no longer we need to get usb device through usb interface. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>