- 01 5月, 2019 40 次提交
-
-
由 Felix Fietkau 提交于
q->tail can be safely updated without locking, because there is no concurrent access. If called from outside of the tasklet (for flushing), the tasklet is always disabled. q->queued can be safely read without locking, as long as the decrement happens within the locked section. This patch allows cleaning up tx packets outside of the section that holds the queue lock for improved performance Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Performance improvement and preparation for adding airtime fairness support Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
Switching to readl/writel is faster because it gets rid of an unnecessary wrapper with extra checks. Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Felix Fietkau 提交于
- tx power is stored in the channels after ieee80211_register_hw, so chan->orig_mpwr needs to be updated as well - for non-TSSI devices, mt76x2e needs to use a different target power value from the EEPROM - fix a rounding error in a few places (need to round up, not down) Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Move mt76_tx_free in mt76_free_device routine in order to unmap all txwi descriptors at module unload Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Since now only mt76u_get_next_rx_entry use queue argument move it to this function. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Alloc sg table at the end of urb structure. This will increase cache usage. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
We already allocate with GFP_ZERO and sg marker is set later for both RX and TX. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Add new rx_urb_alloc routine and reuse common urb_alloc for tx allocations. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Get the RX queue inside mt76u_refill_rx. This will allow to reuse mt76u_urb_alloc for TX allocations. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Put urb pointer in mt76_queue_entry directly instead of mt76u_buf structure. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw 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: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Remove mt76u_buf->{len, buf} fields and operate on corresponding urb fields directly. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw 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: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
We do not need to pass len and sglen to the function. Additionally pass gfp to control allocation context. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
We can not run mt76u_alloc_buf() concurently, rx_tasklet is stooped when mt76u_submit_rx_buffers(). We can remove rx_page_lock. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Remove unnecessery arguments and change the function name since is now used only for RX. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Enable AP mode. For now without multi-vif support, this will require more testing and investigation. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
All mt76 drivers (now also USB drivers) require empty .set_tim callback. Add it to common mt76 module and use on all drivers. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Create software MT_TXQ_PSD queue for USB and map it to MT_TXQ_VO since we do not have USB endpoint for PSD. This should make mt76_release_buffered_frames() work by sending released frames via MT_TXQ_VO. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Since we sent PS buffered frames via beacon memory we need to make beacon slots bigger. That imply we will also need to decrease number of slots as beacon SRAM memory is limited to 8kB. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Program beacons data and PS buffered frames on TBTT work for USB. We do not have MT_TXQ_PSD queue available via USB endpoints. The way we can send PS broadcast frames in timely manner before PS stations go sleep again is program them in beacon data area. Hardware do not modify those frames since TXWI is properly configured. mt76x02_mac_set_beacon() already handle this and free no longer used frames. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
This is required to sent multicast/broadcast frames in USB AP mode just after beacon. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Add sta_ps callback but dont set WCID drop sicne registers for USB can not be accessed from tasklet context. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Move some TBTT mmio functions to mt76x02_beacon.c and create new ones in order to be reused by USB pre-TBTT. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Add implementation of beacon_ops for USB and exit function to stop the timer if running when device is removed. Still no actual work on pre tbtt event. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Enabling/disableing TBTT and beacon will be diffrent for USB. Introduce beacon_ops to encapsulate that and implement it for MMIO. USB implementation is noop for now. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Add timer and work for pre TBTT for USB devices. For now code doesn't do anyting useful, just add hrtimer which synchronize with hardware MT_TBTT_TIMER. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Stanislaw Gruszka 提交于
Move most of beaconing code into separate file and separate beacon initialization for USB and MMIO as pre TBTT implementation for USB will be different. Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Improve code readability reducing code indentation in mt76u_alloc_tx Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Use register definitions instead of magic numbers in mt7603_reg_map Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Remove mt7603_mcu_init since mcu.mutex has been already initialized in mt76_mmio_init. Run mt7603_load_firmware directly in mt7603_init_hardware Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
As already done for mt76_dma_tx_queue_skb_raw, add static qualifier to mt76_dma_tx_queue_skb and introduce mt76_tx_queue_skb in order to run mt76_dma_tx_queue_skb in driver code Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Add mt76_tx_info as auxiliary data structure to pass values to tx_prepare_skb pointer. This is a preliminary patch to add support for new chipsets (e.g. mt7615) Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Move skb dma mapping before configuring txwi since new chipsets (mt7615) will need skb dma addresses in order to properly configure txwi Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Introduce tx_aligned4_skbs in mt76_driver_ops and move mt76_insert_hdr_pad in mt76_dma_tx_queue_skb. This is a preliminary patch in order to unify tx dma mapping for mt76x02 and new chipsets Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Move mt76x02_insert_hdr_pad in m76-core and rename it in mt76_insert_hdr_pad in order to be used in mt76_dma_tx_queue_skb. This is a preliminary patch in order to properly support tx dma mapping for new chipsets (e.g. mt7615) Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Add mt76_txq_id field to mt76_queue_entry in order to properly track outstanding frames for mt7615 that relies on a single hw queue Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Introduce mt76_sw_queue data structure in order to support new chipsets (e.g. mt7615) that have a shared hardware queue for all traffic identifiers. mt76_sw_queue will be used to track outstanding packets Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-
由 Lorenzo Bianconi 提交于
Remove mt76_queue dependency from tx_complete_skb function pointer and rely on mt76_tx_qid instead. Remove flush from tx_complete_skb signature. This is a preliminary patch to introduce mt76_sw_queue support Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: NFelix Fietkau <nbd@nbd.name>
-